/* Cardio waitlist page. Dark, quiet, product-first. Accent = the coronary blue from the app icon. */
:root {
  --bg: #131313;
  --bg-2: #181716;
  --surface: #1b1a19;
  --surface-2: #222120;
  --line: #2a2826;
  --line-2: #34312e;
  --text: #ebe9e6;
  --muted: #9b968f;
  --dim: #6d6963;
  --blue: #3a8dff;
  --blue-soft: rgba(58, 141, 255, 0.16);
  --blue-mid: rgba(58, 141, 255, 0.32);
  --green: #3fb46a;
  --green-soft: rgba(63, 180, 106, 0.13);
  --paper: #f4f2ee;
  --paper-ink: #22201d;
  --paper-line: #dedad3;
  --serif: "Source Serif 4", "Iowan Old Style", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --gutter: 16px;
  --max: 1080px;
  --ease: cubic-bezier(.22, .9, .25, 1);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 1rem/1.55 var(--sans); -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button { font: inherit; color: inherit; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding-inline: max(var(--gutter), env(safe-area-inset-left)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--text); color: var(--bg); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 6px; }

h1, h2 { font-family: var(--serif); font-weight: 400; margin: 0; letter-spacing: -0.015em; font-optical-sizing: auto; }
h1 em, h2 em { font-style: italic; }
h1 { font-size: clamp(2.5rem, 10.5vw, 4.6rem); line-height: 1.02; }
h2 { font-size: clamp(2rem, 7.6vw, 3.1rem); line-height: 1.06; }
p { margin: 0; }
.label { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.label--blue { color: var(--blue); }
.mini { font-size: 0.66rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.desc, .sub { color: var(--muted); font-size: 1.06rem; max-width: 32em; }

/* nav */
.nav { position: sticky; top: 0; z-index: 30; background: rgba(19, 19, 19, 0.82); backdrop-filter: saturate(140%) blur(14px); -webkit-backdrop-filter: saturate(140%) blur(14px); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; justify-content: space-between; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 500 1.35rem/1 var(--serif); }
.brand img { width: 32px; height: 32px; border-radius: 8px; }

/* pills */
.pill { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; border-radius: 12px; border: 0; text-decoration: none; font-weight: 600; font-size: 0.95rem; cursor: pointer; white-space: nowrap; transition: transform .2s var(--ease), filter .2s; }
.pill--light { background: var(--text); color: #141312; }
.pill--blue { background: var(--blue); color: #fff; }
.pill--lg { min-height: 52px; padding: 0 22px; font-size: 1rem; }
.pill:hover { filter: brightness(1.06); }
.pill:active { transform: scale(0.98); }

/* waitlist form */
.waitlist { margin-top: 26px; max-width: 520px; }
.field { display: flex; flex-direction: column; gap: 10px; }
.field input { min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface); color: var(--text); font: inherit; font-size: 16px; }
.field input::placeholder { color: var(--dim); }
.field input:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px var(--blue-soft); }
.form-msg { min-height: 1.5em; margin-top: 10px; font-size: 0.92rem; color: var(--muted); }
.form-msg.ok { color: var(--text); }
.fineprint { font-size: 0.85rem; color: var(--dim); }

/* reveal on scroll */
.fade { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.fade.in { opacity: 1; transform: none; }

/* ---------- HERO ---------- */
.hero { padding: 40px 0 72px; }
.hero h1 { margin: 14px 0 16px; }
.frame {
  margin-top: 44px; border-radius: 22px; padding: 10px;
  background: radial-gradient(120% 90% at 50% 0%, #1d2a44 0%, #151b26 38%, #121212 75%);
  border: 1px solid var(--line);
}
.caption { margin-top: 14px; font-size: 0.86rem; color: var(--dim); text-align: center; }

/* the app mock */
.app { text-align: left; position: relative; border-radius: 14px; overflow: hidden; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 30px 60px -30px rgba(0,0,0,.8); height: 650px; display: flex; flex-direction: column; }
.app-bar { display: flex; align-items: center; gap: 12px; height: 42px; padding: 0 14px; border-bottom: 1px solid var(--line); font-size: 0.8rem; color: var(--muted); flex: none; }
.lights { display: inline-flex; gap: 6px; }
.lights i { width: 10px; height: 10px; border-radius: 50%; background: #3a3836; }
.crumbs b { color: var(--dim); font-weight: 400; margin: 0 4px; }
.crumbs { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-body { position: relative; flex: 1; min-height: 0; }
.quiz { position: absolute; inset: 0; overflow: hidden; }
.quiz-in { padding: 16px 16px 24px; transition: transform .9s var(--ease); }
.q-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 0.72rem; color: var(--muted); margin-bottom: 10px; }
.chip { padding: 3px 8px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-weight: 600; font-size: 0.66rem; }
.stem { font-size: 0.93rem; line-height: 1.5; margin-bottom: 12px; }
.opts { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.opts li { position: relative; display: flex; align-items: center; gap: 10px; min-height: 40px; padding: 8px 34px 8px 10px; border-radius: 10px; border: 1px solid var(--line); font-size: 0.82rem; line-height: 1.3; color: var(--text); transition: opacity .5s, border-color .4s, background .4s, color .4s; }
.opts b { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: var(--surface-2); font-size: 0.7rem; color: var(--muted); transition: background .4s, color .4s; }
.tick { position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; background: var(--green); transform: scale(0); transition: transform .45s var(--ease); }
.tick::after { content: ""; position: absolute; left: 6px; top: 3.5px; width: 4px; height: 8px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
.ref { margin-top: 12px; padding: 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg-2); font-size: 0.8rem; line-height: 1.5; color: #cfccc7; opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.ref { border-left: 3px solid var(--blue); }
.ref-q { font-family: var(--serif); font-style: italic; font-size: 0.86rem; color: var(--text); }


/* hero demo: miss it, then a variant */
.day { padding: 4px 10px; border-radius: 8px; border: 1px solid var(--line-2); font-weight: 600; color: var(--text); white-space: nowrap; transition: background .3s, border-color .3s, color .3s; }
.app.later .day { background: var(--blue-soft); border-color: var(--blue-mid); color: #cfe2ff; }
.stem span { display: inline-block; white-space: pre; opacity: 0; filter: blur(6px); transform: translateY(5px); animation: word .42s var(--ease) forwards; animation-delay: calc(var(--d) * 14ms); }
@keyframes word { to { opacity: 1; filter: none; transform: none; } }
.opts li { animation: optin .45s var(--ease) both; animation-delay: calc(var(--d) * 45ms + 120ms); }
@keyframes optin { from { opacity: 0; transform: translateY(6px); } }
.opts li.press { background: var(--surface-2); border-color: var(--line-2); }
.opts li.wrong { border-color: rgba(229,83,75,.65); background: rgba(229,83,75,.12); }
.opts li.wrong b { background: #e5534b; color: #fff; }
.opts li.right { border-color: rgba(63,180,106,.6); background: var(--green-soft); }
.opts li.right b { background: var(--green); color: #fff; }
.app.answered .opts li:not(.wrong):not(.right) { opacity: .38; }
.app.quick .opts li { opacity: .5; }
.mark { position: absolute; right: 10px; top: 50%; width: 18px; height: 18px; margin-top: -9px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 11px; font-weight: 700; line-height: 1; animation: pop .4s var(--ease) both; }
.mark--x { background: #e5534b; }
.mark--ok { background: var(--green); }
@keyframes pop { from { transform: scale(0); } }
.app.answered .ref { opacity: 1; transform: none; }
.app.reveal .hq { background-size: 100% 100%; }
.rate { position: absolute; left: 0; right: 0; bottom: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 12px 16px 16px; background: linear-gradient(180deg, rgba(27,26,25,0), var(--surface) 30%); transform: translateY(110%); transition: transform .45s var(--ease); }
.app.rating .rate { transform: none; }
.rbtn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 48px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--surface-2); transition: transform .15s, background .2s; }
.rbtn b { font-size: .9rem; font-weight: 600; }
.rbtn i { font-style: normal; font-size: .7rem; color: var(--muted); }
.rbtn--again b { color: #ff8a80; }
.rbtn--good b { color: #7ee2a0; }
.rbtn.press { transform: scale(.95); background: #2c2a28; }
.skip-day { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(19,19,19,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); opacity: 0; pointer-events: none; transition: opacity .3s var(--ease); }
.skip-day span { padding: 10px 18px; border-radius: 99px; background: var(--blue); color: #fff; font-weight: 600; font-size: .95rem; transform: translateY(8px) scale(.96); transition: transform .45s var(--ease); }
.app.skipping .skip-day { opacity: 1; }
.app.skipping .skip-day span { transform: none; }
.hero .timeline { margin-top: 14px; }

/* PDF pane: hidden on phones (the scroll scene shows it), side pane on desktop */
.pdfpane { display: none; position: absolute; left: 0; right: 0; bottom: 0; height: 64%; background: #262422; border-top: 1px solid var(--line-2); border-radius: 16px 16px 0 0; transform: translateY(104%); transition: transform .8s var(--ease); display: flex; flex-direction: column; box-shadow: 0 -20px 40px -20px rgba(0,0,0,.7); }
.pdf-head { display: flex; justify-content: space-between; gap: 10px; padding: 10px 14px; font-size: 0.72rem; color: var(--muted); }
.pdf-head span:first-child { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.match { color: #9cc4ff; white-space: nowrap; }
.page { flex: 1; margin: 0 12px; padding: 16px; border-radius: 6px 6px 0 0; background: var(--paper); color: var(--paper-ink); overflow: hidden; }
.page-h { font: 600 0.92rem/1.2 var(--serif); margin-bottom: 10px; }
.ln { display: block; height: 6px; border-radius: 3px; background: var(--paper-line); margin-bottom: 7px; }
.ln.w1 { width: 100%; } .ln.w2 { width: 92%; } .ln.w3 { width: 84%; } .ln.w4 { width: 60%; }
.page-t { font: 400 0.86rem/1.5 var(--serif); margin: 10px 0 12px; }
.hq { background-image: linear-gradient(rgba(58,141,255,.32), rgba(58,141,255,.32)); background-repeat: no-repeat; background-size: 0% 100%; transition: background-size 1.3s var(--ease) .5s; border-radius: 2px; }

/* fake tap */
.tap { position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%; background: rgba(255,255,255,.22); border: 1.5px solid rgba(255,255,255,.7); opacity: 0; transform: translate(var(--tx, 200px), var(--ty, 300px)) scale(.6); transition: transform .9s var(--ease), opacity .4s; pointer-events: none; z-index: 5; }
.tap.show { opacity: 1; transform: translate(var(--tx), var(--ty)) scale(1); }
.tap.press { transform: translate(var(--tx), var(--ty)) scale(.78); transition-duration: .18s; }

/* ---------- DISTILL (scroll-driven) ---------- */
.distill { position: relative; height: 480vh; border-top: 1px solid var(--line); }
.distill-sticky { position: sticky; top: 60px; height: calc(100vh - 60px); height: calc(100svh - 60px); overflow: hidden; }
.distill-in { height: 100%; display: flex; flex-direction: column; padding-top: 18px; padding-bottom: 18px; }
.bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; flex: none; }
.bars span { display: block; }
.bars span::before { content: ""; display: block; height: 5px; border-radius: 3px; background: var(--line-2); }
.bars i { display: block; height: 5px; margin-top: -5px; border-radius: 3px; background: var(--blue); transform-origin: left; transform: scaleX(var(--f, 0)); }
.bars span:nth-child(2) i { background: #7c6cff; }
.bars span:nth-child(3) i { background: var(--green); }
.bars span:nth-child(4) i { background: #f0a03c; }
.bars em { display: block; margin-top: 6px; font-style: normal; font-size: 0.62rem; white-space: nowrap; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--dim); transition: color .3s; }
.bars span.on em { color: var(--text); }
.dcopy { position: relative; flex: none; height: 132px; margin-top: 16px; }
.dstep { position: absolute; inset: 0; opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.dstep.is-on { opacity: 1; transform: none; }
.dstep h2 { font-size: clamp(1.75rem, 7.4vw, 3rem); margin: 6px 0 6px; }
.dstep p:last-child { color: var(--muted); font-size: 0.95rem; max-width: 30em; }
.label--blue:not(:last-child) { margin: 0; }

.stage { position: relative; flex: 1; min-height: 0; margin-top: 12px; }
.doc { position: absolute; left: 0; right: 0; top: 0; height: 58%; border-radius: 12px; background: var(--paper); color: var(--paper-ink); padding: 14px 16px; overflow: hidden; box-shadow: 0 24px 50px -24px rgba(0,0,0,.8); transform-origin: top center; will-change: transform, opacity; }
.doc-head { display: flex; justify-content: space-between; font-size: 0.66rem; color: #7d776f; padding-bottom: 8px; margin-bottom: 10px; border-bottom: 1px solid var(--paper-line); }
.doc-h { font: 600 1rem/1.2 var(--serif); margin-bottom: 6px; }
.doc-t { font: 400 0.84rem/1.55 var(--serif); color: #4e4943; }
.s { color: var(--paper-ink); border-radius: 2px; background-image: linear-gradient(rgba(58,141,255,.30), rgba(58,141,255,.30)); background-repeat: no-repeat; background-size: calc(var(--h, 0) * 100%) 100%; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.scan { position: absolute; left: 0; right: 0; top: 0; height: 60px; background: linear-gradient(180deg, rgba(58,141,255,0) 0%, rgba(58,141,255,.14) 85%, rgba(58,141,255,.55) 100%); transform: translateY(calc(var(--sy, -1) * 1px)); opacity: var(--so, 0); pointer-events: none; }
.slots { position: absolute; left: 0; right: 0; top: 61%; display: flex; flex-wrap: wrap; gap: 8px; visibility: hidden; }
.slots i { display: block; height: 34px; border-radius: 99px; }
.chips { position: absolute; inset: 0; pointer-events: none; }
.cchip { position: absolute; left: 0; top: 0; display: inline-flex; align-items: center; height: 34px; padding: 0 13px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--blue-mid); color: #d7e7ff; font-size: 0.8rem; font-weight: 600; white-space: nowrap; opacity: 0; will-change: transform, opacity; }
.cchip.lit { background: var(--blue); border-color: var(--blue); color: #fff; }
.deck { position: absolute; left: 0; right: 0; top: 0; height: 58%; pointer-events: none; }
.qc { position: absolute; left: 0; right: 0; top: 0; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line-2); box-shadow: 0 20px 40px -20px rgba(0,0,0,.9); opacity: 0; will-change: transform, opacity; }
.qc p { font-size: 0.92rem; line-height: 1.45; }
.qc-tag { display: inline-block; font-size: 0.66rem !important; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #9cc4ff; margin-bottom: 6px; }
.qc-src { margin-top: 10px; padding-top: 8px; border-top: 1px dashed var(--line-2); font-size: 0.74rem !important; color: var(--green) !important; }


.sched { position: absolute; left: 0; right: 0; top: 61%; margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; opacity: 0; pointer-events: none; }
.sched li { padding: 8px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg-2); font-size: .8rem; line-height: 1.3; transition: border-color .3s, background .3s, transform .3s var(--ease); }
.sched b { display: block; font-weight: 600; }
.sched span { color: var(--dim); font-size: .74rem; }
.sched li:first-child.on { border-color: rgba(229,83,75,.55); background: rgba(229,83,75,.1); }
.sched li:not(:first-child).on { border-color: var(--blue-mid); background: var(--blue-soft); }
.sched li.on span { color: var(--muted); }
.sched li.cur { transform: scale(1.03); }
.qc-stem span { display: inline-block; white-space: pre; opacity: 0; filter: blur(6px); transform: translateY(5px); animation: word .42s var(--ease) forwards; animation-delay: calc(var(--d) * 14ms); }
.qc--front { transition: border-color .3s, box-shadow .3s; }
.qc--front.missed { border-color: rgba(229,83,75,.6); }
.qc--front.missed .qc-src { color: #ff8a80 !important; }
.qc--front.variant { border-color: var(--blue-mid); box-shadow: 0 0 0 1px var(--blue-mid), 0 20px 40px -20px rgba(0,0,0,.9); }
.qc--front.variant .qc-src { color: #9cc4ff !important; }

/* ---------- SECTIONS ---------- */
.section { padding: 88px 0; border-top: 1px solid var(--line); }
.split { display: grid; gap: 34px; align-items: center; }
.split h2 { margin: 12px 0 14px; }

.timeline { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.timeline li { padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); font-size: 0.86rem; }
.timeline b { display: block; font-weight: 600; }
.timeline span { color: var(--dim); font-size: 0.8rem; }
.timeline li.on { border-color: var(--blue-mid); background: var(--blue-soft); }

/* why + fine print */
.why-list { list-style: none; margin: 0; padding: 0; display: grid; }
.why-list li { padding: 16px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 1.02rem; }
.why-list b { color: var(--text); font-weight: 600; }
.fine dl { margin: 0; display: grid; }
.fine dl div { padding: 14px 0; border-top: 1px solid var(--line); }
.fine dt { font-size: 0.7rem; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--dim); }
.fine dd { margin: 4px 0 0; }

/* final */
.final-in { text-align: center; display: flex; flex-direction: column; align-items: center; }
.final-icon { width: 88px; height: 88px; border-radius: 20px; margin-bottom: 22px; box-shadow: 0 20px 50px -18px rgba(58,141,255,.45); }
.final h2 { max-width: 12em; margin-bottom: 12px; }
.final .waitlist { width: 100%; text-align: left; }
.final .form-msg, .final .fineprint { text-align: center; }

.foot { display: flex; flex-wrap: wrap; gap: 6px 24px; justify-content: space-between; padding-block: 26px 40px; padding-bottom: max(40px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: 0.82rem; color: var(--dim); }

/* ---------- WIDER SCREENS ---------- */
@media (min-width: 560px) {
  :root { --gutter: 24px; }
  .field { flex-direction: row; }
  .field input { flex: 1; min-width: 0; }
  .timeline { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .hero { padding: 72px 0 96px; text-align: center; }
  .hero .sub { margin-inline: auto; }
  .hero .waitlist { margin-inline: auto; }
  .frame { padding: 48px 48px 0; border-radius: 32px 32px 0 0; border-bottom: 0; }
  .app { height: 620px; border-radius: 14px 14px 0 0; border-bottom: 0; }
  .app-body { display: grid; grid-template-columns: 1.08fr 1fr; }
  .quiz { position: relative; inset: auto; border-right: 1px solid var(--line); }
  .quiz-in { padding: 22px 26px; }
  .stem { font-size: 1rem; }
  .opts li { font-size: 0.86rem; }
  .pdfpane { display: flex; position: relative; height: auto; transform: none; border-radius: 0; border-top: 0; box-shadow: none; }
  .app .pdfpane { opacity: .6; transition: opacity .8s var(--ease); }
  .app.reveal .pdfpane { opacity: 1; }
  .page { margin: 0 18px; padding: 22px; }

  .distill { height: 440vh; }
  .distill-in { padding-top: 28px; padding-bottom: 28px; }
  .dcopy { height: 150px; }
  .doc { right: auto; width: 46%; height: auto; max-height: 100%; padding: 22px 26px 28px; }
  .doc-t { font-size: 1rem; }
  .doc-h { font-size: 1.2rem; }
  .slots { left: 50%; right: 0; top: 0; height: 30%; align-content: flex-start; }
  .deck { left: 50%; right: 0; top: 34%; height: 66%; }
  .sched { left: 50%; right: 0; top: 0; }
  .split { grid-template-columns: 1fr 1fr; gap: 64px; }
  .split--top { align-items: start; }
  .section { padding: 128px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .fade { opacity: 1; transform: none; transition: none; }
    .pdfpane, .hq, .tap, .ref, .dstep, .rate, .skip-day { transition: none !important; }
  .stem span, .qc-stem span, .opts li { animation: none !important; opacity: 1 !important; filter: none !important; transform: none !important; }
}
