/*
  RIDE website: shared stylesheet for every page of ride-app.eu.
  Light theme on white. Every color is a token on :root, so a dark variant
  later is one extra block of tokens. Brand, metric, grade and zone colors
  follow Theme.swift in the app, with Apple's light system variants for the
  metric colors and darker "ink" variants where a color is used as text.
  Holds the page frame (header, footer, buttons, sections), the screenshot
  placeholders, the home page sections and the support and legal pages.
*/

:root {
  color-scheme: light;

  --bg: #ffffff;
  --bg-soft: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #515154;
  --ink-3: #6e6e73;
  --line: rgba(0, 0, 0, 0.1);
  --line-strong: rgba(0, 0, 0, 0.18);
  --panel: #f5f5f7;
  --header-bg: rgba(255, 255, 255, 0.84);
  --shadow: 0 18px 44px -20px rgba(0, 0, 0, 0.22);
  --glow: rgba(232, 56, 155, 0.07);

  --cta-bg: #1d1d1f;
  --cta-ink: #ffffff;

  /* Device frames and screenshots: the ride screen in the app is always dark. */
  --device: #1d1d1f;
  --screen: #0e121a;

  --gold: #f2b441;
  --pink: #e8389b;
  --blue: #2e6be6;
  --brand: linear-gradient(90deg, var(--gold), var(--pink) 50%, var(--blue));
  /* Same gradient with a deeper gold, so large text keeps its contrast on white. */
  --brand-text: linear-gradient(90deg, #c27c00, var(--pink) 50%, var(--blue));

  --power: #007aff;
  --heart: #ff3b30;
  --cadence: #ff9500;
  --speed: #34c759;
  --strava: #fc5200;

  --power-ink: #0058c7;
  --heart-ink: #d70015;
  --cadence-ink: #b25000;
  --speed-ink: #1f7a36;
  --gold-ink: #946000;
  --strava-ink: #c43f00;

  --grade-down: #007aff;
  --grade-easy: #34c759;
  --grade-moderate: #ffcc00;
  --grade-hard: #ff9500;
  --grade-extreme: #ff3b30;

  --z1: #8e8e93;
  --z2: #007aff;
  --z3: #34c759;
  --z4: #ffcc00;
  --z5: #ff9500;
  --z6: #ff3b30;
  --z7: #af52de;

  --font-display: "Barlow Semi Condensed", "Arial Narrow", "Roboto Condensed", system-ui, sans-serif;
  --font-body: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --step--1: 0.8125rem;
  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
  --step-3: clamp(2.125rem, 1.4rem + 3vw, 3.5rem);
  --step-4: clamp(2.75rem, 1.5rem + 5.6vw, 6.25rem);

  --r-panel: 22px;
  --r-thin: 14px;
  --r-chip: 8px;

  --gutter: clamp(16px, 4vw, 40px);
  --section-pad: clamp(72px, 9vw, 128px);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */

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

html { scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.005em;
  text-wrap: balance;
}
p { margin: 0; }
a { color: inherit; }
img, svg, canvas { max-width: 100%; }

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

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-left: max(var(--gutter), env(safe-area-inset-left, 0px));
  padding-right: max(var(--gutter), env(safe-area-inset-right, 0px));
}

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

.skip-link {
  position: absolute;
  left: 16px;
  top: -60px;
  z-index: 50;
  padding: 10px 16px;
  border-radius: var(--r-chip);
  background: var(--cta-bg);
  color: var(--cta-ink);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

/* Uppercase label, as Theme.Labels in the app. */
.label {
  font-family: var(--font-display);
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.gradient-text {
  background: var(--brand-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.fine { color: var(--ink-3); font-size: 0.875rem; line-height: 1.5; }

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  border: 1px solid transparent;
  font: 700 1rem/1 var(--font-body);
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.15s ease-out, background-color 0.2s ease-out, box-shadow 0.25s ease-out;
}
.btn:active { transform: scale(0.98); }
.btn svg { flex: none; }

.btn-primary {
  background: var(--cta-bg);
  color: var(--cta-ink);
  box-shadow: 0 12px 30px -12px rgba(232, 56, 155, 0.6);
}
.btn-primary:hover { box-shadow: 0 16px 38px -10px rgba(232, 56, 155, 0.75); }

.btn-ghost {
  background: var(--bg);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--bg-soft); }

.btn-small { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(160%) blur(18px);
  backdrop-filter: saturate(160%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 68px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: none;
}
.wordmark img {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--line);
}
.wordmark b {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.primary-nav { margin-left: auto; }
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none;
  transition: color 0.2s, background-color 0.2s;
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }

.menu-button {
  display: none;
  margin-left: auto;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

.mobile-menu {
  border-top: 1px solid var(--line);
  padding-block: 8px 16px;
}
.mobile-menu ul { list-style: none; margin: 0; padding: 0; display: grid; }
.mobile-menu a {
  display: flex;
  align-items: center;
  min-height: 48px;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
}

@media (max-width: 880px) {
  .primary-nav { display: none; }
  .menu-button { display: inline-flex; }
  .site-header .header-cta { display: none; }
}

/* ---------- Sections ---------- */

.section { padding-block: var(--section-pad); position: relative; }
.section + .section { border-top: 1px solid var(--line); }

.section-head {
  display: grid;
  gap: 18px;
  max-width: 760px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
.section-head h2 { font-size: var(--step-3); }
.section-head p { color: var(--ink-2); font-size: var(--step-1); line-height: 1.5; max-width: 62ch; }
.section-head a { color: var(--power-ink); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--r-panel);
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-chip);
  border: 1px solid var(--line-strong);
  background: var(--bg);
  font-family: var(--font-display);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}

.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: currentColor; }

/* Two columns: a screenshot next to text. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split-flip { grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr); }
.split-flip > .device { order: 2; }
@media (max-width: 900px) {
  .split, .split-flip { grid-template-columns: minmax(0, 1fr); }
  .split-flip > .device { order: 0; }
}

/* ---------- Devices and screenshot placeholders ---------- */

.device {
  position: relative;
  margin: 0 auto;
  background: var(--device);
  box-shadow: var(--shadow), 0 30px 80px -50px rgba(232, 56, 155, 0.5);
}
.device-phone {
  width: min(300px, 100%);
  aspect-ratio: 1179 / 2556;
  border-radius: 46px;
  padding: 10px;
}
.device .screen {
  height: 100%;
  overflow: hidden;
  background: var(--screen);
  border-radius: 36px;
}
.device .screen img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Two phones next to each other, the second one a little lower. */
.device-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(14px, 3vw, 28px); align-items: start; }
.device-pair .device-phone { width: 100%; max-width: 270px; }
.device-pair .device-phone + .device-phone { margin-top: 48px; }
@media (max-width: 480px) { .device-pair .device-phone { border-radius: 30px; padding: 6px; } .device-pair .screen { border-radius: 25px; } }

/* ---------- FAQ ---------- */

.faq-list { display: grid; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); }
.faq-list summary {
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-height: 64px;
  padding-block: 16px;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  line-height: 1.2;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "";
  width: 12px;
  height: 12px;
  flex: none;
  border-right: 2px solid var(--ink-3);
  border-bottom: 2px solid var(--ink-3);
  transform: rotate(45deg) translateY(-3px);
  transition: transform 0.2s var(--ease-out);
}
.faq-list details[open] summary::after { transform: rotate(-135deg) translateY(-3px); }
.faq-list details p { color: var(--ink-2); padding-bottom: 20px; max-width: 64ch; }
.faq-list details a { color: var(--power-ink); }

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 56px 40px;
  background: var(--bg-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 32px;
}
.footer-grid h3 { font-size: var(--step--1); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.footer-grid a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  color: var(--ink-2);
  text-decoration: none;
}
.footer-grid a:hover { color: var(--ink); }
.footer-brand p { color: var(--ink-2); margin-top: 14px; max-width: 30ch; }
.footer-grid .footer-mail { font-family: var(--font-mono); font-size: 0.9375rem; color: var(--ink); }
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 0.875rem;
}
.footer-legal a { color: var(--ink-3); }
.footer-legal a:hover { color: var(--ink); }

@media (max-width: 820px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}

/* ================= Home page ================= */

/* ---------- Intro ---------- */

.intro {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(64px, 8vw, 112px);
  background: radial-gradient(70% 90% at 50% -10%, var(--glow), transparent 70%), var(--bg);
}
.intro-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 82%, transparent), radial-gradient(ellipse 34% 40% at 28% 48%, rgb(0 0 0 / 0.2), #000);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 82%, transparent), radial-gradient(ellipse 34% 40% at 28% 48%, rgb(0 0 0 / 0.2), #000);
  mask-composite: intersect;
}
.intro-lines canvas { width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 0.6s ease-out; }

.intro-grid {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.intro-copy { display: grid; gap: 24px; justify-items: start; min-width: 0; }
.intro-eyebrow { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; }
.chip-beta .dot { color: var(--speed); box-shadow: 0 0 0 4px rgba(52, 199, 89, 0.2); }
.intro h1 {
  font-size: var(--step-4);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  max-width: 11ch;
}
.intro-lead { font-size: var(--step-1); line-height: 1.5; color: var(--ink-2); max-width: 46ch; }
.intro-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.intro-fine { color: var(--ink-3); font-size: 0.9375rem; }
.intro-fine b { color: var(--ink); font-weight: 600; }

.intro-device { position: relative; display: grid; justify-items: center; min-width: 0; }

.float-card {
  position: absolute;
  z-index: 2;
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 14px;
  border-radius: var(--r-thin);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  font-size: 0.875rem;
  line-height: 1.25;
  white-space: nowrap;
}
.float-card b { display: block; font-weight: 600; }
.float-card span { color: var(--ink-2); }
.float-trainer { top: 18%; right: calc(50% + 110px); }
.float-strava { bottom: 12%; left: calc(50% + 115px); }
.float-strava .dot { color: var(--strava); }
.float-trainer .dot { color: var(--speed); }

@media (max-width: 1100px) {
  .float-trainer { right: calc(50% + 90px); }
  .float-strava { left: calc(50% + 90px); }
}
@media (max-width: 960px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr); }
  .intro h1 { max-width: 12ch; }
  .float-trainer { top: 10%; right: auto; left: 0; }
  .float-strava { bottom: 8%; left: auto; right: 0; }
}
@media (max-width: 520px) {
  .float-card { display: none; }
}

/* ---------- Ride modes ---------- */

.modes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.mode { display: grid; gap: 10px; align-content: start; padding: 28px 28px 8px 0; min-width: 0; }
.mode + .mode { padding-left: 28px; border-left: 1px solid var(--line); }
.mode-art { display: block; width: 100%; height: 72px; margin-bottom: 10px; }
.mode h3 { font-size: var(--step-2); }
.mode p:not(.label) { color: var(--ink-2); }
@media (max-width: 900px) {
  .modes { grid-template-columns: minmax(0, 1fr); }
  .mode, .mode + .mode { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Climb profile ---------- */

.climb { padding: clamp(20px, 3vw, 32px); display: grid; gap: 24px; background: var(--bg); box-shadow: var(--shadow); }
.climb-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px 40px; align-items: end; }
.climb-head h3 { font-size: var(--step-2); }
.climb-head h3 span { color: var(--ink-3); font-weight: 500; }
.climb-head .label { margin-top: 8px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.chip-free { color: var(--speed-ink); border-color: rgba(31, 122, 54, 0.5); }
.stat-row { display: flex; flex-wrap: wrap; gap: 12px 36px; margin: 0; }
.stat-row div { display: grid; gap: 2px; }
.stat-row dt { margin: 0; }
.stat-row dd { margin: 0; font-family: var(--font-display); font-size: 2rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-row dd small { font-size: 1rem; font-weight: 500; color: var(--ink-3); margin-left: 3px; }

.climb-chart { position: relative; border-radius: var(--r-thin); cursor: ew-resize; touch-action: pan-y; }
.climb-chart canvas { display: block; width: 100%; height: clamp(220px, 30vw, 340px); }
.climb-chart:focus-within { outline: 2px solid var(--power); outline-offset: 6px; }
.scrub {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  pointer-events: none;
}

.climb-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 20px; align-items: center; }
.readout {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, auto));
  gap: 8px 32px;
  margin: 0;
}
.readout div { display: grid; gap: 2px; min-width: 0; }
.readout dd { margin: 0; font-family: var(--font-display); font-size: 1.75rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: center; gap: 8px; }
.readout dd small { font-size: 0.9375rem; font-weight: 500; color: var(--ink-3); }
.readout .grade-swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--grade-hard); }

.rider {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 20px 36px;
  align-items: end;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}
.rider-input { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: baseline; min-width: 0; }
.rider-input output { font-family: var(--font-display); font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.rider-input input { grid-column: 1 / -1; width: 100%; margin: 0; accent-color: var(--pink); min-height: 32px; cursor: pointer; }
.rider-input input:focus-visible { outline: 2px solid var(--power); outline-offset: 4px; }
.rider-result { display: grid; gap: 4px; text-align: right; }
.rider-time { font-family: var(--font-display); font-size: clamp(2.25rem, 5vw, 3rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.rider-sub { color: var(--ink-2); font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
@media (max-width: 760px) {
  .rider { grid-template-columns: minmax(0, 1fr); }
  .rider-result { text-align: left; }
}

.grade-legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 20px; }
.grade-legend li { display: flex; gap: 8px; align-items: center; font-size: 0.875rem; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.grade-legend i { width: 18px; height: 8px; border-radius: 3px; background: var(--c); }

.route-notes { margin-top: clamp(48px, 7vw, 88px); }
.notes { display: grid; gap: 28px; }
.notes div { display: grid; gap: 6px; }
.notes h3 { font-size: var(--step-2); }
.notes p { color: var(--ink-2); }

@media (max-width: 900px) {
  .readout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- GPX ---------- */

.gpx-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 72px); align-items: center; }
.gpx-grid .section-head { margin-bottom: 0; }
.gpx-visual { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 14px; align-items: center; }
.gpx-file, .gpx-route { padding: 18px; display: grid; gap: 12px; min-width: 0; }
.gpx-route { background: var(--bg); box-shadow: var(--shadow); }
.file-head { display: flex; gap: 10px; align-items: center; font-size: 0.9375rem; color: var(--ink-2); min-width: 0; }
.file-head span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-badge { font-family: var(--font-display); font-weight: 700; font-size: 0.75rem; letter-spacing: 0.08em; padding: 3px 7px; border-radius: 6px; background: var(--bg); border: 1px solid var(--line); color: var(--ink); }
.gpx-file pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.6;
  color: var(--ink-3);
  overflow-x: auto;
}
.gpx-file pre em { font-style: normal; color: var(--gold-ink); }
.gpx-arrow { color: var(--ink-3); }
.gpx-route canvas { width: 100%; height: 96px; display: block; }
.gpx-route h3 { font-size: 1.25rem; }
.gpx-route p { color: var(--ink-2); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
.chip-ready { color: var(--power-ink); border-color: rgba(0, 88, 199, 0.45); justify-self: start; }
@media (max-width: 960px) { .gpx-grid { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 560px) {
  .gpx-visual { grid-template-columns: minmax(0, 1fr); }
  .gpx-arrow { justify-self: center; transform: rotate(90deg); }
}

/* ---------- Workouts ---------- */

.workout-card { padding: clamp(20px, 3vw, 32px); display: grid; gap: 22px; background: var(--bg); box-shadow: var(--shadow); }
.workout-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; align-items: end; }
.workout-head h3 { font-size: var(--step-2); }
.workout-head p { color: var(--ink-2); margin-top: 6px; max-width: 52ch; }
#workout-canvas { width: 100%; height: clamp(180px, 22vw, 240px); display: block; }
.zone-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.zone-legend li { display: grid; gap: 4px; padding-top: 10px; border-top: 3px solid var(--c); min-width: 0; }
.zone-legend b { font-family: var(--font-display); font-weight: 600; font-size: 1.0625rem; line-height: 1; }
.zone-legend span { font-size: 0.8125rem; color: var(--ink-2); line-height: 1.25; overflow-wrap: anywhere; }
.zone-legend em { font-style: normal; font-size: 0.8125rem; color: var(--ink-3); font-variant-numeric: tabular-nums; }

.workout-more { margin-top: clamp(48px, 7vw, 88px); }
.feature-list { list-style: none; margin: 0; padding: 0; display: grid; border-top: 1px solid var(--line); }
.feature-list li { display: grid; gap: 4px; padding-block: 18px; border-bottom: 1px solid var(--line); }
.feature-list h3 { font-size: 1.375rem; }
.feature-list p { color: var(--ink-2); }
@media (max-width: 1000px) { .zone-legend { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 480px) { .zone-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Connections ---------- */

.connections-copy { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.connections-copy .section-head { margin-bottom: 0; }
@media (max-width: 900px) { .connections-copy { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Privacy ---------- */

.privacy-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); }
.privacy-grid h2 { font-size: var(--step-4); text-transform: uppercase; line-height: 0.92; margin-top: 18px; }
.promise-list { list-style: none; margin: 0; padding: 0; display: grid; }
.promise-list li { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 4px 18px; padding-block: 22px; border-bottom: 1px solid var(--line); }
.promise-list li:first-child { padding-top: 0; }
.promise-list svg { grid-row: span 2; color: var(--ink); width: 28px; height: 28px; margin-top: 2px; }
.promise-list h3 { font-size: 1.375rem; }
.promise-list p { color: var(--ink-2); }
@media (max-width: 900px) { .privacy-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- What RIDE is ---------- */

.is-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.is-list article { padding: 28px 28px 8px 0; display: grid; gap: 12px; align-content: start; }
.is-list article + article { padding-left: 28px; border-left: 1px solid var(--line); }
.is-list h3 { font-size: var(--step-3); line-height: 0.95; }
.is-list h3::after {
  content: "";
  display: block;
  width: 56px;
  height: 4px;
  margin-top: 14px;
  border-radius: 2px;
  background: var(--brand);
}
.is-list p { color: var(--ink-2); }
@media (max-width: 900px) {
  .is-list { grid-template-columns: minmax(0, 1fr); }
  .is-list article, .is-list article + article { padding: 24px 0; border-left: 0; border-bottom: 1px solid var(--line); }
}

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { padding: 28px; display: grid; gap: 14px; align-content: start; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--panel); }
.plan-featured {
  background:
    linear-gradient(var(--bg), var(--bg)) padding-box,
    var(--brand) border-box;
  border: 1.5px solid transparent;
  box-shadow: 0 30px 70px -36px rgba(232, 56, 155, 0.55);
}
.plan-top { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.plan h3 { font-size: var(--step-2); }
.chip-save { color: var(--gold-ink); border-color: rgba(148, 96, 0, 0.45); }
.price { display: flex; align-items: baseline; gap: 8px; }
.price b { font-family: var(--font-display); font-size: clamp(3rem, 2.2rem + 2.4vw, 4.25rem); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.price span { color: var(--ink-2); }
.plan .per { color: var(--ink-2); }
.plan-includes { background: var(--bg); }
.plan-includes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.plan-includes li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 10px; color: var(--ink); }
.plan-includes svg { color: var(--speed-ink); margin-top: 4px; }
.free-tier {
  margin-top: 16px;
  padding: 24px 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.free-tier .mini-climb { width: 140px; height: 56px; display: block; }
.free-tier h3 { font-size: 1.5rem; margin-top: 6px; }
.free-tier p:last-child { color: var(--ink-2); margin-top: 6px; }
.pricing-fine { margin-top: 16px; }
@media (max-width: 1000px) {
  .plans { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .plan-includes { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .plans { grid-template-columns: minmax(0, 1fr); }
  .free-tier { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- FAQ section ---------- */

.faq-grid { display: grid; grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); gap: clamp(32px, 6vw, 80px); }
.faq-grid .section-head { margin-bottom: 0; align-content: start; }
@media (max-width: 900px) { .faq-grid { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Join the beta ---------- */

.beta {
  position: relative;
  overflow: hidden;
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
  background: radial-gradient(60% 80% at 50% 110%, rgba(232, 56, 155, 0.1), transparent 70%), var(--bg);
}
.beta-inner { display: grid; gap: 22px; justify-items: center; text-align: center; }
.beta-icon { width: 96px; height: 96px; border-radius: 22px; box-shadow: 0 20px 50px -14px rgba(232, 56, 155, 0.5), 0 0 0 1px var(--line); }
.beta h2 { font-size: var(--step-4); text-transform: uppercase; line-height: 0.9; }
.beta-inner > p { color: var(--ink-2); font-size: var(--step-1); max-width: 52ch; }
.steps {
  list-style: none;
  margin: 8px 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
  max-width: 900px;
  counter-reset: step;
}
.steps li {
  counter-increment: step;
  display: grid;
  gap: 6px;
  padding: 22px;
  text-align: left;
  border-radius: var(--r-panel);
  border: 1px solid var(--line);
  background: var(--panel);
}
.steps li::before {
  content: counter(step);
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 1;
  background: var(--brand-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.steps h3 { font-size: 1.375rem; }
.steps p { color: var(--ink-2); font-size: 0.9875rem; }
.desktop-note { display: none; }
@media (hover: hover) and (pointer: fine) { .desktop-note { display: block; } }
@media (max-width: 760px) { .steps { grid-template-columns: minmax(0, 1fr); } }

/* ================= Support and legal pages ================= */

.doc-hero {
  position: relative;
  padding-block: clamp(56px, 8vw, 104px) clamp(32px, 4vw, 48px);
  background: radial-gradient(60% 120% at 50% -20%, var(--glow), transparent 70%), var(--bg);
  border-bottom: 1px solid var(--line);
}
.doc-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  background: var(--brand);
  opacity: 0.8;
}
.doc-hero .wrap { display: grid; gap: 14px; }
.doc-hero h1 { font-size: var(--step-4); text-transform: uppercase; letter-spacing: 0.01em; }
.doc-updated { color: var(--ink-3); }

.doc-layout {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: clamp(32px, 6vw, 88px);
  padding-block: clamp(40px, 6vw, 72px) var(--section-pad);
}
.doc-toc { position: sticky; top: 96px; align-self: start; }
.doc-toc ol { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 2px; }
.doc-toc a {
  display: flex;
  align-items: center;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 10px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 0.9375rem;
  line-height: 1.35;
}
.doc-toc a:hover { color: var(--ink); background: var(--bg-soft); }

.doc-body { max-width: 70ch; min-width: 0; }
.doc-body h2 { font-size: var(--step-2); margin: 44px 0 14px; scroll-margin-top: 96px; }
.doc-body h2:first-child { margin-top: 0; }
.doc-body h3 { font-size: var(--step-1); margin: 26px 0 10px; }
.doc-body p, .doc-body li { color: var(--ink-2); }
.doc-body p { margin-bottom: 14px; }
.doc-body ul { margin: 0 0 14px; padding-left: 1.2em; display: grid; gap: 6px; }
.doc-body strong { color: var(--ink); font-weight: 600; }
.doc-body a { color: var(--power-ink); }
.doc-body table { width: 100%; border-collapse: collapse; margin: 0 0 14px; font-size: 0.9375rem; }
.doc-body th, .doc-body td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); color: var(--ink-2); }
.doc-body th { color: var(--ink); font-weight: 600; }
.doc-body .table-scroll { overflow-x: auto; }

@media (max-width: 860px) {
  .doc-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-toc { position: static; }
  .doc-toc ol { grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
