/* ==========================================================================
   purpleDrop design-audit fixes (preview). Loaded LAST on every page.
   One type scale, 8px spacing tokens, one hero template support, header
   lockup sizing, storyboard static fallback on phones, stronger no-JS /
   reduced-motion failsafes. No copy, links, forms or scripts change here.
   ========================================================================== */
:root {
  /* type scale (px at 16px root): desktop / mobile */
  --fs-h1: 4rem;        --fs-h1-m: 2.5rem;      /* 64 / 40 */
  --fs-h2: 2.5rem;      --fs-h2-m: 1.875rem;    /* 40 / 30 */
  --fs-h3: 1.375rem;    --fs-h3-m: 1.25rem;     /* 22 / 20 */
  --fs-lede: 1.15rem;                            /* 18.4   */
  --fs-body: 1.0625rem;                          /* 17     */
  --fs-small: .9375rem;                          /* 15     */
  --fs-fine: .8125rem;                           /* 13     */
  /* spacing tokens (8px base): standard / compact, desktop / mobile */
  --pad-std: 6rem;      --pad-std-m: 4rem;       /* 96 / 64 */
  --pad-compact: 4rem;  --pad-compact-m: 3rem;   /* 64 / 48 */
}

/* ---------- one type scale ---------- */
body { font-size: var(--fs-body); }

h1, .has-ill h1, .has-ill > .reveal h1 {
  font-size: var(--fs-h1); line-height: 1.05; letter-spacing: -0.03em;
}
h2, .stage h2 {
  font-size: var(--fs-h2); line-height: 1.08; letter-spacing: -0.02em;
}
h3, .faq-item h3, .fold-t {
  font-size: var(--fs-h3); line-height: 1.2;
}
.lede, .hero-side .hero-sub, .hero-sub { font-size: var(--fs-lede); }
.callout { font-size: var(--fs-lede); }

.small, .trust-line, .site-footer h3, .site-footer a, .footer-brand p,
.field label, .choice, .chooser-label, .fold-s, .prompt-text, .chat-missing {
  font-size: var(--fs-small);
}
.eyebrow { font-size: var(--fs-small); }
.chat-q strong, .chat-a .ai-label, .prompt-box-label, .match-tag { font-size: var(--fs-fine); letter-spacing: .06em; }
.ai-caption, .ai-panel-head, figcaption, .sample-review figcaption,
.footer-base, .footer-base a, .footer-loc, .field .hint, .card .meta { font-size: var(--fs-fine); }
.chat-q, .chat-a { font-size: var(--fs-small); }

@media (max-width: 48rem) {
  h1, .has-ill h1, .has-ill > .reveal h1 { font-size: var(--fs-h1-m); }
  h2, .stage h2 { font-size: var(--fs-h2-m); }
  h3, .faq-item h3, .fold-t { font-size: var(--fs-h3-m); }
}

/* legal pages: quieter headings */
body.legal h1 { font-size: 2.75rem; }          /* 44, within 40-48 */
body.legal h2 { font-size: 1.5rem; }           /* 24, within 22-24 */
@media (max-width: 48rem) {
  body.legal h1 { font-size: 2.5rem; }         /* 40 */
  body.legal h2 { font-size: 1.375rem; }       /* 22 */
}

/* decorative oversized elements stay outside the scale */
.faq-word, .footer-wordmark, .by-design { /* unchanged */ }

/* ---------- one button style: 16px / 600 / 48px tall / one padding ---------- */
.btn, .header-cta .btn, .mobile-menu a.cta {
  font-size: 1rem; font-weight: 600;
  min-height: 3rem; padding: .8rem 1.6rem;
  display: inline-flex; align-items: center; justify-content: center;
}
.mobile-cta {
  font-size: 1rem; font-weight: 600;
  min-height: 3rem; padding: .8rem 1.25rem;
  display: flex; align-items: center; justify-content: center;
}
@media (min-width: 64rem) { .mobile-cta { display: none; } }

/* header pill looks identical on every page, including the one it points to */
.header-cta .btn[aria-current="page"] { box-shadow: none; }

/* has-ill heroes: on a phone the illustration follows the words, never leads them */
@media (max-width: 47.99rem) {
  .has-ill > .reveal { display: flex; flex-direction: column; }
  .has-ill > .reveal > .ill-float { order: 1; margin: 1.25rem auto 0; }
}

/* ---------- header lockup: 34px mark, 26px wordmark, 10.5px tagline ---------- */
.header-inner { height: 4.5rem; }              /* 72px header */
.brand svg { width: 34px; height: 34px; }
.brand-name { font-size: 1.625rem; }           /* 26 */
.brand-tag { font-size: .65625rem; letter-spacing: .18em; } /* 10.5, tighter tracking */

/* ---------- 8px spacing tokens ---------- */
.section { padding: var(--pad-std) 0; }
.hero { padding: var(--pad-std) 0; }
.section-dark { padding: var(--pad-std) 0 !important; }
.section.fold-section { padding: var(--pad-compact) 0; }
.fold > section.section { padding-top: 1.5rem; padding-bottom: 2.5rem; }
@media (max-width: 48rem) {
  .section { padding: var(--pad-std-m) 0; }
  .hero { padding: var(--pad-std-m) 0; }
  .section-dark { padding: var(--pad-std-m) 0 !important; }
  .section.fold-section { padding: var(--pad-compact-m) 0; }
}

/* ---------- footer: capped near 400px, watermark clipped near 120px ---------- */
.site-footer { padding: 2rem 0 1rem; }
.footer-grid { gap: 2rem; }
.footer-base { margin-top: 1.5rem; padding-top: 1rem; }
.footer-wordmark {
  font-size: clamp(4rem, 10.5vw, 9.5rem);      /* layout band ~0.8x font-size ≈ 120px */
  margin-top: 1.5rem;
}

/* ---------- storyboard: static stacked list on phones (the blank-gap fix) ---------- */
@media (max-width: 47.5rem) {                  /* ~760px */
  .story::before, .story::after { display: none; }
  .story { margin-inline: 0; }
  .story .stage, .js .story .stage.reveal {
    display: block;
    opacity: 1 !important; transform: none !important; transition: none !important;
    padding: 1.5rem 0; margin-bottom: 0; background: none;
  }
  .story .stage .stage-num { display: none; }
  .story .stage-ill { margin-top: 1rem; }
}

/* ---------- sticky call bar: reader-first on phones ----------
   Hidden while scrolling down or at rest; returns on scroll-up away from the
   top; always steps aside near the CTA band / footer. Footer keeps clearance. */
@media (max-width: 63.99rem) {
  body.has-mobile-cta .site-footer { padding-bottom: 7rem; } /* 48px bar + clearance */
}
.mobile-cta { transition: transform .25s ease; }
html.bar-down .mobile-cta, html.cta-hide .mobile-cta { transform: translateY(140%) !important; transition: transform .25s ease; }

/* ---------- ai-trend block on phones: no floating decor, tighter lead-in ---------- */
@media (max-width: 47.99rem) {
  #ai-trend .hero-visual { margin-top: 1.5rem !important; }
  #ai-trend .hero-art { display: none; }      /* radar rings: pure decoration */
  #ai-trend .hero-badge { display: none; }    /* floating drop overlapped the card corner */
}

/* ---------- path cards: meta rows align across the row ---------- */
@media (min-width: 48rem) {
  .grid-3 .path-card { display: flex; flex-direction: column; }
  .grid-3 .path-card > .meta { margin-top: auto; }
}

/* ---------- failsafes: content is never invisible ---------- */
html:not(.js) .reveal,
html:not(.js) .sc-wi,
html:not(.js) .ai-panel--assemble .chat-q,
html:not(.js) .ai-panel--assemble .chat-a > p,
html:not(.js) .ai-panel--assemble .chat-a ol li,
html:not(.js) .ai-panel--assemble .ai-caption {
  opacity: 1 !important; transform: none !important;
}
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .stage,
  html.sc-on .sc-wi,
  html.sc-on .ai-panel--assemble .chat-q,
  html.sc-on .ai-panel--assemble .chat-a > p,
  html.sc-on .ai-panel--assemble .chat-a ol li,
  html.sc-on .ai-panel--assemble .ai-caption {
    opacity: 1 !important; transform: none !important; transition: none !important;
  }
  .story { --story-p: 1 !important; }
}
