/* ═══════════════════════════════════════════════════════════
   Young by You – Landing Page
   A calm, premium longevity-HUD: navy surface, mint is the data,
   gold is a credential. The only light comes from the numbers.
   ═══════════════════════════════════════════════════════════ */

:root {
  /* base palette (kept) */
  --bg: #0A0E1A;
  --bg-deep: #070A14;
  --surface: #131A2C;
  --surface-hi: #1B2440;
  --surface-glass: rgba(22, 30, 52, .55);
  --stroke: #263150;
  --stroke-hi: rgba(120, 150, 210, .20);
  --mint: #4ADEC2;
  --mint-bright: #6CF0D8;
  --mint-dark: #2BB39A;
  --gold: #F5C97B;
  --gold-deep: #E9B45F;
  --text: #F2F5FA;
  --text-2: #9AA6C0;
  --text-3: #5E6A87;
  /* sticky-nav height (logo 34 + 14/14 padding) — used to clear pinned scenes below it */
  --nav-h: 62px;
  /* radius scale */
  --radius: 24px;
  --r-chip: 14px;
  --r-card: 20px;
  --r-panel: 28px;
  --r-pill: 100px;
  /* signature dial sweep */
  --ring-grad: conic-gradient(from -90deg, var(--mint-dark), var(--mint) 24%, var(--mint-bright) 56%, var(--gold) 100%);
  /* elevation scale (ambient + key + contact, with inset top-highlight) */
  --e-1: inset 0 1px 0 var(--stroke-hi), 0 18px 40px -24px rgba(0,0,0,.8), 0 2px 8px -4px rgba(0,0,0,.6);
  --e-2: inset 0 1px 0 var(--stroke-hi), 0 28px 60px -28px rgba(0,0,0,.85);
  --e-3: 0 50px 110px -40px rgba(0,0,0,.9);
  /* glow tiers — signature is reserved for the hero number ONLY */
  --glow-focus: 0 0 28px rgba(74,222,194,.30);
  --glow-signature: 0 0 80px rgba(74,222,194,.40), 0 0 26px rgba(108,240,216,.5);
  /* motion grammar */
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --dur-fast: .18s;
  --dur: .35s;
  --dur-slow: .7s;
  /* type */
  --fs-hero-num: clamp(58px, 8.4vw, 84px);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  /* iOS Safari paints the ROOT background behind its toolbars, in the safe areas
     (notch / home indicator) and in the overscroll bounce. It must match the body's
     content floor (var(--bg)) AND the theme-color meta (#0A0E1A) — otherwise those
     zones render a slightly darker near-black (#070A14) and read as bars top & bottom
     on OLED. The hero keeps its deeper top via the body gradient painting over this. */
  background: var(--bg);
}

body {
  font-family: var(--font);
  font-size-adjust: 0.545; /* keeps the system fallback's x-height ≈ Inter → no LCP swap reflow */
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(74,222,194,.06), transparent 60%),
    linear-gradient(180deg, var(--bg-deep), var(--bg) 30%);
  color: var(--text);
  line-height: 1.6;
  overflow-x: clip; /* clip (not hidden) avoids a scroll-container that would break position:sticky */
  -webkit-font-smoothing: antialiased;
}

::selection { background: rgba(74, 222, 194, .3); }

/* ── Measurement-grid backdrop (replaces the blurred orbs) ── */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(74,222,194,.025) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(74,222,194,.025) 0 1px, transparent 1px 40px);
  -webkit-mask-image: linear-gradient(180deg, #000, transparent 70%);
  mask-image: linear-gradient(180deg, #000, transparent 70%);
}

main, .nav, .footer { position: relative; z-index: 1; }

/* tabular numerals so live numbers never jitter */
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* ═══════════ Navigation ═══════════ */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  padding: calc(14px + env(safe-area-inset-top)) calc(clamp(20px, 5vw, 56px) + env(safe-area-inset-right)) 14px calc(clamp(20px, 5vw, 56px) + env(safe-area-inset-left));
  background: rgba(10, 14, 26, .78);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(38, 49, 80, .6);
}
.nav-logo {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text);
  font-weight: 800; font-size: 17px; letter-spacing: -.3px;
  white-space: nowrap;
}
.nav-logo em { font-style: normal; color: var(--mint); }
.nav-links { display: flex; gap: clamp(14px, 2.5vw, 30px); }
.nav-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 14.5px; font-weight: 600;
  transition: color .2s;
}
.nav-links a:hover { color: var(--mint); }
.nav-actions { display: flex; align-items: center; gap: 12px; }

.lang-toggle {
  background: var(--surface); color: var(--text-2);
  border: 1px solid var(--stroke); border-radius: 10px;
  font: 700 12.5px var(--font); letter-spacing: .5px;
  padding: 7px 12px; cursor: pointer;
  transition: all .2s;
}
.lang-toggle:hover { color: var(--mint); border-color: var(--mint); }
.lang-toggle:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }

/* ═══════════ Buttons ═══════════ */
.btn {
  position: relative;
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
  background: linear-gradient(120deg, var(--mint), var(--mint-bright));
  color: #04261F;
  font-weight: 800; font-size: 15.5px;
  text-decoration: none;
  padding: 15px 32px; border-radius: 16px;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.4) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .6s var(--ease-out);
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 48px -10px rgba(74,222,194,.5), 0 0 0 1px rgba(108,240,216,.4);
}
.btn:hover::after { transform: translateX(120%); }
.btn:focus-visible { outline: 2px solid var(--mint-bright); outline-offset: 3px; }
.btn-small { padding: 10px 20px; font-size: 13.5px; border-radius: 12px; }
.btn-big { padding: 18px 44px; font-size: 17px; }
.btn-ghost {
  background: transparent; color: var(--mint);
  border: 1.5px solid var(--mint);
}
.btn-ghost::after { display: none; }
.btn-ghost:hover { background: rgba(74,222,194,.08); box-shadow: none; }

/* ═══════════ Hero ═══════════ */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  align-items: center;
  gap: clamp(32px, 6vw, 80px);
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(48px, 9vh, 110px) clamp(20px, 5vw, 56px) clamp(48px, 8vh, 90px);
}
.hero h1 {
  font-size: clamp(38px, 5.6vw, 64px);
  font-weight: 900; letter-spacing: -2.2px; line-height: 1.05;
  margin-bottom: 18px;
}
.grad { color: var(--mint); } /* one deliberate accent on the key word — not a clipped gradient */

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

.hero-sub {
  font-size: clamp(16px, 1.6vw, 18.5px);
  color: var(--text-2);
  max-width: 520px;
  margin-bottom: 30px;
}

.store-badges { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 24px; }
.store-badge {
  position: relative;
  display: flex; align-items: center; gap: 12px;
  background: var(--surface-glass);
  border: 1px solid var(--stroke);
  box-shadow: var(--e-1);
  border-radius: 16px;
  padding: 12px 22px;
  color: var(--text); text-decoration: none;
  transition: border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.store-badge[aria-disabled="true"] { cursor: default; }
.store-badge:hover { border-color: var(--mint); transform: translateY(-2px); }
.store-badge:focus-visible { outline: 2px solid var(--mint); outline-offset: 2px; }
.store-badge small { display: block; font-size: 11px; color: var(--text-3); line-height: 1.2; }
.store-badge strong { font-size: 16.5px; letter-spacing: -.3px; }

.hero-trust {
  display: flex; flex-wrap: wrap; gap: 8px 22px;
  list-style: none;
  font-size: 13.5px; font-weight: 600; color: var(--text-3);
}

/* ── Phone mockup ── */
.hero-phone { position: relative; display: flex; justify-content: center; }
.phone-glow {
  position: absolute; inset: 6% 12%;
  background: radial-gradient(circle, rgba(74,222,194,.18), transparent 68%);
  z-index: 0;
}
.phone {
  position: relative; z-index: 1;
  width: min(320px, 80vw);
  aspect-ratio: 9 / 18.6;
  background: #060910;
  border: 3px solid #2A3552;
  border-radius: 48px;
  padding: 12px;
  box-shadow: 0 40px 90px rgba(0,0,0,.6), inset 0 0 0 1.5px #0e1424;
}
.phone-notch {
  position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 96px; height: 26px;
  background: #060910;
  border-radius: 14px;
  z-index: 3;
}
.phone-screen {
  position: relative;
  height: 100%;
  background: linear-gradient(180deg, #0E1426 0%, var(--bg) 45%);
  border-radius: 36px;
  overflow: hidden;
  padding: 64px 18px 18px;
  display: flex; flex-direction: column; align-items: center;
}
.ps-label {
  font-size: 10px; font-weight: 800; letter-spacing: 2px;
  color: var(--text-2);
}
.ps-age {
  margin-top: 8px;
  font-size: 52px; font-weight: 800; letter-spacing: -2px; line-height: 1;
  color: var(--mint);
  text-shadow: 0 0 22px rgba(74,222,194,.45);
}
.ps-unit { font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-top: 6px; }
.ps-delta {
  margin-top: 12px;
  display: inline-flex; align-items: center;
  background: rgba(74,222,194,.12);
  color: var(--mint);
  font-size: 11.5px; font-weight: 700;
  border-radius: 100px;
  padding: 5px 13px;
}
.ps-chips { display: flex; gap: 8px; margin-top: 16px; width: 100%; }
.ps-chip {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-chip);
  padding: 9px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.ps-chip .ic { width: 14px; height: 14px; stroke-width: 2; }
.ps-chip[data-kind="streak"] .ic { color: var(--gold); }
.ps-chip[data-kind="points"] .ic { color: var(--mint); }
.ps-chip[data-kind="freeze"] .ic { color: #7BC5FF; }
.ps-chip b { font-size: 13.5px; }
.ps-chip small { font-size: 8.5px; color: var(--text-3); font-weight: 600; }

.ps-routines { width: 100%; margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.ps-routine {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-chip);
  padding: 10px 12px;
  transition: all .45s ease;
}
.ps-routine .pr-ic { display: grid; place-items: center; color: var(--pc, var(--mint)); }
.ps-routine .pr-ic .ic { width: 15px; height: 15px; stroke-width: 2; }
.ps-routine[data-pillar="movement"] { --pc: #4ADEC2; }
.ps-routine[data-pillar="sleep"] { --pc: #7B9CFF; }
.ps-routine[data-pillar="mind"] { --pc: #C78BFF; }
.ps-routine[data-pillar="nutrition"] { --pc: #8BE04A; }
.ps-routine .pr-t { flex: 1; font-size: 11.5px; font-weight: 600; transition: all .4s; }
.pr-check {
  width: 19px; height: 19px; border-radius: 50%;
  border: 2px solid var(--text-3);
  transition: all .35s ease;
  position: relative;
  flex-shrink: 0;
}
.ps-routine.done { background: rgba(74,222,194,.07); border-color: rgba(74,222,194,.4); }
.ps-routine.done .pr-t { color: var(--text-3); text-decoration: line-through; }
.ps-routine.done .pr-check {
  background: var(--mint); border-color: var(--mint);
  box-shadow: 0 0 14px rgba(74,222,194,.5);
}
.ps-routine.done .pr-check::after {
  content: '';
  position: absolute; inset: 0;
  background: center / 11px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23062018' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
}

.ps-float {
  position: absolute;
  right: 26px; top: 46%;
  background: var(--mint); color: #04261F;
  font-size: 11px; font-weight: 800;
  border-radius: 100px;
  padding: 4px 11px;
  opacity: 0;
  pointer-events: none;
  box-shadow: 0 0 20px rgba(74,222,194,.5);
}
.ps-float.fly { animation: fly 1.3s ease-out forwards; }
@keyframes fly {
  0% { opacity: 0; transform: translateY(8px); }
  18% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-36px); }
}

/* ═══════════ Sections ═══════════ */
.section {
  max-width: 1180px;
  margin: 0 auto;
  padding: clamp(56px, 9vh, 110px) clamp(20px, 5vw, 56px) 0;
}
.section-narrow { max-width: 800px; }
.eyebrow {
  display: block; text-align: center;
  font-size: 12px; font-weight: 700; letter-spacing: .14em;
  text-transform: uppercase; color: var(--mint);
  margin-bottom: 12px;
}
.section h2 {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 900; letter-spacing: -1.4px;
  text-align: center;
}
.section-sub {
  text-align: center;
  color: var(--text-2);
  font-size: clamp(15px, 1.5vw, 17px);
  max-width: 620px;
  margin: 14px auto 0;
}

/* ── Steps: a connected ghost-numeral path (no boxed cards) ── */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin-top: 48px;
}
.step {
  background: transparent;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px 28px;
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.step:hover { border-color: rgba(74,222,194,.45); box-shadow: var(--e-1); }
.step-num {
  -webkit-text-stroke: 2px var(--mint);
  color: transparent;
  font-size: 58px; font-weight: 900; line-height: 1;
  font-variant-numeric: tabular-nums;
  margin-bottom: 12px;
}
.step h3 { font-size: 18.5px; letter-spacing: -.4px; margin-bottom: 8px; }
.step p { font-size: 14.5px; color: var(--text-2); }

/* ── Pillars: one accent (mint) — the custom monoline icon carries each pillar's identity ── */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 16px;
  margin-top: 48px;
}
.pillar {
  --pc: var(--mint); /* all pillars are "the data" → mint; gold stays reserved for credentials */
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 20px;
  padding: 26px 20px;
  text-align: center;
  box-shadow: var(--e-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.pillar::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 0, color-mix(in srgb, var(--pc) 16%, transparent), transparent 60%);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
  pointer-events: none;
}
.pillar:hover {
  transform: translateY(-4px);
  box-shadow: var(--e-1),
    0 18px 44px -18px color-mix(in srgb, var(--pc) 55%, transparent),
    0 0 0 1px color-mix(in srgb, var(--pc) 45%, transparent);
}
.pillar:hover::before { opacity: 1; }
.pillar-ic {
  position: relative; z-index: 1;
  width: 54px; height: 54px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--pc) 14%, transparent);
  color: var(--pc);
}
.pillar-ic .ic { width: 27px; height: 27px; }
.pillar h3 { position: relative; z-index: 1; font-size: 16.5px; color: var(--pc); letter-spacing: -.3px; margin-bottom: 7px; }
.pillar p { position: relative; z-index: 1; font-size: 13px; color: var(--text-2); }

/* ── Features: a bento with two signature 2-col cells ── */
.features {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: 48px;
}
.feature {
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 30px 28px;
  box-shadow: var(--e-1);
  transition: border-color var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.feature.span-2 { grid-column: span 2; }
.feature:hover { border-color: var(--stroke-hi); box-shadow: var(--e-2); }
.feat-ic {
  position: relative; z-index: 1;
  width: 50px; height: 50px; margin-bottom: 16px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: rgba(74,222,194,.1);
  color: var(--mint);
}
.feat-ic .ic { width: 25px; height: 25px; }
.feature h3 { position: relative; z-index: 1; font-size: 17.5px; letter-spacing: -.4px; margin-bottom: 7px; }
.feature p { position: relative; z-index: 1; font-size: 14px; color: var(--text-2); }
/* faded number echo in the "living number" bento cell */
.f-ghost {
  position: absolute; right: 16px; bottom: -14px; z-index: 0;
  font-weight: 900; font-size: 92px; letter-spacing: -.05em;
  color: rgba(74,222,194,.07);
  opacity: 0; transition: opacity .7s var(--ease-out);
  pointer-events: none; user-select: none;
}
.feature.in .f-ghost { opacity: 1; }
/* honest projection sparkline in the "90-day" bento cell */
.spark { position: relative; z-index: 1; display: block; width: 100%; max-width: 300px; height: auto; margin-top: 16px; }
.spark .area { fill: url(#sparkFill); }
.spark .line {
  fill: none; stroke: var(--mint); stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 240; stroke-dashoffset: 240;
}
.spark.drawn .line { animation: sparkdraw 1.1s var(--ease-out) forwards; }
.spark .tip {
  fill: var(--mint-bright); filter: drop-shadow(0 0 5px var(--mint));
  opacity: 0; transform: scale(.4);
  transform-box: fill-box; transform-origin: center;
  transition: opacity .3s var(--ease-out) .85s, transform .3s var(--ease-out) .85s;
}
.spark.drawn .tip { opacity: 1; transform: scale(1); }
.spark-cap {
  position: relative; z-index: 1;
  display: block; font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-3); margin-top: 8px;
}
@keyframes sparkdraw { to { stroke-dashoffset: 0; } }

/* ═══════════ The Calibration · signature scroll moment ═══════════ */
/* A full-viewport pinned scene at the Pillars→Features seam. As you scroll,
   one JS rAF loop scrubs: number 38→34,76, the dial draws mint→gold, four
   routines check off, two copy lines complete a sentence. Reversible.
   Default CSS = the "armed/start" look; JS scrubs it; reduced-motion shows the
   finished state in a collapsed (un-pinned) section. */
.calibration { position: relative; }
.cal-track { position: relative; height: 240vh; }
.cal-stage {
  position: sticky; top: 0;
  height: 100vh;
  height: 100dvh; /* match the visual viewport on iOS so the pin doesn't sit under the URL bar */
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: clamp(14px, 3vh, 34px);
  /* shift the whole scene below the sticky nav (line 1 was getting occluded on tall phones) */
  padding: calc(var(--nav-h) + env(safe-area-inset-top) + 6px) 16px calc(env(safe-area-inset-bottom) + 10px);
  overflow: hidden;
}
/* (removed the edge vignette — its darkened top/bottom read as bars framing a lighter
   centre instead of a uniform full-bleed scene; the measurement-grid backdrop carries the depth) */
.cal-stage > * { position: relative; z-index: 1; }

.cal-line {
  font-size: clamp(20px, 3.2vw, 32px);
  font-weight: 800; letter-spacing: -.6px; line-height: 1.15;
  text-align: center; max-width: 16ch;
  will-change: opacity, transform;
}
.cal-line-1 { color: var(--text-2); opacity: 0; }
.cal-line-2 { color: var(--mint); opacity: 0; transform: translateY(10px); }

.cal-phone { position: relative; display: flex; justify-content: center; }
.cal-phone .phone { width: auto; height: min(58vh, 540px); max-width: 78vw; }
.cal-screen {
  position: relative; height: 100%;
  background: linear-gradient(180deg, #0E1426 0%, var(--bg) 60%);
  border-radius: 36px; overflow: hidden;
  padding: clamp(30px, 5vh, 46px) 18px clamp(16px, 2.6vh, 22px);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: clamp(10px, 2vh, 16px);
}
.cal-dial-wrap {
  position: relative;
  width: clamp(118px, 19vh, 158px); height: clamp(118px, 19vh, 158px);
  flex-shrink: 0;
}
.cal-dial-wrap::before {
  content: ''; position: absolute; inset: -12%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(74,222,194,.32), transparent 64%);
  opacity: 0; transition: opacity .55s var(--ease-out);
  pointer-events: none;
}
.cal-dial-wrap.bloom::before { opacity: 1; }
.cal-dial { display: block; width: 100%; height: 100%; }
.cal-dial-track { fill: none; stroke: var(--stroke); stroke-width: 6; }
.cal-dial-arc {
  fill: none; stroke: url(#calArcGrad); stroke-width: 7;
  stroke-linecap: round; stroke-linejoin: round; /* round join closes the seam once the dash is dropped at the end */
  stroke-dasharray: 1; stroke-dashoffset: 1;
}
.cal-dial-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center;
}
.cal-label { font-size: 9px; font-weight: 800; letter-spacing: 2px; color: var(--text-2); }
.cal-age {
  font-size: clamp(30px, 5.2vh, 42px); font-weight: 800;
  letter-spacing: -2px; line-height: 1;
  color: var(--mint); text-shadow: 0 0 22px rgba(74,222,194,.45);
  margin: 4px 0 2px;
  transition: text-shadow .55s var(--ease-out);
}
.cal-dial-wrap.bloom .cal-age { text-shadow: var(--glow-signature); } /* the reserved hero-number glow, finally used */
.cal-unit { font-size: 9.5px; font-weight: 600; color: var(--text-3); }

/* ── 90-day streak: a mini progress bar that fills 0→90 as you scroll ── */
.cal-streak { width: 100%; display: flex; flex-direction: column; gap: 6px; }
.cal-streak-row {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; font-weight: 700; line-height: 1;
}
.cal-streak-label { display: inline-flex; align-items: center; gap: 5px; color: var(--gold); letter-spacing: .4px; }
.cal-streak-label .ic { width: 12px; height: 12px; color: var(--gold); stroke-width: 2; }
.cal-streak-label b { color: var(--text); font-size: 12px; }
.cal-streak-max { color: var(--text-3); font-size: 10px; letter-spacing: .4px; }
.cal-streak-track {
  position: relative; width: 100%; height: 5px;
  border-radius: 100px; background: rgba(255,255,255,.08);
  overflow: hidden;
}
.cal-streak-fill {
  position: absolute; inset: 0; width: 100%;
  transform-origin: left center; transform: scaleX(0); /* composited — JS drives scaleX(p) */
  will-change: transform;
  border-radius: 100px;
  background: linear-gradient(90deg, var(--mint-dark), var(--mint) 58%, var(--gold));
  box-shadow: 0 0 12px rgba(74,222,194,.4);
}

.cal-routines { width: 100%; display: flex; flex-direction: column; gap: 7px; }
/* rotating routine labels stay on one line (uniform row height, never wrap/clip the fixed phone) */
.cal-routines .ps-routine .pr-t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
/* on the frame a day-set swaps in, kill transitions so the prior "done" look doesn't ghost-fade */
.cal-routines .ps-routine.cal-swap,
.cal-routines .ps-routine.cal-swap .pr-t,
.cal-routines .ps-routine.cal-swap .pr-check { transition: none; }
/* extra pillar accents used by the rotating routine sets */
.cal-routines .ps-routine[data-pillar="water"] { --pc: #4AD7FF; }
.cal-routines .ps-routine[data-pillar="sun"] { --pc: #F5C97B; }
.cal-routines .ps-routine[data-pillar="breath"] { --pc: #6FE0CF; }
.cal-routines .ps-routine[data-pillar="cold"] { --pc: #8FC0FF; }
.cal-routines .ps-routine[data-pillar="social"] { --pc: #FF9E9E; }
.cal-routines .ps-routine[data-pillar="challenge"] { --pc: #F5C97B; }

/* ═══════════ Mission · full-bleed act-break ═══════════ */
.mission {
  margin: clamp(56px, 9vh, 110px) 0 0;
  padding: clamp(56px, 8vw, 96px) clamp(20px, 5vw, 56px);
  background:
    radial-gradient(90% 120% at 50% 0, rgba(74,222,194,.07), transparent 60%),
    var(--bg-deep);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--stroke-hi);
  text-align: center;
}
.mission h2 {
  font-size: clamp(26px, 3.8vw, 44px);
  font-weight: 900; letter-spacing: -1.4px; line-height: 1.18;
  max-width: 22ch;
  margin: 0 auto;
  text-wrap: balance;
}
.mission h2 em { font-style: normal; color: var(--mint); }
.mission-story {
  max-width: 620px;
  margin: 22px auto 0;
  color: var(--text-2);
  font-size: clamp(14.5px, 1.5vw, 16.5px);
}
.mission-story + .mission-story { margin-top: 14px; }
.mission-sig { margin-top: 20px; color: var(--text-3); font-size: 13.5px; font-weight: 600; }

/* ═══════════ Two trees ═══════════ */
.trees {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 18px;
  max-width: 920px;
  margin: 48px auto 0;
}
.tree-card {
  --tc: var(--mint); /* accent: mint for the in-app tree */
  position: relative; overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 32px 30px;
  box-shadow: var(--e-1);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out);
}
.tree-card::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(120% 90% at 50% 0, color-mix(in srgb, var(--tc) 10%, transparent), transparent 60%);
  pointer-events: none;
}
.tree-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--e-1), 0 18px 44px -18px color-mix(in srgb, var(--tc) 45%, transparent);
}
.tree-card > * { position: relative; z-index: 1; }
.tree-card-real { --tc: #8BE04A; } /* the real tree is leaf-green, not data-mint */
.tree-badge {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--tc);
  background: color-mix(in srgb, var(--tc) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--tc) 35%, transparent);
  border-radius: 100px;
  padding: 5px 12px;
  margin-bottom: 18px;
}
.tree-badge-soon { color: var(--gold); background: rgba(245,201,123,.10); border-color: rgba(245,201,123,.35); }
.tree-ic {
  width: 54px; height: 54px; margin-bottom: 16px;
  display: grid; place-items: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--tc) 13%, transparent);
  color: var(--tc);
}
.tree-ic .ic { width: 27px; height: 27px; }
.tree-card h3 { font-size: 19px; letter-spacing: -.4px; margin-bottom: 9px; }
.tree-card p { font-size: 14.5px; color: var(--text-2); }
.tree-card .tree-foot {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--stroke);
  font-size: 12px; color: var(--text-3);
}

/* ── Apple Health / Health Connect: real values flow into the estimate ── */
.health-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 22px;
  align-items: stretch;
  margin-top: 44px;
}
.health-visual {
  background: linear-gradient(165deg, var(--surface-hi), var(--surface) 70%);
  border: 1px solid var(--stroke);
  border-radius: var(--r-panel);
  box-shadow: var(--e-1);
  padding: clamp(24px, 3vw, 34px) 20px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 16px;
  text-align: center;
}
.hv-chips {
  display: flex; flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  max-width: 340px;
}
.hv-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 13px;
  background: var(--surface-glass);
  border: 1px solid var(--stroke);
  border-radius: var(--r-pill);
  box-shadow: inset 0 1px 0 var(--stroke-hi);
}
.hv-chip .ic { width: 15px; height: 15px; stroke-width: 2; color: var(--c, var(--mint)); }
.hv-chip span { display: flex; align-items: baseline; gap: 5px; }
.hv-chip b { font-size: 13px; letter-spacing: -.2px; }
.hv-chip small { font-size: 11px; color: var(--text-3); }
.hv-arrow { color: var(--mint-dark); line-height: 0; }
.hv-result {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 18px 34px;
  background: radial-gradient(120% 130% at 50% -20%, rgba(74,222,194,.14), transparent 60%), var(--surface);
  border: 1px solid rgba(74,222,194,.30);
  border-radius: var(--r-card);
  box-shadow: var(--glow-focus);
}
.hv-label { font-size: 10px; font-weight: 700; letter-spacing: 1.6px; color: var(--text-3); }
.hv-age { font-size: 40px; font-weight: 800; letter-spacing: -1.5px; color: var(--mint); }
.hv-note { font-size: 12px; color: var(--text-2); }
.health-points { display: grid; gap: 14px; align-content: center; }
.hp {
  display: flex; align-items: flex-start; gap: 16px;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--r-card);
  box-shadow: var(--e-1);
  padding: 18px 20px;
}
.hp-ic {
  width: 42px; height: 42px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 13px;
  background: rgba(74,222,194,.11);
  color: var(--mint);
}
.hp-ic .ic { width: 20px; height: 20px; }
.hp h3 { font-size: 15.5px; letter-spacing: -.3px; margin-bottom: 4px; }
.hp p { font-size: 13.5px; color: var(--text-2); line-height: 1.55; }
.health-foot {
  margin-top: 22px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}
@media (max-width: 900px) {
  .health-grid { grid-template-columns: 1fr; }
}

/* ── Privacy: a full-bleed deep-navy act-break ── */
.privacy-banner {
  max-width: none;
  margin: clamp(56px, 9vh, 110px) 0 0;
  padding: clamp(40px, 6vw, 64px) 0;
  background: var(--bg-deep);
  border-top: 1px solid var(--stroke);
  border-bottom: 1px solid var(--stroke);
  box-shadow: inset 0 1px 0 var(--stroke-hi);
}
.pb-inner {
  display: flex; align-items: center; gap: 26px;
  max-width: 1180px; margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}
.pb-lock {
  width: 56px; height: 56px; flex-shrink: 0;
  display: grid; place-items: center;
  border-radius: 16px;
  background: rgba(74,222,194,.12);
  color: var(--mint);
}
.pb-lock .ic { width: 28px; height: 28px; }
.pb-inner h3 { font-size: clamp(18px, 2.2vw, 23px); letter-spacing: -.5px; margin-bottom: 6px; }
.pb-inner p { color: var(--text-2); font-size: 15px; max-width: 640px; }

/* ── Pricing ── */
.plans {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 380px));
  justify-content: center;
  gap: 22px;
  margin-top: 48px;
}
.plan {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 28px;
  padding: 36px 32px;
  display: flex; flex-direction: column;
  position: relative;
  box-shadow: var(--e-1);
}
.plan-pro {
  border-color: rgba(245,201,123,.5);
  box-shadow: var(--e-1), 0 0 70px -22px rgba(245,201,123,.4);
}
.plan-flag {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--gold); color: #2B1F05;
  font-size: 12px; font-weight: 800; letter-spacing: .4px;
  border-radius: 100px;
  padding: 5px 16px;
}
.plan h3 { font-size: 19px; letter-spacing: -.4px; }
.plan-price {
  font-size: 42px; font-weight: 900; letter-spacing: -1.8px;
  margin: 12px 0 4px;
  font-variant-numeric: tabular-nums;
}
.plan-price small { font-size: 15px; font-weight: 600; color: var(--text-3); letter-spacing: 0; }
.plan-alt { font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.plan ul { list-style: none; margin: 18px 0 28px; flex: 1; }
.plan li {
  padding: 7px 0 7px 30px;
  font-size: 14.5px; color: var(--text-2);
  background: left 9px / 17px no-repeat
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%234ADEC2' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E");
}
.plan .btn, .plan .btn-ghost { text-align: center; }

/* ── FAQ ── */
.faq { margin-top: 40px; display: flex; flex-direction: column; gap: 12px; }
.faq details {
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: 18px;
  padding: 0 24px;
  box-shadow: var(--e-1);
  transition: border-color .25s;
}
.faq details[open] { border-color: rgba(74,222,194,.4); }
.faq summary {
  cursor: pointer;
  font-weight: 700; font-size: 15.5px;
  padding: 19px 28px 19px 0;
  list-style: none;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: '+';
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  color: var(--mint);
  font-size: 22px; font-weight: 400;
  transition: transform .25s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p {
  color: var(--text-2);
  font-size: 14.5px;
  padding-bottom: 20px;
}

/* ── Final CTA ── */
.final-cta {
  text-align: center;
  max-width: 760px;
  margin: 0 auto;
  padding: clamp(70px, 11vh, 130px) 20px;
}
.final-cta h2 {
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 900; letter-spacing: -1.6px;
  margin-bottom: 14px;
}
.final-cta p { color: var(--text-2); font-size: 17px; margin-bottom: 32px; }

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--stroke);
  padding: 44px calc(clamp(20px, 5vw, 56px) + env(safe-area-inset-right)) calc(36px + env(safe-area-inset-bottom)) calc(clamp(20px, 5vw, 56px) + env(safe-area-inset-left));
  max-width: 1180px;
  margin: 0 auto;
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: flex-start;
  flex-wrap: wrap; gap: 24px;
}
.footer-brand strong { font-size: 17px; letter-spacing: -.3px; }
.footer-brand em { font-style: normal; color: var(--mint); }
.footer-brand p { color: var(--text-3); font-size: 13.5px; margin-top: 6px; }
.footer-links { display: flex; gap: 24px; }
.footer-links a {
  color: var(--text-2); text-decoration: none;
  font-size: 14px; font-weight: 600;
}
.footer-links a:hover { color: var(--mint); }
.footer-note {
  color: var(--text-3); font-size: 12px;
  max-width: 720px;
  margin-top: 30px;
}
.footer-copy { color: var(--text-3); font-size: 12px; margin-top: 12px; }

/* ── Content is present immediately — no scroll-triggered fade-up.
   Feels more solid/confident and avoids the staggered "everything floats in" look.
   The signature animations still play (calibration scrub, hero phone, count-ups,
   sparkline, and the feature number-echo, which keys off .feature.in below). ── */
.reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; transition-delay: 0s; }
  .btn::after { display: none; }
  .spark .line { animation: none; stroke-dashoffset: 0; }
  .spark .tip { opacity: 1; transform: none; }
  .f-ghost { opacity: 1; transition: none; }
  /* Calibration: collapse the pin to a normal-height section showing the finished scene */
  .cal-track { height: auto; }
  .cal-stage { position: static; height: auto; padding: clamp(48px, 9vh, 90px) 0; overflow: visible; }
  .cal-line { opacity: 1; transform: none; }
  .cal-line-2 { transform: none; }
  .cal-dial-arc { stroke-dashoffset: 0; }
  .cal-dial-wrap::before { opacity: 1; transition: none; }
  .cal-age { text-shadow: var(--glow-signature); }
}

/* ═══════════ Monoline icons ═══════════ */
.ic {
  width: 24px; height: 24px;
  fill: none; stroke: currentColor;
  stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
  display: block;
}

/* ═══════════ Credibility / evidence strip ═══════════ */
.cred {
  max-width: 1180px;
  margin: 0 auto;
  padding: 6px clamp(20px, 5vw, 56px) 0;
  text-align: center;
}
.cred-label {
  font-size: 13.5px; font-weight: 600;
  color: var(--text-2);
  max-width: 580px; margin: 0 auto 16px;
}
.cred-chips {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 9px;
  list-style: none;
}
.cred-chips li {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--stroke);
  border-radius: 100px; padding: 7px 15px;
  box-shadow: var(--e-1);
}
.cred-chips li .ic { width: 15px; height: 15px; color: var(--mint-dark); stroke-width: 2; }
.cred-cites { font-size: 12px; color: var(--text-3); max-width: 640px; margin: 14px auto 0; }

/* ═══════════ Screenshot gallery ═══════════ */
.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 28px 22px;
  margin-top: 48px;
}
.shot { margin: 0; }
.shot-frame {
  border-radius: 26px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: #060910;
  box-shadow: var(--e-2);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.shot:hover .shot-frame {
  transform: translateY(-6px);
  border-color: rgba(74,222,194,.4);
  box-shadow: 0 34px 70px -26px rgba(74,222,194,.28);
}
.shot-frame img { display: block; width: 100%; height: auto; }
.shot figcaption { margin-top: 16px; text-align: center; }
.shot figcaption b { display: block; font-size: 15px; letter-spacing: -.2px; }
.shot figcaption span { display: block; font-size: 13px; color: var(--text-2); margin-top: 3px; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .hero {
    grid-template-columns: 1fr;
    text-align: center;
    padding-top: 44px;
  }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .store-badges, .hero-trust { justify-content: center; }
  .hero-phone { order: 6; margin-top: 8px; }
  .features { grid-template-columns: 1fr; }
  .feature.span-2 { grid-column: auto; }
  .pb-inner { flex-direction: column; text-align: center; }
  .cal-phone .phone { height: min(64vh, 524px); max-width: 74vw; }
  .cal-dial-wrap { width: clamp(112px, 17vh, 146px); height: clamp(112px, 17vh, 146px); }
  .cal-screen { padding: clamp(28px, 4vh, 40px) 16px clamp(14px, 2.2vh, 20px); gap: clamp(8px, 1.6vh, 14px); }
  .cal-routines { gap: 6px; }
  .cal-line { font-size: clamp(19px, 5.4vw, 26px); }
}
/* Short viewports (small phones, landscape): compress the Calibration so the dial,
   streak bar and all 4 routines stay inside the phone and below the sticky nav */
@media (max-height: 720px) {
  .cal-track { height: 220vh; }
  .cal-phone .phone { height: min(72vh, 452px); }
  .cal-dial-wrap { width: clamp(94px, 14vh, 122px); height: clamp(94px, 14vh, 122px); }
  .cal-screen { padding: clamp(22px, 3vh, 32px) 16px clamp(12px, 2vh, 18px); gap: clamp(6px, 1.2vh, 11px); }
  .cal-routines { gap: 5px; }
  .cal-routines .ps-routine { padding: 7px 11px; }
  .cal-streak { gap: 4px; }
  .cal-streak-track { height: 4px; }
  .cal-stage { gap: clamp(8px, 1.6vh, 16px); padding-top: calc(var(--nav-h) + env(safe-area-inset-top)); }
  .cal-line { font-size: clamp(16px, 4.4vw, 21px); }
}
/* Too short to pin the whole scene (landscape phones): un-pin it into a normal,
   scrollable section in its finished state. The phone gets a fixed height so its
   dial + streak + 4 routines fit; JS paints the end-state (see refreshCalMode). */
@media (max-height: 560px) {
  .cal-track { height: auto; }
  .cal-stage {
    position: static; height: auto; overflow: visible;
    padding: clamp(36px, 9vh, 60px) 16px;
    gap: clamp(16px, 4vh, 28px);
  }
  .cal-phone .phone { height: 408px; max-width: 215px; }
  .cal-dial-wrap { width: 108px; height: 108px; }
  .cal-screen { padding: 26px 16px 16px; gap: 9px; }
  .cal-routines { gap: 5px; }
  .cal-routines .ps-routine { padding: 6px 11px; }
  .cal-line { opacity: 1; transform: none; font-size: clamp(17px, 3.4vw, 22px); }
  .cal-line-2 { transform: none; }
}
@media (max-width: 560px) {
  .shots { grid-template-columns: repeat(2, 1fr); gap: 22px 14px; }
  .shot figcaption span { display: none; }
  .f-ghost { font-size: 72px; }
}
