/* ---------------------------------------------------------------
   Firvo — shared styles.

   The app's tokens, unchanged. Paper cream ground, ink text, one plum
   accent kept under ~10% of any screen, and gold reserved entirely for
   the brain's "you" node — it appears nowhere else on this site either.

   Serif (Georgia) = the app speaking. Sans = everything operational.
   No frameworks, no build step, no external requests.
   --------------------------------------------------------------- */

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

:root {
  --cream: #F5F1E8;
  --ink: #211D1A;
  --plum: #4C2A3D;
  --line: #E0D8C8;
  --muted: #8A8071;
  /* The muted token darkened just enough to clear 4.5:1 on cream. Used wherever
     secondary text has to actually be read rather than merely sensed. */
  --muted-strong: #6E6558;
  --gold: #E8C87A;
  --brain-ground: #1B1712;
  --cream-on-dark: #F0E9DA;
  --paper-sent: #EDE7D8;

  --serif: Georgia, "Iowan Old Style", "Times New Roman", Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.375rem, 5vw, 3.5rem);
  --spring: cubic-bezier(.32, .72, 0, 1);

  /* The site commits to daylight. No dark swap — the paper is the brand. */
  color-scheme: light;
}

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

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  /* Belt and braces: nothing on this page may ever push the phone sideways. */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--plum); text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--cream);
  padding: 0.75rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

/* For labels that the layout says out loud but the screen doesn't need. */
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.wrap {
  width: min(100%, 74rem);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* --- Masthead ------------------------------------------------- */

.masthead {
  padding-block: clamp(1.5rem, 4vw, 2.5rem);
}

.wordmark {
  font-family: var(--serif);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  display: inline-block;
}
.wordmark:hover { text-decoration: none; }

/* --- Shared section furniture --------------------------------- */

section { padding-block: clamp(4.5rem, 12vw, 9rem); }

.rule { border-top: 1px solid var(--line); }

.kicker {
  font-family: var(--sans);
  font-size: 0.6875rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted-strong);
  margin: 0 0 clamp(1.25rem, 3vw, 2rem);
}

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.015em;
  margin: 0;
  text-wrap: balance;
}

/* --- Hero ----------------------------------------------------- */

.hero {
  padding-block: clamp(3rem, 9vw, 7rem) clamp(5rem, 13vw, 9rem);
}

.hero h1 {
  font-size: clamp(2.75rem, 8.6vw, 6rem);
  line-height: 1.02;
  letter-spacing: -0.028em;
  max-width: 16ch;
  margin: 0;
}

/* The mechanism, in one breath. Sans, because it explains rather than asks. */
.hero .mechanism {
  font-family: var(--sans);
  font-size: clamp(1.25rem, 3.3vw, 1.875rem);
  line-height: 1.35;
  color: var(--muted-strong);
  /* Wide enough to sit on one line on a laptop; balanced so a phone breaks it
     between the two sentences rather than orphaning "you." */
  max-width: 32ch;
  text-wrap: balance;
  margin: clamp(1.5rem, 3.5vw, 2.5rem) 0 0;
  letter-spacing: -0.01em;
}

.hero-actions {
  margin-top: clamp(2.5rem, 6vw, 4rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2rem);
}

.price-line {
  font-size: 0.9375rem;
  color: var(--muted-strong);
  margin: 0;
}
.price-line strong { font-weight: 600; color: var(--ink); }

/* The hero's one quiet action: a text link on purpose, never a button.
   The arm's-length thought stays the headline. */
.waitlist-jump {
  display: inline-block;
  margin-top: 0.5rem;
}

/* --- App Store badge placeholder ------------------------------
   Deliberately NOT an Apple badge. Dashed, labelled, obviously a stand-in. */

.badge-placeholder {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.9rem 1.4rem;
  border: 1px dashed var(--muted);
  border-radius: 10px;
  background: transparent;
  min-width: 15rem;
}
.badge-placeholder .tag {
  font-size: 0.625rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--plum);
  font-weight: 600;
}
.badge-placeholder .title {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}
.badge-placeholder .sub {
  font-size: 0.8125rem;
  color: var(--muted-strong);
}

/* --- Specimen: one question on paper -------------------------- */

.specimen-frame {
  border-top: 1px solid var(--line);
  padding-top: clamp(2rem, 5vw, 3rem);
  max-width: 44rem;
}

.specimen-q {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.2vw, 2.25rem);
  line-height: 1.34;
  margin: 0;
  letter-spacing: -0.012em;
}

.answer-line {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
  padding-bottom: 0.75rem;
  max-width: 32rem;
}
.answer-line .placeholder {
  flex: 1;
  color: var(--muted);
  font-size: 1.0625rem;
}
.answer-line .mic {
  width: 20px;
  height: 20px;
  flex: none;
  color: var(--ink);
  opacity: 0.6;
}

.specimen-note {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  font-size: 0.9375rem;
  color: var(--muted-strong);
  max-width: 30rem;
}

/* --- Brain band: the one place the lights go down -------------- */

.brain-band {
  background: var(--brain-ground);
  color: var(--cream-on-dark);
  /* Full-bleed, whatever the container above was doing. */
  padding-block: clamp(4.5rem, 12vw, 8.5rem);
}
.brain-band .kicker { color: rgba(240, 233, 218, 0.6); }
.brain-band h2 {
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.18;
  max-width: 18ch;
  color: var(--cream-on-dark);
}
.brain-band p {
  color: rgba(240, 233, 218, 0.74);
  max-width: 32rem;
}

.brain-layout {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
}
@media (min-width: 62rem) {
  .brain-layout { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr); }
}

/* The canvas is transparent — the band above paints the ground behind it. */
/* Wider than tall on purpose. The module sizes the constellation's radius from
   the SHORTER edge, so the extra width becomes margin for the node labels —
   which sit beside their dots and would otherwise run off a square canvas. */
.brain-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  max-width: 36rem;
  max-height: 27rem;
  margin-inline: auto;
}
.brain-stage canvas { display: block; }

.brain-caption {
  margin: 1.5rem 0 0;
  font-size: 0.8125rem;
  color: rgba(240, 233, 218, 0.55);
  text-align: center;
}

/* --- The loop ------------------------------------------------- */

.loop {
  display: grid;
  gap: 0;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  counter-reset: step;
}
.loop > li {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-block: clamp(1.75rem, 4vw, 2.5rem);
}
.loop > li:last-child { border-bottom: 1px solid var(--line); }

.loop h3 {
  font-size: clamp(1.375rem, 3.4vw, 1.875rem);
  line-height: 1.25;
  margin: 0;
}
.loop p {
  margin: 0.5rem 0 0;
  color: var(--muted-strong);
  max-width: 34rem;
}
.loop .step-no {
  display: block;
  font-family: var(--sans);
  font-size: 0.6875rem;
  letter-spacing: 0.18em;
  color: var(--muted-strong);
  margin-bottom: 0.75rem;
}

@media (min-width: 56rem) {
  .loop { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(2rem, 4vw, 3.5rem); }
  .loop > li { border-bottom: 1px solid var(--line); }
}

/* --- Price ---------------------------------------------------- */

.price h2 {
  font-size: clamp(2rem, 6vw, 3.5rem);
  line-height: 1.08;
  max-width: 16ch;
}

.terms-rows {
  margin: clamp(2.5rem, 6vw, 3.5rem) 0 0;
  padding: 0;
  max-width: 38rem;
}
.terms-rows > li {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  justify-content: space-between;
  align-items: baseline;
  border-top: 1px solid var(--line);
  padding-block: 1.125rem;
}
.terms-rows > li:last-child { border-bottom: 1px solid var(--line); }
.terms-rows .label { font-weight: 500; }
.terms-rows .sub { color: var(--muted-strong); font-size: 0.9375rem; }

/* --- Waitlist ------------------------------------------------- */

.waitlist h2 {
  font-size: clamp(1.875rem, 5.4vw, 3rem);
  line-height: 1.1;
  max-width: 14ch;
}

.waitlist-form {
  margin-top: clamp(2rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  max-width: 34rem;
}
.waitlist-form input[type="email"] {
  flex: 1 1 15rem;
  min-width: 0;
  font: inherit;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}
.waitlist-form input[type="email"]::placeholder { color: var(--muted); }
.waitlist-form input[type="email"]:focus-visible { border-color: var(--plum); }

.btn {
  font: inherit;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--plum);
  border-radius: 8px;
  background: var(--plum);
  color: var(--cream);
  padding: 0.85rem 1.5rem;
  transition: opacity 0.2s var(--spring);
}
.btn:hover { opacity: 0.86; }

.form-note {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  color: var(--muted-strong);
  max-width: 34rem;
}

/* The honest confirmation. Hidden until the form is used. */
.form-status {
  margin: 1.25rem 0 0;
  font-size: 0.9375rem;
  max-width: 34rem;
  border-left: 2px solid var(--plum);
  padding-left: 1rem;
  color: var(--ink);
}
.form-status[hidden] { display: none; }

/* --- Footer --------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: clamp(3rem, 7vw, 4.5rem);
  font-size: 0.9375rem;
  color: var(--muted-strong);
}
.site-footer p { margin: 0 0 1rem; max-width: 34rem; }
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
}
.site-footer .fineprint { font-size: 0.8125rem; color: var(--muted-strong); }

/* --- Policy + support pages ----------------------------------- */

.doc { padding-block: clamp(2rem, 5vw, 3rem) clamp(4rem, 10vw, 7rem); }

.doc h1 {
  font-size: clamp(2.25rem, 6.5vw, 3.5rem);
  line-height: 1.08;
  margin-bottom: 1rem;
}

.doc-meta {
  font-size: 0.875rem;
  color: var(--muted-strong);
  margin: 0 0 clamp(2rem, 5vw, 3rem);
}

.doc h2 {
  font-size: clamp(1.375rem, 3.2vw, 1.75rem);
  line-height: 1.25;
  margin: clamp(2.75rem, 6vw, 3.75rem) 0 0.75rem;
}
.doc h3 {
  font-family: var(--sans);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0;
  margin: 2rem 0 0.5rem;
}
.doc p, .doc li { max-width: 38rem; }
.doc p { margin: 0 0 1rem; }
.doc ul, .doc ol { padding-left: 1.25rem; margin: 0 0 1rem; }
.doc li { margin-bottom: 0.5rem; }
.doc strong { font-weight: 600; }

/* Anything still to be filled in before launch, marked so it cannot be missed. */
.tbd {
  font-family: var(--sans);
  font-weight: 600;
  color: var(--plum);
  border-bottom: 1px dotted var(--plum);
  white-space: nowrap;
}

.draft-note {
  border: 1px solid var(--plum);
  border-left-width: 4px;
  border-radius: 4px;
  padding: 1rem 1.25rem;
  margin: 0 0 clamp(2rem, 5vw, 3rem);
  max-width: 38rem;
  font-size: 0.9375rem;
  color: var(--ink);
}
.draft-note strong {
  display: block;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.6875rem;
  color: var(--plum);
  margin-bottom: 0.35rem;
}

/* The plain-language summary that opens each policy. */
.summary {
  background: var(--paper-sent);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 2rem);
  max-width: 38rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}
.summary h2 { margin-top: 0; font-size: 1.25rem; }
.summary ul { margin-bottom: 0; }

/* The crisis line. Quiet, never hidden. */
.crisis {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: clamp(1.25rem, 3vw, 1.75rem);
  max-width: 38rem;
  margin-top: clamp(2rem, 5vw, 3rem);
}
.crisis h2 { margin-top: 0; font-size: 1.25rem; }
.crisis p:last-child { margin-bottom: 0; }

/* Sub-processor list, readable on a phone without a scrolling table. */
.processors { padding: 0; margin: 0 0 1rem; max-width: 38rem; }
.processors > li {
  list-style: none;
  border-top: 1px solid var(--line);
  padding-block: 1.125rem;
  margin: 0;
}
.processors > li:last-child { border-bottom: 1px solid var(--line); }
.processors .who { font-weight: 600; display: block; }
.processors .what { color: var(--muted-strong); font-size: 0.9375rem; }

.back-link {
  display: inline-block;
  font-size: 0.9375rem;
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

/* --- Entrances ------------------------------------------------
   12px rise + fade, 60ms apart — the app's own arrival, borrowed. */

@keyframes fRise {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

.rise {
  animation: fRise 0.55s var(--spring) both;
  animation-delay: calc(var(--d, 0) * 60ms);
}

html.js .reveal { opacity: 0; transform: translateY(14px); }
html.js .reveal.is-in {
  opacity: 1;
  transform: none;
  transition: opacity 0.55s var(--spring), transform 0.55s var(--spring);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html.js .reveal { opacity: 1; transform: none; }
}
