/* Spinebird landing. The design system is built from the illustration itself: a warm cream ground (#FFF0EA, the disc
   behind the figure), ink text and buttons in the figure's outline navy (#161A33), coral (#FF7A59, her top) as the one
   accent and the leggings' navy (#2F3D8F) as a second colour; cards and frames are white on the cream.
   Light by default; [data-theme="dark"] (set only by the toggle) turns the ground to deep ink navy with cream text.
   The exercise cards stay light in both themes, since the figure is drawn with dark outlines.
   Radius scale: pills for buttons and controls (quiz answers, inputs), 24px for large surfaces, 18px for frames and
   the rows of the day-1 list. */

@font-face {
  font-family: 'Geist';
  src: url('fonts/Geist-Variable.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  /* brand */
  --cream: #fff0ea;
  --cream-deep: #ffe4d9;
  --cream-line: #f2d6ca;
  --ink-navy: #161a33;
  --navy: #2f3d8f;
  --coral: #ff7a59;
  --coral-ink: #b93a1f; /* coral dark enough for small text on cream */
  /* roles */
  --bg: #fffcfb; /* the cream, 20% over white: a warm hint without glare */
  --surface: #fff5f1;
  --raised: #ffffff;
  --border: #f6e9e3;
  --text: var(--ink-navy);
  --muted: #5d6079;
  --ink: var(--ink-navy);
  --on-ink: var(--cream);
  --accent: var(--coral);
  --accent-text: var(--coral-ink);
  --focus: var(--coral-ink); /* the light coral is 2.5:1 on the page, under the 3:1 a focus ring needs */
  --bezel: var(--ink-navy);
  --card: #ffffff; /* the exercise cards and the figure stages */
  --disc: var(--cream);
  --loop-filter: none;
  --shadow: 0 30px 70px -30px rgba(22, 26, 51, 0.32);
  --r-lg: 24px;
  --r-md: 18px;
  --gutter: 32px;
  --max: 1200px;
  --nav-h: 64px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

:root[data-theme='dark'] {
  /* a deep night navy (less violet than the outline's navy), warm off-white text, the same coral */
  --bg: #0e1124;
  --surface: #161a33;
  --raised: #1c2140;
  --border: #2a3052;
  --text: #f7f1ee;
  --muted: #a9abc2;
  --ink: #f7f1ee;
  --on-ink: var(--ink-navy);
  --accent: #ff8a6b;
  --focus: #ff8a6b; /* 7:1 on the night navy */
  --accent-text: #ff9e83;
  --bezel: #262c4f;
  --card: #fbf3ef; /* the figure keeps a light card, a touch dimmer than the day's white so it does not glare */
  --disc: #f6e2d8;
  --loop-filter: none;
  --shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Geist', ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, video, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, p, dl, dd, figure, ol { margin: 0; }
ol { padding: 0; list-style: none; }
h1, h2, h3 { text-wrap: balance; overflow-wrap: break-word; hyphens: auto; }
p { text-wrap: pretty; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (max-width: 767px) { :root { --gutter: 16px; } }

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--ink); color: var(--on-ink); padding: 10px 16px; border-radius: 999px; text-decoration: none;
}
.skip:focus { top: 12px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

.h2 { font-size: clamp(32px, 4vw, 52px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 600; }
.lede { color: var(--muted); font-size: 18px; max-width: 48ch; }
.fine { color: var(--muted); font-size: 14px; }
.ico { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: none; }
.ico svg { width: 100%; height: 100%; }
.ico--sm { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px; border: 0;
  font-size: 15px; font-weight: 550; letter-spacing: -0.01em; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}
.btn--ink { background: var(--ink); color: var(--on-ink); }
.btn--ink:hover { opacity: 0.86; }
.btn:active { transform: scale(0.97); }
.btn--block { width: 100%; height: 48px; font-size: 16px; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 999px; border: 0; background: transparent; cursor: pointer;
  display: inline-grid; place-items: center; color: var(--text);
  transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.icon-btn:hover { background: var(--surface); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn--ring { border: 1px solid var(--border); width: 44px; height: 44px; }
.icon-btn--ring:disabled { opacity: 0.35; cursor: default; background: transparent; }

.badge { display: inline-block; border-radius: 12px; transition: transform 0.2s var(--ease); }
.badge img { height: 54px; width: auto; }
.badge:hover { transform: translateY(-2px); }
.badge-cta { height: 52px; padding: 0 26px; font-size: 16px; font-weight: 600; text-decoration: none; }
.badge:active { transform: scale(0.98); }

/* ------------------------------------------------------------------ nav */
.top-sentinel { position: absolute; top: 0; height: 8px; width: 1px; }
.nav {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(160%) blur(16px); backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease);
}
.nav.is-scrolled { border-bottom-color: var(--border); }
.nav__bar { height: var(--nav-h); display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; justify-self: start; }
.brand__mark { width: 30px; height: 30px; border-radius: 9px; background: var(--ink); color: var(--on-ink); display: grid; place-items: center; }
.brand__mark svg { width: 18px; height: 18px; }
.brand__mark--sm { width: 26px; height: 26px; border-radius: 8px; }
.brand__mark--sm svg { width: 15px; height: 15px; }
.brand__name { font-weight: 650; font-size: 19px; letter-spacing: -0.03em; }

.nav__links { display: flex; gap: 4px; }
.nav__links a {
  padding: 8px 14px; border-radius: 999px; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none;
  transition: color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface); }
.nav__links a.is-here { color: var(--text); }
.nav__tools { display: flex; align-items: center; gap: 4px; justify-self: end; }
.nav__cta { margin-left: 6px; }

.lang { position: relative; }
.lang summary {
  list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 10px 0 12px; border-radius: 999px; font-size: 14px; font-weight: 550; color: var(--text);
  transition: background-color 0.2s var(--ease);
}
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { background: var(--surface); }
.lang summary .ico--sm { color: var(--muted); transition: transform 0.2s var(--ease); }
.lang[open] summary .ico--sm { transform: rotate(180deg); }
.lang__menu {
  position: absolute; right: 0; top: calc(100% + 8px); min-width: 196px; padding: 6px;
  background: var(--raised); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow);
  display: grid; gap: 2px;
}
.lang__menu a {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px 12px; border-radius: 10px; font-size: 15px; text-decoration: none;
}
.lang__menu a:hover { background: var(--surface); }
.lang__menu a[aria-current='page'] { font-weight: 600; background: var(--surface); }
.lang__code { font-size: 12px; color: var(--muted); font-weight: 550; letter-spacing: 0.04em; }

.theme-toggle .ico--sun { display: none; }
/* pause or play every looping animation (WCAG 2.2.2); hidden when the system already asks for reduced motion */
.motion-toggle .ico--play { display: none; }
:root[data-motion='paused'] .motion-toggle .ico--pause { display: none; }
:root[data-motion='paused'] .motion-toggle .ico--play { display: inline-grid; }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } }
.reveal-fallback .reveal { opacity: 1 !important; transform: none !important; }
:root[data-theme='dark'] .theme-toggle .ico--sun { display: inline-grid; }
:root[data-theme='dark'] .theme-toggle .ico--moon { display: none; }

.menu-toggle { display: none; }
.menu-toggle .ico--close { display: none; }
.menu-toggle[aria-expanded='true'] .ico--close { display: inline-grid; }
.menu-toggle[aria-expanded='true'] .ico--open { display: none; }

.sheet { border-top: 1px solid var(--border); background: var(--bg); padding: 12px 0 20px; }
.sheet[hidden] { display: none; }
.sheet__links { display: grid; }
.sheet__links a { padding: 14px 0; font-size: 22px; font-weight: 550; letter-spacing: -0.02em; text-decoration: none; border-bottom: 1px solid var(--border); }
.sheet__langs { display: flex; gap: 8px; margin: 18px 0; }
.sheet__langs a {
  flex: 1; height: 40px; display: grid; place-items: center; border: 1px solid var(--border); border-radius: 999px;
  font-size: 14px; font-weight: 550; text-decoration: none; color: var(--muted);
}
.sheet__langs a[aria-current='page'] { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }

@media (max-width: 959px) {
  .nav__bar { grid-template-columns: 1fr auto; }
  .nav__links { display: none; }
}
@media (max-width: 639px) {
  .nav__cta, .lang { display: none; }
  .menu-toggle { display: inline-grid; }
}

/* ------------------------------------------------------------------ hero */
.hero { padding: 56px 0 88px; }
.hero__grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: 48px; align-items: center; min-height: min(calc(100dvh - var(--nav-h) - 144px), 700px); }
.hero__title { font-size: clamp(48px, 6.6vw, 92px); line-height: 0.98; letter-spacing: -0.05em; font-weight: 650; max-width: 11ch; }
.hero__title--long { font-size: clamp(42px, 5.2vw, 72px); max-width: 13ch; }
.hero__sub { margin: 28px 0 36px; font-size: 20px; line-height: 1.5; color: var(--muted); max-width: 36ch; }
.hero__media { display: flex; justify-content: center; }

/* app screens in a phone frame (How it works) */
.phone { width: 300px; max-width: 100%; border-radius: 50px; padding: 10px; background: var(--bezel); box-shadow: var(--shadow); }
.phone img { border-radius: 41px; width: 100%; height: auto; }
:root[data-theme='dark'] .phone { box-shadow: var(--shadow), 0 0 0 1px var(--border); }

/* The hero figure: a flat illustration (five colours, one dark outline), the plumb line and the ear-shoulder-hip
   dots that fall into line. The figure keeps its own colours in both themes; only the overlay follows the theme. */
.hf, .exl, .tilt__fig {
  --fig-skin: #f6b39a; --fig-skin-far: #e2977c; --fig-top: #ff7a59; --fig-legs: #2f3d8f; --fig-legs-far: #222c6c; --fig-top-band: #e85d3d; --fig-legs-band: #253278; --fig-hair: #1e2140; --fig-line: #161a33; --fig-ghost: #ffe4d9; --fig-ghost-line: #e8bfae; --fig-w: 6px;
  position: relative; width: min(100%, 440px); margin: 0;
}
.hf__svg { display: block; width: 100%; height: auto; max-height: min(74dvh, 660px); overflow: visible; }
.hero .hf__svg { transform: scaleX(-1); } /* in the hero she faces the headline */
.hf__fig path, .hf__phone { stroke: var(--fig-line); stroke-width: var(--fig-w); stroke-linejoin: round; stroke-linecap: round; paint-order: stroke fill; }
.hf__skin { fill: var(--fig-skin); }
.hf__skin-far { fill: var(--fig-skin-far); }
.hf__legs-far { fill: var(--fig-legs-far); }
.hf__fig .hf__thin { stroke-width: calc(var(--fig-w) * 0.7); }
.hf__legs { fill: var(--fig-legs); }
.hf__top { fill: var(--fig-top); }
.hf__top-band { fill: var(--fig-top-band); }
.hf__legs-band { fill: var(--fig-legs-band); }
.hf__union .hf__seam { stroke-width: calc(var(--fig-w) / 2); paint-order: normal; }
.hf__hair { fill: var(--fig-hair); }
.hf__phone { fill: var(--fig-line); stroke-width: calc(var(--fig-w) / 2); }
.hf__union .hf__line { fill: none; }
.hf__union .hf__fill { stroke: none; }
.hf__fig--front .hf__seam { stroke-width: calc(var(--fig-w) / 2); paint-order: normal; }
.hf__fig--front .hf__line { fill: none; }
.hf__fig--front .hf__fill { stroke: none; }
/* The alignment overlay stays quiet: a hairline plumb, small dots, a faint height marker. */
.hf__plumb { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 8; stroke-linecap: round; opacity: 0.35; }
.hf__floor { stroke: var(--border); stroke-width: 1.5; stroke-linecap: round; }
.hf__align { opacity: 0.3; }
.hf__align polyline { fill: none; stroke: var(--muted); stroke-width: 1; stroke-linejoin: round; opacity: 0; transition: opacity 0.4s var(--ease); }
.hf.is-rising .hf__align polyline { opacity: 1; } /* the line only shows while she straightens */
.hf__align circle { fill: var(--bg); stroke: var(--muted); stroke-width: 1.2; transition: fill 0.5s var(--ease); }
.hf.is-aligned .hf__align circle { fill: var(--muted); }
.hf__crown line { stroke: var(--muted); stroke-width: 1; stroke-linecap: round; }
.hf__crown-from { stroke-dasharray: 2 5; }
.hf__crown { opacity: 0; transition: opacity 0.6s var(--ease); }
.hf.is-rising .hf__crown, .hf.is-aligned .hf__crown { opacity: 0.45; }
/* the starting slouch: one pale tint, no outline, barely there */
.hf__ghost path { fill: var(--fig-ghost); stroke: none; }
/* outlined so it reads: all outlines first, then all fills, so only the silhouette is drawn */
.hf__ghost .hf__ghost-line path { fill: none; stroke: var(--fig-ghost-line); stroke-width: calc(var(--fig-w) * 0.9); stroke-linejoin: round; }
.js .hf__ghost { opacity: 0; }
.js .hf .hf__fig { opacity: 0; } /* the player fades her in, already on the phone */
.hf.is-aligned .hf__fig, .hf-fallback .hf__fig { opacity: 1; }
/* the exercise loops keep their own white card in both themes, like the old videos */
:root[data-theme='dark'] .hf { --fig-ghost: #f3ddd2; --fig-ghost-line: #e2bfae; }
/* at night her dark hair and outline would sink into the ground: she stands in front of a cream disc, as in the cards */
:root[data-theme='dark'] .hero .hf, :root[data-theme='dark'] .tilt__fig { isolation: isolate; }
:root[data-theme='dark'] .hero .hf::before, :root[data-theme='dark'] .tilt__fig::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 37%; width: 100%; aspect-ratio: 1; transform: translate(-50%, -50%); /* head to hips */
  border-radius: 50%; background: var(--disc);
}
.hf__replay { position: absolute; right: 0; bottom: 4px; background: var(--bg); }
.hf__replay[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .hf { animation: rise 0.9s var(--ease) 0.1s both; }
}

@media (max-width: 899px) {
  .hero { padding: 28px 0 56px; }
  .hero__grid { grid-template-columns: 1fr; gap: 48px; min-height: 0; }
  .hero__sub { font-size: 18px; margin: 20px 0 28px; }
  .hf { width: min(100%, 340px); }
  .hf__svg { max-height: 62dvh; }
}

/* ------------------------------------------------------------------ statement: words ink in as the line scrolls */
.statement { padding: 72px 0 120px; }
.statement__title { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.12; letter-spacing: -0.035em; font-weight: 550; max-width: 22ch; }
.statement__body { margin-top: 32px; font-size: 20px; color: var(--muted); max-width: 44ch; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .statement__title span {
      animation: ink linear both;
      animation-timeline: view();
      animation-range: cover calc(18% + var(--i) * 1.6%) cover calc(26% + var(--i) * 1.6%);
    }
  }
}
@keyframes ink { from { opacity: 0.18; } to { opacity: 1; } }

/* ------------------------------------------------------------------ how it works: sticky stage + steps */
.how { padding: 40px 0 120px; }
.how__grid { margin-top: 24px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 64px; }
.how__stage { position: sticky; top: calc(var(--nav-h) + 24px); height: calc(100dvh - var(--nav-h) - 48px); max-height: 760px; display: grid; place-items: center; }
.how__shot {
  grid-area: 1 / 1; display: grid; place-items: center; width: 100%;
  opacity: 0; transform: translateY(24px) scale(0.98);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.how__shot.is-on { opacity: 1; transform: none; }
.how__shot .phone { width: min(320px, 70%); }
.how__steps { display: grid; }
.step { min-height: min(66dvh, 620px); display: flex; flex-direction: column; justify-content: center; padding: 48px 0; opacity: 0.32; transition: opacity 0.5s var(--ease); }
.step.is-on { opacity: 1; }
.step__fig { display: flex; align-items: baseline; gap: 14px; flex-wrap: wrap; }
.step__n { font-size: clamp(56px, 6vw, 88px); font-weight: 650; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.step__l { color: var(--muted); font-size: 16px; }
.step h3 { margin-top: 28px; font-size: clamp(26px, 2.6vw, 34px); font-weight: 600; letter-spacing: -0.03em; line-height: 1.15; }
.step__body { margin-top: 14px; color: var(--muted); font-size: 18px; max-width: 40ch; }
.step__media { display: none; }

.frame { border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border); background: var(--raised); }
.frame--step { width: min(460px, 100%); border-radius: var(--r-lg); }
.loop { width: 100%; height: auto; aspect-ratio: 6 / 5; object-fit: cover; background: var(--card); filter: var(--loop-filter); }
.loop--flat { filter: none; } /* the new flat illustrations keep their colours in both themes */

@media (max-width: 899px) {
  .how { padding: 24px 0 88px; }
  .how__grid { grid-template-columns: 1fr; gap: 0; margin-top: 8px; }
  .how__stage { display: none; }
  .step { min-height: 0; opacity: 1; padding: 40px 0; }
  .step + .step { border-top: 1px solid var(--border); }
  .step__media { display: flex; justify-content: center; margin-top: 32px; }
  .step__media .phone { width: min(260px, 70vw); }
}

/* ------------------------------------------------------------------ exercise rail */
.library { padding: 40px 0 120px; }
.library__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 36px; }
.library__head .lede { margin-top: 16px; }
.library__nav { display: flex; gap: 8px; flex: none; }
.rail {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 300px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; overscroll-behavior-x: contain;
  padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))) 8px;
  scroll-padding: 0 max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.rail::-webkit-scrollbar { display: none; }
.move { scroll-snap-align: start; }
.move figcaption { margin-top: 14px; font-weight: 550; font-size: 16px; letter-spacing: -0.01em; }
@media (max-width: 639px) {
  .library__nav { display: none; }
  .rail { grid-auto-columns: 76%; gap: 14px; }
}

/* ------------------------------------------------------------------ privacy */
.privacy { padding: 48px 0 136px; }
.privacy__inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.privacy__icon { width: 56px; height: 56px; border-radius: 999px; display: grid; place-items: center; border: 1px solid var(--border); margin-bottom: 28px; }
.privacy__icon svg { width: 24px; height: 24px; }
.privacy .h2 { max-width: 18ch; }
.privacy .lede { margin-top: 18px; }

/* ------------------------------------------------------------------ pricing */
.pricing { padding: 0 0 136px; }
.pricing__head .lede { margin-top: 16px; }
.plans { margin-top: 44px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.plan { border-radius: var(--r-lg); border: 1px solid var(--border); padding: 30px 32px 32px; background: var(--raised); }
.plan--best { border: 2px solid var(--ink); padding: 29px 31px 31px; }
:root[data-theme='dark'] .plan--best { border-color: var(--accent); } /* at night the coral of its tag, not a white frame */
.plan__top { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 28px; }
.plan h3 { font-size: 18px; font-weight: 600; }
.plan__tag { font-size: 13px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: var(--accent); color: var(--ink-navy); white-space: nowrap; }
.plan__price { margin-top: 28px; font-size: clamp(30px, 3vw, 40px); font-weight: 650; letter-spacing: -0.04em; line-height: 1.1; font-variant-numeric: tabular-nums; }
.plan__per { margin-top: 8px; color: var(--muted); font-size: 16px; }
.pricing__foot { margin-top: 36px; display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
@media (max-width: 699px) { .plans { grid-template-columns: 1fr; gap: 14px; } .plan { padding: 24px; } .plan--best { padding: 23px; } }

/* ------------------------------------------------------------------ faq */
.faq { padding: 0 0 136px; }
.faq__grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 64px; align-items: start; }
.faq__title { position: sticky; top: calc(var(--nav-h) + 32px); }
.faq details { border-bottom: 1px solid var(--border); }
.faq details:first-child { border-top: 1px solid var(--border); }
.faq summary {
  list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 24px 0; font-size: 19px; font-weight: 550; letter-spacing: -0.015em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq__caret { flex: none; width: 20px; height: 20px; transition: transform 0.25s var(--ease); color: var(--muted); }
.faq details[open] .faq__caret { transform: rotate(180deg); }
.faq details p { padding: 0 40px 26px 0; color: var(--muted); max-width: 62ch; }
@media (max-width: 899px) { .faq__grid { grid-template-columns: 1fr; gap: 24px; } .faq__title { position: static; } }

/* ------------------------------------------------------------------ final */
.final { padding: 0 0 128px; }
.final__inner { display: flex; flex-direction: column; align-items: center; text-align: center; padding-top: 40px; }
.final__title { font-size: clamp(40px, 6vw, 80px); line-height: 1; letter-spacing: -0.05em; font-weight: 650; max-width: 14ch; }
.final .lede { margin: 22px 0 34px; }
@media (max-width: 699px) { .final__inner { padding-top: 16px; } .final { padding-bottom: 88px; } }

/* ------------------------------------------------------------------ footer */
.footer { padding: 0 0 48px; }
.footer__grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 32px 24px;
  border-top: 1px solid var(--border); padding-top: 40px; font-size: 15px; color: var(--muted);
}
.footer__brand p { margin-top: 14px; max-width: 34ch; }
.footer__brand .brand { color: var(--text); }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col a, .footer__legal a { text-decoration: none; }
.footer__col a:hover, .footer__legal a:hover { color: var(--text); }
.footer__legal { grid-column: 1 / -1; display: flex; gap: 20px; font-size: 14px; padding-top: 24px; border-top: 1px solid var(--border); }
@media (max-width: 699px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ------------------------------------------------------------------ hero: second way in, to the quiz */
.hero__cta { display: flex; align-items: center; flex-wrap: wrap; gap: 16px 28px; }
.hero__link {
  display: inline-flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 550; letter-spacing: -0.01em;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; text-decoration-color: var(--border);
  transition: text-decoration-color 0.2s var(--ease);
}
.hero__link:hover { text-decoration-color: currentColor; }
.hero__link .ico { transition: transform 0.2s var(--ease); }
.hero__link:hover .ico { transform: translateX(3px); }

/* ------------------------------------------------------------------ head tilt: the figure follows the slider */
.tilt { padding: 24px 0 128px; }
.tilt__grid {
  display: grid; grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); column-gap: 72px; align-items: center;
  grid-template-areas: "fig head" "fig read" "fig ctl" "fig src";
}
.tilt__fig { grid-area: fig; width: min(100%, 380px); justify-self: center; margin: 0; }
.tilt__fig .hf__svg { max-height: min(70dvh, 560px); }
.tilt__head { grid-area: head; }
.tilt__head .lede { margin-top: 20px; }
.tilt__read { grid-area: read; margin-top: 40px; }
.tilt__ctl { grid-area: ctl; max-width: 460px; }
.tilt__load { display: flex; align-items: baseline; gap: 10px; line-height: 0.9; }
.tilt__n { font-size: clamp(80px, 10vw, 136px); font-weight: 650; letter-spacing: -0.06em; font-variant-numeric: tabular-nums; }
.tilt__unit { font-size: clamp(28px, 3vw, 40px); font-weight: 600; letter-spacing: -0.03em; color: var(--muted); }
.tilt__cap { margin-top: 14px; font-size: 18px; color: var(--muted); }
.tilt__ratio { margin-top: 4px; font-size: 18px; font-weight: 550; min-height: 1.55em; }
.tilt__label { margin-top: 36px; display: flex; justify-content: space-between; align-items: baseline; font-size: 15px; font-weight: 550; }
.tilt__deg { font-variant-numeric: tabular-nums; color: var(--muted); }
.tilt__hint { margin-top: 10px; font-size: 14px; color: var(--muted); }
.tilt__src { grid-area: src; margin-top: 40px; font-size: 13px; color: var(--muted); max-width: 52ch; }
html:not(.js) .tilt__hint, html:not(.js) .tilt__label, html:not(.js) .tilt__range { display: none; }

/* the slider: a hairline track that fills in ink up to the thumb */
.tilt__range {
  -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 44px; margin: 4px 0 0; background: transparent; cursor: pointer;
}
.tilt__range:disabled { cursor: default; opacity: 0.5; }
.tilt__range::-webkit-slider-runnable-track {
  height: 4px; border-radius: 999px; background: linear-gradient(to right, var(--ink) var(--v), var(--border) var(--v));
}
.tilt__range::-moz-range-track { height: 4px; border-radius: 999px; background: var(--border); }
.tilt__range::-moz-range-progress { height: 4px; border-radius: 999px; background: var(--ink); }
.tilt__range::-webkit-slider-thumb {
  -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 999px;
  background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--ink), 0 6px 16px -6px rgba(28, 27, 25, 0.5);
  transition: transform 0.15s var(--ease);
}
.tilt__range::-moz-range-thumb {
  width: 20px; height: 20px; border-radius: 999px; background: var(--ink); border: 4px solid var(--bg); box-shadow: 0 0 0 1px var(--ink);
}
.tilt__range:active::-webkit-slider-thumb { transform: scale(1.1); }
.tilt__range:focus-visible { outline: none; }
.tilt__range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 1px var(--ink), 0 0 0 5px var(--bg), 0 0 0 7px var(--text); }
.tilt__range:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 1px var(--ink), 0 0 0 5px var(--bg), 0 0 0 7px var(--text); }

/* the overlay: a plumb line through the shoulder and the ear drifting off it */
.tf__plumb { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 8; stroke-linecap: round; opacity: 0.45; }
.tf__align line { stroke: var(--muted); stroke-width: 1.2; stroke-linecap: round; opacity: 0.6; }
.tf__align circle { fill: var(--bg); stroke: var(--muted); stroke-width: 1.4; transition: fill 0.3s var(--ease), stroke 0.3s var(--ease); }
.tilt.is-level .tf__align circle { fill: var(--text); stroke: var(--text); }

@media (max-width: 899px) {
  .tilt { padding: 8px 0 88px; }
  /* the drawing sits beside the figures, so both stay on screen while the slider moves */
  .tilt__grid { grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); column-gap: 16px; align-items: end; grid-template-areas: "head head" "fig read" "ctl ctl" "src src"; }
  .tilt__fig { width: 100%; margin-top: 24px; }
  .tilt__fig .hf__svg { max-height: 38dvh; }
  .tilt__read { margin: 0 0 8px; }
  .tilt__n { font-size: clamp(64px, 20vw, 96px); }
  .tilt__cap, .tilt__ratio { font-size: 16px; }
  .tilt__label { margin-top: 20px; }
  .tilt__ctl { max-width: none; }
  .tilt__src { margin-top: 28px; }
}

/* ------------------------------------------------------------------ quiz and day 1 */
.dayplan { padding: 0 0 136px; }
.dayplan__box {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px; align-items: start;
  background: var(--surface); border-radius: var(--r-lg); padding: 56px;
}
.dayplan__quiz { align-self: center; }
.dayplan__quiz .lede { margin-top: 16px; }
.quiz { margin-top: 40px; }
.quiz__q { border: 0; margin: 0; padding: 0; min-width: 0; }
.quiz__q[hidden] { display: none; }
.quiz__q legend { padding: 0; display: grid; gap: 6px; margin-bottom: 20px; }
.quiz__step { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.quiz__ask { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; letter-spacing: -0.025em; line-height: 1.2; }
.quiz__opts { display: grid; gap: 10px; }
.quiz__opt {
  position: relative; display: flex; align-items: center; min-height: 54px; padding: 12px 24px; border-radius: 999px;
  background: var(--raised); border: 1px solid var(--border); font-size: 17px; font-weight: 500; cursor: pointer;
  transition: border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.quiz__opt:hover { border-color: var(--muted); }
.quiz__opt:active { transform: scale(0.99); }
.quiz__opt input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.quiz__opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }
.quiz__opt:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 20px; padding: 6px 0; border: 0; background: none; cursor: pointer;
  font-size: 15px; font-weight: 550; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--border);
}
.link-btn:hover { color: var(--text); }
.link-btn[hidden] { display: none; }
html:not(.js) .quiz { display: none; }

.quiz__result { margin-top: 40px; outline: none; }
.quiz__result[hidden] { display: none; }
.quiz__name { font-size: clamp(26px, 2.6vw, 34px); font-weight: 650; letter-spacing: -0.035em; line-height: 1.1; }
.quiz__body { margin-top: 12px; color: var(--muted); }
.week { margin-top: 20px; display: grid; gap: 4px; }
.week li { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 12px; align-items: baseline; padding: 6px 0; }
.week__d { font-size: 14px; color: var(--muted); font-variant-numeric: tabular-nums; }
.week__t { font-weight: 550; }
.quiz__after { margin-top: 18px; }
.quiz__cta { margin-top: 28px; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px; }

.dayplan__day { background: var(--raised); border-radius: var(--r-lg); padding: 20px 20px 12px; }
.day__stage { position: relative; aspect-ratio: 6 / 5; background: var(--card); border: 0; }
.day__fig[hidden] { display: none; }
.day__head { padding: 22px 8px 8px; }
.day__label { font-size: 14px; color: var(--muted); }
.day__theme { margin-top: 4px; font-size: 24px; font-weight: 650; letter-spacing: -0.03em; line-height: 1.2; }
.day__meta { margin-top: 2px; font-size: 15px; color: var(--muted); }
.day__list { margin-top: 8px; display: grid; gap: 2px; }
.day__item {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: left;
  padding: 9px 8px 9px 12px; border: 0; border-radius: var(--r-md); background: transparent; cursor: pointer;
  transition: background-color 0.2s var(--ease);
}
.day__item:hover { background: var(--surface); }
.day__item.is-on { background: var(--surface); }
.day__name { display: grid; gap: 0; font-size: 16px; font-weight: 550; letter-spacing: -0.01em; }
.day__reps { font-size: 14px; font-weight: 400; color: var(--muted); }
.day__secs { flex: none; font-size: 15px; color: var(--muted); font-variant-numeric: tabular-nums; }
.day__item.is-on .day__secs { color: var(--accent-text); }
@media (prefers-reduced-motion: no-preference) {
  .dayplan.is-swap .day__list, .dayplan.is-swap .day__theme { animation: swap 0.5s var(--ease) both; }
}
@keyframes swap { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (max-width: 899px) {
  .dayplan { padding-bottom: 88px; }
  .dayplan__box { grid-template-columns: 1fr; gap: 32px; padding: 32px 20px 20px; }
  .dayplan__day { padding: 14px 12px 8px; }
}
@media (max-width: 639px) {
  .dayplan .wrap { padding: 0 8px; }
  .quiz__opt { min-height: 50px; padding: 10px 20px; font-size: 16px; }
}

/* ------------------------------------------------------------------ waitlist (pre-launch) */
.wl { width: 100%; max-width: 480px; margin-top: 6px; text-align: left; }
.wl__hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.wl__label { display: block; font-size: 15px; font-weight: 550; margin-bottom: 8px; }
.wl__row { display: flex; gap: 8px; }
.wl__input {
  flex: 1; min-width: 0; height: 52px; padding: 0 22px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--raised); color: var(--text); font: inherit; font-size: 16px;
  transition: border-color 0.2s var(--ease);
}
.wl__input::placeholder { color: var(--muted); opacity: 1; }
.wl__input:hover { border-color: var(--muted); }
.wl__input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-color: var(--focus); }
.wl__input[aria-invalid='true'] { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.wl__btn { height: 52px; padding: 0 24px; font-size: 16px; }
.wl__btn:disabled { opacity: 0.6; cursor: default; }
.wl__msg { min-height: 1.55em; margin-top: 10px; font-size: 15px; font-weight: 550; }
.wl[data-state='ok'] .wl__row, .wl[data-state='ok'] .wl__label { display: none; }
.wl[data-state='ok'] .wl__msg { font-size: 18px; margin-top: 0; }
.wl__note { margin-top: 4px; }
@media (max-width: 519px) { .wl__row { flex-direction: column; } .wl__input { flex: none; width: 100%; } .wl__btn { width: 100%; } }

/* ------------------------------------------------------------------ reveal on scroll */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
  .js .reveal.is-in { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge, .btn, .icon-btn, .faq__caret, .how__shot, .step { transition: none; }
}

/* Exercise loops, played live as SVG (exercise-player.mjs; the app gets the same frames as video). --u is the drawing
   units per pixel of the 1200 px reference frame, set per exercise, so every stroke keeps its weight at any size. */
.exl { --fig-w: calc(var(--u) * 10px); position: relative; display: block; margin: 0; width: 100%; aspect-ratio: 6 / 5; background: var(--card); overflow: hidden; }
.exl > svg, .exl .hf__svg { display: block; width: 100%; height: 100%; max-height: none; overflow: hidden; }
.exl .ex-disc { fill: var(--disc); }
.exl .ex-floor { fill: #f6dccf; }
.exl .ex-mat-top { fill: #fbe8df; stroke: none; }
.exl .ex-shadow path, .exl .ex-shadow rect { fill: #f2d9cd !important; stroke: none !important; opacity: 1 !important; }
.exl .ex-cushion { fill: #ffffff; stroke: #161a33; stroke-width: calc(var(--u) * 8px); paint-order: stroke fill; }
.exl .ex-mat { fill: #f7e1d7; stroke: #161a33; stroke-width: calc(var(--u) * 8px); paint-order: stroke fill; }
.exl .ex-wall-bg { fill: var(--card); }
.exl .ex-skirt { fill: #f8ebe5; }
.exl .ex-wall-line { stroke: #e6cdc1; stroke-width: calc(var(--u) * 3px); }
.exl .ex-wall { fill: #f6e8e1; stroke: #161a33; stroke-width: calc(var(--u) * 8px); paint-order: stroke fill; }
.exl .ex-prop { fill: #ecd5ca; stroke: #161a33; stroke-width: calc(var(--u) * 10px); stroke-linejoin: round; paint-order: stroke fill; }
.exl .ex-wall--section { fill: #f5e4dc; }
.exl .ex-seat { fill: #e0bfae; }
.exl .ex-line { opacity: 0.55; }
.exl .ex-plumb { stroke: #161a33; stroke-opacity: 0.55; stroke-width: calc(var(--u) * 3px); stroke-dasharray: calc(var(--u) * 1px) calc(var(--u) * 12px); stroke-linecap: round; }
.exl .ex-plumb-on { stroke: #22a87a; stroke-width: calc(var(--u) * 4px); stroke-linecap: round; }
.exl .ex-ring { fill: none; stroke: #22a87a; stroke-width: calc(var(--u) * 4px); }
.exl .ex-ghost path { fill: none; stroke: #161a33; stroke-width: calc(var(--u) * 3px); stroke-dasharray: calc(var(--u) * 8px) calc(var(--u) * 8px); stroke-linecap: round; stroke-linejoin: round; }
.exl .ex-arrow path { fill: none; stroke: #ff7a59; stroke-width: calc(var(--u) * 11px); stroke-linecap: round; stroke-linejoin: round; }
.exl .ex-hot { fill: #ff7a59; stroke: none; }
