/* ============================================================================
   Jay waitlist landing page

   Register locked 2026-07-27 after an A/B prototype: the restrained, product-forward
   structure (bento grids, hairline borders, minimal shadow, one typeface, terracotta as a
   single accent) carrying three warm moves across — the cream base, the hero landscape
   band, and Pip at the narrative beats.

   Colour values are lifted verbatim from app/src/theme.ts so the page and the app cannot
   drift. Do not hand-pick new colours here; add them to the app's theme first.
   ========================================================================== */

/* ------------------------------------------------------------------- fonts */
/* Self-hosted. No external font request — it would be a render-blocking third-party
   round trip on a page with a Lighthouse >=90 budget. */
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/HankenGrotesk_500Medium.00851975.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/HankenGrotesk_600SemiBold.2e44cdbb.woff2') format('woff2');
  font-weight: 600; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Hanken Grotesk';
  src: url('assets/fonts/HankenGrotesk_700Bold.42fb38e3.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ------------------------------------------------------------------ tokens */
:root {
  /* Brand — app/src/theme.ts */
  --cream: #F8F4EC;
  --cream-deep: #F0E9DC;
  --card: #FFFDF9;
  --sage: #EBEFE6;
  --ink: #0F1D3A;
  --ink-soft: #4A6B8A;
  --accent: #AF4630;          /* terracotta — AA as text and as a fill */
  --gold: #EBB823;            /* fills and borders only, never text */
  --gold-ink: #8A6200;        /* gold-family text */
  --border: #E7DDCC;
  --hair: #EFE8DA;

  /* Journey / document category tones — app DOCUMENT_CATEGORY_DETAILS + JOURNEY_CATEGORY_TONES */
  --tone-assessment: #7C8869;
  --tone-therapy: #E2725B;
  --tone-school: #C7922C;
  --tone-medication: #EBB823;
  --tone-ndis: #7A72B8;
  --tone-medical: #7A853B;

  --font: 'Hanken Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Motion tokens are published by motion/tokens.js at boot; these are the pre-JS fallbacks
     so a stylesheet-only render still animates correctly. */
  --dur-micro: 150ms;
  --dur-base: 300ms;
  --dur-entrance: 350ms;
  --dur-scrub: 80ms;
  --dur-marquee: 26000ms;
  --ease-standard: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-entrance: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-expressive: cubic-bezier(0.16, 1, 0.3, 1);
  --scrub-rest-opacity: 0.18;

  --gutter: 32px;
  --radius-card: 18px;
  --radius-control: 10px;

  interpolate-size: allow-keywords; /* lets <details> animate to height:auto natively */
}

/* -------------------------------------------------------------------- base */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font);
  font-weight: 500;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.modal-open { overflow: hidden; }

h1, h2, h3 { font-weight: 700; line-height: 1.08; letter-spacing: -0.03em; margin: 0; }
p { margin: 0; }
img { max-width: 100%; height: auto; }
svg { display: block; }

.accent { color: var(--accent); }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.wrap.narrow { max-width: 820px; }
.center { text-align: center; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--ink); color: #fff; padding: 12px 18px;
  border-radius: var(--radius-control); text-decoration: none; font-weight: 600;
  transition: top var(--dur-micro) var(--ease-standard);
}
.skip-link:focus { top: 12px; }

:where(a, button, input, summary):focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.section-head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 46px); }
.lede { margin-top: 18px; font-size: 19px; color: var(--ink-soft); }

.sparkle { width: 11px; height: 11px; fill: var(--gold); display: inline-block; margin-right: 8px; }

/* ------------------------------------------------------------------ reveal */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition:
    opacity var(--dur-entrance) var(--ease-entrance) var(--reveal-delay, 0ms),
    transform var(--dur-entrance) var(--ease-entrance) var(--reveal-delay, 0ms);
}
[data-reveal].is-revealed { opacity: 1; transform: none; }

/* Hero elements use the reference's 250ms load ladder rather than the grid stagger. */
.hero-copy > [data-reveal]:nth-child(1) { --reveal-delay: 0ms; }
.hero-copy > [data-reveal]:nth-child(2) { --reveal-delay: 120ms; }
.hero-copy > [data-reveal]:nth-child(3) { --reveal-delay: 250ms; }
.hero-copy > [data-reveal]:nth-child(4) { --reveal-delay: 375ms; }
.hero-copy > [data-reveal]:nth-child(5) { --reveal-delay: 500ms; }
.hero-stage > [data-reveal] { --reveal-delay: 250ms; }
.hero-stage > .phone[data-reveal] { --reveal-delay: 150ms; }

/* ----------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 24px;
  border: 0; border-radius: var(--radius-control);
  background: none; color: inherit;
  font: inherit; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer;
  transition: transform var(--dur-micro) var(--ease-standard),
              background var(--dur-micro) var(--ease-standard);
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: #17294c; }
.btn-primary:active { transform: translateY(1px); }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: 15px; }
.btn-lg { min-height: 54px; padding: 0 30px; }
.btn-block { width: 100%; }
.btn-quiet {
  min-height: 44px; padding: 0 16px; font-size: 15px;
  border: 1px solid var(--border); background: var(--card); color: var(--ink-soft);
}
.btn-quiet:hover { color: var(--ink); border-color: var(--ink-soft); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* --------------------------------------------------------------------- nav */
.nav {
  position: fixed; inset: 0 0 auto; z-index: 100;
  background: color-mix(in srgb, var(--cream) 82%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-standard);
}
.nav.is-scrolled { border-bottom-color: var(--hair); }
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  padding: 11px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.brand {
  display: flex; align-items: center; gap: 8px;
  min-height: 44px; /* touch target */
  font-weight: 700; font-size: 22px; letter-spacing: -0.03em;
  color: var(--ink); text-decoration: none;
}
.brand-pip { width: 34px; height: 34px; object-fit: contain; object-position: top; }

/* The nav CTA is revealed only once the hero CTA has scrolled away, so the two never
   compete for the same decision. Matches the reference's `show-cta` behaviour. */
.nav-cta {
  opacity: 0; transform: translateY(-6px); pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-standard),
              transform var(--dur-base) var(--ease-standard);
}
.nav.is-scrolled .nav-cta { opacity: 1; transform: none; pointer-events: auto; }

/* -------------------------------------------------------------------- hero */
/* No horizontal padding on .hero itself — the landscape band must reach both edges. Padding
   lives on the copy and stage instead. */
.hero { position: relative; padding: 128px 0 0; text-align: center; }
.hero-copy { position: relative; z-index: 2; padding: 0 var(--gutter); }
.eyebrow {
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 22px;
}
.hero h1 { font-size: clamp(38px, 5.4vw, 66px); max-width: 17ch; margin: 0 auto; }
.hero .lede { max-width: 56ch; margin-left: auto; margin-right: auto; }
.hero-copy p:nth-child(4) { margin-top: 28px; }
.hero-note { margin-top: 14px; font-size: 15px; color: var(--ink-soft); }

.hero-stage {
  position: relative; z-index: 2;
  margin: 64px auto 0; max-width: 1180px; padding: 0 var(--gutter);
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 22px; align-items: end;
  text-align: left;
}

/* The warm move carried over from the illustrated variant: a landscape band anchoring the
   hero, masked so it emerges from the cream rather than butting against it. */
/* Clips the oversized landscape, which is deliberately wider than any viewport so it never
   reveals an edge. Without this the document scrolls sideways. */
.hero-scene { position: relative; z-index: 1; height: 300px; margin-top: -86px; pointer-events: none; overflow: hidden; }
/* --parallax-y is written by motion/parallax.js. Composing it here rather than letting JS set
   `transform` keeps the layout offsets (centring, Pip's position) intact. */
.hero-landscape {
  position: absolute; left: 50%; bottom: -10px;
  transform: translateX(-50%) translateY(var(--parallax-y, 0px));
  width: 1900px; max-width: none; height: 300px;
  object-fit: cover; object-position: 50% 88%;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 34%);
  mask-image: linear-gradient(180deg, transparent, #000 34%);
}
.hero-pip {
  position: absolute; left: 50%; bottom: 14px;
  width: 118px; height: auto;
  transform: translateX(-560px) translateY(var(--parallax-y, 0px));
  filter: drop-shadow(0 10px 16px rgba(122, 90, 60, 0.18));
}

/* flanking panels */
.stage-panel {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 20px;
  margin-bottom: 46px;
}
.panel-title {
  font-size: 11px; font-weight: 700; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-soft);
}
.panel-title-spaced { margin-top: 22px; }
.panel-row { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--hair); }
.panel-row:last-of-type { border-bottom: 0; }
.panel-row-text { display: flex; flex-direction: column; gap: 2px; }
.panel-row-text b { font-size: 14px; font-weight: 600; }
.panel-row-text i { font-style: normal; font-size: 12.5px; color: var(--ink-soft); }
.panel-quote {
  margin-top: 9px; padding: 10px 12px;
  background: var(--cream); border-radius: 9px;
  font-size: 13px; color: var(--ink-soft);
}
.panel-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.panel-grid span {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--cream); border-radius: 9px; padding: 10px 11px;
}
.panel-grid b { font-size: 12.5px; font-weight: 600; }
.panel-grid i { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }

.dot { width: 9px; height: 9px; border-radius: 50%; margin-top: 6px; flex: none; }
.tone-assessment { background: var(--tone-assessment); }
.tone-therapy { background: var(--tone-therapy); }
.tone-school { background: var(--tone-school); }
.tone-medication { background: var(--tone-medication); }
.tone-ndis { background: var(--tone-ndis); }
.tone-medical { background: var(--tone-medical); }

/* --------------------------------------------------- phone + app viewport */
.phone {
  width: 320px; background: var(--ink);
  border-radius: 40px; padding: 8px;
  box-shadow: 0 24px 60px rgba(15, 29, 58, 0.16);
}
.pv {
  background: #fff; border-radius: 33px;
  padding: 13px 14px 0; min-height: 588px;
  display: flex; flex-direction: column; overflow: hidden;
}
.pv-status { display: flex; justify-content: space-between; align-items: center; font-size: 12px; font-weight: 700; padding: 2px 6px 12px; }
.pv-status-icons { display: flex; gap: 4px; align-items: center; }
.pv-signal, .pv-wifi, .pv-batt { display: block; background: var(--ink); border-radius: 1px; }
.pv-signal { width: 14px; height: 9px; clip-path: polygon(0 70%, 25% 70%, 25% 100%, 0 100%, 0 70%, 37% 40%, 62% 40%, 62% 100%, 37% 100%, 37% 40%, 75% 0, 100% 0, 100% 100%, 75% 100%); }
.pv-wifi { width: 11px; height: 9px; border-radius: 50% 50% 0 0 / 90% 90% 0 0; }
.pv-batt { width: 18px; height: 9px; border-radius: 2px; }
.pv-eyebrow { font-size: 10px; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--ink-soft); }
.pv-title { font-size: 22px; margin-top: 3px; }
.pv-bubble { margin-top: 12px; padding: 11px 13px; border-radius: 14px; font-size: 13px; line-height: 1.45; }
.pv-bubble-user { background: var(--ink); color: #fff; margin-left: 40px; border-bottom-right-radius: 5px; }
.pv-bubble-jay { background: var(--cream); margin-right: 28px; border-bottom-left-radius: 5px; }
.pv-bubble-jay p + p { margin-top: 7px; }
.pv-cite { font-size: 11px; font-weight: 600; color: var(--accent); }
.pv-disclaimer { margin-top: auto; padding-top: 12px; font-size: 9.5px; line-height: 1.45; color: var(--ink-soft); }
.pv-composer {
  margin-top: 8px; display: flex; align-items: center; justify-content: space-between;
  background: var(--cream); border-radius: 12px; padding: 9px 9px 9px 14px;
  /* Reads as placeholder text but still clears AA on cream — #9AA9B8 did not. */
  font-size: 13px; color: var(--ink-soft);
}
.pv-send {
  width: 30px; height: 30px; border-radius: 8px; background: var(--accent);
  clip-path: polygon(0 0, 100% 50%, 0 100%, 22% 50%);
  transform: scale(0.62); transform-origin: center;
}
.pv-tabs {
  display: flex; justify-content: space-between;
  margin-top: 10px; padding: 11px 4px 12px;
  border-top: 1px solid var(--hair);
  font-size: 9px; font-weight: 600; color: var(--ink-soft);
}
.pv-tabs .is-active { color: var(--accent); }

/* ----------------------------------------------------- sticky scrub pitch */
/* The runway is deliberately taller than the sticky child; the surplus is the scroll
   distance the character scrub is mapped across. See PATINA_REFERENCE_AUDIT.md §2.3. */
/* No gap above: the landscape band's horizon is the boundary between hero and pitch, so any
   margin here would read as the illustration having been cut off. */
.pitch { position: relative; height: 240vh; }
.pitch-sticky {
  position: sticky; top: 0;
  height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 0 var(--gutter);
}
.pitch-inner { max-width: 900px; text-align: center; }
.pitch-sentence {
  font-size: clamp(30px, 5vw, 62px);
  letter-spacing: -0.035em; line-height: 1.12;
}
.scrub-word { display: inline-block; white-space: nowrap; }
.scrub-char { transition: opacity var(--dur-scrub) linear; }
.pitch-support,
.pitch-resolve {
  margin-top: 26px; font-size: 19px; color: var(--ink-soft);
  max-width: 62ch; margin-left: auto; margin-right: auto;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.pitch-resolve { color: var(--accent); font-weight: 600; }
.pitch-support.is-lit, .pitch-resolve.is-lit { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- picture */
.picture { padding: 130px 0; background: var(--cream-deep); }
.picture-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.picture-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 24px 22px 26px;
}
.picture-card h3 { font-size: 18px; }
.picture-card p { margin-top: 9px; font-size: 15px; color: var(--ink-soft); }

/* --------------------------------------------------------------- features */
.features { padding: 130px 0; }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 22px 22px 26px;
  display: flex; flex-direction: column;
  transition: transform var(--dur-base) var(--ease-standard),
              box-shadow var(--dur-base) var(--ease-standard);
}
@media (hover: hover) and (pointer: fine) {
  .feature-card:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(15, 29, 58, 0.07); }
}
.feature-demo {
  background: var(--cream); border-radius: 13px;
  /* Fixed, not min-height: the demos change content as they animate, and a fixed box means the
     card text below can never shift. It also gives the absolutely-positioned drill-in and article
     panels a definite height to fill. */
  padding: 16px; height: 232px; margin-bottom: 20px;
  overflow: hidden;
}
.kicker {
  font-size: 11px; font-weight: 700; letter-spacing: 0.13em;
  text-transform: uppercase; color: var(--gold-ink); margin-bottom: 8px;
}
.feature-card h3 { font-size: 20px; letter-spacing: -0.025em; }
.feature-card > p:last-child { margin-top: 8px; font-size: 15px; color: var(--ink-soft); }

/* demos */
.demo-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 12px; }
.demo-head b { font-size: 14px; }
.demo-head i { font-style: normal; font-size: 12px; color: var(--ink-soft); }

/* --- journey: the list is taller than its viewport and glides slowly through it --- */
.jrny-viewport { height: 152px; overflow: hidden; position: relative; }
/* Fade the lower edge so rows arrive rather than appearing at a hard cut. */
.jrny-viewport::after {
  content: ''; position: absolute; inset: auto 0 0 0; height: 30px; pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--cream));
}
.jrny {
  position: relative; padding-left: 2px;
  transition: transform 7000ms linear, opacity var(--dur-base) var(--ease-standard);
}
.demo-journey.is-resetting .jrny { opacity: 0; }
.jrny-rail { position: absolute; left: 4px; top: 10px; bottom: 10px; width: 1.5px; background: var(--border); }
.jrny-item { display: flex; gap: 12px; padding: 6px 0; }
.jrny-item .dot { margin-top: 5px; z-index: 1; box-shadow: 0 0 0 3px var(--cream); }
.jrny-text { display: flex; flex-direction: column; gap: 2px; }
.jrny-text b { font-size: 13px; font-weight: 600; }
.jrny-text i { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }
.tag {
  align-self: flex-start; margin-top: 3px;
  font-style: normal; font-size: 10px; font-weight: 700;
  padding: 2px 8px; border-radius: 999px;
  color: #fff;
}

/* --- documents: the grid recedes as a category opens over it --- */
.demo-documents { position: relative; }
.doc-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 9px;
  transition: opacity var(--dur-base) var(--ease-standard), transform var(--dur-base) var(--ease-standard);
}
.demo-documents.is-open .doc-grid { opacity: 0; transform: scale(0.97); }
.doc[data-doc-tile] { transition: transform var(--dur-micro) var(--ease-standard), box-shadow var(--dur-micro) var(--ease-standard); }
.doc.is-tapped { transform: scale(0.94); box-shadow: 0 0 0 2px var(--accent); }
.doc-detail {
  position: absolute; inset: 0; border-radius: 10px; border: 1px solid;
  padding: 12px; display: flex; flex-direction: column; gap: 7px;
  opacity: 0; transform: translateY(8px);
  transition: opacity var(--dur-base) var(--ease-entrance), transform var(--dur-base) var(--ease-entrance);
}
.demo-documents.is-open .doc-detail:not([hidden]) { opacity: 1; transform: none; }
.doc-detail[hidden] { display: none; }
.doc-detail-head { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.doc-back { width: 6px; height: 6px; border-left: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(45deg); opacity: 0.7; }
.doc-file {
  background: rgba(255,255,255,0.68); border-radius: 7px; padding: 7px 10px;
  font-size: 12px; font-weight: 600; color: var(--ink);
}
.doc {
  display: flex; flex-direction: column; gap: 2px;
  padding: 13px 12px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--card);
}
.doc b { font-size: 13.5px; font-weight: 600; }
.doc i { font-style: normal; font-size: 11.5px; color: var(--ink-soft); }
.doc-medical { background: #FBF0D8; border-color: #EAD7A9; }
.doc-assessment { background: #FCE1D2; border-color: #F4C7B2; }
.doc-therapy { background: #EDEDE8; border-color: #D8D8D1; }
.doc-school { background: #FDE3D8; border-color: #F5C7B9; }
.doc-medication { background: #FFF0C8; border-color: #F5D790; }
.doc-ndis { background: #ECE1DD; border-color: #DECBC6; }

/* --- ask: question arrives, Jay thinks, answer lands --- */
.demo-bubble { font-size: 12.5px; }
.demo-ask .pv-bubble-jay { background: var(--card); border: 1px solid var(--border); }
.demo-ask [data-ask-question],
.demo-ask [data-ask-answer] {
  transition: opacity var(--dur-base) var(--ease-entrance), transform var(--dur-base) var(--ease-entrance);
}
.demo-ask [data-ask-question].is-pending { opacity: 0; transform: translateY(6px); }
.demo-ask [data-ask-answer][hidden] { display: none; }
.typing { display: flex; gap: 4px; margin: 10px 28px 0 0; padding: 9px 12px; width: max-content; background: var(--card); border: 1px solid var(--border); border-radius: 14px; border-bottom-left-radius: 5px; }
.typing[hidden] { display: none; }
.typing i { width: 5px; height: 5px; border-radius: 50%; background: var(--ink-soft); opacity: 0.4; animation: typing-dot 1.1s ease-in-out infinite; }
.typing i:nth-child(2) { animation-delay: 0.15s; }
.typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing-dot { 0%, 60%, 100% { opacity: 0.28; transform: translateY(0); } 30% { opacity: 0.9; transform: translateY(-3px); } }

.chk { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 13px; border-bottom: 1px solid var(--border); }
.chk:last-child { border-bottom: 0; }
/* --- prepare: items tick themselves off, then a new one arrives --- */
.chk-mark {
  position: relative; width: 15px; height: 15px; border-radius: 50%;
  border: 1.5px solid var(--border); flex: none;
  transition: background var(--dur-base) var(--ease-standard), border-color var(--dur-base) var(--ease-standard);
}
.chk-mark::after {
  content: ''; position: absolute; left: 4px; top: 1.5px;
  width: 4px; height: 7px; border: solid #fff; border-width: 0 1.6px 1.6px 0;
  transform: rotate(45deg) scale(0); transform-origin: center;
  transition: transform var(--dur-base) var(--ease-entrance);
}
.chk.is-done .chk-mark { background: var(--accent); border-color: var(--accent); }
.chk.is-done .chk-mark::after { transform: rotate(45deg) scale(1); }
.chk { transition: color var(--dur-base) var(--ease-standard); }
.chk-new { opacity: 0; transform: translateY(8px); transition: opacity var(--dur-base) var(--ease-entrance), transform var(--dur-base) var(--ease-entrance); }
.chk-new[hidden] { display: none; }
.chk-new.is-in { opacity: 1; transform: none; }

/* --- discover: one lead opens into the thing behind it --- */
.demo-discover { position: relative; }
.lead { padding: 10px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; transition: transform var(--dur-micro) var(--ease-standard), opacity var(--dur-base) var(--ease-standard); }
.lead:last-child { border-bottom: 0; }
.lead.is-tapped { transform: scale(0.97); }
[data-discover-list] { transition: opacity var(--dur-base) var(--ease-standard); }
[data-discover-list].is-dimmed { opacity: 0.25; }
.article {
  position: absolute; inset: 0; background: var(--card);
  border: 1px solid var(--border); border-radius: 10px; padding: 13px;
  display: flex; flex-direction: column; gap: 5px;
  opacity: 0; transform: translateY(10px);
  transition: opacity var(--dur-base) var(--ease-entrance), transform var(--dur-base) var(--ease-entrance);
}
.article[hidden] { display: none; }
.article.is-in { opacity: 1; transform: none; }
.article-title { font-size: 14px; font-weight: 700; letter-spacing: -0.02em; }
.article-meta { font-size: 11.5px; color: var(--ink-soft); }
.article-line { font-size: 11.5px; line-height: 1.45; color: var(--ink-soft); }
.article-action { margin-top: auto; display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--accent); }
.article-tick { width: 12px; height: 12px; border-radius: 50%; background: var(--accent); position: relative; flex: none; }
.article-tick::after { content: ''; position: absolute; left: 3.5px; top: 1.5px; width: 3px; height: 6px; border: solid #fff; border-width: 0 1.4px 1.4px 0; transform: rotate(45deg); }
.lead b { font-size: 13.5px; font-weight: 600; }
.lead i { font-style: normal; font-size: 12px; color: var(--ink-soft); }

.prof { display: flex; gap: 12px; align-items: center; }
.prof-avatar {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: grid; place-items: center; font-weight: 700; font-size: 17px;
}
.prof-text { display: flex; flex-direction: column; }
.prof-text b { font-size: 15px; }
.prof-text i { font-style: normal; font-size: 12.5px; color: var(--ink-soft); }
/* --- profile: fills in piece by piece as Jay is used --- */
.demo-profile [data-prof-avatar],
.demo-profile [data-prof-name],
.demo-profile [data-prof-place],
.demo-profile [data-prof-pill] {
  opacity: 0; transform: translateY(5px);
  transition: opacity var(--dur-base) var(--ease-entrance), transform var(--dur-base) var(--ease-entrance);
}
.demo-profile [data-prof-avatar] { transform: scale(0.8); }
.demo-profile .is-in { opacity: 1 !important; transform: none !important; }
.pill-row { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 16px; min-height: 58px; }
.pill-row span {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 999px; padding: 5px 11px;
  font-size: 12px; font-weight: 600; color: var(--ink-soft);
}

/* ----------------------------------------------------------------- payoff */
.payoff { padding: 130px 0; background: var(--sage); overflow: hidden; }
.marquee { overflow: hidden; padding: 8px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; gap: 16px; width: max-content; animation: marquee-left var(--dur-marquee) linear infinite; }
.marquee-reverse .marquee-track { animation-name: marquee-right; animation-duration: calc(var(--dur-marquee) * 1.35); }
@media (hover: hover) and (pointer: fine) {
  .marquee:hover .marquee-track { animation-play-state: paused; }
}
.exchange {
  flex: none; width: 320px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 18px 20px;
}
.exchange-q { font-size: 15px; font-weight: 600; }
.exchange-a { margin-top: 8px; font-size: 14px; color: var(--ink-soft); }
@keyframes marquee-left { from { transform: translate3d(0,0,0); } to { transform: translate3d(-50%,0,0); } }
@keyframes marquee-right { from { transform: translate3d(-50%,0,0); } to { transform: translate3d(0,0,0); } }

/* ------------------------------------------------------------------ offer */
.offer { position: relative; padding: 130px 0; overflow: hidden; }
.offer-foliage { position: absolute; opacity: 0.6; pointer-events: none; width: 130px; height: auto; }
.offer-foliage-a { left: 2%; bottom: 60px; }
.offer-foliage-b { right: 2%; top: 90px; width: 116px; }
.offer-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
.offer-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius-card); padding: 28px 24px;
  display: flex; flex-direction: column;
}
.offer-card h3 { font-size: 19px; }
.offer-card > p:last-child { margin-top: 10px; font-size: 15px; color: var(--ink-soft); }
.offer-card.is-featured {
  border-color: var(--accent);
  box-shadow: 0 16px 40px rgba(175, 70, 48, 0.10);
}
.price { margin-top: 16px; font-size: 44px; font-weight: 700; letter-spacing: -0.045em; line-height: 1; }
.price s { font-size: 22px; font-weight: 600; color: var(--ink-soft); opacity: 0.6; margin-right: 8px; }
.price small { font-size: 15px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0; }
.price-note { margin-top: 10px; font-size: 14.5px; font-weight: 600; color: var(--accent); }
.offer-cta { text-align: center; margin-top: 44px; }

/* -------------------------------------------------------------------- faq */
.faq { padding: 0 0 130px; }
.faq h2 { font-size: clamp(28px, 3.6vw, 42px); text-align: center; margin-bottom: 44px; }
.faq-list { border-top: 1px solid var(--border); }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 4px; cursor: pointer; list-style: none;
  font-size: 18px; font-weight: 600;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-mark { position: relative; width: 15px; height: 15px; flex: none; }
.faq-mark::before, .faq-mark::after {
  content: ''; position: absolute; inset: 50% 0 auto 0;
  height: 1.5px; background: var(--accent);
  transition: transform var(--dur-base) var(--ease-standard);
}
.faq-mark::after { transform: rotate(90deg); }
.faq-item[open] .faq-mark::after { transform: rotate(0deg); }
.faq-answer { overflow: hidden; height: 0; transition: height var(--dur-base) var(--ease-standard); }
.faq-item[open] .faq-answer { height: auto; }
.faq-answer p { padding: 0 4px 24px; max-width: 68ch; color: var(--ink-soft); }

/* ------------------------------------------------------------ final + foot */
.final { position: relative; padding: 40px var(--gutter) 120px; }
.final-pip { width: 104px; height: auto; margin: 0 auto 26px; display: block; }
.final h2 { font-size: clamp(32px, 4.6vw, 58px); }
.final .lede { max-width: 46ch; margin-left: auto; margin-right: auto; }
.final p:nth-of-type(2) { margin-top: 30px; }

.foot { background: var(--cream-deep); padding: 54px var(--gutter); }
.foot-legal { font-size: 13.5px; color: var(--ink-soft); max-width: 66ch; margin: 0 auto; }
/* No opacity here — it drops --ink-soft below AA against the deep cream. */
.foot-copy { margin-top: 12px; font-size: 13px; color: var(--ink-soft); }

/* ------------------------------------------------------------------ modal */
.modal { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 20px; }
.modal[hidden] { display: none; }
.modal-scrim {
  position: absolute; inset: 0;
  background: rgba(15, 29, 58, 0.42); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity var(--dur-entrance) var(--ease-standard);
}
.modal.is-open .modal-scrim { opacity: 1; }
.modal-card {
  position: relative; z-index: 1;
  width: min(470px, 100%); max-height: calc(100dvh - 40px); overflow-y: auto;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 22px; padding: 34px 30px 30px; text-align: center;
  opacity: 0; transform: translateY(14px) scale(0.985);
  transition: opacity var(--dur-entrance) var(--ease-entrance),
              transform var(--dur-entrance) var(--ease-entrance);
}
.modal.is-open .modal-card { opacity: 1; transform: none; }
.modal-close {
  position: absolute; top: 12px; right: 12px;
  width: 46px; height: 46px; display: grid; place-items: center;
  border: 0; background: none; cursor: pointer; border-radius: 50%;
}
.modal-close svg { width: 17px; height: 17px; stroke: var(--ink-soft); stroke-width: 1.8; fill: none; stroke-linecap: round; }
.modal-close:hover svg { stroke: var(--ink); }
.modal-pip { width: 76px; height: auto; margin: 0 auto 14px; display: block; }
.modal-card h2 { font-size: 26px; }
.modal-lede { margin-top: 10px; font-size: 15.5px; color: var(--ink-soft); }

.waitlist-form { margin-top: 22px; text-align: left; }
.field { display: block; }
.field-label {
  display: block; font-size: 12px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 7px;
}
.field input {
  width: 100%; min-height: 52px; padding: 0 16px;
  border: 1px solid var(--border); border-radius: var(--radius-control);
  background: #fff; font: inherit; font-size: 16px; color: var(--ink);
}
.field input[aria-invalid='true'] { border-color: var(--accent); }
.field-error { margin-top: 9px; font-size: 14px; color: var(--accent); font-weight: 600; }
.waitlist-form .btn { margin-top: 16px; }
.modal-consent { margin-top: 12px; font-size: 13px; color: var(--ink-soft); text-align: center; }

/* Honeypot: removed from view and from the accessibility tree, but still a real focusable
   input so naive bots fill it. Not display:none — some bots skip those. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.35); border-top-color: #fff;
  display: none; animation: spin 700ms linear infinite;
}
.btn.is-loading .spinner { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }

.success-mark {
  width: 54px; height: 54px; margin: 0 auto 16px; border-radius: 50%;
  background: var(--sage); display: grid; place-items: center;
}
.success-mark svg { width: 26px; height: 26px; stroke: var(--tone-assessment); stroke-width: 2.2; fill: none; stroke-linecap: round; stroke-linejoin: round; }

.survey { margin-top: 24px; text-align: left; }
.survey fieldset { border: 0; padding: 0; margin: 0; }
.survey-prompt { font-size: 15px; font-weight: 600; padding: 0; }
.survey-optional { margin-top: 4px; font-size: 13px; color: var(--ink-soft); }
.survey-options { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; }
.survey-option {
  display: flex; align-items: center; gap: 10px;
  min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: var(--radius-control);
  font-size: 14.5px; cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease-standard);
}
.survey-option:hover { border-color: var(--ink-soft); }
.survey-option input { accent-color: var(--accent); width: 17px; height: 17px; }
.survey .btn { margin-top: 14px; }
.survey-thanks { margin-top: 18px; font-size: 15px; font-weight: 600; color: var(--tone-assessment); }
.share { margin-top: 26px; padding-top: 22px; border-top: 1px solid var(--hair); }
.share-label { font-size: 14px; color: var(--ink-soft); margin-bottom: 10px; }

/* ------------------------------------------------------------- responsive */
@media (max-width: 1080px) {
  .picture-grid { grid-template-columns: 1fr 1fr; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
  .hero-pip { transform: translateX(-420px); width: 100px; }
}

@media (max-width: 900px) {
  :root { --gutter: 20px; }
  .hero { padding-top: 104px; }
  .hero-stage { grid-template-columns: 1fr; justify-items: center; gap: 16px; }
  .stage-panel { margin-bottom: 0; width: 100%; max-width: 360px; order: 2; }
  .phone-hero { order: 1; }
  .hero-scene { height: 210px; margin-top: -50px; }
  .hero-landscape { height: 190px; width: 1200px; }
  .hero-pip { transform: translateX(-160px); width: 84px; bottom: 18px; }
  .offer-grid { grid-template-columns: 1fr; }
  .offer-foliage { display: none; }
  .picture, .features, .payoff, .offer { padding: 84px 0; }
  .faq { padding-bottom: 84px; }
  .section-head { margin-bottom: 38px; }
}

@media (max-width: 720px) {
  .picture-grid, .feature-grid { grid-template-columns: 1fr; }
  /* The sticky scrub is the page's signature moment, so it is preserved rather than
     flattened — only the runway shortens. See PATINA_REFERENCE_AUDIT.md §5. */
  .pitch { height: 210vh; }
  .exchange { width: 268px; }
  .modal-card { padding: 30px 22px 24px; }
}

@media (max-width: 520px) {
  .hero h1 { font-size: clamp(31px, 8.6vw, 40px); }
  .pitch-sentence { font-size: clamp(25px, 7.4vw, 34px); }
  .phone { width: min(300px, 92vw); }
  .doc-grid { grid-template-columns: 1fr; }
  .hero-pip { transform: translateX(-120px); width: 68px; }
}

/* Respect the iOS home indicator and notch. */
@supports (padding: max(0px)) {
  .foot { padding-bottom: max(54px, env(safe-area-inset-bottom)); }
  .modal { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}

/* --------------------------------------------------------- reduced motion */
/* Applied via the media query and via .motion-reduced, which JS also sets when motion
   setup fails. Content is never hidden behind an animation in either case. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* `transition: none` matters as much as the opacity here. A transition with a near-zero duration
   is still a *pending* transition for one frame, and during that frame the computed opacity is
   still the start value — i.e. the content is invisible. Removing the transition entirely means
   there is no frame in which reduced-motion content cannot be seen. */
.motion-reduced [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
.motion-reduced .scrub-char { opacity: 1 !important; transition: none !important; }
.motion-reduced .pitch-support,
.motion-reduced .pitch-resolve { opacity: 1 !important; transform: none !important; transition: none !important; }
.motion-reduced .nav-cta { opacity: 1; transform: none; pointer-events: auto; }
.motion-reduced .marquee-track { animation: none; transform: none; flex-wrap: wrap; width: 100%; justify-content: center; }
.motion-reduced .marquee { -webkit-mask-image: none; mask-image: none; }
.motion-reduced .marquee-reverse { display: none; }
.motion-reduced .jrny,
.motion-reduced .doc-grid, .motion-reduced .doc-detail,
.motion-reduced .article, .motion-reduced .chk-new,
.motion-reduced .demo-ask [data-ask-question], .motion-reduced .demo-ask [data-ask-answer],
.motion-reduced .demo-profile [data-prof-avatar], .motion-reduced .demo-profile [data-prof-name],
.motion-reduced .demo-profile [data-prof-place], .motion-reduced .demo-profile [data-prof-pill] {
  opacity: 1 !important; transform: none !important; transition: none !important;
}
.motion-reduced .typing i { animation: none; }
/* With the drill-in resolved open, the grid underneath must not show through it. */
.motion-reduced .demo-documents.is-open .doc-grid { opacity: 0; }
.motion-reduced .exchange { width: min(320px, 100%); }

/* Reduced motion collapses the scroll runway, so the section takes normal flow height
   instead of leaving two screens of dead scroll behind a static sentence. */
.motion-reduced .pitch,
.pitch.scrub-static { height: auto; }
.motion-reduced .pitch-sticky,
.pitch.scrub-static .pitch-sticky { position: static; height: auto; padding: 90px var(--gutter); }
