/* tokens copied from src/ui/theme.tsx so the site and the app match */
:root {
  --bg: #161616;
  --surface: #1f1f1f;
  --raised: #2a2a2a;
  --line: #3d3d3b;
  --edge: #757571;
  --text: #f2f2f0;
  --muted: #a3a39e;
  --accent: #f0b241;
  --on-accent: #111111;
  --bad: #f0564a;
  --good: #4cc26e;
  --r-sm: 6px;
  --r-lg: 10px;
  --gutter: clamp(16px, 4vw, 40px);
  --display: 'Saira Extra Condensed', 'Arial Narrow', sans-serif;
  --stencil: 'Saira Stencil One', 'Arial Narrow', sans-serif;
  --body: 'Saira', system-ui, sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); font-weight: 800; line-height: 0.95; margin: 0; letter-spacing: 0.005em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }

/* stencil labels, like markings painted on the gym floor */
.label {
  font-family: var(--stencil);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 15px;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: var(--r-sm);
  font: 700 16px/1 var(--body);
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: #f6c262; }
.btn-ghost { background: transparent; border-color: var(--edge); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }

/* nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(22, 22, 22, 0.94); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.nav .logo { display: block; padding: 2px 0; }

/* the nav logo is the app's launch intro layers, boxes from src/ui/introLayers.ts */
.mark { position: relative; display: block; height: 40px; aspect-ratio: 2081 / 825; }
.mark img { position: absolute; max-width: none; }
.l-body { left: 0.529%; top: 2.061%; width: 40.605%; height: 97.212%; }
.l-words { left: 32.484%; top: 50.424%; width: 67.516%; height: 31.879%; }
.l-left { left: 2.547%; top: 26.788%; width: 10.236%; height: 25.939%; }
.l-right { left: 29.793%; top: 13.697%; width: 13.455%; height: 31.515%; }
.l-lines { left: 15.57%; top: 2.788%; width: 21%; height: 88.242%; }

/* timings follow LaunchIntro so the site opens like the app does */
@media (prefers-reduced-motion: no-preference) {
  .mark img { animation: 360ms cubic-bezier(0.33, 1, 0.68, 1) both; }
  .mark .l-left { animation-name: lock; animation-delay: 300ms; }
  .mark .l-right { animation-name: lock; animation-delay: 440ms; }
  .mark .l-lines { animation-name: draw; animation-delay: 660ms; animation-duration: 340ms; }
  .mark .l-words { animation-name: land; animation-delay: 900ms; animation-duration: 280ms; }
  .mark .l-body { animation: none; }
  @keyframes lock {
    from { opacity: 0; transform: scale(1.8) rotate(-90deg); }
    40% { opacity: 1; }
  }
  @keyframes draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
  @keyframes land { from { opacity: 0; transform: translateY(4px); } }
}
.nav ul { display: flex; gap: 24px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.nav ul a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: 15px; padding: 12px 0; }
.nav ul a:hover { color: var(--text); }
.nav .btn { min-height: 44px; padding: 0 16px; font-size: 15px; }
@media (max-width: 760px) {
  .nav ul { display: none; }
  .nav .btn { margin-left: auto; }
}

/* hero */
.hero { padding: clamp(40px, 7vw, 88px) 0 clamp(56px, 8vw, 104px); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 64px); align-items: center; }
.hero h1 { font-size: clamp(46px, 8.4vw, 112px); text-transform: uppercase; text-wrap: balance; }
.hero h1 span { color: var(--accent); display: block; }
.hero .lede { font-size: clamp(18px, 1.7vw, 21px); color: var(--muted); max-width: 34ch; margin: 24px 0 32px; }
.hero .lede strong { color: var(--text); font-weight: 500; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.hero .note { margin-top: 14px; font-size: 14px; color: var(--muted); }

.hero-visual { position: relative; padding: 0 0 48px; }
/* the drawn phone covers the bench corner so his face and the bar stay clear */
.hero-photo {
  aspect-ratio: 16 / 10;
  margin-left: 24%;
  border-radius: var(--r-lg);
  background: var(--surface) 50% 30% / cover no-repeat;
  border: 1px solid var(--line);
}
.hero-visual .phone { position: absolute; left: 0; bottom: 0; width: 32%; max-width: 236px; }

@media (max-width: 900px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .hero-visual { margin-top: 32px; }
  .hero-visual .phone { width: 34%; }
}

/* phone frame, drawn in css so the screens stay sharp and editable */
.phone {
  aspect-ratio: 9 / 19.5;
  background: #0b0b0b;
  border-radius: 34px;
  padding: 9px;
  border: 1px solid #4a4a48;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg);
  font-family: var(--body);
  container-type: inline-size;
}
.screen .island { position: absolute; top: 2.6%; left: 50%; translate: -50% 0; width: 30%; height: 3.4%; background: #000; border-radius: 99px; z-index: 3; }

/* live camera screen, sizes in cqw so it scales with the frame */
.cam { background: radial-gradient(120% 70% at 50% 40%, #3a3836 0%, #1c1b1a 70%); }
.cam .top { position: absolute; inset: 9% 6% auto 6%; display: flex; justify-content: space-between; align-items: flex-start; z-index: 2; }
.cam .name { font: 800 7.4cqw/1 var(--display); text-transform: uppercase; }
.cam .set { font-size: 4.6cqw; color: var(--muted); margin-top: 1.5cqw; }
.cam .end { font-size: 4.4cqw; font-weight: 700; border: 1px solid var(--edge); border-radius: 1.8cqw; padding: 1.6cqw 3cqw; }
.cam .skeleton { position: absolute; left: 8%; top: 21%; width: 84%; }
.cam .count { position: absolute; left: 6%; bottom: 23%; display: flex; align-items: baseline; z-index: 2; }
.cam .reps { font: 900 38cqw/0.8 var(--display); color: var(--accent); font-variant-numeric: tabular-nums; }
.cam .of { font: 700 11cqw/1 var(--display); color: var(--muted); margin-left: 1.5cqw; }
.cam .bpm { position: absolute; right: 6%; bottom: 25%; text-align: right; z-index: 2; }
.cam .bpm b { display: block; font: 700 10cqw/1 var(--display); }
.cam .bpm small { font: 700 5cqw/1 var(--stencil); color: var(--muted); letter-spacing: 0.06em; }
.cam .cue {
  position: absolute; left: 5%; right: 5%; bottom: 6%;
  background: var(--accent); color: var(--on-accent);
  border-radius: 2.4cqw; padding: 4cqw 3cqw;
  font: 800 8.6cqw/1 var(--display); text-align: center; text-transform: uppercase;
}

/* sections */
section { scroll-margin-top: 80px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section h2 { font-size: clamp(40px, 5.6vw, 72px); text-transform: uppercase; }
.section .intro { max-width: 52ch; color: var(--muted); margin-top: 20px; font-size: 18px; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* the real recording, proof for the drawn phone in the hero */
.watch { background: var(--surface); }
.watch .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); grid-template-areas: "clip copy"; gap: clamp(32px, 6vw, 80px); align-items: center; }
.watch .copy { grid-area: copy; }
.clip { grid-area: clip; margin: 0; display: grid; justify-items: center; gap: 16px; }
.clip .phone { width: min(300px, 70vw); }
.clip .screen { background: #5a5853; border-radius: 24px; }
.clip video { display: block; width: 100%; height: 100%; object-fit: cover; }
.clip-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.clip-controls[hidden] { display: none; }
.clip figcaption { max-width: 34ch; text-align: center; font-size: 14px; color: var(--muted); }
@media (max-width: 860px) {
  .watch .wrap { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "clip"; }
}

/* the spoken set, one line per beat */
.heard { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.heard .sticky { position: sticky; top: 108px; }
.transcript { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.transcript li { display: grid; grid-template-columns: 64px 1fr; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.transcript .t { font: 700 14px/1 var(--stencil); color: var(--muted); letter-spacing: 0.06em; }
.transcript .say { font: 700 clamp(26px, 3.2vw, 38px)/1.05 var(--display); text-transform: uppercase; }
.transcript .count .say { color: var(--muted); font-weight: 600; }
.transcript .cue .say { color: var(--accent); }
.transcript .why { grid-column: 2; font-size: 15px; color: var(--muted); margin-top: 4px; }
@media (max-width: 860px) {
  .heard { grid-template-columns: 1fr; }
  .heard .sticky { position: static; }
}
@media (max-width: 480px) {
  .transcript li { grid-template-columns: 44px 1fr; gap: 12px; }
}

/* setup: photo and real steps */
.setup { background: var(--surface); }
.setup .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.setup-photo { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--r-lg); background: var(--raised); border: 1px solid var(--line); }
.setup .wrap:not(:has(.setup-photo)) { grid-template-columns: minmax(0, 680px); }
.steps { list-style: none; counter-reset: step; margin: 32px 0 0; padding: 0; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 56px 1fr; gap: 8px 16px; padding: 20px 0; border-top: 1px solid var(--line); }
.steps li::before { content: counter(step); font: 900 44px/0.9 var(--display); color: var(--accent); grid-row: span 2; }
.steps h3 { font-size: 26px; text-transform: uppercase; }
.steps p { margin: 0; color: var(--muted); }
@media (max-width: 860px) {
  .setup .wrap { grid-template-columns: 1fr; }
  .setup-photo { aspect-ratio: 4 / 3; }
}

/* plans: workout screen next to the copy */
.plans .wrap { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.plans .phones { display: flex; justify-content: center; }
.plans .phone { width: min(300px, 78vw); }
.facts { margin: 28px 0 0; padding: 0; list-style: none; }
.facts li { padding: 14px 0; border-top: 1px solid var(--line); }
.facts b { font-weight: 700; }
@media (max-width: 860px) {
  .plans .wrap { grid-template-columns: 1fr; }
  .plans .phones { order: 2; }
}

/* workout screen */
.app { padding: 15% 5.5% 0; }
.app .title { font: 800 11cqw/1 var(--display); text-transform: uppercase; margin: 2cqw 0 1cqw; }
.app .sub { font-size: 4.2cqw; color: var(--muted); margin-bottom: 4cqw; }
.nudge { background: var(--surface); border: 1px solid var(--line); border-radius: 3cqw; padding: 3.4cqw; margin-bottom: 3.4cqw; }
.nudge p { margin: 0 0 2.4cqw; font-size: 4.2cqw; line-height: 1.35; color: var(--muted); }
.nudge p b { color: var(--text); font-weight: 700; }
.nudge .row { display: flex; gap: 2cqw; }
.nudge span { flex: 1; text-align: center; font-weight: 700; font-size: 4.2cqw; border-radius: 1.8cqw; padding: 2.4cqw 0; border: 1px solid var(--edge); }
.nudge span.yes { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.circuit { border: 1px solid var(--line); border-radius: 3cqw; padding: 3cqw; margin-bottom: 2.6cqw; background: var(--surface); }
.circuit .head { display: flex; justify-content: space-between; font: 700 3.6cqw/1 var(--stencil); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 2.4cqw; }
.ex { display: grid; grid-template-columns: 13cqw 1fr; gap: 3cqw; align-items: center; }
.ex + .ex { margin-top: 2cqw; }
.ex img { width: 13cqw; height: 13cqw; border-radius: 1.8cqw; background: #e3e3e3; object-fit: contain; }
.ex b { display: block; font-size: 4.3cqw; font-weight: 700; line-height: 1.2; }
.cells { display: flex; gap: 1.2cqw; margin-top: 1.2cqw; }
.cells i { font: 700 3.6cqw/1 var(--display); font-style: normal; background: var(--raised); border-radius: 1.2cqw; padding: 1.2cqw 2cqw; color: var(--text); }
.cells i.kg { background: none; color: var(--muted); padding-left: 0.6cqw; }
.ss { font: 700 3.4cqw/1 var(--stencil); color: var(--accent); letter-spacing: 0.06em; margin: 1.6cqw 0 0 16cqw; }
.start { position: absolute; left: 5.5%; right: 5.5%; bottom: 4%; background: var(--accent); color: var(--on-accent); border-radius: 2cqw; text-align: center; font: 800 6cqw/1 var(--display); text-transform: uppercase; padding: 4cqw 0; }

/* after the set: replay card */
.after .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.replay { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); }
.replay .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.replay figure { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 12px; }
.replay figcaption { display: flex; justify-content: space-between; align-items: baseline; margin-top: 8px; font-size: 14px; color: var(--muted); }
.replay figcaption b { font: 700 13px/1 var(--stencil); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text); }
.replay .score { display: flex; align-items: baseline; gap: 10px; margin-bottom: 16px; }
.replay .score b { font: 900 64px/0.85 var(--display); }
.replay .fault { margin-top: 14px; font-size: 15px; color: var(--muted); }
.replay .fault b { color: var(--bad); font-weight: 700; }
@media (max-width: 860px) { .after .wrap { grid-template-columns: 1fr; } }

/* everything else, as a plain two column list */
.more-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 0 48px; margin-top: 40px; }
.more-list div { padding: 20px 0; border-top: 1px solid var(--line); }
.more-list h3 { font-size: 24px; text-transform: uppercase; margin-bottom: 6px; }
.more-list p { color: var(--muted); margin: 0; font-size: 16px; }

/* privacy band */
.private { background: var(--surface); }
.private .wrap { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: clamp(24px, 6vw, 80px); }
.private ul { margin: 0; padding: 0; list-style: none; }
.private li { padding: 12px 0; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .private .wrap { grid-template-columns: 1fr; } }

/* get it: the one place the hazard stripe shows */
.get { text-align: left; }
.get .stripe { height: 10px; background: repeating-linear-gradient(-45deg, var(--accent) 0 14px, #111 14px 28px); border-radius: 2px; margin-bottom: 48px; max-width: 220px; }
.get h2 { max-width: 14ch; }
.get .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

footer { border-top: 1px solid var(--line); padding: 32px 0 48px; font-size: 14px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; }
footer img { height: 26px; width: auto; }
footer a { color: var(--muted); padding: 12px 0; }
footer a:hover { color: var(--text); }
footer .right { margin-left: auto; }

/* one count up on the hero phone, the moment the page is about */
@media (prefers-reduced-motion: no-preference) {
  .cue.pop { animation: pop 320ms cubic-bezier(0.2, 0.9, 0.3, 1.3) both; }
  @keyframes pop { from { transform: translateY(8px) scale(0.96); opacity: 0; } }
}
