/* ============================================================================
   Chapter One — launch site
   The tokens below are lifted straight from the app's design system:
   colors from Assets.xcassets (light + dark, both defined as a condition of
   existing), radii from LTRadius, spacing from LTSpace, the two faces from
   LTFont. Change a token here, not a value in a rule.
   ========================================================================== */

:root {
  /* --- Tier 1: the palette (Assets.xcassets) ---------------------------- */
  --brand-red:        #E6121F;   /* ink  — text, glyphs, strokes            */
  --brand-red-fill:   #E6121F;   /* fill — surfaces under white             */
  --brand-green:      #0E7C44;
  --brand-green-fill: #0E7C44;
  --brand-yellow:     #DE9A00;
  --paper:            #F5F7E6;
  --paper-card:       #FFFFFF;
  --on-fill:          #FFFFFF;

  /* Ink, hairline and shadow all follow brochure.php exactly. Note the
     hairline is GREEN-tinted there, not neutral grey — that is deliberate on
     the brochure and it is what makes the two pages read as one site. */
  --ink:        #1B1F17;
  --ink-soft:   #59604F;
  --ink-faint:  #8B8F80;   /* no brochure equivalent; left as it was */
  --hairline:   rgba(14, 124, 68, .16);
  --sea-alpha:  .075;
  --shadow-lo:  0 1px 2px rgba(27,31,23,.06), 0 8px 24px rgba(27,31,23,.05);
  --shadow-hi:  0 2px 6px rgba(27,31,23,.08), 0 24px 60px rgba(27,31,23,.14);
  --bezel:      #16180F;

  /* --- Tier 2: roles ---------------------------------------------------- */
  --action:   var(--brand-red-fill);
  --feature:  var(--brand-red);
  --selected: var(--brand-red);
  --complete: var(--brand-green);

  /* --- Type ------------------------------------------------------------- */
  /* The two faces from public/brochure.php, which the project lead chose.
     They replace the app catalog's Cochin serif and Copperplate display: the
     brochure sets headings in a ROUNDED sans, and the two pages have to agree.
     ui-rounded picks up the system rounded face on Apple devices and falls
     back to the body stack everywhere else, so no webfont is loaded. */
  --face-display: ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  /* Small uppercase eyebrows. The brochure has no third face, so this is the
     display face again — the letterspacing and caps carry the distinction. */
  --face-label:   ui-rounded, "SF Pro Rounded", "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --face-body:    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* --- Shape (LTRadius) ------------------------------------------------- */
  --r-thumb: 6px;  --r-tile: 8px;   --r-control: 10px;
  --r-card: 16px;  --r-bubble: 18px; --r-hero: 24px;

  /* --- Space (LTSpace) -------------------------------------------------- */
  --s-hair: 2px;  --s-tight: 4px; --s-snug: 6px;   --s-small: 8px;
  --s-med: 10px;  --s-reg: 12px;  --s-card: 14px;  --s-large: 16px;
  --s-xl: 20px;   --s-sec: 24px;  --s-page: 32px;

  --ease: cubic-bezier(.2, .7, .2, 1);
  --measure: 62ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand-red:        #FF4A52;
    --brand-red-fill:   #D91424;
    --brand-green:      #3AAE6F;
    --brand-green-fill: #10814A;
    --brand-yellow:     #F2B84B;
    --paper:            #171C17;
    --paper-card:       #232B23;

    --ink:       #ECEFE2;
    --ink-soft:  #A3AC9B;
    --ink-faint: #7E856F;   /* no brochure equivalent; left as it was */
    --hairline:  rgba(255, 255, 255, .10);
    --sea-alpha: .10;
    /* The brochure drops card shadows entirely in dark. Followed here for the
       flat surfaces; --shadow-hi below is kept, because the phone mock-ups
       float above the page and lose their edge without it. */
    --shadow-lo: none;
    --shadow-hi: 0 2px 6px rgba(0,0,0,.45), 0 24px 60px rgba(0,0,0,.55);
    --bezel:     #3B4239;
  }
}

/* ------------------------------------------------------------------ reset */
*, *::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;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--face-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

.sprite { position: absolute; }
.glyph { width: 1em; height: 1em; fill: currentColor; display: inline-block; vertical-align: -.125em; flex: none; }
.glyph.tiny { width: .85em; height: .85em; }

.wrap { width: min(1120px, calc(100% - 2 * var(--s-sec))); margin-inline: auto; }

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

.skip {
  position: absolute; left: var(--s-large); top: -100px; z-index: 100;
  background: var(--action); color: var(--on-fill);
  padding: var(--s-med) var(--s-large); border-radius: var(--r-control);
  font-weight: 600; text-decoration: none; transition: top .2s var(--ease);
}
.skip:focus { top: var(--s-large); }

:where(a, button, input):focus-visible {
  outline: 3px solid var(--feature);
  outline-offset: 3px;
  border-radius: var(--r-thumb);
}

/* ------------------------------------------------------------ typography */
h1, h2, h3 { font-family: var(--face-display); font-weight: 700; line-height: 1.06; margin: 0; letter-spacing: -.01em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.1rem); }
h3 { font-size: 1.4rem; line-height: 1.15; }

.eyebrow {
  font-family: var(--face-label);
  font-size: .74rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--feature);
  margin: 0 0 var(--s-reg);
}

.prose { font-size: 1.0625rem; color: var(--ink-soft); margin: var(--s-reg) 0 0; max-width: var(--measure); }

.sechead { max-width: 46rem; margin-bottom: var(--s-page); }
.sechead h2 { max-width: 20ch; }

/* --------------------------------------------------------------- buttons */
.btn {
  --lift: 0px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-small);
  min-height: 52px; padding: 0 var(--s-sec);
  border: 0; border-radius: var(--r-control);
  background: var(--action); color: var(--on-fill);
  font: 600 1.0625rem/1 var(--face-body);
  cursor: pointer; white-space: nowrap; text-decoration: none;
  box-shadow: 0 6px 18px rgba(230, 18, 31, .28);
  transform: translateY(var(--lift));
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), filter .22s var(--ease);
}
.btn:hover  { --lift: -2px; box-shadow: 0 12px 28px rgba(230, 18, 31, .34); filter: saturate(1.06); }
.btn:active { --lift: 1px; box-shadow: 0 4px 12px rgba(230, 18, 31, .3); transition-duration: .08s; }
.btn-small  { min-height: 40px; padding: 0 var(--s-large); font-size: .95rem; box-shadow: 0 4px 12px rgba(230,18,31,.22); }

.btn-spinner {
  position: absolute; inset: 0; margin: auto;
  width: 20px; height: 20px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  opacity: 0; animation: spin .7s linear infinite;
}
.signup.busy .btn-label { opacity: 0; }
.signup.busy .btn-spinner { opacity: 1; }
.signup.busy .btn { pointer-events: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-large);
  padding: var(--s-med) max(var(--s-sec), calc((100% - 1120px) / 2));
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transform: translateY(-102%);
  transition: transform .45s var(--ease), border-color .45s var(--ease);
}
.topbar.show { transform: none; border-bottom-color: var(--hairline); }
.topbar-brand {
  display: inline-flex; align-items: center; gap: var(--s-small);
  font-family: var(--face-display); font-weight: 700; font-size: 1.25rem;
  color: var(--feature); text-decoration: none;
}
.topbar-brand span { color: var(--ink); }

/* ------------------------------------------------------------------ hero */
.hero {
  position: relative; isolation: isolate;
  min-height: 100svh;
  display: grid; place-items: center;
  padding: calc(var(--s-page) * 2.6) var(--s-sec) calc(var(--s-page) * 2);
  text-align: center;
  overflow: hidden;
}
.hero-inner { position: relative; z-index: 2; width: min(46rem, 100%); }

/* The lockup carries the name AND the tagline, so it IS the headline — the
   hero sets no type of its own above the lede. The SVG themes its own tagline. */
.lockup {
  width: clamp(184px, 23vw, 296px);
  margin: 0 auto var(--s-large);
  filter: drop-shadow(0 12px 30px rgba(230, 18, 31, .16));
  animation: dropIn 1s var(--ease) both;
}
.lockup img { width: 100%; height: auto; }
@media (prefers-color-scheme: dark) { .lockup { filter: drop-shadow(0 12px 30px rgba(255, 74, 82, .16)); } }

.eyebrow-hero { animation: riseIn .8s .22s var(--ease) both; }

.lede {
  font-size: clamp(1.12rem, 2.3vw, 1.38rem);
  color: var(--ink-soft);
  margin: 0 auto var(--s-page);
  max-width: 34rem;
  animation: riseIn .9s .34s var(--ease) both;
}

.hero .signup { animation: riseIn .9s .52s var(--ease) both; }
.formnote { font-size: .875rem; color: var(--ink-faint); margin: var(--s-reg) auto 0; max-width: 32rem; animation: riseIn .9s .62s var(--ease) both; }

/* the splash screen's rocking sea of hearts and books */
.sea { position: absolute; inset: -6%; z-index: 0; pointer-events: none; }
.sea svg {
  position: absolute;
  color: var(--feature);
  opacity: var(--sea-alpha);
  transform-origin: 50% 85%;
  animation: rock 4.4s ease-in-out infinite alternate;
}

.scrollcue {
  position: absolute; bottom: var(--s-sec); left: 50%; z-index: 2;
  width: 26px; height: 42px; margin-left: -13px;
  border: 2px solid var(--hairline); border-radius: 999px;
  animation: fadeIn 1s 1.1s var(--ease) both;
}
.scrollcue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  background: var(--feature); border-radius: 2px;
  animation: cue 1.9s var(--ease) infinite;
}

/* ---------------------------------------------------------------- showcase */
.showcase { padding: calc(var(--s-page) * 2.5) 0; }
.phones {
  display: grid; gap: var(--s-page);
  grid-template-columns: repeat(auto-fit, minmax(238px, 1fr));
  align-items: start;
  perspective: 1400px;
}
.phone { margin: 0; }
.phone figcaption {
  margin-top: var(--s-xl);
  font-size: .95rem; color: var(--ink-soft); line-height: 1.5;
  max-width: 26rem;
}
.phone figcaption strong { color: var(--ink); font-family: var(--face-display); font-size: 1.05rem; }

/* ------------------------------------------------------------- features */
.features { padding: calc(var(--s-page) * 2) 0 calc(var(--s-page) * 2.5); }
.grid { display: grid; gap: var(--s-xl); grid-template-columns: repeat(auto-fit, minmax(258px, 1fr)); }

.feature {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: var(--r-card);
  padding: var(--s-sec);
  box-shadow: var(--shadow-lo);
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.feature:hover { transform: translateY(-4px); box-shadow: var(--shadow-hi); border-color: color-mix(in srgb, var(--feature) 34%, transparent); }
.feature h3 { margin-bottom: var(--s-small); }
.feature .prose { font-size: 1rem; }
.fglyph {
  display: grid; place-items: center;
  width: 44px; height: 44px; margin-bottom: var(--s-large);
  border-radius: 50%;
  background: color-mix(in srgb, var(--feature) 12%, transparent);
  color: var(--feature); font-size: 22px;
}

/* ----------------------------------------------------------------- band */
.band {
  padding: calc(var(--s-page) * 2.2) 0;
  text-align: center;
  border-block: 1px solid var(--hairline);
  background: color-mix(in srgb, var(--feature) 5%, var(--paper));
}
.bigquote { font-size: 40px; color: var(--feature); opacity: .5; }
.pull {
  font-family: var(--face-display); font-weight: 700;
  font-size: clamp(1.7rem, 4.4vw, 2.9rem); line-height: 1.16;
  margin: var(--s-large) auto 0; max-width: 22ch;
}
.pull-attr { font-family: var(--face-label); text-transform: uppercase; letter-spacing: .16em; font-size: .72rem; color: var(--ink-faint); margin-top: var(--s-large); }

/* ------------------------------------------------------------------ cta */
.cta { position: relative; isolation: isolate; overflow: hidden; padding: calc(var(--s-page) * 2.6) 0; text-align: center; }
.cta-inner { position: relative; z-index: 2; max-width: 40rem; }
.cta .prose { margin-inline: auto; }
.ctamark { font-size: 40px; color: var(--feature); margin-bottom: var(--s-large); animation: beat 3.4s ease-in-out infinite; }
.cta h2 { margin-bottom: var(--s-small); }
.signup-big { margin-top: var(--s-sec); }

/* ----------------------------------------------------------------- form */
.signup { max-width: 30rem; margin-inline: auto; }
.field {
  display: flex; gap: var(--s-small);
  background: var(--paper-card);
  border: 1px solid var(--hairline);
  border-radius: calc(var(--r-control) + 4px);
  padding: var(--s-snug);
  box-shadow: var(--shadow-lo);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), transform .25s var(--ease);
}
.field:focus-within {
  border-color: var(--feature);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--feature) 18%, transparent), var(--shadow-lo);
}
.input {
  flex: 1 1 auto; min-width: 0;
  border: 0; background: none; color: var(--ink);
  font: 400 1.0625rem/1 var(--face-body);
  padding: 0 var(--s-reg);
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: 0; }

.signup.invalid .field { border-color: var(--feature); animation: shake .4s var(--ease); }

.formstatus {
  min-height: 1.4em; margin: var(--s-reg) 0 0;
  font-size: .95rem; color: var(--ink-soft);
  opacity: 0; transform: translateY(-4px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.formstatus.show { opacity: 1; transform: none; }
.formstatus.ok   { color: var(--complete); font-weight: 600; }
.formstatus.bad  { color: var(--feature); }

.signup.done .field { border-color: var(--complete); }
.signup.done .btn  { background: var(--brand-green-fill); box-shadow: 0 6px 18px rgba(14, 124, 68, .3); }

/* ---------------------------------------------------------------- footer */
.foot { border-top: 1px solid var(--hairline); padding: var(--s-page) 0; }
.footrow { display: flex; flex-wrap: wrap; gap: var(--s-large); align-items: center; justify-content: space-between; }
.footbrand { display: inline-flex; align-items: center; gap: var(--s-small); margin: 0; font-family: var(--face-display); font-weight: 700; font-size: 1.15rem; color: var(--feature); }
.footbrand span { color: var(--ink); }
.footnote { margin: 0; font-size: .9rem; color: var(--ink-faint); }
.footnote strong { color: var(--ink-soft); }
.footnote a { color: var(--feature); text-decoration-thickness: 1px; text-underline-offset: 3px; }

/* ------------------------------------------------------------ keyframes */
@keyframes rock   { from { transform: rotate(-8deg); } to { transform: rotate(8deg); } }
@keyframes spin2  { to { transform: rotate(360deg); } }
@keyframes riseIn { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
@keyframes dropIn { from { opacity: 0; transform: translateY(-14px) scale(.94); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cue    { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(16px); } }
@keyframes beat   { 0%, 100% { transform: scale(1); } 12% { transform: scale(1.14); } 24% { transform: scale(1); } 36% { transform: scale(1.09); } }
@keyframes shake  { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(5px); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }

/* ------------------------------------------------------- scroll reveals */
.js .reveal {
  opacity: 0; transform: translateY(26px);
  transition: opacity .8s var(--ease) var(--d, 0ms), transform .8s var(--ease) var(--d, 0ms);
  will-change: opacity, transform;
}
.js .reveal.in { opacity: 1; transform: none; }

/* ============================================================================
   The phones — the app's screens rebuilt in CSS.
   Everything inside .screen is sized in `em` off a container-relative root, so
   one phone scales as a unit at any column width. Swap in a real screenshot by
   naming it in main.js (SCREENSHOTS) — the CSS screen is replaced, frame kept.
   ========================================================================== */

.frame {
  --hs: 1;
  position: relative;
  container-type: inline-size;
  width: 100%; max-width: 286px; margin-inline: auto;
  aspect-ratio: 9 / 19.2;
  padding: 9px;
  background: var(--bezel);
  border-radius: 42px;
  box-shadow: var(--shadow-hi), inset 0 0 0 1px rgba(255,255,255,.09);
  transform: translate3d(0, calc(var(--base, 0px) + var(--py, 0px)), 0) scale(var(--hs));
  transition: transform .5s var(--ease), box-shadow .4s var(--ease);
}
.phone:hover .frame { --hs: 1.025; }

.glass {
  position: absolute; inset: 0; z-index: 4; border-radius: 42px; pointer-events: none;
  background: linear-gradient(118deg, rgba(255,255,255,.20) 0 16%, rgba(255,255,255,0) 40%);
}

.screen {
  position: relative; height: 100%; width: 100%;
  display: flex; flex-direction: column;
  border-radius: 33px; overflow: hidden;
  background: var(--paper-card);
  font-size: 10px;
  font-size: 4.15cqw;
  color: var(--ink);
}
.screen-paper { background: var(--paper); }

.screen .shot { width: 100%; height: 100%; object-fit: cover; }

.statusbar { display: flex; align-items: center; justify-content: space-between; padding: 1.1em 1.6em .2em; font-size: .95em; font-weight: 600; }
.dots { width: 2.6em; height: .62em; border-radius: 99px; background: currentColor; opacity: .3; }

.navbar { text-align: center; font-family: var(--face-display); font-weight: 700; font-size: 1.55em; padding: .25em 0 .42em; border-bottom: 1px solid var(--hairline); }

.scrollarea { flex: 1 1 auto; overflow: hidden; }
.scrollarea.pad { display: flex; flex-direction: column; gap: 1em; padding: 1.1em; }

.hero-photo { position: relative; aspect-ratio: 1 / 0.74; }
.photo-a { background: radial-gradient(120% 90% at 30% 15%, #C8B49A 0%, #9A7F63 45%, #4E4234 100%); }
.nameplate { position: absolute; left: 1.1em; right: 1.1em; bottom: .9em; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.55); }
.nameplate .name { display: block; font-family: var(--face-display); font-weight: 700; font-size: 2.3em; line-height: 1; }
.nameplate .meta { display: flex; align-items: center; gap: .35em; font-size: .95em; opacity: .92; margin-top: .25em; }

.lozenges { display: flex; flex-wrap: wrap; gap: .45em; padding: 1em 1.1em .2em; }
.loz { border: 1px solid var(--hairline); border-radius: 99px; padding: .32em .8em; font-size: .92em; color: var(--ink-soft); }
.loz.on { background: var(--brand-red-fill); border-color: transparent; color: var(--on-fill); }

.infobox { margin: 1em 1.1em 0; }
.boxtitle { display: flex; align-items: center; gap: .45em; margin: 0 0 .6em; font-family: var(--face-label); text-transform: uppercase; letter-spacing: .13em; font-size: .82em; color: var(--feature); }

.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45em; }
.tile { aspect-ratio: 1; border-radius: var(--r-tile); display: grid; place-items: center; font-family: var(--face-display); font-weight: 700; font-size: 1.05em; color: #fff; }
.t1 { background: linear-gradient(150deg, #7C4B3A, #3E2318); }
.t2 { background: linear-gradient(150deg, #4B6153, #22322A); }
.t3 { background: linear-gradient(150deg, #6B5B86, #322A45); }
.place.p1 { background: linear-gradient(160deg, #D8CFA8, #8B7C4E); }
.place.p2 { background: linear-gradient(160deg, #B9C6C8, #5F7377); }
.place.p3 { background: linear-gradient(160deg, #E0B9A5, #9A6A56); }

.card { background: var(--paper-card); border: 1px solid var(--hairline); border-radius: var(--r-card); padding: 1.1em; box-shadow: var(--shadow-lo); }
.q-card .question { font-family: var(--face-display); font-weight: 700; font-size: 1.5em; line-height: 1.14; margin: 0 0 .5em; }
.q-card .answer { margin: 0 0 .9em; font-size: 1em; line-height: 1.45; color: var(--ink-soft); }
.q-card .answer.thin { color: var(--ink-faint); }
.q-card.dim { opacity: .5; }

.touchstone { display: flex; align-items: center; gap: .75em; border-top: 1px solid var(--hairline); padding-top: .8em; }
.ts-meta { display: flex; flex-direction: column; min-width: 0; }
.ts-meta strong { font-size: 1em; line-height: 1.2; }
.ts-meta em { font-style: normal; font-size: .9em; color: var(--ink-faint); }
.heart-on { margin-left: auto; color: var(--selected); font-size: 1.35em; }

.cover {
  position: relative; flex: none;
  width: 3.6em; aspect-ratio: 2 / 3;
  border-radius: var(--r-thumb);
  display: grid; place-items: center;
  padding: .35em; text-align: center;
  color: #fff; font-family: var(--face-display); font-weight: 700; font-size: .58em; line-height: 1.12;
  box-shadow: 0 2px 8px rgba(0,0,0,.3);
  overflow: hidden;
}
.cover > span { display: block; padding-left: .5em; overflow-wrap: anywhere; hyphens: auto; }
.touchstone .cover > span { display: none; }
.cover::after { content: ""; position: absolute; inset: 0 auto 0 0; width: .32em; background: rgba(0,0,0,.28); }
.c1 { background: linear-gradient(155deg, #2E5F7C, #14293A); }
.c2 { background: linear-gradient(155deg, #7C2E3E, #3A1420); }
.c3 { background: linear-gradient(155deg, #2F6B57, #133026); }
.c4 { background: linear-gradient(155deg, #8A5E22, #3E2A0E); }

.tabbar { display: flex; border-top: 1px solid var(--hairline); padding: .55em 0 .95em; }
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .22em; font-size: .7em; color: var(--ink-faint); }
.tab .glyph { font-size: 1.7em; }
.tab.on { color: var(--feature); }

/* --- the match reveal ---------------------------------------------------- */
.matchstage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35em; padding: 1.4em; }
.deck { display: flex; justify-content: center; margin-bottom: 1.6em; perspective: 700px; }
.js .deck .cover { opacity: 0; }
.deck .cover { width: 5.4em; font-size: .62em; margin-inline: -.55em; transform: rotateY(70deg) rotate(var(--rot, 0deg)); }
.deck .f1 { --rot: -10deg; --fd: 240ms; }
.deck .f2 { --rot: 0deg;  --fd: 400ms; z-index: 2; }
.deck .f3 { --rot: 10deg; --fd: 560ms; }
.phone.in .deck .cover { animation: flipIn .8s var(--ease) var(--fd) both; }

.faces { display: flex; }
.face { width: 5em; height: 5em; border-radius: 50%; border: .22em solid var(--paper); box-shadow: 0 4px 14px rgba(0,0,0,.2); }
.fa { background: radial-gradient(85% 85% at 35% 25%, #D3B79A, #6E5540); margin-right: -1.3em; }
.fb { background: radial-gradient(85% 85% at 35% 25%, #A9BBC9, #4A5F70); }
.phone.in .fa { animation: slideR .8s .7s var(--ease) both; }
.phone.in .fb { animation: slideL .8s .7s var(--ease) both; }

.matchword { font-family: var(--face-display); font-weight: 700; font-size: 3.9em; line-height: 1; color: var(--feature); margin: .18em 0 0; }
.js .matchword { opacity: 0; }
.phone.in .matchword { animation: pop .7s 1.05s var(--ease) both; }
.matchline { margin: .1em 0 1em; font-size: 1em; color: var(--ink-soft); text-align: center; }
.js .matchline { opacity: 0; }
.phone.in .matchline { animation: riseIn .6s 1.3s var(--ease) both; }
.fauxbtn { background: var(--action); color: var(--on-fill); border-radius: var(--r-control); padding: .75em 1.7em; font-weight: 600; font-size: 1em; }
.js .fauxbtn { opacity: 0; }
.phone.in .fauxbtn { animation: riseIn .6s 1.45s var(--ease) both; }

@keyframes flipIn { from { opacity: 0; transform: rotateY(70deg) rotate(var(--rot)); } to { opacity: 1; transform: rotateY(0deg) rotate(var(--rot)); } }
@keyframes slideR { from { opacity: 0; transform: translateX(-2.4em); } to { opacity: 1; transform: none; } }
@keyframes slideL { from { opacity: 0; transform: translateX(2.4em); } to { opacity: 1; transform: none; } }
@keyframes pop    { 0% { opacity: 0; transform: scale(.6); } 60% { opacity: 1; transform: scale(1.09); } 100% { opacity: 1; transform: scale(1); } }

/* ---------------------------------------------------------- responsive */
@media (min-width: 900px) {
  .phone-lift .frame { --base: -30px; }
  .phones { gap: var(--s-sec); }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .hero { padding-top: calc(var(--s-page) * 1.8); min-height: auto; padding-bottom: var(--s-page); }
  .field { flex-wrap: wrap; }
  .field .btn { width: 100%; }
  .input { padding: var(--s-small) var(--s-reg); min-height: 44px; }
  .showcase, .features { padding: var(--s-page) 0 calc(var(--s-page) * 1.5); }
  .scrollcue { display: none; }
  .footrow { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sea { display: none; }
  .frame { transform: none; }
  .deck .cover, .matchword, .matchline, .fauxbtn { opacity: 1; }
  .deck .cover { transform: rotate(var(--rot, 0deg)); }
}

/* ------------------------------------------------------------- printing */
@media print {
  .topbar, .sea, .scrollcue, .btn { display: none !important; }
  body { background: #fff; color: #000; }
}
