/* CitedIQ site stylesheet, dark data-product aesthetic.
   All color/type derive from brand tokens; scarce semantic cyan/amber only.
   Ref quality bar: Axiom (structure) · Linear (restraint) · Tinybird (mono data). */

@import "../brand/tokens/tokens.css";
@import "./fonts.css";

/* ---------- scale (spacing + radius + type) ---------- */
:root {
  --sp-1: 4px;  --sp-2: 8px;  --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px;
  --sp-9: 96px; --sp-10: 128px;
  --radius: 10px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --maxw: 1120px;
  --maxw-narrow: 760px;
  --header-h: 68px;

  --fs-eyebrow: 0.75rem;
  --fs-body: 1rem;
  --fs-lead: 1.125rem;
  --lh-body: 1.6;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
  color: var(--text);
}
h1 { font-size: clamp(2.125rem, 5.2vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: 1.1875rem; letter-spacing: -0.01em; }

p { margin: 0 0 var(--sp-4); color: var(--text); }
a { color: var(--cited); text-decoration: none; }
a:hover { text-decoration: underline; }

strong { font-weight: 600; }

img, svg { max-width: 100%; }

.muted { color: var(--text-muted); }
.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: 1.55; }

/* mono data face, every prompt, count, %, eyebrow, caption */
.mono, .eyebrow, .stat-num, .prompt, .price, .bar-val, .step-num, .count {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.eyebrow {
  display: inline-block;
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--sp-4);
  font-weight: 500;
}
.eyebrow.cited { color: var(--cited); }

/* ---------- layout ---------- */
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--sp-5); }
.narrow { max-width: var(--maxw-narrow); }
section { padding-block: var(--sp-9); }
section.tight { padding-block: var(--sp-7); }
.section-head { max-width: 720px; margin-bottom: var(--sp-7); }

.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 100;
  background: var(--cited); color: var(--bg); padding: var(--sp-3) var(--sp-4);
  border-radius: 0 0 var(--radius-sm) 0; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- focus ---------- */
:focus-visible {
  outline: 2px solid var(--cited);
  outline-offset: 2px;
  border-radius: 3px;
}

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; gap: var(--sp-5);
  min-height: var(--header-h);
}
.brand-lockup { display: inline-flex; align-items: center; }
.brand-lockup svg { height: 30px; width: auto; display: block; }
.nav { display: flex; align-items: center; gap: var(--sp-6); margin-left: auto; }
.nav-links { display: flex; gap: var(--sp-5); }
.nav-links a {
  color: var(--text-muted); font-size: 0.95rem; font-weight: 500;
  text-decoration: none;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-2);
  font-family: var(--font-body); font-weight: 600; font-size: 0.95rem;
  padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-sm);
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  transition: transform .12s ease, background-color .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--cited); color: #062430; }
.btn-primary:hover { background: color-mix(in srgb, var(--cited) 86%, white); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--cited); color: var(--cited); transform: translateY(-1px); }
.btn-lg { padding: var(--sp-4) var(--sp-6); font-size: 1rem; }
@media (prefers-reduced-motion: reduce) { .btn:hover { transform: none; } }

/* ---------- hero ---------- */
.hero { padding-top: var(--sp-8); padding-bottom: var(--sp-9); }
.hero-grid {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: var(--sp-8); align-items: center;
}
.hero h1 { margin-bottom: var(--sp-5); }
.hero .lead { margin-bottom: var(--sp-6); max-width: 42ch; }
.hero-cta { display: flex; gap: var(--sp-4); flex-wrap: wrap; }
.hero-cta .btn { white-space: normal; text-align: center; }

/* ---------- answer card (signature) ---------- */
.answer-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-5);
  box-shadow: 0 24px 60px -30px rgba(0,0,0,.7);
}
.answer-chrome {
  display: flex; align-items: center; gap: var(--sp-2);
  padding-bottom: var(--sp-4); margin-bottom: var(--sp-4);
  border-bottom: 1px solid var(--line);
}
.answer-chrome .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--line); }
.answer-chrome .url {
  margin-left: var(--sp-3); font-family: var(--font-mono); font-size: 0.78rem;
  color: var(--text-muted);
}
.prompt-line {
  font-family: var(--font-mono); font-size: 0.9rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4); margin-bottom: var(--sp-5);
  display: flex; align-items: baseline; gap: var(--sp-2); min-height: 44px;
}
.prompt-line .chev { color: var(--cited); flex: none; }
.prompt-line .typed { white-space: pre-wrap; word-break: break-word; min-width: 0; }
.caret {
  display: inline-block; width: 8px; height: 1.05em; translate: 0 2px;
  background: var(--cited); margin-left: 1px;
}
.answer-label {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-3);
}
.shortlist { display: flex; flex-direction: column; gap: var(--sp-3); }
.slot {
  display: flex; align-items: center; gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4); border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line);
}
.slot .rank { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); width: 1.5em; }
.slot .name { font-weight: 500; }
.slot .name.blur { filter: blur(4px); user-select: none; letter-spacing: .04em; }
.slot .tag {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.68rem;
  letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 999px;
}
.slot.competitor .tag { color: var(--invisible); border: 1px solid color-mix(in srgb, var(--invisible) 40%, transparent); }
.slot.won {
  background: color-mix(in srgb, var(--cited) 12%, var(--surface-2));
  border-color: color-mix(in srgb, var(--cited) 55%, transparent);
}
.slot.won .name { color: var(--cited); font-weight: 600; }
.slot.won .rank { color: var(--cited); }
.slot.won .tag { color: var(--bg); background: var(--cited); }

/* animated variant: rows hidden until JS/animation reveals them */
.answer-card.animated .slot { opacity: 0; transform: translateY(6px); }
.answer-card.animated.reveal-1 .slot:nth-child(1),
.answer-card.animated.reveal-2 .slot:nth-child(-n+2),
.answer-card.animated.reveal-3 .slot:nth-child(-n+3) {
  opacity: 1; transform: none;
  transition: opacity .4s ease, transform .4s ease;
}
@media (prefers-reduced-motion: reduce) {
  .answer-card.animated .slot { opacity: 1 !important; transform: none !important; }
  .caret { display: none; }
}

/* ---------- stat lines (the shift) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-5);
}
.stat-num { font-size: 2rem; color: var(--cited); font-weight: 500; display: block; margin-bottom: var(--sp-2); letter-spacing: -0.02em; }
.stat p { font-size: 0.95rem; margin-bottom: var(--sp-3); }
.stat .source { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); }

/* ---------- steps (how it works) ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5); }
.step {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: var(--sp-5);
}
.step-num { font-size: 0.75rem; letter-spacing: .1em; color: var(--text-muted); display: block; margin-bottom: var(--sp-3); }
.step h3 { margin-bottom: var(--sp-2); }
.step p { font-size: 0.95rem; margin-bottom: 0; color: var(--text-muted); }

/* ---------- exclusivity panel ---------- */
.exclusivity {
  background:
    radial-gradient(120% 140% at 85% 0%, color-mix(in srgb, var(--cited) 7%, transparent), transparent 60%),
    var(--surface);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.exclusivity h2 { max-width: 16ch; }
.exclusivity .lead { max-width: 60ch; }

/* ---------- offer stack ---------- */
.offer-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: var(--sp-7); align-items: start; }
.offer-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--sp-2); }
.offer-list li {
  display: flex; gap: var(--sp-4); align-items: baseline;
  padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
}
.offer-list li:last-child { border-bottom: 0; }
.offer-list .item-name { font-weight: 600; }
.offer-list .item-desc { color: var(--text-muted); font-size: 0.95rem; display: block; margin-top: 2px; }
.offer-list .item-val { margin-left: auto; font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); white-space: nowrap; }
.offer-list li.exclusive .item-name { color: var(--cited); }

.price-card {
  position: sticky; top: calc(var(--header-h) + var(--sp-4));
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-6);
}
.price { font-size: 1.6rem; color: var(--text); font-weight: 500; letter-spacing: -0.01em; }
.price .per { color: var(--text-muted); font-size: 0.9rem; }
.price-terms { color: var(--text-muted); font-size: 0.9rem; margin-top: var(--sp-2); }
.guarantee {
  margin-top: var(--sp-5); padding-top: var(--sp-5); border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.guarantee .eyebrow { color: var(--cited); }

/* ---------- proof / share-of-voice mini board ---------- */
.proof-grid { display: grid; grid-template-columns: 1fr 0.9fr; gap: var(--sp-7); align-items: center; }
.proof-frame {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden;
}
.proof-frame .answer-chrome { padding: var(--sp-4) var(--sp-5); margin: 0; }
.proof-media {
  aspect-ratio: 16 / 10; display: grid; place-items: center; text-align: center;
  background: var(--bg); color: var(--text-muted); padding: var(--sp-6);
  font-family: var(--font-mono); font-size: 0.8rem;
}
.proof-caption { font-family: var(--font-mono); font-size: 0.8rem; color: var(--text-muted); margin-top: var(--sp-4); }

.board { display: flex; flex-direction: column; gap: var(--sp-3); }
.board-title { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin-bottom: var(--sp-2); }
.bar-row { display: grid; grid-template-columns: 8em 1fr auto; align-items: center; gap: var(--sp-3); }
.bar-row .bar-label { font-size: 0.85rem; color: var(--text-muted); }
.bar-track { height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; border-radius: 999px; background: var(--bar-muted); }
.bar-fill.zero { background: var(--invisible); min-width: 3px; }
.bar-val { font-size: 0.78rem; color: var(--text-muted); min-width: 3.5em; text-align: right; }
.bar-row.you .bar-label { color: var(--invisible); }
.board-denom { font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-muted); margin-top: var(--sp-3); }

/* ---------- prompt chips (vertical pages) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: var(--sp-3); }
.chip {
  font-family: var(--font-mono); font-size: 0.85rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 999px; padding: var(--sp-2) var(--sp-4);
  display: inline-flex; align-items: center; gap: var(--sp-2);
  max-width: 100%;
}
.chip .chev { color: var(--cited); }

/* ---------- vertical cards ---------- */
.vcards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.vcard {
  display: block; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-6); color: var(--text);
  transition: border-color .15s ease, transform .15s ease;
}
.vcard:hover { border-color: var(--cited); transform: translateY(-2px); text-decoration: none; }
@media (prefers-reduced-motion: reduce) { .vcard:hover { transform: none; } }
.vcard h3 { margin-bottom: var(--sp-2); }
.vcard p { color: var(--text-muted); margin-bottom: var(--sp-4); }
.vcard .go { color: var(--cited); font-weight: 600; font-size: 0.9rem; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; }
.faq details {
  border-bottom: 1px solid var(--line); padding: var(--sp-4) 0;
}
.faq summary {
  cursor: pointer; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem;
  list-style: none; display: flex; justify-content: space-between; gap: var(--sp-4);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--cited); font-family: var(--font-mono); }
.faq details[open] summary::after { content: "\2013"; }
.faq details p { margin: var(--sp-3) 0 0; color: var(--text-muted); }

/* ---------- CTA band ---------- */
.cta-band {
  background:
    radial-gradient(90% 180% at 50% 0%, color-mix(in srgb, var(--cited) 8%, transparent), transparent 55%),
    var(--surface);
  border-top: 1px solid var(--line);
  text-align: center;
}
.cta-band h2 { max-width: 22ch; margin-inline: auto; }
.cta-band .btn { margin-top: var(--sp-5); }

/* ---------- audit page ---------- */
.paths { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-6); align-items: start; }
.path {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: var(--sp-6);
}
.path h2 { font-size: 1.4rem; }
.calendar-embed {
  width: 100%; min-height: 620px; border: 0; border-radius: var(--radius);
  background: var(--surface-2);
}
.calendar-fallback {
  display: grid; place-items: center; min-height: 620px; text-align: center;
  color: var(--text-muted); font-family: var(--font-mono); font-size: 0.85rem;
  border: 1px dashed var(--line); border-radius: var(--radius); padding: var(--sp-6);
}
.field { display: flex; flex-direction: column; gap: var(--sp-2); margin-bottom: var(--sp-4); }
.field label { font-size: 0.85rem; color: var(--text-muted); font-weight: 500; }
.field label .req { color: var(--text-muted); }
.field input, .field select {
  font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
}
.field input::placeholder { color: color-mix(in srgb, var(--text-muted) 70%, transparent); }
.field input:focus, .field select:focus { border-color: var(--cited); outline: none; }
.form-note { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-muted); margin-top: var(--sp-3); }
.audit-contains { margin-top: var(--sp-7); }
.audit-contains ul { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--sp-3); }
.audit-contains li { display: flex; gap: var(--sp-3); align-items: baseline; color: var(--text-muted); }
.audit-contains li::before { content: "\2013"; color: var(--cited); }

/* ---------- index-report shell ---------- */
.report-hero { text-align: center; max-width: 620px; margin-inline: auto; }
.inline-form { display: flex; gap: var(--sp-3); margin-top: var(--sp-6); flex-wrap: wrap; justify-content: center; }
.inline-form input {
  flex: 1 1 240px; font-family: var(--font-body); font-size: 1rem; color: var(--text);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: var(--sp-3) var(--sp-4);
}
.inline-form input:focus { border-color: var(--cited); outline: none; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg); padding-block: var(--sp-8); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--sp-6); }
.footer-about h3 { font-size: 1rem; margin-bottom: var(--sp-3); }
.footer-about p { color: var(--text-muted); font-size: 0.9rem; max-width: 46ch; }
.footer-col h4 { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--text-muted); margin: 0 0 var(--sp-3); font-weight: 500; }
.footer-col a, .footer-col span { display: block; color: var(--text-muted); font-size: 0.9rem; margin-bottom: var(--sp-2); }
.footer-col a:hover { color: var(--text); }
.footer-legal {
  margin-top: var(--sp-7); padding-top: var(--sp-5); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: var(--sp-4); flex-wrap: wrap;
  color: var(--text-muted); font-size: 0.82rem;
}
.footer-legal .mono { font-size: 0.78rem; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid, .offer-grid, .proof-grid, .paths { grid-template-columns: 1fr; gap: var(--sp-6); }
  .stat-row, .steps { grid-template-columns: 1fr; }
  .vcards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .price-card { position: static; }
  section { padding-block: var(--sp-8); }
}
@media (max-width: 560px) {
  .nav-links { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 6em 1fr auto; }
  .hero-cta .btn { flex: 1 1 100%; }
}
