/* ============================================================
   earbudsunder1000.online — design tokens
   Palette: warm off-white base, deep teal (sound) + marigold (price/deal)
   Type: Space Grotesk (display) / Inter (body) / JetBrains Mono (specs/data)
   Signature: waveform progress bar used across the Finder flow
   ============================================================ */

:root {
  --bg: #F7F7F4;
  --surface: #FFFFFF;
  --surface-sunken: #EFEEE9;
  --ink: #14171A;
  --ink-soft: #565C61;
  --line: #E1DFD8;

  --teal: #0E7C7B;
  --teal-dark: #0A5C5B;
  --teal-tint: #E3F2F1;

  --marigold: #F2A93B;
  --marigold-dark: #C6841F;

  --good: #2F9E44;
  --bad: #D64545;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --font-display: "Space Grotesk", "Arial Narrow", sans-serif;
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --shadow-card: 0 1px 2px rgba(20,23,26,0.04), 0 6px 20px rgba(20,23,26,0.06);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.1;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}
p { margin: 0 0 1em; color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 24px;
  border-radius: var(--radius-m);
  border: none;
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
  min-height: 48px;
}
.btn:active { transform: scale(0.98); }
.btn-primary { background: var(--teal); color: #fff; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-accent { background: var(--marigold); color: #221600; }
.btn-accent:hover { background: var(--marigold-dark); }
.btn-ghost { background: transparent; color: var(--teal); border: 1.5px solid var(--teal); }
.btn-block { width: 100%; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247,247,244,0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  display: flex;
  align-items: center;
  gap: 8px;
}
.logo .eq { display: inline-flex; gap: 2px; align-items: flex-end; height: 16px; }
.logo .eq i { width: 3px; background: var(--teal); border-radius: 2px; display: block; }
nav.main-nav { display: none; gap: 24px; font-weight: 600; font-size: 0.92rem; }
nav.main-nav a:hover { color: var(--teal); }
@media (min-width: 760px) {
  nav.main-nav { display: flex; }
}

/* ---------- hero ---------- */
.hero {
  padding: 56px 0 40px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 6vw, 3.2rem);
}
.hero .accent { color: var(--teal); }
.hero p.lead {
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto 28px;
}
.hero-cta { margin-bottom: 12px; }
.hero-note { font-size: 0.85rem; color: var(--ink-soft); }

/* signature waveform decoration */
.waveform-deco {
  display: flex;
  gap: 5px;
  justify-content: center;
  align-items: flex-end;
  height: 56px;
  margin: 28px 0 8px;
}
.waveform-deco span {
  width: 6px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--teal), var(--teal-tint));
  animation: bounce 1.6s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .waveform-deco span { animation: none; }
}
@keyframes bounce {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* ---------- sections ---------- */
section { padding: 48px 0; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 32px; }
.eyebrow {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--teal-dark);
  display: block;
  margin-bottom: 8px;
}

.grid-3 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.step-card .step-num {
  font-family: var(--font-mono);
  color: var(--teal);
  font-size: 0.85rem;
  margin-bottom: 8px;
  display: block;
}

/* chips */
.chip-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.chip {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 18px;
  font-weight: 600;
  font-size: 0.9rem;
}
.chip:hover { border-color: var(--teal); color: var(--teal-dark); }

/* product card (featured / results) */
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.product-card .thumb {
  background: var(--surface-sunken);
  border-radius: var(--radius-m);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}
.thumb-icon { width: 40%; max-width: 72px; color: var(--teal); opacity: 0.55; }
.thumb-icon svg { width: 100%; height: 100%; display: block; }

.data-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.data-badge.verified { background: #E3F4E5; color: var(--good); }
.data-badge.sample { background: #FFF4E0; color: #8A6215; }

/* ============================================================
   SHARE BAR
   ============================================================ */
.share-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 18px 0;
}
.share-label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink);
  transition: border-color .15s ease, background .15s ease;
}
.share-btn:hover { border-color: var(--teal); color: var(--teal-dark); }
.share-btn.whatsapp:hover { border-color: #25D366; color: #128C4A; background: #EAFBF1; }
.share-btn.native { background: var(--teal); color: #fff; border-color: var(--teal); }
.share-btn.native:hover { background: var(--teal-dark); }
.share-btn .icon { width: 16px; height: 16px; flex-shrink: 0; }
.share-btn .icon svg { width: 100%; height: 100%; display: block; }

/* ============================================================
   SITE SEARCH
   ============================================================ */
.search-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
}
.search-trigger:hover { border-color: var(--teal); color: var(--teal-dark); }
.search-trigger-label { display: none; }
@media (min-width: 760px) { .search-trigger-label { display: inline; } }

.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,23,26,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 10vh 20px 20px;
}
.search-panel {
  background: var(--surface);
  border-radius: var(--radius-l);
  width: 100%;
  max-width: 560px;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
}
.search-input-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}
.search-input-row input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 1rem;
  font-family: var(--font-body);
  background: transparent;
  color: var(--ink);
}
.search-input-row button {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--ink-soft);
  font-size: 1.1rem;
  padding: 4px;
}
.search-results { overflow-y: auto; padding: 8px; }
.search-group { margin-bottom: 8px; }
.search-group-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  padding: 8px 10px 4px;
}
.search-result {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-s);
  color: var(--ink);
}
.search-result:hover { background: var(--teal-tint); }
.search-result-title { font-weight: 600; font-size: 0.92rem; }
.search-result-meta { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink-soft); flex-shrink: 0; }
.search-hint { padding: 16px; color: var(--ink-soft); font-size: 0.9rem; text-align: center; }

/* ============================================================
   LOADING SKELETONS
   ============================================================ */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}
.skeleton-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  padding: 20px;
  box-shadow: var(--shadow-card);
}
.skeleton-block {
  background: var(--surface-sunken);
  border-radius: var(--radius-s);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-card .skeleton-thumb { height: 110px; border-radius: var(--radius-m); margin-bottom: 12px; }
.skeleton-card .skeleton-line { height: 12px; margin-bottom: 8px; width: 100%; }
.skeleton-card .skeleton-line.short { width: 60%; }
.skeleton-card .skeleton-line.price { width: 40%; height: 18px; margin-top: 12px; }

/* ============================================================
   COMMENTS (Giscus)
   ============================================================ */
.comments-section {
  margin: 40px 0 20px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.comments-section h2 { font-size: 1.2rem; margin-bottom: 16px; }
.giscus-frame { min-height: 80px; }

/* ============================================================
   REVIEWS
   ============================================================ */
.rating-trigger {
  display: block;
  width: fit-content;
  background: none;
  border: none;
  padding: 2px 0;
  margin: 2px 0 4px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--marigold-dark);
  cursor: pointer;
}
.rating-trigger:hover { text-decoration: underline; }
.rating-trigger.has-rating { color: var(--ink); }

.reviews-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20,23,26,0.5);
  z-index: 200;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 6vh 20px 20px;
  overflow-y: auto;
}
.reviews-panel {
  background: var(--surface);
  border-radius: var(--radius-l);
  width: 100%;
  max-width: 520px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.25);
  margin-bottom: 20px;
}
.reviews-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 20px 14px;
  border-bottom: 1px solid var(--line);
}
.reviews-header h3 { margin: 0 0 4px; font-size: 1.05rem; }
.reviews-header button { background: none; border: none; cursor: pointer; font-size: 1.1rem; color: var(--ink-soft); }
.reviews-body { padding: 16px 20px; }
.review-item { padding: 12px 0; border-bottom: 1px solid var(--line); }
.review-item:last-child { border-bottom: none; }
.review-item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.review-item-name { font-weight: 700; font-size: 0.9rem; }
.review-item-stars { color: var(--marigold-dark); font-size: 0.85rem; }
.review-item-text { font-size: 0.9rem; color: var(--ink-soft); margin: 0; }
.review-item-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--ink-soft); }

.review-form { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.review-form h4 { font-size: 0.95rem; margin-bottom: 12px; }
.star-picker { display: flex; gap: 4px; margin-bottom: 12px; }
.star-picker button { background: none; border: none; font-size: 1.6rem; cursor: pointer; color: var(--line); padding: 0; line-height: 1; }
.star-picker button.active, .star-picker button:hover { color: var(--marigold); }
.review-form input, .review-form textarea {
  width: 100%; padding: 10px; border-radius: var(--radius-s); border: 1px solid var(--line);
  font-family: var(--font-body); font-size: 0.9rem; margin-bottom: 10px; background: var(--surface);
}
.review-form textarea { min-height: 80px; resize: vertical; }
.review-form-note { font-size: 0.8rem; color: var(--ink-soft); margin-top: 8px; }
.product-card h3 { font-size: 1.05rem; margin-bottom: 2px; }
.brand-tag { font-family: var(--font-mono); font-size: 0.75rem; color: var(--ink-soft); }
.price-row { display: flex; align-items: baseline; gap: 8px; }
.price-now { font-family: var(--font-mono); font-weight: 700; font-size: 1.15rem; }
.price-was { font-family: var(--font-mono); font-size: 0.85rem; color: var(--ink-soft); text-decoration: line-through; }
.spec-row { display: flex; flex-wrap: wrap; gap: 6px; font-size: 0.75rem; font-family: var(--font-mono); color: var(--teal-dark); }
.spec-row span { background: var(--teal-tint); padding: 3px 8px; border-radius: 6px; }

/* FAQ */
details.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
details.faq-item summary {
  cursor: pointer;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
  display: flex;
  justify-content: space-between;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; color: var(--teal); font-size: 1.2rem; }
details.faq-item[open] summary::after { content: "\2212"; }
details.faq-item p { margin-top: 10px; }

/* footer */
footer.site-footer {
  border-top: 1px solid var(--line);
  padding: 40px 0 28px;
  margin-top: 40px;
}
footer.site-footer .foot-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: 1fr;
}
@media (min-width: 700px) {
  footer.site-footer .foot-grid { grid-template-columns: 2fr repeat(3, 1fr); }
}
footer.site-footer h4 { font-size: 0.85rem; margin-bottom: 10px; }
footer.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
footer.site-footer a { color: var(--ink-soft); font-size: 0.88rem; }
footer.site-footer a:hover { color: var(--teal); }
.foot-bottom {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--ink-soft);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}

/* ============================================================
   FINDER (quiz) — mobile-first, one question per screen
   ============================================================ */
.finder-shell {
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 20px 60px;
  min-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
}

/* signature: waveform progress bar */
.wf-progress {
  display: flex;
  gap: 4px;
  align-items: flex-end;
  height: 28px;
  margin-bottom: 24px;
}
.wf-progress .bar {
  flex: 1;
  border-radius: 3px;
  background: var(--surface-sunken);
  transition: background .25s ease, transform .25s ease;
}
.wf-progress .bar.done { background: var(--teal); }
.wf-progress .bar.current { background: var(--marigold); }

.q-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.q-title { font-size: clamp(1.3rem, 5vw, 1.8rem); margin-bottom: 24px; }

.option-list {
  display: grid;
  gap: 12px;
  margin-bottom: 28px;
}
.option-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding: 18px 18px;
  background: var(--surface);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-m);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  min-height: 56px;
  transition: border-color .15s ease, background .15s ease;
}
.option-btn:hover { border-color: var(--teal); }
.option-btn.selected {
  border-color: var(--teal);
  background: var(--teal-tint);
  color: var(--teal-dark);
}
.option-emoji { font-size: 1.3rem; }

.finder-nav {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding-top: 12px;
}
.finder-nav .btn-ghost { flex: 0 0 auto; }

/* results */
.match-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--teal-tint);
  color: var(--teal-dark);
  font-family: var(--font-mono);
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.85rem;
  margin-bottom: 10px;
}
.rank-1 .match-badge { background: var(--marigold); color: #221600; }
.result-card { margin-bottom: 20px; }
.result-card .why { background: var(--teal-tint); border-radius: var(--radius-s); padding: 10px 14px; font-size: 0.9rem; color: var(--teal-dark); margin-bottom: 14px; }
.pros-cons { display: grid; gap: 16px; grid-template-columns: 1fr 1fr; margin: 14px 0; }
.pros-cons ul { margin: 0; padding-left: 18px; font-size: 0.88rem; }
.pros-cons h5 { margin: 0 0 6px; font-size: 0.8rem; font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .04em; }
.pros-cons .pros h5 { color: var(--good); }
.pros-cons .cons h5 { color: var(--bad); }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

.placeholder-banner {
  background: #FFF4E0;
  border: 1px solid var(--marigold);
  color: #6B4A0E;
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  margin: 0 0 20px;
  text-align: center;
}
.trust-banner {
  background: var(--teal-tint);
  border: 1px solid var(--teal);
  color: var(--teal-dark);
  font-size: 0.82rem;
  padding: 10px 16px;
  border-radius: var(--radius-s);
  margin: 0 0 20px;
  text-align: center;
}

/* ============================================================
   COMPARE page
   ============================================================ */
.compare-slots {
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr;
  margin-bottom: 32px;
}
@media (min-width: 700px) {
  .compare-slots { grid-template-columns: repeat(3, 1fr); }
}
.compare-slot {
  background: var(--surface);
  border: 1.5px dashed var(--line);
  border-radius: var(--radius-l);
  padding: 16px;
  min-height: 96px;
}
.compare-slot.filled { border-style: solid; border-color: var(--teal); }
.compare-slot select {
  width: 100%;
  padding: 12px;
  border-radius: var(--radius-s);
  border: 1px solid var(--line);
  font-family: var(--font-body);
  font-size: 0.95rem;
  background: var(--surface);
  min-height: 44px;
}
.compare-slot .slot-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}
.compare-slot .slot-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--ink-soft);
  text-transform: uppercase;
}
.compare-slot .slot-remove {
  background: none;
  border: none;
  color: var(--bad);
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
}
.compare-slot .slot-summary h4 { margin: 4px 0 2px; font-size: 1rem; }
.compare-slot .slot-summary .price-now { font-size: 1rem; }

.compare-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
}
table.compare-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 560px;
}
table.compare-table th, table.compare-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  vertical-align: top;
}
table.compare-table thead th {
  font-family: var(--font-display);
  font-size: 1rem;
  background: var(--teal-tint);
  color: var(--teal-dark);
  position: sticky;
  top: 0;
}
table.compare-table tbody th {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: var(--surface-sunken);
  position: sticky;
  left: 0;
  white-space: nowrap;
}
table.compare-table td.yes { color: var(--good); font-weight: 700; }
table.compare-table td.no { color: var(--bad); font-weight: 700; }
table.compare-table tbody tr:last-child th,
table.compare-table tbody tr:last-child td { border-bottom: none; }
.compare-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink-soft);
}
