/* Steero home page (D32): one drive from morning to night. Loads after base.css and cockpit.css.
   The sky is one fixed layer; each section names its time of day (data-tod) and home.js sets the one in
   view on <html data-tod-now>, so the sky, the hills and the nav ease between them. Each section's text
   colour comes from its own time of day, so contrast never depends on the transition. */

@property --sky-top { syntax: "<color>"; inherits: true; initial-value: #A9DBF3; }
@property --sky-bottom { syntax: "<color>"; inherits: true; initial-value: #E3F4FB; }
@property --hill { syntax: "<color>"; inherits: true; initial-value: #A6D695; }
@property --sun-x { syntax: "<percentage>"; inherits: true; initial-value: 16%; }
@property --sun-y { syntax: "<percentage>"; inherits: true; initial-value: 24%; }
@property --sun-o { syntax: "<number>"; inherits: true; initial-value: 1; }
@property --night-o { syntax: "<number>"; inherits: true; initial-value: 0; }
@property --sun-c { syntax: "<color>"; inherits: true; initial-value: #FFE08A; }

/* Defaults are on plain :root so each [data-tod-now] rule below outranks them. */
:root {
  --sky-top: #A9DBF3; --sky-bottom: #E3F4FB; --hill: #A6D695; --sun-x: 44%; --sun-y: 14%; --sun-o: 1; --night-o: 0; --sun-c: #FFE08A;
  --nav-ink: #12301E; --nav-material: rgba(240, 249, 253, .62);
  transition: --sky-top 1.4s var(--ease-ios), --sky-bottom 1.4s var(--ease-ios), --hill 1.4s var(--ease-ios), --sun-x 1.8s var(--ease-ios),
    --sun-y 1.8s var(--ease-ios), --sun-o 1.2s, --night-o 1.4s, --sun-c 1.4s;
}
:root[data-tod-now="midday"] { --sky-top: #8FCFF0; --sky-bottom: #DDF1FA; --hill: #A2D592; --sun-x: 72%; --sun-y: 12%; --sun-c: #FFE9A6; }
:root[data-tod-now="afternoon"] { --sky-top: #9FD3EE; --sky-bottom: #F3EED8; --hill: #A9CF86; --sun-x: 84%; --sun-y: 28%; --sun-c: #FFDB86; }
:root[data-tod-now="golden"] { --sky-top: #F3C98B; --sky-bottom: #FCE9C8; --hill: #B7C982; --sun-x: 82%; --sun-y: 52%; --sun-c: #FFC764; }
:root[data-tod-now="sunset"] { --sky-top: #C9787A; --sky-bottom: #F6C08E; --hill: #7F8F5A; --sun-x: 78%; --sun-y: 76%; --sun-c: #FFB27A; }
:root[data-tod-now="dusk"] { --sky-top: #2F3A6E; --sky-bottom: #5E4766; --hill: #3C5C45; --sun-x: 74%; --sun-y: 96%; --sun-o: 0; --night-o: .55; --sun-c: #FFB27A;
  --nav-ink: #F5F5F7; --nav-material: rgba(30, 34, 60, .62); }
:root[data-tod-now="night"] { --sky-top: #0E1B30; --sky-bottom: #1F3352; --hill: #1A3427; --sun-x: 70%; --sun-y: 100%; --sun-o: 0; --night-o: 1;
  --nav-ink: #F5F5F7; --nav-material: rgba(14, 22, 38, .66); }
/* Dark mode: the same drive, at night all the way (like the journey's night scene in the app). */
@media (prefers-color-scheme: dark) {
  :root[data-tod-now] { --sky-top: #0E1B30; --sky-bottom: #1F3352; --hill: #1A3427; --sun-o: 0; --night-o: 1; --nav-ink: #F5F5F7; --nav-material: rgba(14, 22, 38, .66); }
  :root[data-tod-now="golden"], :root[data-tod-now="sunset"] { --sky-top: #1B1E3A; --sky-bottom: #3A2E4A; --hill: #26392F; }
}
@media (prefers-reduced-motion: reduce) { :root { transition-duration: .01s; } }

:root:has(main.home) body { background: var(--sky-bottom); }
.home { position: relative; isolation: isolate;
  --ink: #12301E; --ink-2: #2F4A39; --accent: #1A4FA8; --card: rgba(255, 255, 255, .7); --card-2: rgba(255, 255, 255, .55); --line: rgba(18, 48, 30, .14);
  --text: var(--ink); --text-2: var(--ink-2); --surface: var(--card); --surface-2: rgba(18, 48, 30, .07); --hairline: var(--line);
  color: var(--ink); }
.home [data-tod="golden"] { --ink: #2A2015; --ink-2: #5E4A2E; --line: rgba(60, 40, 10, .16); --surface-2: rgba(60, 40, 10, .07); }
.home [data-tod="sunset"] { --ink: #2A1712; --ink-2: #3E2219; --card: rgba(255, 246, 238, .72); --line: rgba(60, 20, 10, .16); }
.home [data-tod="dusk"], .home [data-tod="night"] { --ink: #F5F5F7; --ink-2: #D6D5E0; --card: rgba(22, 26, 40, .72); --card-2: rgba(22, 26, 40, .55);
  --line: rgba(255, 255, 255, .14); --surface-2: rgba(255, 255, 255, .08); --accent: var(--accent-on-dark); }
@media (prefers-color-scheme: dark) {
  .home, .home [data-tod] { --ink: #F5F5F7; --ink-2: #D6D5E0; --accent: var(--accent-on-dark); --card: rgba(22, 26, 40, .72); --card-2: rgba(22, 26, 40, .55);
    --line: rgba(255, 255, 255, .14); --surface-2: rgba(255, 255, 255, .08); }
}
.home [data-tod] { color: var(--ink); --text: var(--ink); --text-2: var(--ink-2); --surface: var(--card); --hairline: var(--line); }
.home .kicker { color: var(--ink-2); }

/* The sky: gradient, sun, moon, stars and far hills, fixed behind everything. */
.sky { position: fixed; inset: 0; z-index: -2; pointer-events: none; background: linear-gradient(var(--sky-top), var(--sky-bottom) 78%); }
.sky i { position: absolute; display: block; }
.sun { left: var(--sun-x); top: var(--sun-y); width: clamp(90px, 9vw, 130px); aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; opacity: var(--sun-o);
  background: var(--sun-c); box-shadow: 0 0 0 clamp(14px, 1.4vw, 22px) color-mix(in srgb, var(--sun-c) 35%, transparent), 0 0 80px 30px color-mix(in srgb, var(--sun-c) 30%, transparent); }
.moon { right: 14%; top: 14%; width: 64px; aspect-ratio: 1; border-radius: 50%; opacity: var(--night-o); box-shadow: inset -14px 8px 0 0 #F3EBC8; }
.stars { inset: 0 0 30%; opacity: var(--night-o);
  background-image: radial-gradient(1.4px 1.4px at 12% 18%, #fff, transparent), radial-gradient(1px 1px at 28% 8%, #fff, transparent), radial-gradient(1.6px 1.6px at 44% 26%, #fff, transparent),
    radial-gradient(1px 1px at 58% 12%, #fff, transparent), radial-gradient(1.4px 1.4px at 72% 30%, #fff, transparent), radial-gradient(1px 1px at 86% 6%, #fff, transparent),
    radial-gradient(1.2px 1.2px at 8% 42%, #fff, transparent), radial-gradient(1px 1px at 36% 46%, #fff, transparent), radial-gradient(1.4px 1.4px at 64% 50%, #fff, transparent),
    radial-gradient(1px 1px at 92% 38%, #fff, transparent), radial-gradient(1.2px 1.2px at 20% 60%, #fff, transparent), radial-gradient(1px 1px at 52% 64%, #fff, transparent); }
.horizon { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 22vh; fill: var(--hill); }

/* A section's own landscape (hero, finale), drawn by home.js from art.js; the sky shows through. */
.land { position: absolute; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.land svg { position: absolute; left: 0; bottom: 0; width: 100%; height: 100%; }

/* Nav over the sky */
:root:has(main.home) .nav { color: var(--nav-ink); }
:root:has(main.home) .nav.is-scrolled { background: var(--nav-material); color: var(--nav-ink); box-shadow: 0 .5px 0 color-mix(in srgb, var(--nav-ink) 14%, transparent); }
:root:has(main.home) .pill { background: var(--action); color: #fff; }

/* Hero: the copy and a cockpit to try, on the morning hills */
.hero { position: relative; min-height: 100svh; padding: calc(var(--nav-h) + env(safe-area-inset-top) + clamp(12px, 4vh, 48px)) 0 clamp(80px, 14vh, 160px); isolation: isolate; }
.hero-in { max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 480px); gap: clamp(28px, 4vw, 64px); align-items: center; }
.eyebrow { font-weight: 600; font-size: clamp(15px, 1.3vw, 18px); color: var(--ink-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(44px, 6.4vw, 88px); line-height: .98; letter-spacing: -.038em; font-weight: 800; }
.hero .lede { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.4; max-width: 30ch; margin-top: 20px; color: var(--ink-2); letter-spacing: -.016em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.home .btn-soft { background: rgba(255, 255, 255, .82); color: #12301E; box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 8px 24px -8px rgba(25, 60, 35, .25); }
.home [data-tod="dusk"] .btn-soft, .home [data-tod="night"] .btn-soft { background: rgba(255, 255, 255, .12); color: #F5F5F7; box-shadow: none; }
@media (prefers-color-scheme: dark) { .home .btn-soft { background: rgba(255, 255, 255, .12); color: #F5F5F7; box-shadow: none; } }
.fine { font-size: 13px; color: var(--ink-2); margin-top: 14px; }
.hero-demo { position: relative; }
.peek { position: absolute; z-index: 2; left: -26px; top: -54px; display: flex; align-items: flex-start; gap: 6px; pointer-events: none; }
.peek-face { width: clamp(92px, 9vw, 124px); filter: drop-shadow(0 10px 16px rgba(20, 50, 30, .25)); transition: transform .5s var(--spring-bouncy); }
.peek-face.bump { transform: translateY(-6px) rotate(-4deg); }
.say { margin-top: 6px; padding: 8px 13px; border-radius: 16px 16px 16px 4px; background: #fff; color: #12301E; font-weight: 700; font-size: 14px; white-space: nowrap;
  box-shadow: 0 8px 22px rgba(20, 50, 30, .18); transition: transform .4s var(--spring-bouncy), opacity .25s; }
.say.pop { animation: pop .45s var(--spring-bouncy); }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
.hero .ck-head { padding-left: clamp(80px, 8vw, 104px); }
.hero .ck-scene { aspect-ratio: 2 / 1; }
@media (max-width: 980px) {
  .hero { min-height: 0; }
  .hero-in { grid-template-columns: 1fr; }
  .hero-copy { text-align: center; }
  .hero .lede { margin-left: auto; margin-right: auto; }
  .cta { justify-content: center; }
  .hero-demo { width: min(100%, 480px); margin: 64px auto 0; }
  .peek { left: -6px; }
}
@media (max-width: 520px) { .cta { flex-direction: column; align-items: center; } .cta > * { width: min(100%, 300px); justify-content: center; } .peek { top: -48px; } }

/* Nervous to calm */
.calm { padding: clamp(60px, 9vw, 120px) 0; }
.calm-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: clamp(14px, 3vw, 36px); margin-top: 40px; }
.calm-card { margin: 0; display: grid; grid-template-columns: clamp(110px, 12vw, 150px) 1fr; align-items: center; gap: 20px; padding: 22px 26px; border-radius: var(--r-tile); background: var(--card);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.calm-card b { display: block; font-size: 15px; color: var(--ink-2); margin-bottom: 6px; }
.calm-card p { font-size: clamp(17px, 1.5vw, 20px); line-height: 1.4; font-weight: 600; letter-spacing: -.015em; }
.calm-arrow svg { width: 34px; height: 34px; fill: none; stroke: var(--ink-2); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 860px) { .calm-grid { grid-template-columns: 1fr; } .calm-arrow { justify-self: center; rotate: 90deg; } }

/* Story: the road becomes the page. The phone pins while four steps play. */
.story { position: relative; height: 440svh; color: var(--ink); }
.story::before { /* the centre line keeps going */
  content: ""; position: absolute; inset: 0 auto 0 50%; width: 6px; translate: -50% 0; pointer-events: none; display: none;
  -webkit-mask: linear-gradient(transparent, #000 4%, #000 92%, transparent); mask: linear-gradient(transparent, #000 4%, #000 92%, transparent);
}
.story-pin {
  position: sticky; top: 0; height: 100svh; max-width: 1240px; margin: 0 auto; padding: var(--nav-h) var(--gutter) 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: clamp(28px, 6vw, 96px);
  --pw: min(calc(min(76svh, 700px) * .4615), 330px);
}
.story-captions { display: grid; justify-self: end; max-width: 400px; }
.cap { grid-area: 1 / 1; opacity: 0; transform: translateY(26px); filter: blur(8px); pointer-events: none;
  transition: opacity .5s var(--ease-ios), transform var(--t-smooth) var(--spring-smooth), filter .5s var(--ease-ios); }
.cap.is-past { transform: translateY(-26px); }
.cap.is-active { opacity: 1; transform: none; filter: none; pointer-events: auto; }
.cap-k { font-size: 15px; font-weight: 600; color: var(--accent); margin-bottom: 12px; font-variant-numeric: tabular-nums; }
.cap h2 { font-size: clamp(30px, 3.6vw, 46px); line-height: 1.05; letter-spacing: -.028em; font-weight: 700; }
.cap p:last-child { margin-top: 16px; font-size: clamp(17px, 1.4vw, 19px); color: var(--ink-2); line-height: 1.5; }
.story-rail { display: grid; gap: 6px; justify-self: start; }
.story-rail button {
  display: flex; align-items: center; gap: 12px; padding: 8px 4px; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 600; color: var(--ink-2); text-align: left; transition: color .3s;
}
.story-rail button i { width: 3px; height: 26px; border-radius: 2px; background: var(--line); position: relative; overflow: hidden; }
.story-rail button i::after { content: ""; position: absolute; inset: 0; background: var(--accent); transform-origin: top; transform: scaleY(var(--f, 0)); }
.story-rail button.is-active { color: var(--ink); }
.story-progress { display: none; }
.phone-stage { perspective: 1400px; }
.phone-wrap {
  transform: translateY(calc((1 - var(--enter, 1)) * 10svh)) rotateX(calc((1 - var(--enter, 1)) * 24deg)) scale(calc(.9 + var(--enter, 1) * .1));
  transform-origin: 50% 100%; will-change: transform;
}

@media (max-width: 900px) {
  .story { height: 460svh; }
  .story::before { display: none; }
  .story-pin {
    grid-template-columns: 1fr; grid-template-rows: auto auto 1fr; align-items: start; justify-items: center; row-gap: 18px;
    padding-top: calc(var(--nav-h) + 14px);
    --pw: min(calc(min(58svh, 560px) * .4615), 68vw);
  }
  .story-rail { display: none; }
  .story-progress { display: flex; gap: 6px; width: min(100%, 420px); margin: 0; padding: 0; list-style: none; }
  .story-progress li { flex: 1; height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
  .story-progress li::after { content: ""; display: block; height: 100%; background: var(--accent); transform-origin: left; transform: scaleX(var(--f, 0)); }
  .phone-stage { grid-row: 2; }
  .story-captions { grid-row: 3; justify-self: center; text-align: center; max-width: 440px; }
  .cap h2 { font-size: clamp(25px, 6.6vw, 32px); }
  .cap p:last-child { margin-top: 8px; font-size: 16px; line-height: 1.42; }
  .cap-k { margin-bottom: 6px; font-size: 13px; }
}
@media (max-width: 900px) and (max-height: 700px) { .cap-k { display: none; } .cap p:last-child { font-size: 15px; } }

.phone-stage { position: relative; }
/* The character beside the phone, acting each step (D32). home.js fills the frames. */
.story-char { position: absolute; z-index: 2; right: calc(var(--pw) * -.6); bottom: calc(var(--pw) * -.04); width: calc(var(--pw) * .5); aspect-ratio: 2 / 3; pointer-events: none; }
.story-char > div { position: absolute; inset: 0; opacity: 0; transition: opacity .4s var(--ease-ios); }
.story-char > div.on { opacity: 1; }
.story-char .sc-act-front.on { animation: face-a 3.2s var(--ease-ios) infinite; }
.story-char .sc-act-turn.on { animation: face-b 3.2s var(--ease-ios) infinite; }
/* Two faces taking turns: a for the front, b for the head check. */
@keyframes face-a { 0%, 40% { opacity: 1; } 50%, 90% { opacity: 0; } 100% { opacity: 1; } }
@keyframes face-b { 0%, 40% { opacity: 0; } 50%, 90% { opacity: 1; } 100% { opacity: 0; } }
.story-char .waves { position: absolute; left: 84%; top: 26%; width: 22%; aspect-ratio: 1; border: 3px solid var(--accent); border-left-color: transparent; border-bottom-color: transparent; border-radius: 50%; rotate: 45deg; opacity: 0; }
.story-char .sc-listen.on .waves { animation: wave 1.6s ease-out infinite; }
@keyframes wave { 0% { opacity: 0; scale: .6; } 30% { opacity: .9; } 100% { opacity: 0; scale: 1.4; } }
@media (max-width: 900px) { .story-char { right: calc(var(--pw) * -.34); width: calc(var(--pw) * .42); } }

/* Phone: drawn in CSS, sized by --pw, contents scale with container units */
.phone {
  --p-bg: #F2F2F7; --p-card: #FFFFFF; --p-text: #000; --p-text-2: #8A8A8E; --p-fill: rgba(120, 120, 128, .12); --p-hair: rgba(60, 60, 67, .16);
  position: relative; width: var(--pw); aspect-ratio: 9 / 19.5; border-radius: calc(var(--pw) * .17); padding: calc(var(--pw) * .032);
  background: linear-gradient(150deg, #5B5E64, #2A2C30 22%, #1A1B1E 60%, #3C3F44);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14), inset 0 0 0 calc(var(--pw) * .012) #0B0B0C,
    0 50px 90px -30px rgba(0, 0, 0, .7), 0 20px 40px -20px rgba(0, 0, 0, .5);
}
@media (prefers-color-scheme: dark) {
  .phone { --p-bg: #000; --p-card: #1C1C1E; --p-text: #fff; --p-text-2: #8D8D93; --p-fill: rgba(120, 120, 128, .24); --p-hair: rgba(84, 84, 88, .5); }
}
.screen { position: relative; height: 100%; border-radius: calc(var(--pw) * .14); overflow: hidden; background: var(--p-bg); color: var(--p-text);
  container-type: inline-size; font-size: 4.2cqw; letter-spacing: -.01em; }
.island { position: absolute; z-index: 3; top: 2.8cqw; left: 50%; translate: -50% 0; width: 31cqw; height: 9.2cqw; border-radius: 6cqw; background: #000; }
.sb { position: absolute; z-index: 2; inset: 0 0 auto; height: 14cqw; display: flex; align-items: center; justify-content: space-between; padding: 1.4cqw 8cqw 0 10cqw; font-weight: 600; font-size: 4.1cqw; }
.sb svg { height: 3.2cqw; width: auto; fill: currentColor; }
.sb-icons { display: flex; gap: 1.4cqw; align-items: center; }
.home-ind { position: absolute; z-index: 2; bottom: 2.2cqw; left: 50%; translate: -50% 0; width: 35cqw; height: 1.3cqw; border-radius: 1cqw; background: var(--p-text); opacity: .85; }

.scr { position: absolute; inset: 15cqw 0 0; padding: 0 5cqw 9cqw; display: flex; flex-direction: column; gap: 4cqw;
  opacity: 0; transform: scale(1.05); filter: blur(5px);
  transition: opacity .45s var(--ease-ios), transform var(--t-smooth) var(--spring-smooth), filter .45s var(--ease-ios); }
.scr.is-past { transform: scale(.94); }
.scr.is-active { opacity: 1; transform: none; filter: none; }
.scr:not(.is-active) * { transition-delay: 0s !important; animation-play-state: paused !important; }

.app-top { display: grid; grid-template-columns: 7cqw 1fr 7cqw; align-items: center; text-align: center; margin-top: 1cqw; }
.app-top svg { width: 5.6cqw; height: 5.6cqw; stroke: var(--look); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.app-top b { display: block; font-size: 4.4cqw; font-weight: 600; }
.app-top small { display: block; font-size: 3.3cqw; color: var(--p-text-2); }
.chip { align-self: center; font-size: 3.1cqw; font-weight: 600; color: var(--p-text-2); background: var(--p-fill); padding: 1.2cqw 3cqw; border-radius: 9cqw; font-variant-numeric: tabular-nums; }
.p-card { background: var(--p-card); border-radius: 5.5cqw; padding: 5cqw; }
.large { font-size: 7.4cqw; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; margin-top: 2cqw; }
.sub { font-size: 3.4cqw; color: var(--p-text-2); margin-top: -2.6cqw; }

/* 1 · Listen */
.examiner { display: flex; flex-direction: column; gap: 4cqw; padding: 7cqw 6cqw; margin-top: 2cqw; }
.voice { display: flex; align-items: center; gap: 1.3cqw; height: 9cqw; }
.voice i { width: 1.6cqw; height: 100%; border-radius: 1cqw; background: var(--look); transform: scaleY(.25); }
.scr.is-active .voice i { animation: talk 1.1s ease-in-out infinite alternate; animation-delay: calc(var(--n) * -170ms); }
@keyframes talk { 0% { transform: scaleY(.22); } 40% { transform: scaleY(.9); } 70% { transform: scaleY(.45); } 100% { transform: scaleY(1); } }
.voice span { margin-left: 2cqw; font-size: 3.2cqw; font-weight: 600; color: var(--look); }
.quote { font-size: 7.6cqw; font-weight: 700; line-height: 1.16; letter-spacing: -.02em; }
.quote span { color: var(--p-text-2); opacity: .55; transition: color .3s, opacity .3s; }
.scr.is-active .quote span { color: var(--p-text); opacity: 1; transition-delay: calc(var(--w) * 190ms + 350ms); }
.drive { display: grid; gap: 2.6cqw; padding: 4.4cqw 5cqw; }
.drive-row { display: flex; justify-content: space-between; font-size: 3.4cqw; color: var(--p-text-2); }
.drive-row b { color: var(--p-text); font-weight: 600; }
.drive-row span:last-child { font-variant-numeric: tabular-nums; }
.drive-row:last-child span:last-child { color: var(--p-text); font-weight: 500; }
.drive-dots { display: grid; grid-template-columns: repeat(23, 1fr); gap: .7cqw; }
.drive-dots i { height: 1.8cqw; border-radius: 1cqw; background: var(--p-fill); }
.drive-dots .done { background: var(--caught); }
.drive-dots .now { background: var(--accent); }
.scr.is-active .drive-dots .now { animation: now 1.4s ease-in-out infinite alternate; }
@keyframes now { to { opacity: .35; } }
.hint { margin-top: auto; display: flex; align-items: center; gap: 2.4cqw; font-size: 3.4cqw; color: var(--p-text-2); justify-content: center; }
.hint svg { width: 5cqw; height: 5cqw; stroke: currentColor; fill: none; stroke-width: 2; }
.placard-p { display: flex; align-items: center; justify-content: center; height: 13.5cqw; border-radius: 4.6cqw; background: var(--action); color: #fff; font-weight: 700; font-size: 4.4cqw; }
.placard-p.is-quiet { background: var(--p-fill); color: var(--p-text-2); }

/* 2 · Act */
.act-q { font-size: 4.6cqw; font-weight: 600; text-align: center; line-height: 1.25; }
.timer { position: relative; flex: 1; min-height: 70cqw; border-radius: 6cqw; overflow: hidden; background: var(--asphalt); }
.timer canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.looks { display: grid; grid-template-columns: repeat(4, 1fr); gap: 2cqw; }
.look { display: grid; justify-items: center; gap: 1.2cqw; padding: 2.6cqw 0 2cqw; border-radius: 3.6cqw; background: var(--p-card); font-size: 2.8cqw; font-weight: 500; color: var(--p-text-2);
  transition: background-color .25s, color .25s, transform var(--t-bouncy) var(--spring-bouncy); }
.look svg { width: 6cqw; height: 6cqw; stroke: currentColor; fill: none; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.look.on { background: color-mix(in srgb, var(--look) 16%, var(--p-card)); color: var(--look); transform: scale(1.07); }
.look.done { color: var(--p-text); }
.eyes { display: flex; align-items: center; justify-content: center; gap: 3cqw; font-size: 3.6cqw; color: var(--p-text-2); font-weight: 500; }
.eyes-head { position: relative; width: 7cqw; height: 7cqw; }
.eyes-head::before { content: ""; position: absolute; inset: 1.6cqw; border-radius: 50%; background: var(--look); }
.eyes-head i { position: absolute; left: 50%; bottom: 50%; width: 6cqw; height: 4cqw; translate: -50% 0; transform-origin: 50% 100%;
  background: linear-gradient(to top, color-mix(in srgb, var(--look) 55%, transparent), transparent); clip-path: polygon(50% 100%, 0 0, 100% 0);
  transform: rotate(var(--eye, 0deg)); transition: transform var(--t-bouncy) var(--spring-bouncy); }
.eyes-label { min-width: 34cqw; }

/* 3 · Review */
.checks { list-style: none; margin: 0; padding: 0 4.4cqw; }
.checks li { display: grid; grid-template-columns: 6cqw 1fr; column-gap: 3cqw; align-items: center; padding: 3cqw 0; border-bottom: .5px solid var(--p-hair); font-size: 3.7cqw; line-height: 1.25;
  border-radius: 2cqw; transition: background-color .35s, padding .35s, margin .35s; }
.checks li:last-child { border-bottom: 0; }
.tick { position: relative; width: 5.4cqw; height: 5.4cqw; border-radius: 50%; background: var(--caught); transform: scale(0); transition: transform var(--t-bouncy) var(--spring-bouncy), background-color .25s; }
.tick::before, .tick::after { content: ""; position: absolute; inset: 0; background: #fff; transition: opacity .2s; }
.tick::before { -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.tick::after { opacity: 0; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 8.5l7 7m0-7l-7 7' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M8.5 8.5l7 7m0-7l-7 7' fill='none' stroke='black' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E") center/100% no-repeat; }
.scr.is-active .tick { transform: scale(1); transition-delay: calc(var(--n) * 90ms + 150ms); }
.trick { grid-column: 2; display: grid; grid-template-rows: 0fr; opacity: 0; transition: grid-template-rows var(--t-smooth) var(--spring-smooth), opacity .4s; }
.trick > span { overflow: hidden; font-size: 3.3cqw; color: var(--p-text-2); }
.trick b { color: var(--p-text); font-weight: 600; }
.scr.is-active .miss { background: color-mix(in srgb, var(--skipped) 13%, transparent); padding-left: 2cqw; padding-right: 2cqw; margin: 0 -2cqw; transition-delay: 1.15s; }
.scr.is-active .miss .tick { background: var(--skipped); transition-delay: 1.15s, 1.15s; }
.scr.is-active .miss .tick::before { opacity: 0; transition-delay: 1.15s; }
.scr.is-active .miss .tick::after { opacity: 1; transition-delay: 1.15s; }
.scr.is-active .miss .trick { grid-template-rows: 1fr; opacity: 1; padding-top: 1.6cqw; transition-delay: 1.3s; }
.tap { position: absolute; width: 11cqw; height: 11cqw; border-radius: 50%; background: rgba(120, 120, 128, .35); opacity: 0; pointer-events: none; left: -2.8cqw; top: .6cqw; }
.scr.is-active .tap { animation: tap 1.2s .7s var(--ease-ios) both; }
@keyframes tap { 0% { opacity: 0; transform: scale(.4); } 30% { opacity: 1; transform: scale(1); } 45% { transform: scale(.82); } 100% { opacity: 0; transform: scale(1.5); } }
.score { display: flex; align-items: center; justify-content: space-between; font-size: 3.6cqw; font-weight: 600; }
.score span { color: var(--p-text-2); font-weight: 500; }
.drill-next { margin-top: auto; }

/* 4 · Drill */
.ws { display: grid; gap: 1.8cqw; padding: 3.2cqw 0; border-bottom: .5px solid var(--p-hair); }
.ws:first-child { padding-top: 0; } .ws:last-child { border-bottom: 0; padding-bottom: 0; }
.ws-row { display: flex; justify-content: space-between; font-size: 3.7cqw; }
.ws-row b { font-weight: 600; }
.ws-row span { color: var(--p-text-2); font-variant-numeric: tabular-nums; }
.ws-bar { height: 1.8cqw; border-radius: 1cqw; background: var(--p-fill); overflow: hidden; }
.ws-bar i { display: block; height: 100%; border-radius: inherit; background: var(--skipped); transform-origin: left; transform: scaleX(0); transition: transform 1s var(--spring-smooth); }
.scr.is-active .ws-bar i { transform: scaleX(var(--w)); transition-delay: calc(var(--n) * 120ms + 250ms); }
.cleared { display: flex; align-items: center; gap: 3cqw; font-size: 3.6cqw; }
.cleared .tick { transform: scale(1); }
.drill-cta { margin-top: auto; }
.scr.is-active .drill-cta { animation: press 3.2s 1.4s var(--ease-ios) infinite; }
@keyframes press { 0%, 80%, 100% { transform: none; } 86% { transform: scale(.95); } 92% { transform: scale(1.01); } }

/* Stats on an afternoon band */
.stats { padding: clamp(80px, 11vw, 140px) 0 clamp(40px, 6vw, 70px); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-top: 44px; }
.stat { padding: 24px 22px; border-radius: 24px; background: var(--card); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.stat b { display: block; font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, sans-serif; font-size: clamp(44px, 5.4vw, 70px); line-height: 1; letter-spacing: -.04em; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 10px; color: var(--ink-2); font-size: 16px; max-width: 220px; }
@media (max-width: 760px) { .stats-grid { grid-template-columns: repeat(2, 1fr); margin-top: 32px; } }

/* Feature tiles at golden hour: six big ones and a slim row */
.features { padding: clamp(50px, 7vw, 90px) 0 clamp(60px, 8vw, 100px); }
.bento { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 44px; }
.tile { position: relative; display: flex; flex-direction: column; min-height: 320px; padding: 28px; border-radius: var(--r-tile); background: var(--card); overflow: hidden; isolation: isolate;
  -webkit-backdrop-filter: blur(18px) saturate(1.3); backdrop-filter: blur(18px) saturate(1.3); box-shadow: 0 20px 50px -30px rgba(60, 40, 10, .35); }
.tile h3 { font-size: 24px; line-height: 1.15; letter-spacing: -.024em; font-weight: 700; }
.tile p { margin-top: 8px; color: var(--ink-2); font-size: 17px; }
.tile-k { font-size: 14px; font-weight: 600; color: var(--ink-2); margin-bottom: 8px; }
.tile-art { margin-top: auto; padding-top: 24px; }
.tile-wide { grid-column: span 2; }
.road-art img { display: block; width: min(100%, 440px); height: auto; filter: drop-shadow(0 14px 22px rgba(0, 0, 0, .18)); }
.rules-mini { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.rules-mini li { padding: 10px 14px; border-left: 3px solid var(--look); border-radius: 4px 12px 12px 4px; background: var(--surface-2); font-size: 15px; font-weight: 500; line-height: 1.35; }
@media (max-width: 980px) { .bento { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .bento { grid-template-columns: 1fr; gap: 14px; } .tile-wide { grid-column: auto; } .tile { min-height: 0; padding: 24px; } }

/* Head check: the character with AirPods turns chin to shoulder, and it counts. */
.headcheck { text-align: center; }
.hc-stage { position: relative; width: 150px; aspect-ratio: 84 / 88; margin: 0 auto; }
.hc-stage::before { content: ""; position: absolute; inset: -10% -14% 0; border-radius: 50%; background: radial-gradient(closest-side, rgba(111, 166, 255, .28), transparent); }
.hc { position: absolute; inset: 0; }
.hc-front { animation: face-a 5s var(--ease-ios) infinite; }
.hc-turn { opacity: 0; animation: face-b 5s var(--ease-ios) infinite; }
.head-label { display: flex; justify-content: center; gap: 8px; margin-top: 14px; font-weight: 600; font-size: 15px; }
.head-label span { color: var(--caught); animation: headok 5s infinite; }
@keyframes headok { 0%, 56% { opacity: 0; } 62%, 88% { opacity: 1; } 94%, 100% { opacity: 0; } }

/* Learn scene */
.scene { position: relative; border-radius: 20px; overflow: hidden; background: var(--scene-ground); aspect-ratio: 4 / 3; }
.tile-learn .scene { aspect-ratio: 16 / 9; }
.tile-learn .scene svg { position: absolute; inset: 0; }
@media (max-width: 640px) { .tile-learn .scene { aspect-ratio: 1; } }
.scene svg { width: 100%; height: 100%; }
.seg { position: absolute; left: 50%; bottom: 14px; translate: -50% 0; display: grid; grid-template-columns: repeat(3, 1fr); white-space: nowrap; text-align: center; padding: 3px; border-radius: 999px; background: rgba(0, 0, 0, .45);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .75); }
.seg span { position: relative; z-index: 1; padding: 6px 14px; border-radius: 999px; }
.seg i { position: absolute; z-index: 0; top: 3px; bottom: 3px; left: 3px; width: calc((100% - 6px) / 3); border-radius: 999px; background: var(--action); animation: seg 9s infinite; transition: none; }
/* One 9 s loop shared with the SVG cars: Watch 0–31 %, Your turn 34–64 %, Mistake 67–97 % */
@keyframes seg { 0%, 31% { transform: translateX(0); } 34%, 64% { transform: translateX(100%); } 67%, 97% { transform: translateX(200%); } 100% { transform: translateX(0); } }
.scene .bubble { position: absolute; left: 50%; top: 16px; translate: -50% 0; padding: 9px 16px; border-radius: 999px; background: var(--sign); color: var(--sign-ink); font-weight: 700; font-size: 15px; white-space: nowrap;
  opacity: 0; animation: bubble 9s ease-in-out infinite; }
@keyframes bubble { 0%, 41% { opacity: 0; transform: scale(.6); } 44%, 62% { opacity: 1; transform: scale(1); } 65%, 100% { opacity: 0; transform: scale(.8); } }
@keyframes bubble-bad { 0%, 73% { opacity: 0; transform: scale(.6); } 76%, 93% { opacity: 1; transform: scale(1); } 96%, 100% { opacity: 0; transform: scale(.8); } }

/* Lock Screen card */
.lock { border-radius: 22px; padding: 22px 16px 16px; text-align: center; color: #fff;
  background: radial-gradient(120% 90% at 20% 0%, #4E6E9E, transparent 60%), radial-gradient(120% 100% at 100% 100%, #C9973A, transparent 55%), #1C2333; }
.lock-date { font-size: 14px; font-weight: 600; opacity: .85; }
.lock-time { font-size: 64px; line-height: 1; font-weight: 700; letter-spacing: -.03em; margin: 2px 0 16px; font-variant-numeric: tabular-nums; }
.activity { display: grid; gap: 6px; text-align: left; padding: 14px 16px; border-radius: 20px; background: rgba(20, 20, 22, .62);
  -webkit-backdrop-filter: blur(20px) saturate(160%); backdrop-filter: blur(20px) saturate(160%); }
.activity-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 600; color: rgba(255, 255, 255, .7); }
.activity-top .mark { width: 20px; height: 20px; border-radius: 5px; }
.activity-top span:first-child { display: flex; align-items: center; gap: 8px; }
.activity-main { display: flex; align-items: baseline; justify-content: space-between; font-size: 17px; font-weight: 600; }
.activity-main b { font-size: 24px; color: var(--accent-on-dark); letter-spacing: -.02em; }
.activity-note { font-size: 13px; line-height: 1.35; color: rgba(255, 255, 255, .72); }

/* Maneuver Lab */
.lab { border-radius: 20px; overflow: hidden; background: var(--scene-ground); aspect-ratio: 16 / 10; }
.lab svg { width: 100%; height: 100%; }

/* The slim row: smaller things, one line each */
.slim { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.slim li, .slim a { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: auto auto; column-gap: 12px; align-items: center; }
.slim li { padding: 16px 18px; border-radius: 20px; background: var(--card-2); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.slim a { text-decoration: none; color: inherit; grid-column: 1 / -1; grid-row: 1 / -1; }
.slim-i { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: color-mix(in srgb, var(--look) 14%, transparent); color: var(--look); }
.slim-i svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.slim b { font-size: 16px; }
.slim span:not(.slim-i) { font-size: 14px; color: var(--ink-2); line-height: 1.3; }
@media (max-width: 980px) { .slim { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .slim { grid-template-columns: 1fr; } }

/* Try it at sunset: two free drills */
.try { padding: clamp(40px, 6vw, 80px) 0 clamp(60px, 8vw, 110px); }
.try-card { display: grid; grid-template-columns: 1.3fr 1fr; align-items: end; gap: 24px; padding: clamp(28px, 4vw, 56px); border-radius: 36px; background: var(--card);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); overflow: hidden; }
.try-copy > p { margin-top: 12px; font-size: 19px; color: var(--ink-2); }
.picks { display: grid; gap: 12px; margin-top: 26px; max-width: 520px; }
.pick { display: grid; grid-template-columns: 1fr auto; align-items: center; column-gap: 12px; padding: 16px 20px; border-radius: 20px; text-decoration: none; color: inherit; background: rgba(255, 255, 255, .7); }
.pick b { font-size: 18px; } .pick span { grid-column: 1; font-size: 15px; color: var(--ink-2); }
.pick svg { grid-row: 1 / span 2; grid-column: 2; width: 14px; height: 14px; color: var(--ink-2); }
@media (prefers-color-scheme: dark) { .pick { background: rgba(255, 255, 255, .08); } }
.try-art { width: min(100%, 260px); justify-self: center; margin-bottom: -12px; }
@media (max-width: 760px) { .try-card { grid-template-columns: 1fr; } .try-art { width: 180px; } }

/* Details (spec sheet for power users) */
.details { padding: clamp(70px, 9vw, 120px) 0 0; }
.spec { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 56px; margin: 48px 0 0; }
.spec div { display: grid; grid-template-columns: 150px 1fr; gap: 16px; padding: 18px 0; border-top: 1px solid var(--hairline); }
.spec dt { font-weight: 600; }
.spec dd { margin: 0; color: var(--text-2); }
.spec dd q { quotes: "“" "”"; color: var(--text); }
@media (max-width: 860px) { .spec { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .spec div { grid-template-columns: 1fr; gap: 4px; } }

/* FAQ */
.faq { padding: clamp(80px, 10vw, 140px) 0 0; }
.faq-list { margin-top: 40px; border-bottom: 1px solid var(--hairline); }
.faq-item { border-top: 1px solid var(--hairline); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 22px 0; cursor: pointer; list-style: none; font-size: clamp(19px, 1.7vw, 22px); font-weight: 600; letter-spacing: -.018em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary i { position: relative; flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-2); transition: transform var(--t-smooth) var(--spring-smooth), background-color .3s; }
.faq-item summary i::before, .faq-item summary i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px; border-radius: 1px; background: var(--text); translate: -50% -50%; }
.faq-item summary i::after { rotate: 90deg; }
.faq-item.is-open summary i { transform: rotate(135deg); }
.faq-body { overflow: hidden; }
.faq-body p { padding: 0 48px 24px 0; color: var(--text-2); font-size: 18px; max-width: 760px; }

.faq { padding-bottom: clamp(40px, 6vw, 80px); }

/* Finale at night: the cockpit icon, Full G, a proud wave */
.final { position: relative; isolation: isolate; padding: clamp(90px, 12vw, 170px) 0 clamp(260px, 30vw, 380px); text-align: center; overflow: hidden; }
.final .app-icon { width: 112px; height: 112px; margin: 0 auto 32px; border-radius: 26px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 0 80px 10px rgba(63, 203, 114, .25), 0 24px 50px -18px rgba(0, 0, 0, .6); }
.final .app-icon svg { width: 100%; height: 100%; }
.final .h2 { font-size: clamp(38px, 6vw, 72px); }
.final .cta { justify-content: center; margin-top: 34px; }
.final .appstore { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4); }
.finale { position: absolute; left: 50%; bottom: clamp(40px, 6vw, 70px); width: 300px; height: 200px; translate: -50% 0; pointer-events: none; }
.flag { position: absolute; left: 160px; bottom: 6px; width: 60px; height: 120px; }
.finale-char { position: absolute; left: 70px; bottom: 0; width: 110px; }
.finale-car { position: absolute; left: -4px; bottom: -2px; width: 84px; }
.finale-tag { position: absolute; left: 190px; bottom: 0; font-size: 13px; font-weight: 700; padding: 5px 10px; border-radius: 99px; background: rgba(255, 255, 255, .92); color: #12301E; }
.confetti { position: absolute; inset: -60px -40px 40px; }
.confetti i { position: absolute; width: 7px; height: 11px; border-radius: 2px; opacity: 0; }
.confetti.go i { animation: fall 2.4s cubic-bezier(.2, .6, .4, 1) forwards; animation-delay: var(--d); }
@keyframes fall { 0% { opacity: 0; transform: translate(0, -40px) rotate(0); } 10% { opacity: 1; } 100% { opacity: 0; transform: translate(var(--x), 170px) rotate(var(--r)); } }

/* Footer: the page ends at night */
main.home ~ .foot { background: #0B1322; color: rgba(235, 235, 245, .62); border-top-color: rgba(255, 255, 255, .08); }
main.home ~ .foot .brand, main.home ~ .foot .foot-links a { color: #F5F5F7; }

/* The road down the page: the journey's seven stops, with your car driving it as you scroll */
.spine { position: absolute; z-index: 0; top: 0; left: max(10px, calc((100% - var(--max)) / 2 - 104px)); width: 96px; pointer-events: none; display: none; }
@media (min-width: 1300px) { .spine { display: block; } }
.spine svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.spine .stop text { font: 700 11px -apple-system, system-ui, sans-serif; fill: #12301E; }
.spine .stop rect { fill: rgba(255, 255, 255, .9); }
.spine .stop .ring { fill: #fff; stroke: #A9B0B8; stroke-width: 3; transition: fill .3s, stroke .3s; }
.spine .stop.done .ring { fill: #2F8F55; stroke: #fff; }
.spine .stop .tick { opacity: 0; transition: opacity .3s; }
.spine .stop.done .tick { opacity: 1; }
.spine .car { transition: none; }

/* Reduced motion (home parts) */
@media (prefers-reduced-motion: reduce) {
  .phone-wrap { transform: none !important; }
  .cap, .scr { transform: none !important; filter: none !important; }
  .hc-turn { opacity: 1; } .hc-front { opacity: 0; } .head-label span { opacity: 1; }
  .scene .bubble { opacity: 1; } .seg i { transform: none; }
  .story-char .sc-act-turn.on { opacity: 1; } .story-char .sc-act-front.on { opacity: 0; }
}

/* Phones: the morning sun moves out from behind the headline; the hero's hills fade into the sky below. */
@media (max-width: 760px) { :root { --sun-x: 88%; --sun-y: 8%; } }
.hero .land { -webkit-mask: linear-gradient(#000 82%, transparent); mask: linear-gradient(#000 82%, transparent); }
