/* Colors are the app's own (dorado/src/constants/theme.ts), so the site and app match. */
:root {
  --text: #10182b;
  --background: #f4f7fb;
  --surface: #e8eef7;
  --selected: #dae4f2;
  --muted: #5a6478;
  --border: #d2dcea;
  --accent: #b8873d;

  /* Fixed brand pair: navy and gold look the same in light and dark mode, as in the app. */
  --navy: #0b1220;
  --gold: #d8b15e;

  --map-water: #9fd8ea;
  --map-land: #e3f1df;
  --map-road: #ffffff;
  --pin-ring: #ffffff;

  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --text: #f5f3ec;
    --background: #0b1220;
    --surface: #141c30;
    --selected: #1d2740;
    --muted: #98a1b3;
    --border: #243049;
    --accent: #d8b15e;

    --map-water: #0e2338;
    --map-land: #141c30;
    --map-road: #243049;
    --pin-ring: #141c30;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--text);
  background: var(--background);
  font: 500 16px/1.5 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2 { margin: 0; font-weight: 700; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.shell { width: min(100% - 32px, 1040px); margin: 0 auto; }

/* Header */
.header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--background) 85%, transparent);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.wordmark { font-size: 19px; font-weight: 700; letter-spacing: -0.02em; }
.header-link { color: var(--accent); font-size: 15px; font-weight: 600; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 64px;
  padding: 72px 0 96px;
}
.hero h1 { font-size: clamp(40px, 6vw, 60px); line-height: 1.05; }
.lede { max-width: 30em; margin: 20px 0 32px; color: var(--muted); font-size: 18px; }

.store-row { display: flex; flex-wrap: wrap; gap: 12px; }
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px 8px 14px;
  color: #fff;
  background: var(--navy);
  border: 1px solid var(--border);
  border-radius: 12px;
  font-size: 17px;
  font-weight: 600;
  line-height: 1.1;
  cursor: default;
}
.store-badge svg { width: 24px; height: 24px; }
.store-badge small { display: block; font-size: 11px; font-weight: 500; opacity: 0.8; }

/* Phone mockups: an iPhone-proportioned frame around HTML copies of the app's screens. */
.phone {
  position: relative;
  width: 300px;
  aspect-ratio: 300 / 640;
  margin: 0;
  padding: 10px;
  background: #1a1f2b;
  border-radius: 48px;
  box-shadow: 0 30px 60px -20px rgba(11, 18, 32, 0.35);
}
.screen {
  position: relative;
  height: 100%;
  overflow: hidden;
  padding: 0 14px;
  background: var(--background);
  border-radius: 38px;
  font-size: 12px;
}
/* The list scrolls under the tab bar, as in the app; fade it out so it doesn't peek below. */
.screen::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 90px;
  background: linear-gradient(transparent, var(--background) 70%);
}
.phone-map .screen::after { display: none; }
.status { height: 44px; padding: 14px 18px 0; font-size: 13px; font-weight: 600; }
.screen-title { padding: 6px 4px 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; }

.i { width: 16px; height: 16px; flex: none; color: var(--muted); }
.i-ink { color: var(--text); }

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 12px;
  color: var(--muted);
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  font-size: 13px;
}
.search span:first-of-type { flex: 1; }
.search-divider { width: 1px; height: 18px; background: var(--border); }

.race { margin-top: 14px; overflow: hidden; background: var(--surface); border-radius: 18px; }
.race-picture {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 10;
  color: var(--gold);
  background: var(--navy);
}
@media (prefers-color-scheme: dark) {
  .race { border: 1px solid var(--border); }
  .race-info { border-top: 1px solid var(--border); }
}
.race-glyph { width: 30px; height: 30px; }
.pill {
  position: absolute;
  left: 12px;
  bottom: 12px;
  padding: 1px 8px;
  color: var(--gold);
  background: var(--navy);
  border: 1px solid #243049;
  border-radius: 32px;
  font-size: 11px;
  font-weight: 700;
}
.glass-save {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--gold);
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  backdrop-filter: blur(8px);
}
.glass-save svg { width: 14px; height: 14px; }
.race-info { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px 14px; }
.race-info strong { font-size: 13px; font-weight: 600; }
.race-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.register { display: inline-flex; align-items: center; gap: 4px; margin-right: auto; color: var(--accent); font-weight: 600; }
.register svg { width: 11px; height: 11px; }

.tabs {
  position: absolute;
  z-index: 1;
  left: 12px;
  right: 12px;
  bottom: 14px;
  display: flex;
  justify-content: space-around;
  padding: 5px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  border: 1px solid var(--border);
  border-radius: 30px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
  backdrop-filter: blur(16px);
}
.tab {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 5px 0 4px;
  color: var(--muted);
  border-radius: 24px;
  font-size: 9.5px;
  font-weight: 600;
}
.tab svg { width: 18px; height: 18px; }
.tab.active { color: var(--accent); background: var(--selected); }

/* Map screen */
.phone-map .screen { padding: 0; }
.map { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone-map .status { position: relative; }
.search-floating { position: relative; margin: 0 14px; }
.pin {
  position: absolute;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  color: var(--navy);
  background: var(--gold);
  border: 3px solid var(--pin-ring);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  font-size: 11px;
  font-weight: 700;
  transform: translate(-50%, -50%);
}
.pin i { width: 8px; height: 8px; background: var(--navy); border-radius: 50%; }
.pin-group { width: 32px; height: 32px; }
.pin-selected { width: 38px; height: 38px; color: var(--gold); background: var(--navy); border-color: var(--gold); }

/* Features */
.features { padding: 96px 0; background: var(--surface); border-block: 1px solid var(--border); }
.features-inner { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 80px; }
.features .phone { background: #1a1f2b; }
.feature-list h2 { margin-bottom: 28px; font-size: clamp(30px, 4vw, 40px); }
dl { display: grid; gap: 24px; margin: 0; }
dl div { padding-left: 16px; border-left: 3px solid var(--accent); }
dt { font-size: 18px; font-weight: 600; }
dd { max-width: 28em; margin: 4px 0 0; color: var(--muted); }

/* Download */
.download { padding: 96px 0; text-align: center; }
.download h2 { font-size: clamp(28px, 4vw, 40px); }
.download p { margin: 12px 0 0; font-size: 17px; }

/* Footer */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 0 32px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}
.footer .wordmark { font-size: 16px; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--muted); }
.footer-links a:hover, .footer-links a[aria-current] { color: var(--text); }

/* Privacy and Terms: same layout as the app's legal screen. */
.legal { max-width: 680px; padding: 56px 0 80px; }
.legal h1 { font-size: clamp(32px, 5vw, 44px); }
.legal-updated { margin: 8px 0 24px; font-size: 14px; }
.legal-intro { margin: 0 0 8px; font-size: 17px; }
.legal section { margin-top: 32px; }
.legal h2 { margin-bottom: 8px; font-size: 17px; font-weight: 700; letter-spacing: 0; }
.legal section p { margin: 0 0 12px; color: var(--muted); }
.legal section a { color: var(--accent); }

@media (max-width: 820px) {
  .hero, .features-inner { grid-template-columns: minmax(0, 1fr); gap: 48px; }
  .hero { padding: 48px 0 72px; }
  .phone { justify-self: center; width: min(300px, 100%); }
  .features { padding: 72px 0; }
  .features-inner .phone { order: 2; }
  .download { padding: 72px 0; }
}
