/* Coil landing page.
   Palette is lifted directly from the app's Colors.swift so the site and the product read as
   one thing. Brief calls for "precise, athletic, calm — premium but not bro", which rules out
   the high-contrast shouty fitness register: generous space, restrained accent, no gradients. */

:root {
  --bg:        #141A17;
  --surface:   #1E2421;
  --surface-2: #262E29;
  --accent:    #66CC8C;
  --accent-dim:#4FA872;
  --text:      #F5F5F0;
  --muted:     #B2B8B2;
  --line:      #2C3531;

  --measure: 68ch;
  --pad: clamp(1.25rem, 5vw, 4rem);

  --font: ui-sans-serif, system-ui, -apple-system, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3 { line-height: 1.1; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }

em { font-style: normal; color: var(--accent); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Nav ───────────────────────────────────────────────── */

.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem var(--pad);
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: lowercase;
}
.wordmark::after {
  content: "";
  display: inline-block;
  width: 6px; height: 6px;
  margin-left: 4px;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: middle;
}
.wordmark.small { font-size: 1.1rem; }

.nav-note {
  font-size: 0.78rem;
  color: var(--muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Layout ────────────────────────────────────────────── */

main { display: block; }

.band {
  padding: clamp(3.5rem, 9vw, 7rem) var(--pad);
  max-width: 1120px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}

.section-title {
  font-size: clamp(1.6rem, 4vw, 2.3rem);
  margin-bottom: clamp(2rem, 4vw, 3rem);
  max-width: var(--measure);
}

.prose { max-width: var(--measure); display: grid; gap: 1.25rem; }
.prose h2 { font-size: clamp(1.6rem, 4.5vw, 2.5rem); margin-bottom: 0.5rem; }
.prose p { color: var(--muted); font-size: 1.05rem; }
.prose .emphasis {
  color: var(--text);
  font-size: clamp(1.15rem, 3vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* ── Hero ──────────────────────────────────────────────── */

.hero {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(2.5rem, 6vw, 4rem);
  align-items: center;
  padding: clamp(2.5rem, 7vw, 5.5rem) var(--pad) clamp(3.5rem, 8vw, 6rem);
  max-width: 1120px;
  margin-inline: auto;
}

@media (min-width: 900px) {
  .hero { grid-template-columns: 1.15fr 0.85fr; }
}

.eyebrow {
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.25rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 7.5vw, 4.1rem);
  margin-bottom: 1.5rem;
  text-wrap: balance;
}

/* The hard break is tuned for the two-line desktop headline. On a phone it orphans a word,
   so let the text wrap naturally instead. */
@media (max-width: 640px) {
  .hero h1 br { display: none; }
}

.lede {
  color: var(--muted);
  font-size: clamp(1.02rem, 2.2vw, 1.2rem);
  max-width: 46ch;
  margin-bottom: 2.25rem;
}
.lede.center { margin-inline: auto; text-align: center; }

/* ── Figure ────────────────────────────────────────────── */

.hero-figure { display: grid; justify-items: center; gap: 1.25rem; }

.skeleton {
  width: min(100%, 300px);
  height: auto;
  color: var(--surface-2);
}
.skeleton .joints { fill: var(--accent); }
.skeleton .measure { stroke: var(--accent); opacity: 0.55; }

/* Joints settle in one after another — reads as the camera acquiring the body. */
.skeleton .j {
  opacity: 0;
  animation: pop 0.5s ease-out forwards;
  animation-delay: calc(var(--i) * 0.055s + 0.2s);
  transform-origin: center;
}
@keyframes pop {
  from { opacity: 0; transform: scale(0.4); }
  to   { opacity: 1; transform: scale(1); }
}

.figure-caption {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ── Form ──────────────────────────────────────────────── */

.signup { max-width: 30rem; }
.closing .signup { margin-inline: auto; }

.field-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.signup input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.95rem 1.05rem;
  font: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  transition: border-color 0.15s ease;
}
.signup input[type="email"]::placeholder { color: #6E7772; }
.signup input[type="email"]:focus-visible {
  outline: none;
  border-color: var(--accent);
}
.signup input[type="email"][aria-invalid="true"] { border-color: #D97B6C; }

.signup button {
  flex: 0 0 auto;
  padding: 0.95rem 1.5rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: #0E1411;
  background: var(--accent);
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.08s ease;
}
/* Once the row wraps, the button should span the width — a full-bleed target is easier to hit
   one-handed, and this page's traffic is overwhelmingly mobile. */
@media (max-width: 560px) {
  .signup button { flex: 1 1 100%; }
}

.signup button:hover { background: #79D89B; }
.signup button:active { transform: translateY(1px); }
.signup button:disabled { opacity: 0.55; cursor: default; }
.signup button:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }

.form-note { margin-top: 0.85rem; font-size: 0.85rem; color: var(--muted); }
.form-error { margin-top: 0.7rem; font-size: 0.88rem; color: #E39182; }

/* ── Success + handicap question ───────────────────────── */

.success {
  max-width: 34rem;
  padding: 1.6rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
}
.closing .success { margin-inline: auto; }
.success h3 { font-size: 1.3rem; margin-bottom: 0.5rem; color: var(--accent); }
.success > p { color: var(--muted); font-size: 0.96rem; }

.handicap { border: 0; padding: 0; margin: 1.1rem 0 0; }
.handicap legend {
  padding: 0;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.7rem;
}
.handicap button {
  padding: 0.55rem 0.95rem;
  margin: 0 0.4rem 0.5rem 0;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.handicap button:hover { border-color: var(--accent); color: var(--accent); }
.handicap button[aria-pressed="true"] {
  border-color: var(--accent);
  color: #0E1411;
  background: var(--accent);
}
.success .thanks { margin-top: 0.9rem; color: var(--accent); font-size: 0.92rem; }

/* ── Steps ─────────────────────────────────────────────── */

.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: clamp(1.75rem, 3.5vw, 2.5rem);
}
@media (min-width: 820px) {
  .steps { grid-template-columns: repeat(3, 1fr); gap: 2.5rem; }
}

.steps li { display: grid; gap: 0.7rem; align-content: start; }
.step-num {
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.steps h3 { font-size: 1.22rem; }
.steps p { color: var(--muted); font-size: 0.98rem; }

/* ── Cards ─────────────────────────────────────────────── */

.grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15.5rem), 1fr));
}

.card {
  padding: 1.4rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.card h3 { font-size: 1.06rem; }
.card p { color: var(--muted); font-size: 0.94rem; line-height: 1.55; }

.footnote {
  margin-top: 1.75rem;
  max-width: var(--measure);
  color: var(--muted);
  font-size: 0.9rem;
}

/* ── Tracks ────────────────────────────────────────────── */

.tracks {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}
.track {
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  border-top: 2px solid var(--accent);
  display: grid;
  gap: 0.5rem;
  align-content: start;
}
.track h3 { font-size: 1.2rem; }
.track-for {
  font-size: 0.78rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent);
}
.track > p:last-child { color: var(--muted); font-size: 0.95rem; }

/* ── Closing ───────────────────────────────────────────── */

.closing { text-align: center; }
.closing h2 { font-size: clamp(1.7rem, 5vw, 2.6rem); margin-bottom: 1rem; }

/* ── Footer ────────────────────────────────────────────── */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 2rem var(--pad) 3rem;
  max-width: 1120px;
  margin-inline: auto;
  border-top: 1px solid var(--line);
}
.foot p { color: var(--muted); font-size: 0.85rem; }
