/* Home page, 29 Oct 2026 redesign: "the hatch". Loaded on top of site.css by pages with
   layout: home (build.py). Two big moments and nothing louder: the hero, where the FitStreak
   wordmark splits open into a glowing portal and the visitor cracks the egg themselves (the
   app's own "the last crack is yours"), and the growth story, where scrolling grows Foxfire
   through its five real stages. Everything else is quiet type, hairlines and real screens.
   Motion lives in assets/home.js; Reduce Motion gets every end state and no movement.
   Every colour is a token below, like site.css. */

@font-face {
  font-family: "Bricolage Var"; font-weight: 200 800; font-stretch: 75% 100%; font-style: normal; font-display: block;
  src: url("fonts/bricolage-var.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("fonts/instrument-serif.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-weight: 400; font-style: italic; font-display: swap;
  src: url("fonts/instrument-serif-italic.woff2") format("woff2");
}

body.home {
  --display: "Bricolage Var", "Bricolage Grotesque", -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif;
  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --ink-gold-hi: #f6e2a4;
  --glow-core: rgba(255, 200, 104, 0.62);
  --glow-mid: rgba(212, 165, 68, 0.2);
  --glow-ring: rgba(232, 200, 106, 0.3);
  --glow-ring-soft: rgba(232, 200, 106, 0.14);
  --glow-shadow: rgba(212, 165, 68, 0.32);
  --portal-top: #0e0c09;
  --portal-mid: #1b150b;
  --portal-low: #3b2a10;
  --mote: #f0d68a;
  --glass-card: rgba(240, 232, 216, 0.07);
  --glass-card-line: rgba(240, 232, 216, 0.09);
  --glass-dark: rgba(12, 11, 9, 0.6);
  --dock-bg: rgba(26, 24, 20, 0.88);
  --grid-line: rgba(240, 232, 216, 0.05);
  --outline-num: rgba(232, 200, 106, 0.16);
  --flash: rgba(255, 236, 190, 0.9);
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --edge: min(624px, calc(50vw - 8px));
}

/* Two architectural hairlines at the content edges, and a whisper of film grain. */
body.home::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: linear-gradient(var(--grid-line), var(--grid-line)), linear-gradient(var(--grid-line), var(--grid-line));
  background-size: 1px 100%; background-repeat: no-repeat;
  background-position: calc(50% - var(--edge)) 0, calc(50% + var(--edge)) 0;
}
body.home::after {
  content: ""; position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
body.home > * { position: relative; z-index: 1; }
body.home header.site { position: sticky; z-index: 20; background: transparent; border-bottom-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; transition: background-color 0.3s ease, border-color 0.3s ease; animation: fade-in 0.5s ease 0.15s both; }
body.home.is-scrolled header.site { background: var(--glass-bar); border-bottom-color: var(--line-soft); -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px); }
body.home header.site .wrap { max-width: 1240px; }
body.home main.home-main { padding: 0; }

/* Type for the home page: Bricolage at full weight for headings, a mono for small facts. */
.home-main h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 5.4vw, 76px); line-height: 1; letter-spacing: -0.015em; margin: 0 0 var(--space-6); max-width: 13em; }
.home-main h2 em, .home-main h1 em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; color: var(--gold-2); padding-right: 0.03em; }
.home-main .band { max-width: 1240px; margin: 0 auto; padding: clamp(88px, 12vw, 150px) var(--space-5) 0; border-top: 0; }
.home-main .band > p { font-size: clamp(16px, 1.35vw, 18px); color: var(--muted); max-width: 36em; }

/* ---------- The hatch (hero) ---------- */
.hatch {
  --fs: min(15vh, 10vw);
  --ph: min(64vh, 40vw, 620px); /* portal height, shared by the portal and the parting words */
  position: relative; max-width: 1240px; margin: 0 auto;
  min-height: calc(100svh - 64px); display: flex; flex-direction: column;
  padding: var(--space-2) var(--space-5) var(--space-8);
}
.hatch-row { flex: 1; display: flex; align-items: center; justify-content: center; gap: calc(var(--fs) * 0.16); }
.hatch-word {
  font-family: var(--display); font-weight: 800; font-size: var(--fs); line-height: 0.8;
  letter-spacing: -0.045em; color: var(--text); white-space: nowrap; user-select: none; -webkit-user-select: none;
  animation: words-part 2.1s cubic-bezier(0.5, 0, 0.3, 1) both;
}
.hatch-fit { --dir: 1; }
.hatch-streak { --dir: -1; }
/* The words start beside the hairline and slide apart as the portal opens. Only transforms and
   clip-path move, so the layout is final from the first frame (no layout shift for CLS). */
@keyframes words-part {
  0%, 14% { transform: translateX(calc(var(--dir) * (var(--ph) * 0.31 - 1px))); }
  30% { transform: translateX(calc(var(--dir) * var(--ph) * 0.275)); }
  58% { transform: translateX(calc(var(--dir) * var(--ph) * 0.11)); }
  100% { transform: none; }
}
.hatch-streak {
  background: linear-gradient(180deg, var(--ink-gold-hi) 0%, var(--gold-2) 45%, var(--gold) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; padding-right: 0.04em;
}

.portal {
  --S: calc(var(--ph) * 0.8);
  position: relative; flex: none; height: var(--ph); width: calc(var(--ph) * 0.62);
  border-radius: 999px; overflow: hidden; isolation: isolate;
  background: radial-gradient(120% 70% at 50% 84%, var(--portal-low) 0%, var(--portal-mid) 46%, var(--portal-top) 100%);
  box-shadow: 0 0 0 1px var(--glow-ring), 0 0 0 7px var(--gold-soft), 0 40px 140px -30px var(--glow-shadow), inset 0 1px 0 var(--glow-ring), inset 0 0 70px var(--shade-deep);
  animation: portal-open 2.1s cubic-bezier(0.5, 0, 0.3, 1) both;
}
.portal::after { /* the gold hairline the portal opens from */
  content: ""; position: absolute; inset: 0; background: var(--gold-2); pointer-events: none; z-index: 9;
  animation: line-out 2.1s linear both;
}
@keyframes portal-open {
  0% { clip-path: inset(50% calc(50% - 1px) 50% calc(50% - 1px) round 999px); }
  14% { clip-path: inset(0 calc(50% - 1px) 0 calc(50% - 1px) round 999px); }
  30% { clip-path: inset(0 calc(50% - var(--ph) * 0.035) 0 calc(50% - var(--ph) * 0.035) round 999px); }
  58% { clip-path: inset(0 calc(50% - var(--ph) * 0.2) 0 calc(50% - var(--ph) * 0.2) round 999px); }
  100% { clip-path: inset(0 0 0 0 round 999px); }
}
@keyframes line-out { 0%, 14% { opacity: 1; } 30%, 100% { opacity: 0; } }

.portal-glow {
  position: absolute; left: 50%; top: 80%; width: 130%; aspect-ratio: 1; transform: translate(-50%, -50%);
  background: radial-gradient(closest-side, var(--glow-core), var(--glow-mid) 46%, transparent 72%);
  animation: breathe 4.5s ease-in-out infinite; pointer-events: none;
}
@keyframes breathe { 50% { transform: translate(-50%, -50%) scale(1.08); opacity: 0.85; } }
.portal-motes i {
  position: absolute; bottom: 12%; width: 3px; height: 3px; border-radius: 50%; background: var(--mote);
  opacity: 0; animation: mote 7s linear infinite; pointer-events: none;
}
.portal-motes i:nth-child(1) { left: 22%; animation-delay: 0.4s; }
.portal-motes i:nth-child(2) { left: 38%; animation-delay: 2.1s; animation-duration: 8s; }
.portal-motes i:nth-child(3) { left: 55%; animation-delay: 1.2s; width: 2px; height: 2px; }
.portal-motes i:nth-child(4) { left: 70%; animation-delay: 3.4s; animation-duration: 9s; }
.portal-motes i:nth-child(5) { left: 30%; animation-delay: 4.6s; width: 2px; height: 2px; }
.portal-motes i:nth-child(6) { left: 62%; animation-delay: 5.5s; animation-duration: 6.5s; }
.portal-motes i:nth-child(7) { left: 46%; animation-delay: 2.9s; width: 4px; height: 4px; }
.portal-motes i:nth-child(8) { left: 78%; animation-delay: 6.1s; width: 2px; height: 2px; }
@keyframes mote {
  0% { transform: translate(0, 0); opacity: 0; }
  15% { opacity: 0.9; }
  100% { transform: translate(14px, calc(var(--ph) * -0.75)); opacity: 0; }
}

/* The stage is the hatch clip's square frame; the egg sits exactly where the clip's egg starts,
   so the swap from still to clip lands on the same pixels (percentages from the clip's bbox). */
.portal-stage {
  position: absolute; z-index: 2; width: var(--S); height: var(--S); left: 50%; margin-left: calc(var(--S) / -2);
  top: calc(var(--ph) * 0.7 - var(--S) * 0.826);
  animation: stage-in 0.7s var(--ease-out) 1.5s both; pointer-events: none;
}
@keyframes stage-in { from { opacity: 0; transform: translateY(12px); } }
.portal-stage::before { /* "tap me" ring around the egg */
  content: ""; position: absolute; left: 50%; top: 64.3%; width: 52%; aspect-ratio: 1; border-radius: 50%;
  border: 1.5px solid var(--gold-2); transform: translate(-50%, -50%) scale(0.7); opacity: 0;
  animation: tap-ring 2.4s ease-out 2.6s infinite;
}
.hatch.is-tapped .portal-stage::before { animation: none; opacity: 0; }
@keyframes tap-ring { 0% { opacity: 0.55; transform: translate(-50%, -50%) scale(0.62); } 70%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.15); } }
.stage-egg {
  position: absolute; width: 41.083%; height: auto; left: 29.496%; top: 43.782%;
  transform-origin: 50% 92%; filter: drop-shadow(0 14px 18px var(--shade));
  animation: egg-idle 3.6s ease-in-out 2.6s infinite;
}
@keyframes egg-idle {
  0%, 72%, 100% { transform: rotate(0); }
  76% { transform: rotate(-5deg); } 80% { transform: rotate(4deg); } 84% { transform: rotate(-3deg); } 88% { transform: rotate(1.5deg); }
}
.stage-egg.is-shake { animation: egg-shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
.stage-egg.is-shake-hard { animation: egg-shake-hard 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; }
@keyframes egg-shake {
  15% { transform: rotate(-9deg) scale(1.03); } 35% { transform: rotate(8deg); } 55% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } 100% { transform: rotate(0); }
}
@keyframes egg-shake-hard {
  10% { transform: rotate(-12deg) scale(1.06, 0.95); } 25% { transform: rotate(11deg) scale(0.97, 1.05); } 40% { transform: rotate(-9deg); }
  55% { transform: rotate(7deg) scale(1.03); } 70% { transform: rotate(-4deg); } 85% { transform: rotate(2deg); } 100% { transform: rotate(0); }
}
/* First visit: later taps on the stopped egg get a small, calm wiggle (no pop). */
.stage-egg.is-nudge { animation: egg-nudge 0.7s ease-in-out both; }
@keyframes egg-nudge { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-3deg); } 50% { transform: rotate(2.5deg); } 75% { transform: rotate(-1.5deg); } }
.stage-hatch { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 0.6s ease; }
.stage-hatch.is-leaving { opacity: 0; }
/* The hatched fox, drawn from the 2107 px master art and placed where the hatch clip's last frame ends. */
.stage-still { position: absolute; left: 24.22%; top: 32.55%; width: 52.08%; height: auto; }
.stage-still { filter: drop-shadow(0 16px 18px var(--shade)); }
/* Tap reactions on the sharp still: weight at the feet, ease in and out, no overshoot pops. */
.stage-still { transform-origin: 50% 100%; }
.stage-still.is-arriving { animation: still-in 0.6s ease both; }
@keyframes still-in { from { opacity: 0; } }
.stage-still.is-hop { animation: fox-hop 1.05s cubic-bezier(0.45, 0, 0.35, 1) both; }
@keyframes fox-hop {
  0% { transform: none; }
  16% { transform: translateY(0) scale(1.04, 0.95); }
  42% { transform: translateY(-14%) scale(0.98, 1.03); }
  62% { transform: translateY(0) scale(1.03, 0.97); }
  78% { transform: translateY(-3%) scale(1, 1); }
  100% { transform: none; }
}
.stage-still.is-wiggle { animation: fox-wiggle 1.2s ease-in-out both; }
@keyframes fox-wiggle {
  0%, 100% { transform: none; }
  15% { transform: rotate(-6deg) translateY(-2%); }
  35% { transform: rotate(5deg) translateY(-3%); }
  55% { transform: rotate(-4deg) translateY(-1.5%); }
  75% { transform: rotate(2deg); }
}
.portal.is-flash::before { /* the burst */
  content: ""; position: absolute; inset: -10%; z-index: 4; pointer-events: none;
  background: radial-gradient(circle at 50% 70%, var(--flash), transparent 60%);
  animation: flash 0.7s ease-out both;
}
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }

.portal-tap {
  position: absolute; inset: 0; z-index: 6; width: 100%; height: 100%; border: 0; padding: 0; margin: 0;
  background: transparent; cursor: pointer; border-radius: inherit; -webkit-tap-highlight-color: transparent;
}
.portal-tap:focus-visible { outline: 3px solid var(--gold-2); outline-offset: -6px; }
.portal-hint {
  position: absolute; z-index: 7; left: 50%; bottom: 13%; transform: translateX(-50%); max-width: 72%; width: max-content;
  text-wrap: balance;
  margin: 0; padding: 7px 14px; border-radius: var(--radius-pill); text-align: center; pointer-events: none;
  font: 500 13px/1.35 var(--font); letter-spacing: 0.01em; color: var(--gold-3); background: var(--glass-dark);
  border: 1px solid var(--glow-ring-soft); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  animation: fade-up 0.6s var(--ease-out) 2.3s both;
}
.portal-hint.is-swap { animation: hint-swap 0.45s var(--ease-out); }
@keyframes hint-swap { from { opacity: 0; } }
.portal-note {
  position: absolute; z-index: 7; top: 15%; left: 7%; right: 7%; display: flex; gap: var(--space-3); align-items: flex-start;
  padding: 10px 12px; border-radius: 18px; font-size: 13px; line-height: 1.35; text-align: left; pointer-events: none;
  background: var(--glass-note); border: 1px solid var(--glass-note-dim); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 16px 40px var(--shade); opacity: 0; transform: translateY(-14px);
  transition: opacity 0.45s ease, transform 0.6s var(--ease-out);
}
.portal-note img { width: 34px; height: 34px; border-radius: 9px; flex: none; background: var(--surface-2); }
.portal-note p { margin: 0; }
.note-top { display: flex; justify-content: space-between; gap: var(--space-3); color: var(--muted); font-size: 12px; }
.note-top b { color: var(--text); font-weight: 600; }
.hatch.is-noted .portal-note { opacity: 1; transform: none; }
/* First visit's last crack: the store button sits under the hint, inside the portal.
   Centred with auto margins, not a transform, so .button's hover and press transforms still work. */
.portal-store {
  position: absolute; z-index: 8; left: 0; right: 0; bottom: 6%; width: max-content; max-width: 86%;
  margin: 0 auto; font-size: 14px; line-height: 1.25; padding: 10px 20px; white-space: normal; text-align: center;
  animation: fade-in 0.5s ease 0.15s both;
}
.portal-store[hidden] { display: none; }
/* The portal's bottom is a half circle, so the last-crack stack sits above the curve, where the
   capsule is wide enough for the button, and the egg lifts to make room for it. */
.portal-stage { transition: translate 0.6s var(--ease-out); }
.hatch.is-last .portal-stage { translate: 0 calc(var(--ph) * -0.15); }
.hatch.is-last .portal-store { bottom: 15%; }
.hatch.is-last .portal-hint { bottom: calc(15% + 52px); background: none; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; font-size: 14px; }
.portal-sound {
  position: absolute; z-index: 8; top: 3.2%; left: 50%; margin-left: -17px; width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--glow-ring-soft); background: var(--glass-dark); color: var(--gold-3); cursor: pointer;
  animation: fade-up 0.6s var(--ease-out) 2.5s both;
}
.portal-sound svg { fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.portal-sound svg path:first-child { fill: currentColor; }
.portal-sound[aria-pressed="false"] .wave { opacity: 0; }
.portal-sound:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 2px; }

.hatch-foot { display: flex; align-items: flex-end; gap: var(--space-8); margin-top: var(--space-6); animation: rise 0.9s var(--ease-out) 1.15s both; }
.hatch-copy { max-width: 34em; }
.hatch h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(30px, 3vw, 44px); line-height: 1.04; letter-spacing: -0.01em; margin: 0 0 var(--space-3); }
.hatch .lede { margin: 0; font-size: 16px; max-width: 32em; }
.hatch-rule { flex: 1; height: 1px; margin-bottom: 26px; background: var(--line); transform-origin: 50% 50%; animation: draw 1.2s var(--ease-out) 1.2s both; }
@keyframes draw { from { transform: scaleX(0); } }
.hatch-cta { display: grid; justify-items: end; gap: var(--space-2); }
.hatch-cta .button { margin: 0; font-size: 16px; padding: 14px 26px; }
.hatch.is-hatched .hatch-cta .button { animation: beckon 1.6s var(--ease-out) 0.2s 2; }
@keyframes beckon { 0%, 100% { box-shadow: 0 0 0 0 var(--glow-ring); } 50% { box-shadow: 0 0 0 10px transparent, 0 0 40px var(--glow-shadow); } }

@keyframes fade-in { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(20px); opacity: 0; } }
@keyframes fade-up { from { opacity: 0; transform: translate(-50%, 10px); } }

/* Phones: the word stacks around a screen-shaped portal, and the copy follows. */
@media (max-width: 760px) {
  .hatch { --fs: min(24vw, 12.5svh); --ph: min(52svh, 104vw); min-height: auto; padding: var(--space-2) var(--space-5) var(--space-6); }
  .hatch-row { flex-direction: column; align-items: stretch; gap: 12px; }
  .hatch-fit { align-self: flex-start; }
  .hatch-streak { align-self: flex-end; }
  .portal { --S: calc(var(--ph) * 0.88); width: 100%; border-radius: 36px; animation-name: portal-open-m; }
  @keyframes portal-open-m {
    0% { clip-path: inset(calc(50% - 1px) 50% calc(50% - 1px) 50% round 36px); }
    14% { clip-path: inset(calc(50% - 1px) 0 calc(50% - 1px) 0 round 36px); }
    30% { clip-path: inset(45% 0 45% 0 round 36px); }
    58% { clip-path: inset(24% 0 24% 0 round 36px); }
    100% { clip-path: inset(0 0 0 0 round 36px); }
  }
  .hatch-word { animation-name: words-part-m; }
  @keyframes words-part-m {
    0%, 14% { transform: translateY(calc(var(--dir) * (var(--ph) * 0.5 - 1px))); }
    30% { transform: translateY(calc(var(--dir) * var(--ph) * 0.45)); }
    58% { transform: translateY(calc(var(--dir) * var(--ph) * 0.24)); }
    100% { transform: none; }
  }
  .portal { --S: calc(var(--ph) * 0.86); }
  .portal-stage { top: calc(var(--ph) * 0.74 - var(--S) * 0.826); }
  .portal-hint { bottom: 14px; }
  .portal-store { bottom: 14px; }
  .hatch.is-last .portal-stage { translate: 0 calc(var(--ph) * -0.1); }
  .hatch.is-last .portal-store { bottom: 14px; }
  .hatch.is-last .portal-hint { bottom: 60px; background: var(--glass-dark); border-color: var(--glow-ring-soft); }
  .portal-sound { top: 14px; left: auto; right: 14px; margin: 0; }
  .portal-note { top: 14px; left: 14px; right: 60px; }
  .hatch-foot { flex-direction: column; align-items: stretch; gap: var(--space-5); }
  .hatch-rule { display: none; }
  .hatch-cta { justify-items: stretch; }
  .hatch-cta .meta { text-align: center; }
}

/* ---------- Voice: the companion's real reminder lines, drifting past ---------- */
.voice-rows { display: grid; gap: var(--space-4); margin: var(--space-10) calc(50% - 50vw) 0; padding: var(--space-2) 0; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent); }
.voice-row { display: flex; gap: var(--space-4); flex-wrap: wrap; justify-content: center; padding: 0 var(--space-5); }
.voice-rows.is-looped .voice-row { flex-wrap: nowrap; width: max-content; padding: 0; animation: marquee 70s linear infinite; }
.voice-rows.is-looped .voice-row-back { animation-duration: 84s; animation-direction: reverse; }
.voice-rows.is-looped:hover .voice-row { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }
.note {
  flex: none; width: 340px; display: flex; gap: var(--space-3); align-items: flex-start; padding: 12px 14px;
  border-radius: 20px; background: var(--glass-card); border: 1px solid var(--glass-card-line); font-size: 14px; line-height: 1.4;
}
.note img { width: 40px; height: 40px; border-radius: 11px; flex: none; background: var(--surface-2); object-fit: contain; }
.note > div { min-width: 0; flex: 1; }
.note p { margin: 0; }

/* ---------- Growth story: scroll grows Foxfire through its five real stages ---------- */
.grow-story { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: var(--space-12); margin-top: var(--space-8); }
.grow-visual { position: sticky; top: 11vh; height: 78vh; display: grid; place-items: center; }
.grow-count {
  position: absolute; inset: 0; display: grid; place-items: center; z-index: 0;
  font: 400 min(52vh, 34vw)/1 var(--serif); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums;
  color: transparent; -webkit-text-stroke: 1px var(--outline-num); user-select: none; -webkit-user-select: none;
}
.grow-visual::after { /* the pedestal light */
  content: ""; position: absolute; left: 50%; bottom: 11%; width: 62%; height: 46px; transform: translateX(-50%); z-index: 1;
  border-radius: 50%; background: radial-gradient(closest-side, var(--glow-mid), transparent), radial-gradient(closest-side, var(--shade-deep), transparent 80%);
}
.grow-img {
  position: absolute; z-index: 2; left: 50%; bottom: 12%; width: min(74%, 470px); transform-origin: 50% 100%;
  transform: translateX(-50%) scale(0.97); opacity: 0; filter: drop-shadow(0 26px 30px var(--shade));
  transition: opacity 0.18s ease, transform 0.3s ease; /* leaving: out quickly, so two stages never overlap */
}
.grow-img:first-of-type { width: min(44%, 280px); }
.grow-img.is-on { opacity: 1; transform: translateX(-50%) scale(1); transition: opacity 0.35s ease 0.1s, transform 0.6s var(--ease-out) 0.08s; }
.grow-ring { position: absolute; z-index: 1; left: 50%; bottom: 14%; width: 58%; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--gold-2); opacity: 0; transform: translate(-50%, 30%) scale(0.5); pointer-events: none; }
.grow-ring.is-pulse { animation: ring-out 1.2s ease-out; }
@keyframes ring-out { 0% { opacity: 0.45; transform: translate(-50%, 30%) scale(0.7); } 100% { opacity: 0; transform: translate(-50%, 30%) scale(1.15); } }
.grow-steps { list-style: none; padding: 0; margin: 0; }
.grow-steps li { min-height: 74vh; display: flex; flex-direction: column; justify-content: center; margin: 0; max-width: 28em; opacity: 0.25; transition: opacity 0.4s ease; }
.grow-steps li.is-on { opacity: 1; }
.grow-steps li:first-child { min-height: 62vh; }
.grow-at { font: italic 400 25px/1 var(--serif); color: var(--gold-2); margin: 0 0 var(--space-3); }
.grow-steps h3 { font-family: var(--serif); font-weight: 400; font-size: clamp(44px, 4.8vw, 66px); line-height: 1; letter-spacing: -0.01em; margin: 0 0 var(--space-4); }
.grow-steps p { color: var(--muted); font-size: 17px; margin: 0; }
.grow-steps .picks { display: flex; flex-wrap: wrap; gap: var(--space-2); margin-top: var(--space-5); }
.pick { padding: 0; border: 0; background: none; cursor: pointer; border-radius: 16px; -webkit-tap-highlight-color: transparent; }
.pick img { display: block; width: 56px; height: 56px; padding: 4px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: transform 0.2s var(--ease-out), border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.pick:hover img { transform: translateY(-3px); border-color: var(--gold); }
.pick[aria-pressed="true"] img { border-color: var(--gold-2); background: var(--surface-3); transform: translateY(-3px); box-shadow: 0 10px 24px var(--glow-shadow); }
.pick:focus-visible { outline: 3px solid var(--gold-2); outline-offset: 3px; }
.pick-say { min-height: 1.5em; margin-top: var(--space-4) !important; font: italic 400 22px/1.3 var(--serif); color: var(--gold-3) !important; }
.pick-say.is-swap { animation: say-in 0.45s var(--ease-out); }
@keyframes say-in { from { opacity: 0; } }
.grow-img.is-on.is-fading { opacity: 0; transition: opacity 0.22s ease; }
@media (max-width: 860px) {
  .grow-story { grid-template-columns: minmax(0, 1fr); gap: 0; margin-top: var(--space-4); }
  .grow-visual { top: 60px; height: 44svh; z-index: 3; background: linear-gradient(var(--bg) 82%, transparent); }
  .grow-count { font-size: min(36svh, 64vw); }
  .grow-img { width: min(62%, 300px); bottom: 8%; }
  .grow-img:first-of-type { width: min(36%, 170px); }
  .grow-visual::after { bottom: 7%; }
  .grow-steps li, .grow-steps li:first-child { min-height: 56svh; justify-content: flex-start; padding-top: var(--space-6); }
}

/* ---------- Small enough to do today: counters and the real screens ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-6); margin: var(--space-10) 0 var(--space-4); border-top: 1px solid var(--line); padding-top: var(--space-6); }
.stats p { margin: 0; display: grid; gap: var(--space-2); }
.stats b {
  font: 400 clamp(72px, 8.6vw, 124px)/0.9 var(--serif); letter-spacing: -0.02em; font-variant-numeric: lining-nums tabular-nums; color: var(--text);
}
.stats span { color: var(--muted); font-size: 15px; max-width: 13em; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-8); } }
.small .shots { margin-top: var(--space-12); margin-bottom: var(--space-10); }
@media (min-width: 760px) {
  .small .shots { gap: var(--space-6); padding-bottom: var(--space-12); }
  .small .shots img { transform: translateY(var(--py, 0)); will-change: transform; }
  .small .shots img:nth-child(even) { margin-top: var(--space-12); }
}

/* Rows and lists, a touch bigger than on the guides. */
.home-main .rows ul { counter-reset: row; max-width: none; margin-top: var(--space-10); }
.home-main .rows li { counter-increment: row; padding: var(--space-6) 0; font-size: 16px; position: relative; }
.home-main .rows li strong { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 2.4vw, 32px); letter-spacing: -0.005em; line-height: 1.1; }
.home-main .rows li::before { content: counter(row, decimal-leading-zero); position: absolute; right: 0; top: var(--space-6); font: italic 400 17px var(--serif); color: var(--faint); }
@media (min-width: 700px) { .home-main .rows li { grid-template-columns: 19em minmax(0, 1fr); padding-right: var(--space-12); align-items: baseline; } }
.home-main .inline-list ul { margin-top: var(--space-10); gap: 0 var(--space-8); }
.home-main .inline-list li { padding: var(--space-5) 0; border-top: 1px solid var(--line); }
.home-main .inline-list li strong { font-family: var(--serif); font-weight: 400; font-size: 25px; line-height: 1.15; margin-bottom: var(--space-2); }
.home-main .band > ol { margin-top: var(--space-6); }

/* Plans: Premium gets a slow gold beam around its edge. */
@property --beam { syntax: "<angle>"; inherits: false; initial-value: 0deg; }
.home-main .plans { margin-top: var(--space-10); gap: var(--space-5); }
.home-main .plan { padding: var(--space-8); border-radius: 28px; }
.home-main .plan h3 { font-family: var(--serif); font-weight: 400; font-size: 36px; letter-spacing: -0.01em; line-height: 1.05; }
.home-main .plan-pro {
  border: 1px solid transparent;
  background: linear-gradient(var(--surface-2), var(--surface-2)) padding-box,
    conic-gradient(from var(--beam), var(--glow-ring-soft) 0deg, var(--glow-ring-soft) 250deg, var(--gold-2) 300deg, var(--ink-gold-hi) 320deg, var(--glow-ring-soft) 345deg) border-box;
  animation: beam 7s linear infinite;
}
@keyframes beam { to { --beam: 360deg; } }

/* Questions: the heading holds still on the left while the answers scroll. */
@media (min-width: 900px) {
  .home-main .band-faq { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.9fr); gap: var(--space-12); align-items: start; }
  .home-main .band-faq > h2 { position: sticky; top: 110px; }
  .home-main .band-faq .faq { margin-top: 0; }
}
.home-main .faq { max-width: none; }
.home-main .faq h3 { font-family: var(--font); font-weight: 600; font-size: 18px; letter-spacing: 0; padding-top: var(--space-6); }
.home-main .faq p { font-size: 16px; padding-bottom: var(--space-6); }

/* ---------- Finale ---------- */
.finale { position: relative; max-width: 1240px; margin: clamp(100px, 14vw, 180px) auto 0; padding: 0 var(--space-5) clamp(80px, 10vw, 140px); display: grid; justify-items: center; text-align: center; }
.finale-egg { position: relative; width: clamp(130px, 16vw, 190px); margin-bottom: var(--space-6); }
.finale-egg img { position: relative; z-index: 1; display: block; width: 100%; transform-origin: 50% 92%; animation: egg-idle 3.2s ease-in-out infinite; filter: drop-shadow(0 20px 26px var(--shade)); }
.finale-glow { position: absolute; left: 50%; top: 55%; width: 260%; aspect-ratio: 1; transform: translate(-50%, -50%); background: radial-gradient(closest-side, var(--glow-mid), transparent 70%); animation: breathe 4.5s ease-in-out infinite; }
.finale h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(52px, 7.6vw, 112px); line-height: 0.95; letter-spacing: -0.02em; margin: 0 0 var(--space-6); max-width: 10em; }
.finale p { color: var(--muted); font-size: 17px; margin: 0 0 var(--space-5); }
.finale .button { font-size: 16px; padding: 15px 30px; }
.qr { display: none; }
@media (min-width: 980px) and (hover: hover) and (pointer: fine) {
  .finale-copy { padding: 0 210px; }
  .qr { display: grid; justify-items: center; gap: var(--space-3); position: absolute; right: var(--space-5); bottom: clamp(80px, 10vw, 140px); margin: 0; width: 170px; }
  .qr img { width: 150px; height: 150px; border-radius: 16px; padding: 8px; background: var(--text); box-shadow: 0 20px 50px var(--shade); }
  .qr figcaption { font-size: 13px; color: var(--faint); line-height: 1.4; }
}

/* ---------- The phone dock: a calm Get button once the hero's button scrolls away ---------- */
.dock { display: none; }
@media (max-width: 760px) {
  .dock {
    display: flex; align-items: center; gap: var(--space-3); position: fixed; z-index: 30;
    left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom));
    padding: 10px 10px 10px 12px; border-radius: 20px; background: var(--dock-bg);
    border: 1px solid var(--glass-card-line); box-shadow: 0 18px 40px var(--shade);
    -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
    transform: translateY(160%); transition: transform 0.5s var(--ease-out);
  }
  .dock.is-on { transform: none; }
  .dock img { width: 40px; height: 40px; border-radius: 10px; }
  .dock p { flex: 1; margin: 0; line-height: 1.25; min-width: 0; }
  .dock b { display: block; font-size: 15px; }
  .dock span { font-size: 13px; color: var(--muted); }
  .dock-get { background: var(--gold); color: var(--on-gold); font-weight: 650; font-size: 15px; padding: 10px 16px; border-radius: var(--radius-pill); white-space: nowrap; }
  .dock-get:hover { color: var(--on-gold); text-decoration: none; background: var(--gold-2); }
  body.home footer.site { padding-bottom: 84px; }
}

/* Scroll reveals (home.js adds .rv only to blocks below the fold). */
.rv { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease-out), transform 1s var(--ease-out); }
.rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  body.home header.site, .portal, .portal::after, .portal-stage, .portal-hint, .portal-sound, .hatch-foot, .hatch-rule,
  .portal-store, .portal-glow, .portal-motes i, .stage-egg, .portal-stage::before, .finale-egg img, .finale-glow, .home-main .plan-pro, .hatch-word { animation: none !important; }
  .portal::after, .portal-motes { display: none; }
  .voice-rows { overflow-x: auto; -webkit-mask-image: none; mask-image: none; }
  .grow-img, .grow-steps li, .rv, .portal-note { transition: none; }
  .rv { opacity: 1; transform: none; }
}
.grow-img.is-companion:first-of-type { width: min(64%, 400px); }
@media (max-width: 860px) { .grow-img.is-companion:first-of-type { width: min(56%, 260px); } }

/* Scripts the Latin accent serif does not cover: keep the gold, drop the fake italic.
   Japanese breaks lines by phrase so a headline never splits a word. */
:lang(ja) .home-main em, :lang(ko) .home-main em, :lang(zh) .home-main em, :lang(hi) .home-main em { font-family: inherit; font-style: normal; font-weight: inherit; letter-spacing: inherit; }
:lang(ja) .home-main h1, :lang(ja) .home-main h2, :lang(ja) .home-main h3, :lang(ja) .home-main p { word-break: auto-phrase; line-break: strict; }

/* The serif covers Latin only: Hindi, Japanese, Korean and Chinese keep the sans for headings. */
:lang(ja) .home-main :is(h1, h2, h3, .grow-at, .pick-say, .rows li strong, .plan h3, .inline-list li strong),
:lang(ko) .home-main :is(h1, h2, h3, .grow-at, .pick-say, .rows li strong, .plan h3, .inline-list li strong),
:lang(zh) .home-main :is(h1, h2, h3, .grow-at, .pick-say, .rows li strong, .plan h3, .inline-list li strong),
:lang(hi) .home-main :is(h1, h2, h3, .grow-at, .pick-say, .rows li strong, .plan h3, .inline-list li strong) { font-family: var(--display); font-style: normal; font-weight: 600; letter-spacing: -0.01em; }

/* The line under the plans: prices are US prices, the App Store shows each visitor's own. */
.home-main .plans + p { font-size: 14px; color: var(--faint); margin-top: var(--space-2); }
