/* RunToDrive — palette mirrors DesignSystem/Tokens/RTDColor.swift (iconMatch) */
:root {
  --bg: #081722;
  --bg-2: #142432;
  --surface: #19364a;
  --surface-2: #214c66;
  --accent: #7bc7ff;
  --accent-2: #d8f36a;
  --orange: #ff7a1a;
  --text: #f4f1e9;
  --text-2: #c7d2d8;
  --text-muted: #9aa3b5;
  --hairline: rgba(255, 255, 255, 0.05);
  --radius: 18px;
  --max: 1080px;
}

* { box-sizing: border-box; }

img { max-width: 100%; height: auto; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- nav ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 23, 34, 0.82);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--hairline);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  font-size: 19px;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }
.brand span { color: var(--accent); }
.nav a.link { color: var(--text-2); font-size: 15px; font-weight: 500; }
.nav a.link:hover { color: var(--text); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 16px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-2px); filter: brightness(1.06); }
.btn-primary { background: var(--accent); color: #081722; }
.btn-ghost { background: transparent; color: var(--text); border-color: rgba(255, 255, 255, 0.18); }

/* Apple-supplied badge art: never restyle it, only size it.
   Clear space is Apple's required 10% of badge height. */
.badge-appstore { display: inline-block; padding: 5px; transition: transform 0.15s ease; }
.badge-appstore:hover { transform: translateY(-2px); }
.badge-appstore img { display: block; height: 50px; width: auto; }

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 80px;
  border-bottom: 1px solid var(--hairline);
}
.hero::before {
  content: "";
  position: absolute;
  top: -320px;
  left: 50%;
  width: 900px;
  height: 700px;
  transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(123, 199, 255, 0.16), transparent 72%);
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid rgba(123, 199, 255, 0.32);
  background: rgba(123, 199, 255, 0.07);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 22px;
}
h1 {
  font-size: clamp(38px, 6vw, 62px);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 800;
  margin: 0 0 20px;
}
h1 .grad {
  background: linear-gradient(100deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede { font-size: 19px; color: var(--text-2); margin: 0 0 32px; max-width: 30em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.cta-note { font-size: 14px; color: var(--text-muted); margin-top: 14px; }

.phone {
  width: 100%;
  max-width: 320px;
  margin: 0 auto;
  display: block;
  border-radius: 34px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.65), 0 0 70px rgba(123, 199, 255, 0.12);
}

/* ---------- sections ---------- */
section { padding: 88px 0; border-bottom: 1px solid var(--hairline); }
.section-head { max-width: 34em; margin-bottom: 48px; }
h2 {
  font-size: clamp(28px, 4vw, 40px);
  letter-spacing: -0.03em;
  font-weight: 800;
  margin: 0 0 14px;
  line-height: 1.12;
}
.section-head p { color: var(--text-2); margin: 0; font-size: 18px; }

/* ---------- loop steps ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.step {
  background: linear-gradient(160deg, var(--surface), var(--bg-2));
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 24px 22px;
}
.step-n {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 10px;
}
.step h3 { margin: 0 0 8px; font-size: 18px; letter-spacing: -0.01em; }
.step p { margin: 0; color: var(--text-2); font-size: 15px; line-height: 1.55; }

/* ---------- features ---------- */
.feature {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  margin-bottom: 88px;
}
.feature:last-child { margin-bottom: 0; }
.feature.flip .feature-copy { order: 2; }
.feature h3 { font-size: 26px; letter-spacing: -0.025em; margin: 0 0 12px; }
.feature p { color: var(--text-2); margin: 0 0 16px; }
.tag {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}
.feature img {
  width: 100%;
  max-width: 290px;
  display: block;
  margin: 0 auto;
  border-radius: 30px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.ticks { list-style: none; padding: 0; margin: 0; color: var(--text-2); }
.ticks li { padding-left: 26px; position: relative; margin-bottom: 8px; font-size: 16px; }
.ticks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--accent);
}

/* ---------- promise ---------- */
.promise { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card h3 { margin: 0 0 8px; font-size: 18px; }
.card p { margin: 0; color: var(--text-2); font-size: 15px; }
.card.no::before { content: "✕"; color: var(--orange); font-weight: 800; display: block; margin-bottom: 10px; }
.card.yes::before { content: "✓"; color: var(--accent); font-weight: 800; display: block; margin-bottom: 10px; }

/* ---------- final cta ---------- */
.final { text-align: center; }
.final h2 { max-width: 16em; margin-inline: auto; }
.final p { color: var(--text-2); max-width: 32em; margin: 0 auto 30px; }

/* ---------- footer ---------- */
footer { padding: 44px 0 56px; color: var(--text-muted); font-size: 15px; }
.foot-inner { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; }
.foot-inner nav { margin-left: auto; display: flex; flex-wrap: wrap; gap: 22px; }
footer a { color: var(--text-2); }

/* ---------- legal / prose pages ---------- */
.prose { max-width: 760px; padding: 64px 0 88px; }
.prose h1 { font-size: clamp(32px, 5vw, 44px); margin-bottom: 10px; }
.prose .updated { color: var(--text-muted); font-size: 15px; margin: 0 0 40px; }
.prose h2 { font-size: 22px; margin: 40px 0 12px; letter-spacing: -0.02em; }
.prose h3 { font-size: 18px; margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-2); }
.prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose strong { color: var(--text); }
.prose table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15px; }
.prose th, .prose td {
  text-align: left;
  padding: 11px 12px;
  border-bottom: 1px solid var(--hairline);
  vertical-align: top;
  color: var(--text-2);
}
.prose th { color: var(--text); font-weight: 700; }
.callout {
  background: var(--surface);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 18px 20px;
  margin: 26px 0;
}
.callout p { margin: 0; }

/* ---------- feedback form ---------- */
.form { max-width: 620px; padding: 64px 0 88px; }
.field { margin-bottom: 22px; }
label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 8px; }
.hint { color: var(--text-muted); font-weight: 400; font-size: 14px; }
textarea, select {
  width: 100%;
  background: var(--bg-2);
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  font-size: 16px;
  resize: vertical;
}
textarea:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.counter { font-size: 13px; color: var(--text-muted); text-align: right; margin-top: 6px; }
.status { margin-top: 18px; font-size: 15px; min-height: 1.4em; }
.status.ok { color: var(--accent); }
.status.err { color: var(--orange); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

@media (max-width: 860px) {
  .hero { padding: 60px 0 56px; }
  .hero-grid, .feature, .feature.flip .feature-copy { grid-template-columns: 1fr; order: 0; }
  .hero-grid { gap: 40px; }
  .feature { gap: 32px; margin-bottom: 64px; }
  .steps, .promise { grid-template-columns: 1fr; }
  section { padding: 64px 0; }
  .nav a.link.hide-sm { display: none; }
}
