/* Repeta landing page. Tokens mirror repeta/DesignSystem/Theme.swift and the asset colorsets. */

@font-face { font-family: "Chillax"; src: url(/fonts/Chillax-Variable.woff2) format("woff2"); font-weight: 200 700; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url(/fonts/Satoshi-Regular.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Satoshi"; src: url(/fonts/Satoshi-Medium.woff2) format("woff2"); font-weight: 500 700; font-display: swap; }

:root {
  --navy: #162B42;
  --ink: #161D25;
  --paper: #F7FAFF;
  --sky: #98C8FF;
  --sky-soft: #C9E0FF;
  --gold: #DABD2B;
  --gold-soft: #F6E27C;
  --coral: #EF5340;
  --text: #162B42;
  --text-2: rgba(22, 43, 66, .72);
  --border: #C9E0FF;
  --display: "Chillax", ui-rounded, system-ui, sans-serif;
  --body: "Satoshi", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.4, .64, 1);
  --maxw: 1240px;
  /* Default phone edge; each phone overrides these in its own settings block */
  --edge-depth: .1; --edge-slices: 24; --edge-light: #7D8DA2; --edge-dark: #0C1219;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--text);
  font: 500 1.125rem/1.55 var(--body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; margin: 0; line-height: 1.2; letter-spacing: -.01em; text-wrap: balance; }
p { text-wrap: pretty; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ───────────── Buttons ───────────── */
.btn-pill {
  display: inline-flex; align-items: center; justify-content: center;
  height: 64px; padding: 0 40px; border-radius: 999px;
  font: 600 1.0625rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; text-decoration: none;
  transition: transform .25s var(--ease-out), box-shadow .25s var(--ease-out), background .2s;
}
.btn-pill:hover { transform: translateY(-2px); }
.btn-pill:active { transform: translateY(1px) scale(.98); }
.btn-pill.gold { background: var(--gold); color: var(--ink); box-shadow: 0 14px 30px -10px rgba(170, 140, 10, .65); }
.btn-pill.gold:hover { box-shadow: 0 20px 36px -12px rgba(170, 140, 10, .75); }
.btn-pill.white { background: #fff; color: var(--navy); box-shadow: 0 10px 30px -14px rgba(22, 43, 66, .35); }
.btn-pill.navy { background: var(--navy); color: var(--paper); }
.btn-pill svg { width: 22px; height: 22px; margin-right: 10px; margin-top: -3px; }
.store { letter-spacing: .04em; }

/* ───────────── HERO ───────────── */
/* Full-bleed hero: the gradient is the section background, content stays within 1440px */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% 15%, rgba(255,255,255,.45), transparent 55%),
    linear-gradient(160deg, #B9D3F1 0%, #C7D6E6 45%, #D9D3B8 100%);
}
/* faint grid lines */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.22) 1px, transparent 1px);
  background-size: 160px 160px;
  mask-image: radial-gradient(80% 70% at 60% 55%, #000 30%, transparent 80%);
}
.hero-card {
  position: relative;
  max-width: 1440px; margin: 0 auto;
  min-height: max(760px, 100svh);
  padding: 28px 56px 48px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto 1fr auto;
  --hero-pw: clamp(280px, min(22vw, 40svh), 340px); /* hero phone width, shared with .hero-note */
}

.nav { grid-row: 1; display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 5; }
.nav-pills { display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(255,255,255,.28); backdrop-filter: blur(10px); }
.nav-pills a { padding: 12px 22px; border-radius: 999px; text-decoration: none; font-size: 1.0625rem; color: var(--text-2); transition: background .2s, color .2s; }
.nav-pills a:hover { color: var(--navy); background: rgba(255,255,255,.3); }
.nav-pills a.on { background: rgba(255,255,255,.75); color: var(--navy); box-shadow: 0 4px 14px -6px rgba(22,43,66,.25); }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; font: 600 1.625rem/1 var(--display); letter-spacing: .28em; color: var(--navy); }


.hero-head { grid-row: 2; position: relative; z-index: 3; padding-top: clamp(60px, 11vh, 120px); width: max-content; max-width: 100%; }
.hero-head h1 {
  font: 500 clamp(1.75rem, 2.8vw, 3rem)/1.1 var(--body); white-space: nowrap;
  text-transform: uppercase; letter-spacing: .005em; color: var(--ink);
}
.hero-head .l { display: block; overflow: hidden; padding-bottom: .06em; }
.hero-head .l > span { display: inline-block; transform: translateY(105%); animation: lineUp 1s var(--ease-out) forwards; }
.hero-head .l1 { padding-left: 3em; }
.hero-head .l3 { padding-left: 1.6em; }
.hero-head .l1 > span { animation-delay: .15s; }
.hero-head .l2 > span { animation-delay: .27s; }
.hero-head .l3 > span { animation-delay: .39s; }
@keyframes lineUp { to { transform: none; } }

/* The tilted phone */
.hero-phone-wrap {
  position: absolute; z-index: 2; left: 67%; top: 52%; translate: -50% -50%;
  display: grid; place-items: center;
  perspective: 1600px;
  /* The fade lives here, outside the 3D scene: opacity on the phone itself
     (even a held 1 from an animation) makes the browser flatten its sides */
  animation: phoneFade .8s var(--ease-out) .2s both;
}
@keyframes phoneFade { from { opacity: 0; } }
.hero-phone-tilt { transform-style: preserve-3d; transition: transform .6s var(--ease-out); will-change: transform; }
.phone.p-hero {
  /* ── Hero phone settings ── */
  --pw: var(--hero-pw);              /* width (set on .hero-card) */
  --rx: 8deg; --ry: -28deg; --rz: 4deg; /* resting angle */
  --edge-depth: .06;                 /* side thickness, as a fraction of the width */
  --edge-slices: 20;                 /* more slices = smoother side */
  --edge-light: #7D8DA2;             /* highlight in the middle of the side */
  --edge-dark: #0C1219;              /* side colour at the front and back */
  transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz));
  animation: phoneIn 1.4s var(--ease-out) .2s backwards, floaty 7s ease-in-out 1.6s infinite;
}
@keyframes phoneIn {
  from { transform: translateY(120px) rotateX(24deg) rotateY(-40deg) rotateZ(10deg) scale(.9); }
}
@keyframes floaty {
  0%, 100% { transform: rotateX(var(--rx)) rotateY(var(--ry)) rotateZ(var(--rz)) translateY(0); }
  50% { transform: rotateX(calc(var(--rx) - 2deg)) rotateY(calc(var(--ry) + 4deg)) rotateZ(calc(var(--rz) - 1deg)) translateY(-14px); }
}
.phone-shadow {
  position: absolute; bottom: 4%; left: 50%; width: 60%; height: 40px; translate: -42% 0;
  background: radial-gradient(closest-side, rgba(22,43,66,.35), transparent);
  filter: blur(8px); z-index: -1;
  animation: shadowPulse 7s ease-in-out 1.6s infinite;
}
@keyframes shadowPulse { 50% { transform: scaleX(.85); opacity: .7; } }

/* Giant words set behind the phone */
.giant {
  margin: 0; position: absolute; z-index: 1; pointer-events: none; /* behind the phone (z 2) */
  font: 700 clamp(6.25rem, 13.2vw, 14.375rem)/.8 var(--display);
  letter-spacing: -.01em; color: #fff;
  text-shadow: 0 20px 50px rgba(22, 43, 66, .12);
}
.giant span { display: inline-block; animation: giantIn 1.2s var(--ease-out) both; }
.g1 { left: 44px; bottom: 140px; }
.g1 span { animation-delay: .5s; }
.g2 { right: -14px; bottom: -34px; }
.g2 span { animation-delay: .7s; }
@keyframes giantIn { from { opacity: 0; transform: translateY(40%); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 -20% 0); } }

.hero-note {
  text-wrap: balance;
  position: absolute; z-index: 5; bottom: 210px; margin: 0;
  /* starts just past the phone's right edge (centre 67%, visible half-width ≈ .44 × width) */
  left: calc(67% + var(--hero-pw) * .46 + 24px); right: 56px; max-width: 270px;
  font-size: 1.1875rem; line-height: 1.45; color: var(--ink);
  opacity: 0; animation: fadeUp .9s var(--ease-out) 1s forwards;
}
.hero-ctas {
  /* sits under the headline, clear of the giant words at the bottom */
  grid-row: 3; align-self: start; margin-top: clamp(28px, 5vh, 48px);
  display: flex; gap: 18px; position: relative; z-index: 5;
  opacity: 0; animation: fadeUp .9s var(--ease-out) .9s forwards;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ───────────── Phone frame ───────────── */
.phone {
  --pw: 300px;
  position: relative;
  width: var(--pw); aspect-ratio: 402 / 874;
  border-radius: calc(var(--pw) * .15);
  padding: calc(var(--pw) * .028);
  background: linear-gradient(145deg, #2B3A4E, #0E141C 40%, #1D2836);
  box-shadow:
    inset 0 0 0 1.5px rgba(255,255,255,.18),
    inset 0 0 0 4px #0A0F15,
    0 50px 80px -30px rgba(22, 43, 66, .55),
    0 20px 30px -20px rgba(22, 43, 66, .4);
  transform-style: preserve-3d;
}
/* Real thickness: stacked slices behind the face form the phone's metal band.
   Each phone sets its own --edge-* values (see .p-hero and .p-story); landing.js builds
   --edge-slices slices and gives each a --shade (0 at the faces, 1 mid-band). */
.phone-edge { position: absolute; inset: 0; border-radius: inherit; transform-style: preserve-3d; pointer-events: none; }
.phone-edge i {
  position: absolute; inset: 0; border-radius: inherit;
  background: color-mix(in srgb, var(--edge-light) calc(var(--shade) * 100%), var(--edge-dark));
  transform: translateZ(calc(var(--z) / var(--edge-slices) * var(--edge-depth) * var(--pw) * -1));
}
.phone-edge i:last-child { background: var(--edge-dark); }
.phone .screens { transform: translateZ(.6px); }
.phone::after { /* side buttons */
  content: ""; position: absolute; right: -3px; top: 24%; width: 3px; height: 12%; border-radius: 0 3px 3px 0; background: #26303D;
}
.phone .screens {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--pw) * .125); overflow: hidden;
  container-type: inline-size;
  background: var(--paper);
}
.phone .screens::after { /* glass sheen */
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 20;
  background: linear-gradient(115deg, rgba(255,255,255,.28) 0%, rgba(255,255,255,0) 32%);
  mix-blend-mode: soft-light;
}

/* ───────────── App screens (sized in screen points via --p) ───────────── */
.scr {
  --p: calc(100cqw / 402);
  position: absolute; inset: 0;
  font-family: var(--body); color: var(--text);
  background: linear-gradient(170deg, #D2E4FA 0%, #E3E9EE 55%, #EFEBD6 100%);
  padding: 0 calc(20 * var(--p));
  font-size: calc(17 * var(--p));
  overflow: hidden;
  transition: opacity .6s var(--ease-out), transform .7s var(--ease-out), filter .6s;
}
.scr .ic, .scr svg { width: 1em; height: 1em; }
.sb { display: flex; align-items: center; justify-content: space-between; height: calc(56 * var(--p)); padding: 0 calc(14 * var(--p)); font: 600 calc(17 * var(--p))/1 -apple-system, var(--body); color: var(--ink); }
.island { position: absolute; left: 50%; top: calc(11 * var(--p)); translate: -50% 0; width: calc(124 * var(--p)); height: calc(36 * var(--p)); border-radius: 99px; background: #000; }
.sb-r { display: flex; gap: calc(3 * var(--p)); align-items: flex-end; }
.sb-r b { width: calc(4 * var(--p)); background: var(--ink); border-radius: 1px; }
.sb-r b:nth-child(1) { height: calc(6 * var(--p)); } .sb-r b:nth-child(2) { height: calc(9 * var(--p)); } .sb-r b:nth-child(3) { height: calc(12 * var(--p)); width: calc(22 * var(--p)); border-radius: calc(4 * var(--p)); margin-left: calc(4 * var(--p)); }

.pill { display: inline-flex; align-items: center; padding: calc(8 * var(--p)) calc(16 * var(--p)); border-radius: 99px; background: rgba(247, 250, 255, .8); font-size: calc(16 * var(--p)); }
.mascot { width: calc(72 * var(--p)); height: calc(72 * var(--p)); flex: none; }
.bob { animation: bob 2.8s ease-in-out infinite; transform-origin: 50% 100%; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(0); } 30% { transform: translateY(-6%) rotate(-4deg); } 60% { transform: translateY(0) rotate(3deg); } }

.bubble-row { display: flex; align-items: flex-end; gap: calc(8 * var(--p)); margin-top: calc(16 * var(--p)); }
.bubble { flex: 1; margin: 0; padding: calc(13 * var(--p)) calc(16 * var(--p)); background: var(--paper); border: 1px solid var(--border); border-radius: calc(20 * var(--p)) calc(20 * var(--p)) calc(6 * var(--p)) calc(20 * var(--p)); font-size: calc(19 * var(--p)); line-height: 1.3; }

.goalbar { height: calc(12 * var(--p)); border-radius: 99px; background: rgba(247, 250, 255, .85); overflow: hidden; }
.goalbar i { display: block; height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--gold-soft), var(--gold)); transition: width 1.6s var(--ease-out); min-width: calc(12 * var(--p)); }
.on-screen .goalbar i { width: var(--to); }

/* Home */
.h-top { display: flex; justify-content: space-between; align-items: center; margin-top: calc(8 * var(--p)); }
.h-top .ic { width: calc(28 * var(--p)); height: calc(28 * var(--p)); }
.streak { display: inline-flex; align-items: center; gap: calc(6 * var(--p)); padding: calc(7 * var(--p)) calc(14 * var(--p)); background: var(--gold); border-radius: 99px; font: 600 calc(19 * var(--p))/1 var(--display); color: var(--ink); box-shadow: 0 calc(4 * var(--p)) calc(16 * var(--p)) rgba(218, 189, 43, .5); }
.streak svg { width: calc(18 * var(--p)); height: calc(18 * var(--p)); }
.week { display: flex; justify-content: space-between; margin: calc(14 * var(--p)) 0 calc(16 * var(--p)); }
.d { width: calc(46 * var(--p)); height: calc(74 * var(--p)); border-radius: 99px; background: rgba(247, 250, 255, .7); border: 1px solid rgba(201, 224, 255, .9); display: flex; flex-direction: column; align-items: center; justify-content: space-around; padding: calc(6 * var(--p)) 0; }
.d em { font-style: normal; font-size: calc(13 * var(--p)); color: var(--text-2); }
.d b { font-weight: 500; font-size: calc(16 * var(--p)); width: calc(36 * var(--p)); height: calc(36 * var(--p)); display: grid; place-items: center; border-radius: 50%; }
.d.done b { background: #F1E7A9; }
.d.today { border: calc(2 * var(--p)) solid var(--navy); }
.d.today b { background: #F1E7A9; }
.goal-label { margin: calc(8 * var(--p)) 0 0; font-size: calc(15 * var(--p)); color: var(--text-2); }
.big-ring { position: relative; width: calc(250 * var(--p)); aspect-ratio: 1; margin: calc(22 * var(--p)) auto calc(26 * var(--p)); }
.big-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.big-ring circle { fill: none; stroke-width: 16; }
.big-ring .track { stroke: #C9DEFA; }
.big-ring .arc { stroke: var(--gold); stroke-linecap: round; stroke-dasharray: 0 100; transition: stroke-dasharray 2s var(--ease-out) .3s; }
.on-screen .big-ring .arc { stroke-dasharray: 60 100; }
.ring-face { position: absolute; inset: calc(32 * var(--p)); border-radius: 50%; background: #EEF3F8; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.ring-face strong { font: 600 calc(32 * var(--p))/1.1 var(--display); color: var(--navy); }
.ring-face small { margin-top: calc(8 * var(--p)); font-size: calc(14 * var(--p)); color: var(--text-2); }
.agenda-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: calc(12 * var(--p)); }
.agenda-head h4 { font-size: calc(24 * var(--p)); color: var(--navy); }
.row { position: relative; display: flex; align-items: center; gap: calc(14 * var(--p)); padding: calc(14 * var(--p)) calc(18 * var(--p)); border-radius: calc(20 * var(--p)); background: rgba(247, 250, 255, .75); border: 1px solid var(--border); margin-bottom: calc(10 * var(--p)); overflow: hidden; }
.row::before { content: ""; position: absolute; inset: 0; width: 0; background: #F1E7B4; transition: width 1.4s var(--ease-out); z-index: 0; }
.on-screen .row.filled::before { width: var(--fill); }
.row:nth-of-type(2)::before { transition-delay: .2s; } .row:nth-of-type(3)::before { transition-delay: .4s; }
.row > * { position: relative; z-index: 1; }
.row .ic, .row .ins { width: calc(26 * var(--p)); height: calc(26 * var(--p)); flex: none; }
.row div { flex: 1; display: flex; flex-direction: column; }
.row b { font-weight: 500; font-size: calc(20 * var(--p)); }
.row small { font-size: calc(15 * var(--p)); color: var(--text-2); }
.row span { font-size: calc(16 * var(--p)); color: var(--text-2); }
.ins { display: inline-block; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.tabbar { position: absolute; left: calc(14 * var(--p)); right: calc(14 * var(--p)); bottom: calc(24 * var(--p)); height: calc(62 * var(--p)); border-radius: 99px; background: rgba(247, 250, 255, .9); box-shadow: 0 calc(8 * var(--p)) calc(30 * var(--p)) rgba(22, 43, 66, .18); display: flex; align-items: center; justify-content: space-around; padding: 0 calc(6 * var(--p)); z-index: 5; backdrop-filter: blur(8px); }
.tabbar span { display: flex; align-items: center; gap: calc(8 * var(--p)); height: calc(50 * var(--p)); padding: 0 calc(20 * var(--p)); border-radius: 99px; font-size: calc(18 * var(--p)); }
.tabbar svg { width: calc(24 * var(--p)); height: calc(24 * var(--p)); }
.tabbar .on { background: var(--gold); color: var(--ink); }

/* Practice session */
.sheet-head { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin-top: calc(6 * var(--p)); }
.sheet-head b { font: 600 calc(19 * var(--p))/1 var(--display); }
.sp-progress { margin-top: calc(18 * var(--p)); }
.sp-progress p { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 calc(8 * var(--p)); }
.sp-progress b { font-weight: 500; font-size: calc(18 * var(--p)); }
.sp-progress span { font-size: calc(15 * var(--p)); color: var(--text-2); }
.rep-ring { position: relative; width: calc(290 * var(--p)); aspect-ratio: 1; margin: calc(28 * var(--p)) auto calc(10 * var(--p)); }
.rep-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rep-ring circle { fill: none; stroke-width: 14; }
.rep-ring .seg { fill: none; stroke: #C9DEFA; stroke-width: 14; stroke-linecap: round; transition: stroke .35s; }
.rep-ring .seg.done { stroke: var(--gold); }
.rep-face { position: absolute; inset: calc(34 * var(--p)); border-radius: 50%; background: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 calc(10 * var(--p)) calc(30 * var(--p)) rgba(22, 43, 66, .1); transition: transform .2s var(--ease-spring); }
.rep-face.tap { transform: scale(.94); }
.rep-face small { font-size: calc(17 * var(--p)); color: var(--text-2); }
.rep-face strong { font: 600 calc(82 * var(--p))/1 var(--display); color: var(--navy); }
.hint { text-align: center; margin: 0; font-size: calc(15 * var(--p)); color: var(--text-2); }
.session-tools { position: absolute; left: calc(20 * var(--p)); right: calc(20 * var(--p)); bottom: calc(34 * var(--p)); display: flex; gap: calc(10 * var(--p)); }
.session-tools span { height: calc(54 * var(--p)); min-width: calc(54 * var(--p)); border-radius: 99px; background: rgba(247, 250, 255, .9); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--p)); font-size: calc(17 * var(--p)); }
.session-tools svg { width: calc(24 * var(--p)); height: calc(24 * var(--p)); }
.session-tools .rec { flex: 1; }
.rec i { width: calc(14 * var(--p)); height: calc(14 * var(--p)); border-radius: 50%; background: var(--coral); animation: recPulse 1.4s ease-in-out infinite; }
@keyframes recPulse { 50% { box-shadow: 0 0 0 calc(6 * var(--p)) rgba(239, 83, 64, .18); } }

/* Stats */
.scr-title { font-size: calc(34 * var(--p)); color: var(--navy); margin: calc(14 * var(--p)) 0 calc(14 * var(--p)); }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: calc(10 * var(--p)); margin-bottom: calc(12 * var(--p)); }
.tile { padding: calc(14 * var(--p)) calc(16 * var(--p)); border-radius: calc(20 * var(--p)); background: rgba(247, 250, 255, .8); border: 1px solid var(--border); display: flex; flex-direction: column; }
.tile.gold { background: linear-gradient(135deg, var(--gold-soft), var(--gold)); border-color: transparent; }
.tile small { font-size: calc(14 * var(--p)); color: var(--text-2); }
.tile b { font: 600 calc(24 * var(--p))/1.2 var(--display); }
.card { padding: calc(16 * var(--p)); border-radius: calc(24 * var(--p)); background: rgba(247, 250, 255, .8); border: 1px solid var(--border); margin-bottom: calc(12 * var(--p)); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 calc(12 * var(--p)); }
.card-head b { font: 600 calc(21 * var(--p))/1 var(--display); }
.card-head span { font-size: calc(14 * var(--p)); color: var(--text-2); }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: calc(4 * var(--p)); }
.heat i { aspect-ratio: 1; border-radius: calc(6 * var(--p)); background: transparent; border: 1px solid var(--border); transform: scale(.4); opacity: 0; transition: transform .5s var(--ease-spring), opacity .4s; transition-delay: calc(var(--i) * 9ms); }
.on-screen .heat i { transform: none; opacity: 1; }
.heat .l1, .legend .l1 { background: #F4E9AE; border-color: transparent; }
.heat .l2, .legend .l2 { background: #EAD26A; border-color: transparent; }
.heat .l3, .legend .l3 { background: var(--gold); border-color: transparent; }
.heat .fut { visibility: hidden; }
.legend { display: flex; align-items: center; gap: calc(4 * var(--p)); margin: calc(10 * var(--p)) 0 0; font-size: calc(13 * var(--p)); color: var(--text-2); }
.legend i { width: calc(16 * var(--p)); height: calc(16 * var(--p)); border-radius: calc(4 * var(--p)); border: 1px solid var(--border); }
.bars { display: flex; align-items: flex-end; gap: calc(8 * var(--p)); height: calc(150 * var(--p)); }
.bars span { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: calc(6 * var(--p)); }
.bars i { width: 100%; height: 0; border-radius: calc(8 * var(--p)); background: #BFD9FB; transition: height 1.2s var(--ease-out); }
.bars span:nth-child(n) i { transition-delay: calc(var(--n, 0) * 70ms); }
.on-screen .bars i { height: calc(var(--h) * .8); }
.bars .now i { background: var(--gold); }
.bars em { font-style: normal; font-size: calc(12 * var(--p)); color: var(--text-2); }

/* Repertoire */
.sec-label { margin: calc(8 * var(--p)) 0 calc(8 * var(--p)); font-size: calc(14 * var(--p)); text-transform: uppercase; letter-spacing: .08em; color: var(--text-2); }
.piece { display: flex; align-items: center; gap: calc(14 * var(--p)); padding: calc(14 * var(--p)) calc(16 * var(--p)); border-radius: calc(20 * var(--p)); background: rgba(247, 250, 255, .8); border: 1px solid var(--border); margin-bottom: calc(10 * var(--p)); }
.piece .ins, .piece .ic { width: calc(30 * var(--p)); height: calc(30 * var(--p)); flex: none; }
.piece > div { flex: 1; display: flex; flex-direction: column; gap: calc(2 * var(--p)); }
.piece b { font-weight: 500; font-size: calc(19 * var(--p)); }
.piece small { font-size: calc(14 * var(--p)); color: var(--text-2); }
.pbar { height: calc(6 * var(--p)); border-radius: 99px; background: #DCE9FA; margin-top: calc(6 * var(--p)); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; background: var(--gold); border-radius: inherit; transition: width 1.4s var(--ease-out) .2s; }
.on-screen .pbar i { width: var(--to); }

.piece .tag { font-size: calc(13 * var(--p)); padding: calc(5 * var(--p)) calc(10 * var(--p)); border-radius: 99px; background: var(--gold); color: var(--ink); font-family: var(--body); letter-spacing: 0; }
.add { display: flex; align-items: center; justify-content: center; gap: calc(8 * var(--p)); padding: calc(14 * var(--p)); border-radius: 99px; border: 1.5px dashed #9EBEE6; color: var(--navy); font-size: calc(17 * var(--p)); }
.add svg { width: calc(18 * var(--p)); height: calc(18 * var(--p)); }

/* ───────────── Sections ───────────── */
section { position: relative; }
.section-head { max-width: var(--maxw); margin: 0 auto 56px; padding: 0 24px; }
.section-head.center { text-align: center; }
.section-head h2 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1.1; letter-spacing: -.02em; color: var(--navy); }
.section-head .lede { max-width: 28em; color: var(--text-2); font-size: 1.25rem; margin: 20px 0 0; }

/* Marquee */
.marquee { padding: 72px 0 40px; text-align: center; }
.marquee p { margin: 0 0 26px; font-size: 0.9375rem; letter-spacing: .12em; text-transform: uppercase; color: var(--text-2); }
.mq { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.mq-track { display: flex; gap: 14px; width: max-content; animation: marquee 38s linear infinite; }
.mq:hover .mq-track { animation-play-state: paused; }
.mq-track span { display: inline-flex; align-items: center; gap: 12px; padding: 14px 26px; border-radius: 999px; background: #fff; border: 1px solid var(--border); font-size: 1.1875rem; white-space: nowrap; }
.mq-track i { width: 26px; height: 26px; background: var(--navy); -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* Story (sticky phone) */
.story { padding: 110px 0 60px; }
.story-grid { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.step { min-height: 72vh; display: flex; flex-direction: column; justify-content: center; opacity: .4; transition: opacity .5s var(--ease-out); }
.step.active { opacity: 1; }
.step .num { font: 600 1.125rem/1 var(--display); color: #9A7F0E; letter-spacing: .1em; margin-bottom: 16px; }
.step h3 { font-size: clamp(1.875rem, 3vw, 2.75rem); line-height: 1.15; letter-spacing: -.015em; color: var(--navy); margin-bottom: 18px; }
.step p { font-size: 1.25rem; color: var(--text-2); max-width: 24em; margin: 0; }
.story-phone-wrap { position: relative; }
.story-phone { position: sticky; top: calc(50vh - 330px); display: flex; align-items: center; justify-content: center; gap: 28px; height: 660px; }
.story-phone { perspective: 1600px; }
.story-tilt { transform-style: preserve-3d; transform: rotateX(6deg) rotateY(-16deg) rotateZ(3deg); /* starting angle; per-step angles are in landing.js */ transition: transform .8s var(--ease-out); will-change: transform; }
.p-story {
  /* ── Story phone settings ── */
  --pw: 300px;                       /* width */
  --edge-depth: .1008;               /* side thickness, as a fraction of the width */
  --edge-slices: 24;
  --edge-light: #7D8DA2;
  --edge-dark: #0C1219;
}
.p-story .scr { opacity: 0; transform: translateY(6%) scale(.97); filter: blur(4px); }
.p-story .scr.show { opacity: 1; transform: none; filter: none; }

/* Parents */
.parents { padding: 40px 20px; }
.parents-inner { max-width: 1440px; margin: 0 auto; border-radius: 44px; background: var(--navy); color: var(--paper); padding: 110px 0 100px; overflow: hidden; position: relative; }
.parents h2 { color: var(--paper); }
.parents .lede { color: rgba(247, 250, 255, .72); }
.bento { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(2, 1fr) repeat(1, 1fr); grid-template-columns: 1fr 1fr 1fr; gap: 18px; }
.bcard { position: relative; padding: 34px; border-radius: 30px; background: rgba(247, 250, 255, .06); border: 1px solid rgba(247, 250, 255, .1); overflow: hidden; }
.bcard h3 { font-size: 1.625rem; margin-bottom: 8px; }
.bcard p { margin: 0; line-height: 1.5; color: rgba(247, 250, 255, .7); font-size: 1.0625rem; }
.b-wide { grid-column: span 2; display: grid; grid-template-columns: 1fr 1.1fr; gap: 30px; align-items: center; }
.notif-stack { display: grid; gap: 12px; }
.notif { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-radius: 22px; background: rgba(247, 250, 255, .92); color: var(--navy); box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .5); transform: translateY(20px); opacity: 0; transition: transform .8s var(--ease-spring), opacity .5s; }
.notif img { width: 40px; height: 40px; border-radius: 10px; background: var(--paper); }
.notif div { flex: 1; display: flex; flex-direction: column; }
.notif b { font-size: 1rem; } .notif small { font-size: 0.9375rem; color: var(--text-2); }
.notif em { font-style: normal; font-size: 0.8125rem; color: var(--text-2); align-self: flex-start; }
.notif.n2 { transform: translateY(20px) scale(.95); }
.in .notif { transform: none; opacity: 1; }
.in .notif.n2 { transition-delay: .35s; transform: scale(.96); opacity: .85; }
.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 26px; }
.tool-grid span { display: flex; align-items: center; gap: 10px; padding: 14px; border-radius: 18px; background: rgba(247, 250, 255, .08); font-size: 0.9375rem; }
.tool-grid svg { width: 22px; height: 22px; color: var(--gold); }
.tuner-demo { position: relative; height: 130px; margin-bottom: 36px; display: grid; place-items: center; }
.tuner-demo svg { width: 220px; }
.t-track { fill: none; stroke: rgba(247, 250, 255, .15); stroke-width: 10; stroke-linecap: round; }
.t-ok { fill: none; stroke: var(--gold); stroke-width: 10; stroke-linecap: round; stroke-dasharray: 10 100; stroke-dashoffset: -45; }
.needle { stroke: var(--paper); stroke-width: 4; stroke-linecap: round; transform-origin: 100px 100px; animation: needle 4s var(--ease-out) infinite; }
.tuner-demo circle { fill: var(--paper); }
.tuner-demo b { position: absolute; bottom: -22px; font: 600 1.75rem/1 var(--display); }
@keyframes needle { 0% { transform: rotate(-38deg); } 30% { transform: rotate(14deg); } 50% { transform: rotate(-6deg); } 65%, 100% { transform: rotate(0); } }
.invite { display: grid; gap: 12px; }
.invite-link { display: flex; align-items: center; gap: 12px; padding: 18px 20px; border-radius: 18px; background: rgba(247, 250, 255, .92); color: var(--navy); font-size: 1.0625rem; }
.invite-link svg { width: 22px; height: 22px; flex: none; }
.invite-link b { font-weight: 600; }
.caret { display: inline-block; width: 2px; height: 1.1em; vertical-align: -3px; background: var(--navy); margin-left: 2px; animation: caret 1s steps(1) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.invite-add { justify-self: start; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 99px; background: var(--gold); color: var(--ink); font-size: 0.9375rem; transform: scale(.6); opacity: 0; transition: transform .5s var(--ease-spring), opacity .3s; }
.invite-add svg { width: 18px; height: 18px; }
.invite-add.pop { transform: none; opacity: 1; }

/* Three steps */
.steps3 { padding: 130px 0 40px; }
.three { list-style: none; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.three li { padding: 36px; border-radius: 30px; background: #fff; border: 1px solid var(--border); }
.big-n { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 50%; background: var(--gold); font: 600 1.625rem/1 var(--display); color: var(--ink); margin-bottom: 26px; }
.three h3 { font-size: 1.625rem; color: var(--navy); margin-bottom: 8px; }
.three p { margin: 0; color: var(--text-2); }

/* FAQ */
.faq { padding: 120px 0 40px; }
.faq .section-head { max-width: 900px; }
.faq-list { max-width: 900px; margin: 0 auto; padding: 0 24px; }
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { text-wrap: balance; list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 0; font: 600 1.375rem/1.3 var(--display); color: var(--navy); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 36px; height: 36px; border-radius: 50%; background: var(--sky-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12' stroke='%23162B42' stroke-width='2.2' stroke-linecap='round'/%3E%3C/svg%3E") center / 18px no-repeat; transition: transform .35s var(--ease-out), background-color .2s; }
.faq details[open] summary::after { transform: rotate(45deg); background-color: var(--gold); }
.faq details p { margin: 0 0 26px; color: var(--text-2); max-width: 38em; }

/* Final CTA */
.final { padding: 120px 20px 60px; }
.final-card { position: relative; max-width: 1440px; margin: 0 auto; border-radius: 44px; padding: 100px 24px; text-align: center; overflow: hidden; background: linear-gradient(160deg, #B9D3F1 0%, #C7D6E6 45%, #E5D8A0 100%); }
.final-ctas { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 14px; padding: 0 16px; }
.final-mascot { width: 140px; height: 140px; margin: 0 auto 20px; }
.final h2 { font-size: clamp(2.5rem, 5.4vw, 4.75rem); line-height: 1.1; letter-spacing: -.02em; color: var(--navy); }
.final p { color: var(--text-2); font-size: 1.25rem; margin: 18px 0 34px; }

.foot { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 60px; display: flex; align-items: center; gap: 30px; color: var(--text-2); }
.foot .brand { font-size: 1.25rem; margin: 0; }
.foot .brand img { width: 34px; }
.foot nav { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-left: auto; }
.foot a { text-decoration: none; } .foot nav a:hover { color: var(--navy); }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); transition-delay: var(--d, 0s); }
.reveal.in { opacity: 1; transform: none; }

@supports (text-box: trim-both cap alphabetic) {
  .btn-pill, .big-n { text-box: trim-both cap alphabetic; }
}

/* ───────────── Responsive ───────────── */
/* Below this the gap right of the phone is too narrow for the note */
@media (max-width: 1279px) {
  .hero-note { display: none; }
}
@media (max-width: 1100px) {
  .hero-card { padding: 24px 32px 40px; --hero-pw: clamp(240px, 26vw, 300px); }
  /* smaller and further right, so it clears the logo above and the buttons below */
  .hero-phone-wrap { left: 70%; top: 50%; }
  .hero-head .l1 { padding-left: 2.6em; }
  .hero-note { display: none; }
  /* stacked, so they stay left of the phone */
  .hero-ctas { flex-direction: column; align-items: flex-start; }
}
/* Between tablet and wide desktop, three columns squeeze the wide cards' text and demo
   side by side. Two columns give each wide card the full row and pair the small ones */
@media (min-width: 861px) and (max-width: 1180px) {
  .bento { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .hero-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto; padding: 18px 20px 30px; min-height: 0; }
  .nav-pills a:not(.on) { display: none; }
  .brand { font-size: 1.25rem; letter-spacing: .2em; }
  .hero-head { grid-row: 2; padding-top: 56px; }
  .hero-head h1 { font-size: clamp(1.75rem, 7vw, 2.75rem); }
  .hero-head .l1, .hero-head .l3 { padding-left: 0; }
  .hero-head h1 { white-space: normal; }
  .hero-phone-wrap { position: relative; left: auto; top: auto; translate: none; grid-row: 3; margin: 36px 0 0; }
  .phone.p-hero { --pw: min(64vw, 300px); }
  .giant { font-size: 18.5vw; }
  /* the phone fills the width here, so the words sit under it instead of behind it */
  .giant { position: relative; left: auto; right: auto; bottom: auto; }
  .g1 { grid-row: 4; margin-top: 28px; }
  .g2 { grid-row: 5; justify-self: end; }
  .hero-ctas { grid-row: 6; flex-direction: column; align-items: stretch; margin-top: 32px; }
  .btn-pill { height: 58px; padding: 0 24px; white-space: nowrap; }
  .bcard { padding: 26px 22px; }
  .tool-grid span { padding: 12px 10px; gap: 6px; font-size: .875rem; }
  .tool-grid svg { width: 18px; height: 18px; flex: none; }
  .btn-pill.store { white-space: normal; height: auto; min-height: 58px; padding: 14px 24px; line-height: 1.25; text-align: center; letter-spacing: .04em; }
  .story-grid { grid-template-columns: 1fr; gap: 0; }
  .story-phone-wrap { grid-row: 1; }
  .story-phone { position: relative; top: 0; height: 560px; }
  .p-story { --pw: 250px; }
  .step { min-height: 0; padding: 30px 0; opacity: 1; }
  .bento, .three { grid-template-columns: 1fr; }
  .b-wide { grid-column: auto; grid-template-columns: 1fr; }
  .parents-inner, .final-card { border-radius: 32px; padding: 70px 0; }
  .foot { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* Changing numbers keep one digit width so nothing shifts while they count.
   Last in the file because the `font` shorthand above resets font-variant */
[data-count], [data-to], .rep-face .rep-n, .streak, .goal-label, .tile b, .sp-progress span, .row span, .d b, .sb, .notif em, .big-n, .tuner-demo b { font-variant-numeric: tabular-nums; }

/* Let grid children shrink below their content width, so long text like the
   invite link wraps inside the card instead of pushing past its edge */
.b-wide > * { min-width: 0; }
.invite-link span { min-width: 0; overflow-wrap: anywhere; }
.tuner-demo svg { max-width: 100%; }

@media (max-width: 400px) {
  .bcard h3 { font-size: 1.4375rem; }
  /* Two chips per row leave ~90px each: stack icon over label so "Metronome" fits */
  .tool-grid span { flex-direction: column; align-items: flex-start; }
}
