/* Design tokens from REDESIGN.md, the same values the app's theme uses. */
:root {
  --bg: #0E1014;
  --ride-bg: #07080A;
  --surface: #171A21;
  --surface-high: #20242D;
  --border: #2C323D;
  --text: #F3F5F7;
  --muted: #A3ACBA;
  --faint: #7D8797;
  --action: #F08A3C;
  --on-action: #1A1006;

  --speed: #4FC1D6;
  --cadence: #A99BF5;
  --hr: #F0564A;

  --z1: #8A94A6; --z2: #3FA7F5; --z3: #4CC38A; --z4: #F2C94C;
  --z5: #F5913E; --z6: #EF5A4C; --z7: #B97CF3;

  --g-down: #4CC38A; --g-flat: #4FC1D6; --g-climb: #F5913E; --g-steep: #EF5A4C;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "IBM Plex Sans", system-ui, sans-serif;

  --r-chip: 10px; --r-btn: 14px; --r-card: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 16px; color: var(--muted); }
h1, h2, h3 { margin: 0; }
em { font-style: normal; color: var(--action); }

.wrap { width: min(1160px, 100% - 32px); margin-inline: auto; }

/* Type roles */
.kicker {
  font: 600 13px/1 var(--body);
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--speed);
  margin-bottom: 16px;
}
.display, .title {
  font-family: var(--display);
  font-weight: 700;
  line-height: .95;
  letter-spacing: -.01em;
}
.display { font-size: clamp(52px, 8vw, 96px); margin-bottom: 24px; }
.title { font-size: clamp(40px, 5vw, 60px); margin-bottom: 20px; }
.lead { font-size: 19px; max-width: 34ch; }
.label {
  font: 500 11px/1.2 var(--body);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.metric {
  font: 700 40px/1 var(--display);
  font-variant-numeric: tabular-nums;
}
.metric small { font-size: .5em; margin-left: 4px; color: var(--muted); font-weight: 600; }
.muted { color: var(--faint); font-size: 14px; }
.fineprint { font-size: 14px; color: var(--faint); margin-top: 16px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 0 24px;
  background: var(--action); color: var(--on-action);
  border-radius: var(--r-btn);
  font: 600 16px/1 var(--body); text-decoration: none;
  transition: transform .15s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn--small { min-height: 40px; padding: 0 16px; font-size: 14px; }

.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.store {
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 56px; padding: 8px 20px 8px 16px;
  background: var(--surface-high); border: 1px solid var(--border);
  border-radius: var(--r-btn); text-decoration: none;
  font: 600 18px/1.1 var(--body);
  transition: border-color .15s ease, transform .15s ease;
}
.store:hover { border-color: var(--action); transform: translateY(-1px); }
.store svg { width: 26px; height: 26px; }
.store small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 60%, transparent);
}
.nav__inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font: 700 22px/1 var(--display); text-decoration: none;
}
.brand img { border-radius: 8px; }
.nav__links { display: flex; gap: 24px; margin-left: auto; }
.nav__inner > .btn { margin-left: auto; }
.nav__links + .btn { margin-left: 0; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; }
.nav__links a:hover { color: var(--text); }

/* Hero */
.hero { position: relative; overflow: hidden; padding: 72px 0 40px; }
.hero__bg {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 60% 100%; opacity: .75;
  mask-image: linear-gradient(to bottom, transparent, #000 25%, #000 75%, transparent);
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: radial-gradient(60% 70% at 0% 0%, rgba(240,138,60,.22), transparent 70%),
              linear-gradient(90deg, color-mix(in srgb, var(--bg) 85%, transparent) 20%, transparent 62%);
}
.hero__inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 48px;
}

/* Phone frame around the cropped store screenshots */
.phone {
  margin: 0;
  padding: 10px;
  background: #0A0B0E;
  border: 2px solid #3A404B;
  border-radius: 44px;
  box-shadow: 0 40px 80px -20px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.03) inset;
  overflow: hidden;
}
.phone img {
  border-radius: 34px;
  mask-image: linear-gradient(to bottom, #000 88%, transparent);
}
.phone--hero { max-width: 340px; justify-self: center; transform: rotate(2deg); }

/* Stats */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-top: 24px; margin-bottom: 64px;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-card); padding: 20px 24px;
  display: flex; flex-direction: column; gap: 8px;
}
.stat .metric { font-size: 48px; }

/* Feature sections */
.feature {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
  padding: 72px 0;
}
.feature--flip .feature__copy { order: 2; }
.feature__copy > p { max-width: 46ch; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.phone--offset { transform: translateY(48px); }

.ticks { list-style: none; padding: 0; margin: 8px 0 24px; display: grid; gap: 10px; }
.ticks li { position: relative; padding-left: 28px; color: var(--text); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .5em;
  width: 14px; height: 8px;
  border-left: 2px solid var(--action); border-bottom: 2px solid var(--action);
  transform: rotate(-45deg) translateY(-3px);
}

.grades { display: flex; flex-wrap: wrap; gap: 8px; }
.grades span {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--r-chip);
  background: var(--surface); border: 1px solid var(--border);
  font-size: 13px; color: var(--muted);
}
.grades span::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

/* Zone chart */
.zones {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; align-items: end;
  height: 180px; margin: 8px 0 16px; padding: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
}
.zones div {
  height: var(--h); background: var(--c); border-radius: 6px 6px 3px 3px;
  display: flex; flex-direction: column; justify-content: flex-end; padding: 6px 4px;
  color: #0E1014; overflow: hidden;
}
.zones b { font: 700 18px/1 var(--display); }
.zones span { font-size: 10px; line-height: 1.2; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Metric cards: a colored dot says what a number is, as in the app */
.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 8px 0 24px; }
.mcard {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 16px 20px; display: flex; flex-direction: column; gap: 6px;
  position: relative;
}
.mcard::before {
  content: ""; position: absolute; left: 0; top: 18px; bottom: 18px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--c);
}
.mcard .metric { color: var(--c); }

/* Gear cards */
.gear { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; padding: 72px 0 24px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-card);
  padding: 28px;
}
.card svg { width: 28px; height: 28px; color: var(--speed); margin-bottom: 16px; }
.card h3 { font: 700 26px/1.1 var(--display); margin-bottom: 10px; }
.card p { margin: 0; }

/* Pricing */
.pricing { padding: 64px 0 96px; }
.pricing__card {
  text-align: center; padding: 64px 24px;
  border-radius: 24px; border: 1px solid var(--border);
  background:
    radial-gradient(70% 120% at 50% 0%, rgba(240,138,60,.18), transparent 70%),
    var(--surface);
}
.pricing__card p:not(.kicker) { max-width: 44ch; margin: 0 auto 28px; }

/* Footer */
.footer { border-top: 1px solid var(--border); padding: 28px 0; background: var(--ride-bg); }
.footer__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.footer .brand { font-size: 18px; }
.footer nav { display: flex; gap: 24px; }
.footer nav a { color: var(--faint); font-size: 14px; text-decoration: none; }
.footer nav a:hover { color: var(--text); }

a:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }

/* Responsive */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }
  .hero { padding-top: 48px; }
  .hero__inner, .feature { grid-template-columns: 1fr; gap: 40px; }
  .feature { padding: 48px 0; }
  .feature--flip .feature__copy { order: 0; }
  .phone--hero { max-width: 280px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .gear { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .brand span { display: none; }
  .phone { border-radius: 32px; padding: 6px; }
  .phone img { border-radius: 26px; }
  .phone--offset { transform: translateY(24px); }
  .duo { gap: 12px; }
  .stat .metric { font-size: 40px; }
  .zones { padding: 10px; gap: 4px; }
  .zones span { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .store { transition: none; }
}
@media (max-width: 900px) {
  .hero__bg { opacity: .45; object-position: 45% 100%; }
  .hero::before { background: linear-gradient(180deg, var(--bg) 30%, transparent 70%); }
}

/* Long-form pages (privacy policy, 404) */
.prose { max-width: 760px; padding: 56px 0 96px; }
.prose h1 { margin-bottom: 12px; }
.prose h2 { font: 700 30px/1.1 var(--display); margin: 48px 0 14px; scroll-margin-top: 80px; }
.prose p, .prose li { color: var(--muted); }
.prose strong { color: var(--text); font-weight: 600; }
.prose a { color: var(--speed); }
.prose ul, .prose ol { padding-left: 22px; margin: 0 0 16px; }
.prose li { margin-bottom: 6px; }
.prose code { font-size: .9em; background: var(--surface-high); padding: 1px 6px; border-radius: 6px; }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 48px 0 20px; }
