/* ==========================================================================
   Home page (body.v3): white, photo-led. Big uppercase headlines in the
   wordmark's face (Barlow), photographs in large rounded frames with the
   app's own cards laid over them, a light grey Apple Watch band and a photo
   finale. Always light: the page loads styles.light.css, a copy of
   styles.css with its dark-mode rules switched off (tools/build_home_v3.py).
   Motion: parts rise once as they come into view (app.js adds .in to
   [data-reveal]); photos settle from a slight zoom; nothing is pinned.
   ========================================================================== */
.v3 {
  --st-awake: #FF9500; --st-rem: #32ADE6; --st-core: #007AFF; --st-deep: #5856D6;
  --spring: cubic-bezier(.16, 1, .3, 1);
  --frame-r: 28px;
  --ink: #111111;
}
html:has(body.v3) { background: #fff; color-scheme: light; }
.v3 h1, .v3 .section-title, .v3 .pillar h3, .v3 .h-cta h2, .v3 .cta h2 {
  font-family: var(--font-brand); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: .94;
}
.v3 .eyebrow { font-size: .74rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.v3 .eyebrow::before { width: 6px; height: 6px; background: var(--live); }
.v3 .section-title { font-size: clamp(2.3rem, 1.3rem + 3.4vw, 4.4rem); margin-bottom: 20px; }
.v3 .section-sub { font-size: 1.1rem; }

/* Reveal: a longer, softer rise */
html.js .v3 [data-reveal] { opacity: 0; transform: translateY(44px); transition: opacity 1s var(--spring), transform 1.2s var(--spring); }
html.js .v3 [data-reveal].in { opacity: 1; transform: none; }

/* ── Top bar ── */
.h-top { background: #0B0B0C; color: #fff; display: flex; justify-content: center; align-items: center; gap: 14px; flex-wrap: wrap; padding: 9px 16px; font-size: .82rem; text-align: center; }
.h-top span { color: rgba(255,255,255,.72); }
.h-top a { color: #fff; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.v3 nav.site-nav { background: rgba(255,255,255,.86); }

/* ── Photo frames ── */
.frame { position: relative; overflow: hidden; border-radius: var(--frame-r); aspect-ratio: 5 / 4; background: #e9e9ea; isolation: isolate; }
.frame.tall { aspect-ratio: 4 / 5; }
.frame::after { content: ''; position: absolute; inset: 0; z-index: 3; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); pointer-events: none; }
.frame .ph, .hero-pic .ph, .h-cta-frame .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.h-media .frame .ph, .pillar .frame .ph { transform: scale(1.1); transition: transform 1.8s var(--spring); }
.h-media.in .frame .ph, .pillar.in .frame .ph { transform: none; }

/* ── App cards over the photos ── */
.ov { position: absolute; z-index: 2; color: var(--ink); font-size: 13px; line-height: 1.35; border-radius: 20px; padding: 16px;
  background: rgba(255,255,255,.86); -webkit-backdrop-filter: blur(20px) saturate(170%); backdrop-filter: blur(20px) saturate(170%);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.7); }
.h-media .ov, .pillar .ov { opacity: 0; transform: translateY(28px) scale(.97); transition: opacity .8s var(--spring) .45s, transform 1s var(--spring) .45s; }
.h-media.in .ov, .pillar.in .ov { opacity: 1; transform: none; }
.h-media .ov + .ov { transition-delay: .65s; }
.ov [data-ic] { display: inline-flex; } .ov [data-ic] svg { width: 1em; height: 1em; }
.ov-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ov-h b { font-size: 14px; display: inline-flex; align-items: center; gap: 6px; }
.ov-h span { color: #6b6b6b; font-size: 12px; }
.ov-k { font-size: 13px; font-weight: 600; color: #6b6b6b; }
.ov-v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ov-v small { font-size: 13px; font-weight: 500; color: #6b6b6b; letter-spacing: 0; margin-left: 5px; }
.ov-sub { font-size: 12px; color: #6b6b6b; margin-top: 4px; }
.ov-sub.ok, .ov .ok { color: var(--live); display: inline-flex; align-items: center; gap: 4px; }

/* Rings */
.rg { position: relative; display: inline-block; flex-shrink: 0; }
.rg svg { width: 100%; height: 100%; transform: rotate(-90deg); display: block; }
.rg circle { fill: none; stroke-linecap: round; }
.rg .tr { stroke: rgba(0,0,0,.08); }
.rg .tg { stroke: var(--c); opacity: .28; stroke-linecap: butt; }
.rg .pr { stroke: var(--c); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--to) * 100); transition: stroke-dashoffset 1.6s var(--spring) .7s; }
.rg b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
html.js .h-media:not(.in) .rg .pr, html.js .pillar:not(.in) .rg .pr { stroke-dashoffset: 100; }

/* Today (hero) */
.ov-today { width: 340px; padding: 18px; }
.ov-rings { display: grid; grid-template-columns: repeat(3, 1fr); margin: 16px 0 4px; text-align: center; }
.ov-rings > div { display: flex; flex-direction: column; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; }
.ov-tip { display: flex; gap: 10px; align-items: center; margin-top: 14px; padding-top: 14px; border-top: 1px solid rgba(0,0,0,.08); }
.ov-tip i { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; background: color-mix(in srgb, var(--live) 14%, transparent); color: var(--live); flex-shrink: 0; font-size: 16px; }
.ov-tip b { display: block; font-size: 13px; } .ov-tip span { font-size: 12px; color: #6b6b6b; }

/* Pillar cards */
.ov-sm { left: 16px; right: 16px; bottom: 16px; }
.ov-row { display: flex; align-items: center; gap: 14px; }
.ov-scale { position: relative; height: 8px; border-radius: 4px; background: rgba(0,0,0,.08); margin: 12px 0 8px; }
.ov-scale .rg2 { position: absolute; top: 0; bottom: 0; border-radius: 4px; background: color-mix(in srgb, var(--c-training) 40%, transparent); }
.ov-scale .mk { position: absolute; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: var(--ink); box-shadow: 0 0 0 3px #fff; transition: left 1.4s var(--spring) .8s; }
html.js .pillar:not(.in) .ov-scale .mk { left: 0 !important; }
.ov-lanes { display: flex; flex-direction: column; gap: 3px; margin: 12px 0 6px; }
.ov-lanes .ln { position: relative; height: 8px; border-radius: 4px; background: rgba(0,0,0,.06); overflow: hidden; }
.ov-lanes i { position: absolute; top: 0; bottom: 0; border-radius: 2px; transform-origin: left; transition: transform .8s var(--spring) .8s; }
html.js .pillar:not(.in) .ov-lanes i { transform: scaleX(0); }

/* Recording */
.ov-rec { right: 20px; bottom: 20px; width: 300px; }
.ov-rec .live { color: var(--live); font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.ov-rec .live i { width: 7px; height: 7px; border-radius: 50%; background: var(--live); animation: hPulse 1.6s ease-in-out infinite; }
@keyframes hPulse { 50% { opacity: .3; } }
.ov-clock { font-size: 56px; font-weight: 700; letter-spacing: -.045em; line-height: 1; margin: 12px 0 14px; font-variant-numeric: tabular-nums; }
.ov-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 12px; border-top: 1px solid rgba(0,0,0,.08); }
.ov-stats > div + div { padding-left: 10px; border-left: 1px solid rgba(0,0,0,.08); }
.ov-stats b { font-size: 19px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ov-stats small { font-size: 11px; color: #6b6b6b; margin-left: 2px; }
.ov-stats span { display: block; font-size: 11px; color: #6b6b6b; }

/* Food */
.ov-food { left: 20px; bottom: 20px; width: 320px; padding: 14px; }
.ov-search { display: flex; align-items: center; gap: 8px; height: 44px; padding: 0 14px; border-radius: 14px; background: rgba(0,0,0,.05); font-size: 15px; }
.ov-search > [data-ic] { color: #6b6b6b; }
.ov-search .caret { width: 2px; height: 18px; background: var(--live); margin-left: -6px; animation: hCaret 1s steps(1) infinite; }
@keyframes hCaret { 50% { opacity: 0; } }
.ov-res .r { display: flex; align-items: center; gap: 10px; padding: 11px 2px; transition: opacity .35s, transform .45s var(--spring); }
.ov-res .r + .r { border-top: 1px solid rgba(0,0,0,.07); }
.ov-res .r > div { flex: 1; min-width: 0; }
.ov-res b { display: flex; align-items: center; gap: 4px; font-size: 14px; } .ov-res b [data-ic] { color: var(--live); }
.ov-res span { font-size: 12px; color: #6b6b6b; } .ov-res em { font-style: normal; font-weight: 600; font-variant-numeric: tabular-nums; }
.ov-res .add { width: 28px; height: 28px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--ink); color: #fff; transition: background .3s, transform .3s var(--spring); }
.ov-res .add.ok { background: var(--live); transform: scale(1.08); }
.ov-food.typing .ov-res .r { opacity: 0; transform: translateY(6px); }
.ov-kcal { margin-top: 4px; padding-top: 10px; border-top: 1px solid rgba(0,0,0,.07); }
.ov-kcal > div:first-child { font-weight: 600; } .ov-kcal > div:first-child b { font-size: 20px; } .ov-kcal > div:first-child span { color: #6b6b6b; font-weight: 400; }
.ov-kcal .bar { height: 6px; border-radius: 3px; background: rgba(0,0,0,.07); margin: 8px 0 10px; overflow: hidden; }
.ov-kcal .bar i { display: block; height: 100%; width: var(--w); background: var(--c); border-radius: 3px; }
.ov-kcal .mac { display: grid; grid-template-columns: repeat(3, 1fr); }
.ov-kcal .mac span { display: block; font-size: 11px; font-weight: 600; }

/* Social */
.ov-post { left: 20px; top: 20px; width: 290px; }
.ov-post .h { display: flex; align-items: center; gap: 10px; }
.ov-post .ava { width: 36px; height: 36px; border-radius: 50%; background: #ececed; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.ov-post .h b { display: block; font-size: 14px; } .ov-post .h span { font-size: 12px; color: #6b6b6b; }
.ov-post p { margin: 10px 0 12px; font-size: 14px; }
.ov-post .a { display: flex; gap: 16px; font-weight: 600; } .ov-post .a > span { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; }
.ov-post .a [data-ic] { font-size: 19px; }
.ov-post .lk.on { color: var(--c-liked); } .ov-post .lk.on svg path { fill: currentColor; } .ov-post .lk.on svg { animation: hHeart .5s var(--spring); }
@keyframes hHeart { 40% { transform: scale(1.35); } }
.ov-level { right: 20px; bottom: 20px; display: flex; align-items: center; gap: 12px; padding: 12px 16px 12px 12px; }
.ov-level > span { display: flex; } .ov-level svg { display: block; width: 100%; height: auto; }
.ov-level b { display: block; font-size: 15px; } .ov-level div span { font-size: 12px; color: #6b6b6b; }

/* Health */
.ov-vital { right: 20px; bottom: 20px; width: 300px; }
/* "Your body": the two women stand right of centre, so the card sits
   bottom-left over the dumbbell rack (desktop; phones crop narrower) */
@media (min-width: 641px) { .h-row[data-row="vit"] .ov-vital { right: auto; left: 20px; width: 260px; } }
.ov-vital .ok { font-size: 12px; font-weight: 600; }
.ov-vital .band { display: block; width: 100%; height: auto; margin: 10px 0 2px; overflow: visible; }
.ov-vital .bd { fill: color-mix(in srgb, var(--live) 13%, transparent); }
.ov-vital .ln { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 1; stroke-dashoffset: 0; transition: stroke-dashoffset 1.6s cubic-bezier(.45,0,.2,1) .7s; }
html.js .h-media:not(.in) .ov-vital .ln { stroke-dashoffset: 1; }
.ov-vital .dt { fill: var(--live); stroke: #fff; stroke-width: 2.5; }

/* Flyover, as in the app (WorkoutFlyoverView.swift / WorkoutFlyoverMap.swift).
   home.js draws it with Mapbox GL JS, as the app does with the Mapbox Maps
   SDK: satellite, terrain, the app's atmosphere and its follow camera. The
   sky gradient shows until the map has loaded, then the map fades in over
   it. The marker, header and playback bar are the app's, in points; Mapbox's
   logo and credit sit just above the bar. */
.frame.fv-frame { aspect-ratio: 4 / 5; background: #B8D4F0; }
.fv { position: absolute; inset: 0; overflow: hidden; color: #fff; --my: 65%; --hz: 29%; }
.fv-sky { position: absolute; inset: 0; background: linear-gradient(#122952 0%, #295C9E calc(var(--hz) * .5), #B8D4F0 var(--hz), #B8D4F0 100%); }
.fv .fv-map { position: absolute; inset: 0; opacity: 0; transition: opacity .7s ease; } /* .fv: Mapbox's own CSS, loaded later, sets .mapboxgl-map to position: relative */
/* Mapbox sizes its canvas from the box's on-screen size, which the page zoom
   on wide screens (styles.light.css) has already enlarged, and the canvas is
   then enlarged again: the map came out 25% too big at 1920 px and slid away
   from the runner's dot. The map's box undoes the page zoom. */
.fv .fv-map { zoom: calc(1 / var(--page-zoom, 1)); }
.fv.ready .fv-map { opacity: 1; }
.fv-map .mapboxgl-canvas { outline: none; }
/* inside the map's box, which undoes the page zoom: offsets scale with it */
.fv .mapboxgl-ctrl-bottom-left, .fv .mapboxgl-ctrl-bottom-right { bottom: calc(64px * var(--page-zoom, 1)); }
.fv .mapboxgl-ctrl-attrib.mapboxgl-compact { margin: 0 calc(12px * var(--page-zoom, 1)) calc(6px * var(--page-zoom, 1)) 0; }
.fv .mapboxgl-ctrl-logo { margin: 0 0 calc(6px * var(--page-zoom, 1)) calc(12px * var(--page-zoom, 1)) !important; }
/* no WebGL or no map: a still satellite picture */
.fv.flat .fv-map { display: none; }
.fv.flat .fv-sky { background: url(/assets/photos/reservoir.jpg) 50% 50% / cover; }
/* the camera looks down steeply, so the numbers sit on the map, not on sky:
   a shade behind them keeps them legible */
.fv::before { content: ''; position: absolute; z-index: 2; left: 0; right: 0; top: 0; height: 44%; pointer-events: none;
  background: linear-gradient(rgba(6, 14, 30, .66), rgba(6, 14, 30, .32) 58%, rgba(6, 14, 30, 0)); }
.fv-mk { position: absolute; z-index: 2; left: 50%; top: var(--my); width: 25px; height: 25px; margin: -12.5px; border-radius: 50%; background: #5EE6CF; box-shadow: 0 0 0 4.5px #fff, 0 4px 14px rgba(0,0,0,.4); }
.fv-btn { position: absolute; z-index: 3; top: 8px; width: 44px; height: 44px; border-radius: 50%; background: #fff; color: #000; display: flex; align-items: center; justify-content: center; }
.fv-btn svg { width: 18px; height: 18px; } .fv-btn.l { left: 16px; } .fv-btn.r { right: 16px; }
.fv-hud { position: absolute; z-index: 3; top: 60px; left: 16px; right: 16px; display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; text-shadow: 0 1px 3px rgba(0,0,0,.55); pointer-events: none; }
.fv-hud .wm { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-brand); font-weight: 700; font-size: 19px; line-height: 1; }
.fv-hud .wm img { width: 24px; height: 24px; filter: invert(1) drop-shadow(0 1px 3px rgba(0,0,0,.55)); }
.fv-hud h4 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -.01em; line-height: 1.1; }
.fv-hud .st { width: 100%; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 4px; }
.fv-hud .st div { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fv-hud .st span { font-size: 15px; font-weight: 600; white-space: nowrap; }
.fv-hud .st b { font-size: 34px; font-weight: 700; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.fv-hud .st em { font-style: normal; font-size: 17px; font-weight: 600; }
.fv-ctl { position: absolute; z-index: 3; left: 16px; right: 16px; bottom: 12px; height: 52px; border-radius: 14px; background: #fff; color: #000; display: flex; align-items: center; gap: 12px; padding: 0 4px 0 6px; }
.fv-ctl button { border: 0; background: none; color: inherit; padding: 0; cursor: pointer; font: inherit; }
.fv-pp { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; }
.fv-pp svg { width: 20px; height: 20px; } .fv-pp .pl { display: none; }
.fv.paused .fv-pp .pa { display: none; } .fv.paused .fv-pp .pl { display: block; }
.fv-ctl .sl { flex: 1; height: 4px; border-radius: 2px; background: #E5E5E5; position: relative; }
.fv-ctl .sl i { position: absolute; left: 0; top: 0; bottom: 0; width: calc(var(--fp, 0) * 100%); border-radius: 2px; background: #000; }
.fv-ctl .sl i::after { content: ''; position: absolute; right: -12px; top: -8px; width: 24px; height: 20px; border-radius: 10px; background: #fff; box-shadow: 0 1px 5px rgba(0,0,0,.25), 0 0 0 .5px rgba(0,0,0,.08); }
.fv-sp { min-width: 44px; height: 44px; font-size: 17px !important; font-weight: 600 !important; font-variant-numeric: tabular-nums; }

/* ── Hero ──
   The photo (four runners against a bright sky) sits in a rounded frame.
   Wide screens: the headline and the form go over the sky band, which is
   the top 37% of the photo, above the runners' heads; today's scores hang
   off the photo's lower edge. Narrower screens: the words sit on white above
   the photo instead, so they never cover the runners. */
.h-hero { padding: 12px 12px 0; }
.h-hero-frame { position: relative; display: flex; flex-direction: column; }
.hero-pic { position: relative; overflow: hidden; border-radius: var(--frame-r); aspect-ratio: 3 / 2; background: #efe9df; isolation: isolate; }
.hero-pic .ph { object-position: 50% 0%; }
.h-hero-copy { order: -1; color: var(--ink); padding: clamp(28px, 5vw, 56px) clamp(8px, 3vw, 40px) clamp(28px, 4vw, 44px); }
.h-hero h1 { font-size: clamp(3rem, 1.3rem + 6.2vw, 6.2rem); }
/* Other languages run longer than "Train. Eat. Recover.": a little smaller. */
html:not(:lang(en)) .h-hero h1 { font-size: clamp(2.6rem, 1.2rem + 5vw, 5.2rem); }
.h-hero h1 .grad { display: block; color: rgba(17,17,17,.42); }
.h-hero .lede { margin-top: 22px; max-width: 560px; font-size: clamp(1rem, .95rem + .25vw, 1.12rem); color: var(--muted); line-height: 1.55; }
.h-hero .waitlist-form { margin-top: 26px; }
.h-hero .waitlist-form input[type=email] { background: var(--fill); }
.h-hero .waitlist-note { color: var(--muted); margin-top: 12px; }
.h-hero .ov-today { position: relative; z-index: 2; align-self: flex-end; margin: -72px clamp(12px, 3vw, 40px) 0 0; }
@media (min-width: 900px) and (max-width: 1359px) {
  .h-hero-copy { display: grid; grid-template-columns: 1.15fr 1fr; column-gap: 56px; align-items: end; }
  .h-hero h1 { grid-row: 1 / span 3; }
  .h-hero .lede { margin-top: 0; }
}
@media (min-width: 1360px) {
  .hero-pic { aspect-ratio: 16 / 10; }
  .h-hero-copy { position: absolute; z-index: 1; top: clamp(40px, 4vw, 72px); left: clamp(40px, 4vw, 72px); right: clamp(40px, 4vw, 72px); padding: 0;
    display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 600px); justify-content: space-between; column-gap: 48px; align-items: start; }
  .h-hero h1 { grid-column: 1 / -1; font-size: clamp(3.6rem, 4.9vw, 7rem); }
  html:not(:lang(en)) .h-hero h1 { font-size: clamp(3rem, 4.1vw, 5.6rem); }
  .h-hero .lede { grid-row: 2 / span 2; color: #2a2a2a; font-size: clamp(.98rem, .5rem + .55vw, 1.1rem); }
  .h-hero .waitlist-form { grid-column: 2; margin-top: 22px; max-width: none; }
  .h-hero .waitlist-form input[type=email] { background: rgba(255,255,255,.92); }
  .h-hero .waitlist-note { grid-column: 2; color: #2a2a2a; }
  .h-hero .ov-today { position: absolute; right: clamp(32px, 4vw, 64px); bottom: -64px; margin: 0; }
  .h-stats { padding-top: 128px; }
}
@media (prefers-reduced-motion: no-preference) {
  .hero-ph { animation: hZoom 2.8s var(--spring) both; }
  .h-hero-copy > * { animation: hUp 1.1s var(--spring) both; }
  .h-hero-copy > :nth-child(2) { animation-delay: .1s; } .h-hero-copy > :nth-child(n+3) { animation-delay: .2s; }
  .h-hero .ov-today { animation: hUp 1.1s var(--spring) .45s both; }
  .h-hero .ov-today .rg .pr { animation: hRing 1.6s var(--spring) .8s both; }
  html.booting :is(.hero-ph, .h-hero-copy > *, .h-hero .ov-today, .h-hero .ov-today .rg .pr) { animation-play-state: paused; }
}
@keyframes hZoom { from { transform: scale(1.12); } }
@keyframes hUp { from { opacity: 0; transform: translateY(40px); } }
@keyframes hRing { from { stroke-dashoffset: 100; } }
.h-stats { display: grid; grid-template-columns: repeat(3, 1fr); padding: clamp(40px, 6vw, 72px) 0 0; max-width: 1000px; }
.h-stats > div { text-align: center; padding: 0 12px; }
.h-stats > div + div { border-left: 1px solid var(--border); }
.h-stats b { display: block; font-family: var(--font-brand); font-size: clamp(2.6rem, 1.6rem + 3.4vw, 4.6rem); line-height: 1; font-variant-numeric: tabular-nums; }
.h-stats span { display: block; margin-top: 8px; font-size: .9rem; color: var(--muted); }

/* ── Sections ── */
.h-sec { padding: clamp(80px, 10vw, 150px) 0; }
.h-head { text-align: center; max-width: 860px; margin: 0 auto clamp(40px, 5vw, 72px); }
.h-head .eyebrow { justify-content: center; }
.h-head .section-sub { margin: 0 auto; max-width: 600px; }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.pillar h3 { margin-top: 22px; font-size: clamp(1.6rem, 1.2rem + 1vw, 2.2rem); }
.pillar p { margin-top: 10px; color: var(--muted); line-height: 1.55; max-width: 34ch; }
@media (min-width: 900px) { .pillars.two { grid-template-columns: repeat(2, 1fr); } }
.h-endure { padding-top: 0; }
.pillars .pillar:nth-child(2) { transition-delay: .1s; } .pillars .pillar:nth-child(3) { transition-delay: .2s; }

.h-row { padding: clamp(48px, 7vw, 100px) 0; }
.h-row-in { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(32px, 6vw, 96px); align-items: center; }
.h-row.flip .h-media { order: 2; }
.h-copy .section-title { font-size: clamp(2.1rem, 1.3rem + 2.6vw, 3.6rem); }
.h-copy .section-sub { max-width: 480px; }
.h-copy { transition-delay: .12s !important; }

/* ── Apple Watch ── */
.h-watch { background: #F5F5F7; padding: clamp(80px, 10vw, 150px) 0; margin: 0 12px; border-radius: var(--frame-r); overflow: hidden; }
.h-watch-dev { display: flex; justify-content: center; padding: 56px 0 72px; }
/* The watch is Apple's own product image (Apple Design Resources, Series 11
   46 mm Jet Black aluminium, black Sport Band), used as Apple's marketing
   guidelines ask: as is, uncropped, no added shadow, reflection or motion
   on the device; only the app on its screen moves. Laid out in watch
   points: the 560 x 880 image is 280 x 440 pt and its transparent window,
   at (36, 96), is the 208 x 248 pt display, the app screen's own size.
   The drawn hardware from ui.css (band, crown, button, glass) is hidden. */
.h-watch-dev .watch.s11 { --wz: 1.0714; width: 280px; height: 440px; filter: none; }
.watch.s11 :is(.band, .crown, .side-btn) { display: none; }
.watch.s11 .case { left: 36px; top: 96px; width: 208px; height: 248px; padding: 0; border-radius: 46px; background: #000; box-shadow: none; }
.watch.s11 .glass { padding: 0; border-radius: inherit; background: #000; box-shadow: none; }
.watch.s11 .glass::after { display: none; }
.watch.s11::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  background: url(/assets/devices/apple-watch-s11-46mm-jet-black.png) 0 0 / 100% 100% no-repeat; }
.v3 .footer-legal { max-width: var(--maxw); margin: 14px auto 0; padding: 0 clamp(20px,5vw,28px); color: var(--muted); font-size: .78rem; }
.h-watch-list { max-width: 860px; margin: 0 auto; }
.h-watch-list .feature-list { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 40px; margin-top: 0; }

/* ── And the rest ── */
.h-more { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
@media (min-width: 1100px) { .h-more { grid-template-columns: repeat(5, 1fr); } }
.h-more .more-card { width: auto; min-height: 0; border-radius: 22px; background: #fff; border: 1px solid #ECECEE; padding: 24px; box-shadow: none; }
.h-more .mc-ic { width: 44px; height: 44px; border-radius: 14px; display: flex; align-items: center; justify-content: center; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); }
.h-more .mc-ic svg { width: 22px; height: 22px; }
.h-more .mc-t { margin: 0; padding-top: 40px; font-size: 1.1rem; letter-spacing: -.02em; }
.h-more .mc-d { margin-top: 6px; color: var(--muted); font-size: .94rem; line-height: 1.5; }

/* The kept sections */
.v3 .feature-band { border-top: 0; padding: clamp(80px, 10vw, 140px) 0; }
.v3 .feature-band.alt { background: #fff; }
.v3 .faq { padding-inline: clamp(20px, 5vw, 28px); }
.v3 .membership-card { border-radius: 28px; border: 1px solid #ECECEE; box-shadow: 0 40px 80px -40px rgba(0,0,0,.18); }

/* ── Finale ── */
.h-cta { padding: 0 12px 12px; }
.h-cta-frame { position: relative; overflow: hidden; border-radius: var(--frame-r); min-height: 680px; display: flex; align-items: center; justify-content: center; padding: clamp(32px, 6vw, 80px) 20px; isolation: isolate; text-align: center; color: #fff; }
.h-cta-frame .ph { z-index: -2; }
.h-cta-frame::before { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(rgba(0,0,0,.15), rgba(0,0,0,.6)); }
.h-cta-copy { max-width: 680px; display: flex; flex-direction: column; align-items: center; }
.h-cta h2 { font-size: clamp(2.6rem, 1.4rem + 4.6vw, 5.6rem); color: #fff; }
.h-cta h2 .grad { color: rgba(255,255,255,.7); }
.h-cta p { margin-top: 18px; color: rgba(255,255,255,.88); font-size: 1.08rem; line-height: 1.55; max-width: 560px; }
.h-cta .waitlist-form { margin: 28px auto 0; justify-content: center; }
.h-cta .waitlist-form input[type=email] { background: rgba(255,255,255,.95); color: #111; }
.h-cta .btn-primary { background: #fff; color: #111; }
.h-cta .waitlist-or span { color: rgba(255,255,255,.8); } .h-cta .waitlist-or::before, .h-cta .waitlist-or::after { background: rgba(255,255,255,.3); }
.h-cta .waitlist-note { color: rgba(255,255,255,.75); }
.h-cta .waitlist-msg.ok { color: #fff; }

/* ── Phones and tablets ── */
@media (max-width: 899px) {
  .h-row-in { grid-template-columns: 1fr; }
  .h-row.flip .h-media { order: 0; }
  .frame { aspect-ratio: 4 / 5; }
  .frame.fv-frame { aspect-ratio: 9 / 16; }
  .pillars { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -20px; padding: 0 20px 8px; scrollbar-width: none; }
  .pillars::-webkit-scrollbar { display: none; }
  .pillar { scroll-snap-align: center; }
  .h-watch-list .feature-list { grid-template-columns: 1fr; }
  .h-watch-dev .watch.s11 { --wz: .9; }
  .h-watch-dev { padding: 40px 0 48px; }
}
/* Phone motion (photo frames that reveal only: phone mockups in .pf never
   get .in, so a clip there would stay). The photo opens like a curtain (clip widens to the full
   frame) while it settles from its zoom, and the block travels less, so a
   thumb-speed scroll never passes an empty gap. In the swipe row the
   neighbours sit smaller and dimmer and grow as they reach the centre,
   tied to the finger (scroll-driven; older browsers keep the plain row). */
@media (max-width: 899px) and (prefers-reduced-motion: no-preference) {
  html.js .v3 [data-reveal] { transform: translateY(26px); transition: opacity .7s var(--spring), transform .9s var(--spring); }
  html.js .v3 [data-reveal].in { transform: none; }
  html.js .h-media[data-reveal] .frame:not(.pf):not(.fv-frame), html.js .pillar[data-reveal] .frame { clip-path: inset(9% 7% 0 7% round var(--frame-r)); transition: clip-path 1.1s var(--spring); }
  html.js .h-media[data-reveal].in .frame:not(.pf):not(.fv-frame), html.js .pillar[data-reveal].in .frame { clip-path: inset(0 round var(--frame-r)); }
  html.js .h-media[data-reveal] .frame:not(.pf):not(.fv-frame) .ph, html.js .pillar[data-reveal] .frame .ph { transform: scale(1.16); transition: transform 1.5s var(--spring); }
  html.js .h-media[data-reveal].in .frame:not(.pf):not(.fv-frame) .ph, html.js .pillar[data-reveal].in .frame .ph { transform: none; }
  .h-media .ov, .pillar .ov { transition-delay: .3s; }
  .h-media .ov + .ov { transition-delay: .45s; }
  @supports (animation-timeline: view()) {
    .pillars .pillar .frame { animation: hSide linear both; animation-timeline: view(inline); }
    .pillars .pillar :is(h3, p) { animation: hSideT linear both; animation-timeline: view(inline); }
  }
}
@keyframes hSide { entry 0% { transform: scale(.9); opacity: .5; } entry 100% { transform: none; opacity: 1; } exit 0% { transform: none; opacity: 1; } exit 100% { transform: scale(.9); opacity: .5; } }
@keyframes hSideT { entry 0% { opacity: 0; } entry 100% { opacity: 1; } exit 0% { opacity: 1; } exit 100% { opacity: 0; } }
/* "Your body" on a phone: the card hangs below the frame, so no clip there */
@media (max-width: 640px) { html.js .h-row[data-row="vit"] .frame, html.js .h-row[data-row="vit"] .h-media.in .frame { clip-path: none; } }
@media (max-width: 640px) {
  .h-hero { padding: 8px 8px 0; } .h-cta { padding: 0 8px 8px; } .h-watch { margin: 0 8px; }
  .v3 { --frame-r: 22px; }
  .hero-pic { aspect-ratio: 4 / 5; }
  .hero-pic .ph { object-position: 44% 60%; }
  .h-hero .ov-today { align-self: stretch; width: auto; margin: -56px 12px 0; }
  .ov-rec, .ov-food, .ov-vital { left: 12px; right: 12px; bottom: 12px; width: auto; }
  /* "Your body": the two women fill the middle of the phone crop, so the
     card hangs off the photo's lower edge (as the hero's card does) and
     covers only the floor; the photo skips its settle zoom here, since the
     frame no longer clips */
  .h-row[data-row="vit"] .frame { overflow: visible; margin-bottom: 142px; }
  .h-row[data-row="vit"] .frame .ph { border-radius: inherit; transform: none; }
  .h-row[data-row="vit"] .ov-vital { bottom: -130px; background: rgba(255,255,255,.97); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .ov-post { left: 12px; right: 12px; top: 12px; width: auto; }
  .ov-level { right: 12px; bottom: 12px; }
  .ov-clock { font-size: 46px; }
  .h-stats b { font-size: 2.4rem; } .h-stats span { font-size: .8rem; }
  .h-more { grid-template-columns: 1fr 1fr; gap: 10px; }
  .h-more .more-card { padding: 16px; border-radius: 18px; }
  .h-more .mc-ic { width: 38px; height: 38px; border-radius: 12px; }
  .h-more .mc-t { padding-top: 20px; font-size: 1rem; }
  .h-more .mc-d { font-size: .86rem; }
}
@media (prefers-reduced-motion: reduce) {
  .ov-rec .live i, .ov-search .caret { animation: none; }
}

/* ==========================================================================
   Inner pages (body.v3.page), built by tools/build_pages_v3.py in this
   page's layout: a centred headline over a wide grey stage, rows of a frame
   beside the words, the grey Apple Watch band, cards, FAQ, photo finale.
   ========================================================================== */

/* ── iPhone 18 Pro ──
   Apple's own product image (Apple Design Resources: iPhone 18 Pro, Burgundy,
   portrait), used as Apple's marketing guidelines ask, like the watch: as
   is, uncropped, no added shadow, reflection, tilt or motion on the device;
   only the app on its screen moves. Laid out in points: the 1350 x 2760
   image is 450 x 920 pt and its transparent window, at (24, 23), is the
   402 x 874 pt screen that screens.js draws. The Dynamic Island is part of
   the image, so the drawn one and the drawn side buttons are hidden. */
.iphone.i18p { width: 450px; height: 920px; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.iphone.i18p::before { display: none; }
.iphone.i18p::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: auto; height: auto; z-index: 60; pointer-events: none;
  border-radius: 0; box-shadow: none; background: url(/assets/devices/iphone-18-pro-burgundy.png) 0 0 / 100% 100% no-repeat; }
.iphone.i18p .island { display: none; }
.iphone.i18p .screen { position: absolute; left: 24px; top: 23px; width: 402px; height: 874px; border-radius: 58px; }

/* ── Hero ── */
.p-hero { padding: clamp(40px, 6vw, 84px) 0 0; }
.p-hero-copy { text-align: center; max-width: 960px; }
.p-hero .crumbs { margin-bottom: 22px; }
.p-hero .eyebrow { justify-content: center; }
.p-hero h1 { font-size: clamp(2.8rem, 1.2rem + 5.4vw, 6rem); margin-top: 16px; }
html:not(:lang(en)) .p-hero h1 { font-size: clamp(2.4rem, 1.1rem + 4.4vw, 5rem); }
.p-hero h1 .grad { display: block; color: rgba(17,17,17,.42); }
.p-hero .lede { margin: 24px auto 0; max-width: 640px; font-size: clamp(1rem, .95rem + .25vw, 1.12rem); color: var(--muted); line-height: 1.55; }
.p-acts { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }
.p-stage { margin: clamp(44px, 5vw, 72px) 12px 0; border-radius: var(--frame-r); background: #F5F5F7; display: flex; justify-content: center; align-items: center;
  padding: clamp(40px, 5.5vw, 80px) 16px; }
.p-stage .iphone { --z: .66; }
.p-stage.p-card .membership-card { margin: 0; width: min(560px, 100%); }

/* A photo in place of the stage (Community, Recovery), like the home
   page's hero: the picture settles from a slight zoom and an app card
   hangs off its lower edge */
.p-photo { position: relative; display: flex; flex-direction: column; margin: clamp(44px, 5vw, 72px) 12px 0; }
.p-pic { position: relative; overflow: hidden; border-radius: var(--frame-r); aspect-ratio: 16 / 9; background: #e9e9ea; isolation: isolate; }
.p-pic .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--pos); }
.p-photo .ov { position: relative; z-index: 2; left: auto; top: auto; right: auto; bottom: auto; align-self: flex-end; margin: -72px clamp(16px, 3vw, 48px) 0 0; }
.p-ov-row { display: flex; align-items: center; gap: 14px; margin-top: 14px; }
@media (prefers-reduced-motion: no-preference) {
  .p-pic .ph { animation: hZoom 2.8s var(--spring) both; }
  .p-photo .ov { animation: hUp 1.1s var(--spring) .45s both; }
  .p-photo .rg .pr { animation: hRing 1.6s var(--spring) .8s both; }
  html.booting :is(.p-pic .ph, .p-photo .ov, .p-photo .rg .pr) { animation-play-state: paused; }
}
/* Pricing: the membership card itself hangs off the photo, centred */
.p-photo.p-card .membership-card { position: relative; z-index: 2; align-self: center; width: min(560px, calc(100% - 32px)); margin: -200px 0 0; }
/* Sleep card: last night's stages as one bar, with a key */
.p-stg { display: flex; gap: 2px; height: 10px; margin: 16px 0 10px; border-radius: 5px; overflow: hidden; }
.p-stg i { display: block; }
.p-stg-k { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 12px; font-size: 12px; color: #6b6b6b; }
.p-stg-k span { display: flex; align-items: center; gap: 6px; }
.p-stg-k i { width: 8px; height: 8px; border-radius: 2px; flex-shrink: 0; }
.p-stg-k b { margin-left: auto; color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
@media (max-width: 899px) { .p-pic { aspect-ratio: 3 / 2; } .p-photo.p-card .membership-card { margin-top: -120px; } }
@media (max-width: 640px) {
  .p-photo { margin: 40px 8px 0; }
  .p-pic { aspect-ratio: 4 / 5; }
  .p-pic .ph { object-position: var(--pos-m, var(--pos)); }
  .p-photo .ov { align-self: stretch; width: auto; margin: -56px 12px 0; }
  .p-photo.p-card .membership-card { width: auto; align-self: stretch; margin: -56px 12px 0; }
}

/* ── A phone in a row: the frame is grey, sized by the phone ── */
.frame.pf { aspect-ratio: auto; background: #F5F5F7; display: flex; align-items: center; justify-content: center; padding: clamp(36px, 4.5vw, 60px) 16px; }
.frame.pf .iphone { --z: .64; }
/* A notification on the phone's screen, as iOS shows one (moved into the
   screen by home.js once screens.js has drawn it); it drops in when the
   row's words come into view */
.iphone .notif { position: absolute; z-index: 30; top: 56px; left: 10px; right: 10px; display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px;
  border-radius: 24px; background: rgba(64,64,68,.86); -webkit-backdrop-filter: blur(24px) saturate(170%); backdrop-filter: blur(24px) saturate(170%);
  color: #fff; font-size: 15px; line-height: 1.3; opacity: 0; transform: translateY(-24px) scale(.96); transition: opacity .6s var(--spring) .5s, transform .8s var(--spring) .5s; }
.h-row-in:has(.h-copy.in) .iphone .notif, html:not(.js) .iphone .notif { opacity: 1; transform: none; }
.iphone .notif img { width: 38px; height: 38px; border-radius: 9px; background: #fff; padding: 7px; flex-shrink: 0; }
.iphone .notif > div { flex: 1; min-width: 0; }
.iphone .notif .nt { display: flex; justify-content: space-between; font-size: 13px; color: rgba(255,255,255,.6); }
.iphone .notif .nt b { font-weight: 600; color: rgba(255,255,255,.6); }
.iphone .notif > div > b { font-weight: 600; }
.iphone .notif p { margin: 1px 0 0; color: rgba(255,255,255,.92); }
@media (prefers-reduced-motion: reduce) { .iphone .notif { opacity: 1; transform: none; transition: none; } }

/* ── Watch band and cards on inner pages ── */
.p-watch { margin-top: clamp(24px, 4vw, 48px); margin-bottom: clamp(24px, 4vw, 48px); }
.h-more.n4 { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.h-more.n6 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
@media (min-width: 1100px) { .h-more.n4 { grid-template-columns: repeat(4, 1fr); } .h-more.n6 { grid-template-columns: repeat(3, 1fr); } }
.h-more .more-card a { color: inherit; text-decoration: underline; text-underline-offset: 3px; }

/* ── About: the story in the page's type ── */
/* About: the article has no .container, so it takes the page gutter here */
.v3 .prose-wrap { padding-left: clamp(20px, 5vw, 28px); padding-right: clamp(20px, 5vw, 28px); }
.v3 .prose h2 { font-family: var(--font-brand); font-weight: 700; text-transform: uppercase; letter-spacing: -.01em; line-height: 1; font-size: clamp(1.7rem, 1.2rem + 1.4vw, 2.4rem); }

/* ── Blog, its posts and the legal pages: same type, no dark band ── */
.v3.doc .page-hero { border-bottom: 0; }
.v3.doc .page-hero h1 { font-size: clamp(2.4rem, 1.3rem + 3.6vw, 4.4rem); line-height: .96; max-width: 960px; }

@media (max-width: 899px) {
  .p-stage .iphone { --z: .54; }
  .frame.pf .iphone { --z: .5; }
}
@media (max-width: 640px) {
  .p-stage { margin: 40px 8px 0; padding: 36px 12px; }
  .p-acts .btn-secondary { display: none; }
}
@media (max-width: 380px) {
  .p-stage .iphone, .frame.pf .iphone { --z: .46; }
}
