/* Race Stats site — same tokens as the app (constants/theme.ts). */
:root {
  --bg: #0a0e14;
  --low: #0f141a;
  --high: #1b2028;
  --highest: #20262f;
  --on: #f1f3fc;
  --onv: #a8abb3;
  --outline: rgba(68, 72, 79, 0.5);
  --accent: #f0d34f;
  --accent-soft: rgba(240, 211, 79, 0.12);
  --accent-border: rgba(240, 211, 79, 0.35);
  --success: #3ed071;
  --radius: 20px;
  --max: 880px;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--on);
  font-family: 'Roboto', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.6;
}

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

/* ── Header / footer ─────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--outline);
}
.nav-inner {
  max-width: var(--max);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--on);
  font-weight: 900;
  letter-spacing: 0.08em;
  font-size: 15px;
}
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.brand:hover { text-decoration: none; }
.nav-links { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.nav-links a { color: var(--onv); font-size: 14px; font-weight: 500; }
.nav-links a[aria-current='page'] { color: var(--accent); }

footer {
  border-top: 1px solid var(--outline);
  margin-top: 64px;
  padding: 28px 16px 40px;
  color: var(--onv);
  font-size: 14px;
}
.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.footer-inner nav { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-inner nav a { color: var(--onv); }

/* ── Layout ──────────────────────────────────────── */
main { max-width: var(--max); margin: 0 auto; padding: 0 16px; }

.kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}
h1 { font-size: clamp(32px, 7vw, 52px); line-height: 1.05; letter-spacing: -0.02em; margin: 10px 0 14px; font-weight: 900; }
h1 em { font-style: normal; color: var(--accent); }
h2 { font-size: 22px; margin: 40px 0 10px; letter-spacing: -0.01em; }
h3 { font-size: 17px; margin: 24px 0 6px; }
p, li { color: #d7dae2; }
.muted { color: var(--onv); }

/* ── Landing ─────────────────────────────────────── */
.hero { padding: 56px 0 24px; text-align: center; }
.hero p.lead { font-size: 18px; color: var(--onv); max-width: 560px; margin: 0 auto; }
.badges { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 28px; }
.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: 14px;
  background: var(--high);
  border: 1px solid var(--outline);
  color: var(--on);
  font-weight: 700;
}
.store-btn.primary { background: var(--accent); color: var(--bg); border-color: var(--accent); }
.store-btn:hover { text-decoration: none; filter: brightness(1.08); }
.store-btn svg { width: 20px; height: 20px; }

.shots {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin: 40px 0 8px;
}
.shots img { width: 100%; height: auto; border-radius: 16px; display: block; background: var(--low); }
@media (max-width: 720px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.feature { background: var(--high); border-radius: var(--radius); padding: 20px; }
.feature .icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 20px;
}
.feature h3 { margin: 12px 0 4px; }
.feature p { margin: 0; color: var(--onv); font-size: 15px; }

/* ── Documents (policy / terms / support) ────────── */
.doc { padding-top: 40px; }
.doc .meta { color: var(--onv); font-size: 14px; }
.summary {
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 24px 0 8px;
}
.summary ul { margin: 6px 0 0; padding-left: 20px; }
.card { background: var(--high); border-radius: var(--radius); padding: 4px 20px 16px; margin-top: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; margin-top: 8px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--outline); vertical-align: top; }
th { color: var(--onv); font-weight: 700; font-size: 13px; letter-spacing: 0.04em; }
.table-wrap { overflow-x: auto; }

details {
  background: var(--high);
  border-radius: 14px;
  padding: 14px 18px;
  margin-top: 10px;
}
details summary { cursor: pointer; font-weight: 700; list-style: none; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: '+'; float: right; color: var(--accent); font-weight: 700; }
details[open] summary::after { content: '–'; }
details p, details ol, details ul { margin: 10px 0 0; }

.contact {
  display: flex;
  gap: 16px;
  align-items: center;
  background: var(--high);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 24px;
}
.contact .icon { font-size: 28px; }

/* Keep the header on one line on phones. */
.brand { white-space: nowrap; }
@media (max-width: 480px) {
  .nav-inner { gap: 10px; }
  .brand { font-size: 13px; gap: 8px; }
  .brand img { width: 28px; height: 28px; }
  .nav-links { gap: 12px; flex-wrap: nowrap; }
  .nav-links a { font-size: 13px; }
}
