/* PitchForm website: one stylesheet for every page. Colours mirror docs/DESIGN_SYSTEM.md. */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Medium.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ground: #0C0F14;
  --raised: #1A1E25;
  --line: #262B33;
  --chalk: #F2F4F7;
  --chalk-2: #ADB3BD;
  --chalk-3: #8C929C;
  --accent: #7CC4FF;
  --on-accent: #0C0F14;
  --heading: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  --radius: 24px;
  --radius-inset: 16px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--chalk);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.6;
}

/* Links and actions are chalk and white; the accent only praises (DESIGN_SYSTEM §4). */
a { color: var(--chalk); text-decoration-color: var(--chalk-3); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--chalk); text-decoration-thickness: 2px; }
a:focus-visible { outline: 2px solid var(--chalk); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header */

.site-header { border-bottom: 1px solid var(--line); }

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  padding-top: 20px;
  padding-bottom: 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--chalk);
  text-decoration: none;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 20px;
  letter-spacing: -0.01em;
}

.brand-mark { width: 30px; height: 30px; display: block; }

.site-nav { display: flex; gap: 20px; font-family: var(--heading); font-weight: 500; font-size: 15px; }
.site-nav a { color: var(--chalk-2); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--chalk); }

/* Content */

main { padding: 48px 0 64px; }

h1, h2, h3 { font-family: var(--heading); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; }

h1 { font-size: 40px; margin: 0 0 8px; }
h2 { font-size: 24px; margin: 48px 0 12px; }
h3 { font-size: 18px; margin: 28px 0 8px; letter-spacing: -0.01em; }

p, ul, ol { margin: 0 0 16px; }
ul, ol { padding-left: 22px; }
li { margin-bottom: 6px; }
strong { font-weight: 600; }

.updated { color: var(--chalk-3); font-size: 15px; margin-bottom: 32px; }

.lead { font-size: 19px; color: var(--chalk-2); }

.card {
  background: var(--raised);
  border-radius: var(--radius);
  padding: 24px;
  margin: 24px 0;
}

.card > :last-child { margin-bottom: 0; }

.card h2:first-child, .card h3:first-child { margin-top: 0; }

.label {
  display: inline-block;
  font-family: var(--heading);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--chalk-2);
  margin-bottom: 8px;
}

.button {
  display: inline-block;
  background: var(--chalk);
  color: var(--ground);
  font-family: var(--heading);
  font-weight: 700;
  text-decoration: none;
  padding: 12px 22px;
  border-radius: 999px;
}

.button:hover { background: #A3D5FF; }

table { width: 100%; border-collapse: collapse; margin: 0 0 16px; font-size: 16px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); }
th { font-family: var(--heading); font-weight: 700; color: var(--chalk-2); font-size: 14px; }
.table-scroll { overflow-x: auto; }

/* FAQ */

details {
  background: var(--raised);
  border-radius: var(--radius-inset);
  margin: 0 0 10px;
  padding: 0 20px;
}

summary {
  cursor: pointer;
  font-weight: 600;
  padding: 16px 0;
  list-style-position: outside;
}

summary:focus-visible { outline: 2px solid var(--chalk); outline-offset: 2px; border-radius: 6px; }

details[open] summary { color: var(--chalk); }
details > p:last-child { padding-bottom: 16px; margin-bottom: 0; }

/* Footer */

.site-footer { border-top: 1px solid var(--line); color: var(--chalk-3); font-size: 15px; }
.site-footer .wrap { padding-top: 24px; padding-bottom: 32px; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { color: var(--chalk-2); }

@media (max-width: 480px) {
  h1 { font-size: 32px; }
  h2 { font-size: 22px; }
  main { padding: 32px 0 48px; }
  .card { padding: 20px; }
}


/* ---------- Home ---------- */

.wrap.wide { max-width: 1160px; }

.home main { padding: 0; }

.home h2 {
  font-size: clamp(40px, 5.6vw, 76px);
  line-height: 0.98;
  letter-spacing: -0.04em;
  margin: 0;
}

:root { --ease: cubic-bezier(0.2, 0.8, 0.2, 1); }

.store { display: inline-block; border-radius: 12px; transition: opacity 0.2s, transform 160ms ease-out; }
.store img { display: block; height: 56px; width: auto; }
@media (hover: hover) and (pointer: fine) { .store:hover { opacity: 0.85; } }
.store:active { transform: scale(0.97); }
.store:focus-visible { outline: 2px solid var(--chalk); outline-offset: 4px; }

/* 1. Hero */

.hero { padding: 40px 0 120px; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 48px;
  align-items: center;
  min-height: min(760px, calc(100vh - 110px));
}

.hero h1 {
  font-size: clamp(56px, 7.4vw, 112px);
  line-height: 0.92;
  letter-spacing: -0.045em;
  margin: 0 0 28px;
}

.hero-sub { font-size: clamp(18px, 1.6vw, 21px); color: var(--chalk-2); max-width: 24em; margin: 0 0 36px; }

.reveal-words .w { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: 0.1em; margin-bottom: -0.1em; }
.reveal-words .w > span { display: inline-block; }
.reveal-words.go .w > span {
  transform: translateY(108%);
  animation: rise 0.9s var(--ease) forwards;
  animation-delay: calc(var(--i) * 80ms + 120ms);
}
@keyframes rise { to { transform: none; } }

.hero-sub, .hero .store, .devices { animation: arrive 1s var(--ease) both; }
.hero-sub { animation-delay: 0.45s; }
.hero .store { animation-delay: 0.55s; }
.devices { animation-delay: 0.25s; animation-duration: 1.2s; }
@keyframes arrive { from { opacity: 0; transform: translateY(18px); } }

/* The iPhone, drawn in CSS */

.devices { position: relative; display: flex; justify-content: center; padding: 20px 0 20px 70px; }

.iphone {
  width: 300px;
  aspect-ratio: 300 / 640;
  border-radius: 56px;
  padding: 11px;
  background: linear-gradient(145deg, #6E737C 0%, #2B2F36 22%, #3E434B 50%, #23262C 78%, #5D626B 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22), 0 60px 120px -40px rgba(0, 0, 0, 0.9);
  transform: rotate(2deg);
}

.iphone-screen {
  position: relative;
  height: 100%;
  border-radius: 46px;
  background: var(--ground);
  overflow: hidden;
  padding: 52px 14px 0;
  box-shadow: 0 0 0 2px #050608;
  font-size: 12px;
  line-height: 1.3;
}

.island { position: absolute; top: 11px; left: 50%; width: 92px; height: 27px; margin-left: -46px; border-radius: 20px; background: #000; }
.status { position: absolute; top: 15px; left: 30px; right: 24px; display: flex; justify-content: space-between; font-weight: 600; font-size: 13px; }
.status-icons { display: flex; gap: 4px; align-items: center; }
.status-icons i { width: 15px; height: 9px; border-radius: 2px; background: var(--chalk); opacity: 0.9; }
.status-icons b { width: 22px; height: 10px; border-radius: 3px; border: 1.5px solid var(--chalk); opacity: 0.9; }

.app-pitch { aspect-ratio: 50 / 32; background: #141A23; border-radius: 12px; overflow: hidden; }
.app-pitch canvas { display: block; width: 100%; height: 100%; }
.app-meta { color: var(--chalk-3); margin: 12px 4px 4px; }
.app-result { display: flex; align-items: baseline; gap: 8px; padding: 0 4px; }
.app-score { font: 700 30px/1.1 var(--heading); letter-spacing: -0.03em; }
.app-score.won { color: var(--accent); }
.app-goals { font-size: 12px; color: var(--chalk); white-space: nowrap; }

.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 12px 0 0; }
.app-stats div { padding: 0 4px; }
.app-stats div + div { border-left: 1px solid var(--line); padding-left: 9px; }
.app-stats span { display: block; color: var(--chalk-3); font-size: 10px; white-space: nowrap; }
.app-stats em { font-style: normal; }
.app-stats b { font: 700 21px/1.2 var(--heading); font-variant-numeric: tabular-nums; }

.app-week { margin-top: 14px; background: var(--raised); border-radius: 18px; padding: 11px 12px 12px; }
.app-week-head { display: flex; justify-content: space-between; font-size: 12px; }
.app-week-head span { color: var(--chalk-2); }
.app-days { display: grid; grid-template-columns: repeat(7, 1fr); list-style: none; padding: 0; margin: 9px 0 0; }
.app-days li { margin: 0 auto; width: 25px; height: 25px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; color: var(--chalk-2); }
.app-days li.on { background: var(--accent); color: var(--on-accent); font-weight: 600; }
.app-days li.today { box-shadow: inset 0 0 0 1.5px var(--chalk); color: var(--chalk); }
.app-days li.off { color: var(--chalk-3); opacity: 0.55; }

.app-tabs {
  position: absolute;
  left: 12px; right: 12px; bottom: 14px;
  display: flex;
  justify-content: space-around;
  padding: 11px 6px;
  border-radius: 28px;
  background: rgba(38, 43, 51, 0.82);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
  font-size: 10.5px;
  color: var(--chalk-2);
}
.app-tabs .on { color: var(--accent); }

/* The Watch, sized in em so one font-size scales the whole thing */

.watch { font-size: 14px; }

.watch-case {
  width: 15.75em;
  aspect-ratio: 252 / 304;
  border-radius: 4em;
  padding: 0.9em;
  background: linear-gradient(160deg, #50555E, #17191E 42%, #2E3239 70%, #4A4F58);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 40px 80px -30px rgba(0, 0, 0, 0.9);
}

.watch-screen {
  position: relative;
  display: grid;
  height: 100%;
  border-radius: 3.25em;
  background: #000;
  padding: 1.35em 1.4em 1.15em;
  font-size: 0.95em;
  line-height: 1.25;
  overflow: hidden;
}
.watch-screen > * { min-width: 0; }

.w-live, .w-saved { grid-area: 1 / 1; display: flex; flex-direction: column; transition: opacity 0.5s var(--ease); }
.w-saved { opacity: 0; }
.watch.done .w-live { opacity: 0; }
.watch.done .w-saved { opacity: 1; }

.watch-row .watch-screen { display: flex; flex-direction: column; }

.w-top { display: flex; justify-content: space-between; align-items: center; font-weight: 600; }
.w-half { color: var(--accent); }
.w-half::before { content: ""; display: inline-block; width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--accent); margin-right: 0.4em; vertical-align: 0.12em; }
.w-brand { display: flex; align-items: center; gap: 0.4em; }
.w-brand img { width: 1.15em; height: 1.15em; }
.w-done { display: flex; align-items: center; gap: 0.35em; }
.w-done svg { width: 1em; height: 1em; color: var(--accent); }
.w-time { font: 700 3.7em/1.05 var(--heading); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 0.1em; }
.w-hr { display: flex; align-items: center; gap: 0.35em; font: 700 2.15em/1.1 var(--heading); font-variant-numeric: tabular-nums; }
.w-hr small { font: 600 0.45em var(--body); color: var(--chalk-2); align-self: flex-end; margin-bottom: 0.45em; }
.w-heart { width: 0.62em; height: 0.56em; color: #E3A27A; animation: beat 0.4s ease-in-out infinite alternate; }
@keyframes beat { from { transform: scale(1); } to { transform: scale(1.15); } }

.zone-bar { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.28em; margin: 0.65em 0 0.75em; }
.zone-bar i { height: 0.45em; border-radius: 1em; opacity: 0.3; transition: opacity 0.4s; }
.zone-bar i:nth-child(1) { background: #2F4A86; }
.zone-bar i:nth-child(2) { background: #2A86A8; }
.zone-bar i:nth-child(3) { background: #BFAE4E; }
.zone-bar i:nth-child(4) { background: #D2763A; }
.zone-bar i:nth-child(5) { background: #C4483F; }
.zone-bar i.on { opacity: 1; }

.w-stats, .w-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5em; color: var(--chalk-2); font-size: 0.9em; }
.w-stats { margin-top: auto; }
.w-grid { margin-top: 0.7em; row-gap: 0.7em; }
.w-stats b, .w-grid b { font: 700 1.5em var(--heading); color: var(--chalk); font-variant-numeric: tabular-nums; }
.w-stats span, .w-grid span { display: block; color: var(--chalk-3); }
.w-health { margin-top: auto; display: flex; align-items: center; gap: 0.4em; font-size: 0.88em; color: var(--chalk-2); }

.w-start { flex: 1; display: grid; place-items: center; position: relative; }
.w-start::before { content: ""; position: absolute; left: -1.4em; right: -1.4em; top: 50%; height: 1px; background: #2A2E35; }
.w-start::after { content: ""; position: absolute; width: 8.4em; height: 8.4em; border-radius: 50%; border: 1.5px solid #2A2E35; }
.w-start span {
  position: relative;
  z-index: 1;
  border-radius: 50%;
  display: grid; place-items: center;
  background: #24282F;
  font: 700 1.5em var(--heading);
}
.w-start span { width: 4.3em; height: 4.3em; }

.watch-hero { position: absolute; left: 0; bottom: 40px; font-size: 11.5px; transform: rotate(-3deg); }

/* 2. The match, scrubbed by scroll */

.scrub { height: 340vh; }
.scrub-stage {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  align-items: center;
}
.scrub-stage .wrap { width: 100%; }

.scrub h2 { margin-bottom: 32px; }
.scrub-body { display: grid; grid-template-columns: minmax(0, 1fr) 210px; gap: 56px; align-items: center; }

.pitch {
  background: #141A23;
  border-radius: var(--radius);
  aspect-ratio: 50 / 32;
  width: min(100%, calc((100vh - 260px) * 50 / 32));
  overflow: hidden;
}
.pitch canvas { display: block; width: 100%; height: 100%; }

.scrub-stats { display: grid; gap: 26px; margin: 0; }
.scrub-stats dt, .pair dt { color: var(--chalk-3); font-size: 15px; }
.scrub-stats dd, .pair dd {
  margin: 0;
  font: 700 clamp(30px, 3.4vw, 48px)/1.05 var(--heading);
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.scrub-stats .scrub-phase { color: var(--chalk-2); font-weight: 600; }
.scrub-phase.swap { animation: swap 0.45s var(--ease); }
@keyframes swap { from { opacity: 0; transform: translateY(8px); } }

/* Chapters */

.chapter { padding: 180px 0 0; }
.line { font-size: clamp(18px, 1.6vw, 21px); color: var(--chalk-2); margin: 20px 0 0; max-width: 28em; }

/* 3. The Watch row */

.watch-row { display: flex; justify-content: center; align-items: center; gap: 40px; margin-top: 72px; }
.watch-row .watch { opacity: 0; transform: translateY(48px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.watch-row .watch:nth-child(2) { font-size: 15.5px; transition-delay: 80ms; }
.watch-row .watch:nth-child(3) { transition-delay: 160ms; }
.watch-row.in .watch { opacity: 1; transform: none; }

/* 4. Heart rate */

.heart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 24px 48px; }
.pair { display: flex; gap: 48px; margin: 0; }
.chart { height: 320px; margin-top: 56px; }
.chart canvas { display: block; width: 100%; height: 100%; }

/* 5. Form */

.form-grid { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: 48px; align-items: center; }
.orb-wrap { aspect-ratio: 1; width: min(560px, 100%); justify-self: center; }
.orb-wrap canvas { display: block; width: 100%; height: 100%; }
.form-number { margin: 0; }
.form-number span { font: 700 clamp(120px, 15vw, 200px)/0.85 var(--heading); letter-spacing: -0.05em; font-variant-numeric: tabular-nums; }
.form .store { margin-top: 36px; }
.form h2 { margin-top: 16px; }

/* 6. Privacy */

.facts { list-style: none; padding: 0; margin: 40px 0 32px; }
.facts li { margin: 0; font: 700 clamp(26px, 3.4vw, 44px)/1.2 var(--heading); letter-spacing: -0.025em; color: var(--chalk-2); }
.quiet-link { color: var(--chalk-2); font-size: 16px; }

/* 7. Closing */

.closing { padding: 200px 0 160px; text-align: center; }
.closing-inner { display: flex; flex-direction: column; align-items: center; }
.app-icon { display: block; border-radius: 23%; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); }
.closing h2 { margin: 32px 0 36px; }

.footer-note { flex-basis: 100%; color: var(--chalk-3); font-size: 14px; }

/* Smaller screens */

@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; gap: 40px; }
  .devices { padding-left: 60px; }
  .form-grid { grid-template-columns: 1fr; }
  .scrub-body { grid-template-columns: 1fr; gap: 24px; }
  .scrub-stats { grid-template-columns: repeat(4, max-content); gap: 16px 40px; }
  .watch-row { gap: 20px; }
  .watch-row .watch { font-size: 11.5px; }
  .watch-row .watch:nth-child(2) { font-size: 12.5px; }
}

@media (max-width: 640px) {
  .hero { padding: 28px 0 72px; }
  .devices { padding: 10px 0 10px 36px; }
  .iphone { width: 252px; border-radius: 48px; padding: 9px; }
  .iphone-screen { border-radius: 40px; padding: 46px 11px 0; font-size: 10.5px; }
  .island { width: 78px; height: 23px; margin-left: -39px; top: 9px; }
  .status { top: 12px; left: 24px; right: 20px; font-size: 11px; }
  .app-score { font-size: 25px; }
  .app-stats b { font-size: 17px; }
  .app-stats span { font-size: 8.5px; }
  .app-days li { width: 21px; height: 21px; font-size: 9.5px; }
  .app-tabs { font-size: 9px; padding: 9px 4px; }
  .watch-hero { font-size: 8.6px; left: 0; bottom: 24px; }

  .scrub { height: 300vh; }
  .pitch { width: 100%; border-radius: var(--radius-inset); }
  .scrub h2 { margin-bottom: 24px; }

  .scrub-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 24px; }
  .chapter { padding-top: 120px; }
  .watch-row {
    justify-content: flex-start;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    margin: 48px -20px 0;
    padding: 8px 20px 16px;
    gap: 16px;
    scrollbar-width: none;
  }
  .watch-row::-webkit-scrollbar { display: none; }
  .watch-row .watch, .watch-row .watch:nth-child(2) { font-size: 12.5px; scroll-snap-align: center; flex: none; }
  .chart { height: 240px; margin-top: 36px; }
  .pair { gap: 32px; }
  .closing { padding: 140px 0 112px; }
}

/* Reduce Motion, or ?still: no pinning, no entrances, final frames only. */

.still .scrub { height: auto; }
.still .scrub-stage { position: static; height: auto; padding-top: 140px; }
.still .watch-row .watch { opacity: 1; transform: none; transition: none; }

@media (prefers-reduced-motion: reduce) {
  .hero-sub, .hero .store, .devices { animation: none; }
  .w-heart { animation: none; }
  .zone-bar i, .w-live, .w-saved { transition: none; }
}
.still .hero-sub, .still .hero .store, .still .devices, .still .w-heart { animation: none; }
.still .w-live, .still .w-saved, .still .zone-bar i { transition: none; }
