/* Ghostrun website. Tokens match src/theme/tokens.ts and the approved design
   preview (design/vorschau.html). Dark-only by design, like the app.
   Fonts are self-hosted so visitors' IPs never go to Google. */
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url("/assets/fonts/BarlowCondensed_800ExtraBold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter_400Regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter_600SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/Inter_700Bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }

:root {
  --ghost: #00E5CC;
  --behind: #FF5A4E;
  --bg: #0A0D0F;
  --s1: #13181B;
  --s2: #1C2327;
  --text: #F2F6F7;
  --text2: #8A979C;
  --map: #0E1215;
  --street: #1A2024;
  --ghost-a12: rgba(0, 229, 204, .12);
  --ghost-a50: rgba(0, 229, 204, .5);
  --num: "Barlow Condensed", "Arial Narrow", sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 17px/1.55 var(--body); padding-inline: 20px; }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }
.num { font-family: var(--num); font-variant-numeric: tabular-nums; }
.label { font: 600 13px/1.2 var(--num); letter-spacing: .12em; text-transform: uppercase; color: var(--text2); }
.muted { color: var(--text2); }
.small { font-size: 14px; line-height: 1.45; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }

/* ---------- Header / footer ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10; margin-inline: -20px; padding: 14px 20px;
  background: rgba(10, 13, 15, .86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.site-header .in { max-width: 1120px; margin: 0 auto; display: flex; align-items: center; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 34px; height: 34px; }
.brand span { font: 800 26px/1 var(--num); letter-spacing: 2px; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 22px; font-size: 15px; }
.nav a { text-decoration: none; color: var(--text2); }
.nav a:hover { color: var(--text); }
.nav .btn { min-height: 40px; padding: 0 18px; width: auto; font-size: 15px; }
@media (max-width: 640px) { .nav a:not(.btn) { display: none; } }

.site-footer { max-width: 1120px; margin: 0 auto; padding: 40px 0 48px; display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; color: var(--text2); font-size: 14px; }
.site-footer a { color: var(--text2); }
.site-footer a:hover { color: var(--text); }
.site-footer .brand { margin-right: auto; }
.site-footer .brand span { font-size: 20px; }
.site-footer .brand img { width: 26px; height: 26px; }

/* ---------- Buttons ---------- */
.btn {
  appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: 12px; border: 1.5px solid transparent;
  font: 600 16px var(--body); text-decoration: none; cursor: pointer; width: 100%;
  transition: transform .15s, opacity .15s, background-color .15s;
}
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .4; cursor: default; }
.btn.primary { background: var(--ghost); color: var(--bg); }
.btn.primary:hover { background: #2AF0DA; }
.btn.secondary { background: var(--s2); color: var(--text); }
.btn.secondary:hover { background: #242D32; }
.btn.google { background: #FFFFFF; color: #1F1F1F; border-color: #DADCE0; }
.btn.google:hover { background: #F2F2F2; }
.btn.google svg { width: 20px; height: 20px; flex: none; }
.link { appearance: none; background: none; border: 0; color: var(--text2); font: 600 15px var(--body); cursor: pointer; padding: 8px 0; align-self: center; text-decoration: none; }
.link:hover { color: var(--text); }

/* ---------- Landing ---------- */
.page { max-width: 1120px; margin: 0 auto; }
.hero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding: 56px 0 96px; }
.hero h1 { font: 800 clamp(56px, 8.5vw, 104px)/.88 var(--num); text-transform: uppercase; letter-spacing: -.005em; }
.hero h1 em { font-style: normal; color: var(--ghost); }
.hero .lead { font-size: 19px; color: var(--text2); max-width: 34ch; margin-top: 24px; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero .ctas .btn { width: auto; }
.hero .soon { margin-top: 18px; font-size: 14px; color: var(--text2); }
.hero-visual { display: flex; justify-content: center; position: relative; }
@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; gap: 48px; padding-top: 32px; }
}

.section { padding: 72px 0; }
.section-head { display: flex; flex-direction: column; gap: 10px; max-width: 60ch; margin-bottom: 36px; }
.section-head h2 { font: 800 clamp(36px, 5vw, 56px)/.95 var(--num); text-transform: uppercase; }
.section-head p { color: var(--text2); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 880px) { .steps { grid-template-columns: 1fr; } }
.step { background: var(--s1); border-radius: 20px; overflow: hidden; display: flex; flex-direction: column; min-width: 0; }
.step .visual { aspect-ratio: 4 / 3; background: var(--map); position: relative; overflow: hidden; }
.step .visual svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.step .text { padding: 20px 22px 24px; display: flex; flex-direction: column; gap: 8px; }
.step .n { font: 800 15px/1 var(--num); color: var(--text2); letter-spacing: .12em; }
.step h3 { font: 600 21px/1.25 var(--body); }
.step p { color: var(--text2); font-size: 16px; }

.board { position: absolute; inset: 16px; display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.board .row { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--s2); }
.board .row.pick { background: var(--ghost-a12); box-shadow: inset 0 0 0 1.5px var(--ghost); }
.board .rk { font: 800 20px/1 var(--num); color: var(--text2); }
.board .nm { font-size: 15px; font-weight: 600; }
.board .tm { font: 700 22px/1 var(--num); font-variant-numeric: tabular-nums; }

.gapcard { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: flex-start; padding: 0 26px; gap: 6px; }
.gapcard .big { font: 800 96px/.85 var(--num); color: var(--ghost); font-variant-numeric: tabular-nums; }
.gapcard .big small { font-size: 44px; }
.gapcard .word { font: 800 24px/1 var(--num); text-transform: uppercase; letter-spacing: .06em; color: var(--ghost); }
.gapcard .sub { font: 600 18px/1 var(--num); color: var(--text2); letter-spacing: .04em; }

.features { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
@media (max-width: 760px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--s1); border-radius: 20px; padding: 26px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.feature h3 { font: 600 21px/1.25 var(--body); }
.feature p { color: var(--text2); font-size: 16px; }
.feature .quote { margin-top: 6px; padding: 14px 16px; border-radius: 12px; background: var(--s2); font-size: 15px; display: flex; gap: 12px; align-items: center; }
.feature .quote svg { flex: none; width: 22px; height: 22px; color: var(--ghost); }
.feature .split { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.feature .split span { font: 700 15px/1 var(--num); letter-spacing: .1em; text-transform: uppercase; padding: 9px 12px; border-radius: 8px; background: var(--s2); }

.cta-band { margin: 24px 0 40px; border-radius: 24px; background: var(--s1); padding: 48px 32px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.cta-band h2 { font: 800 clamp(34px, 5vw, 52px)/.95 var(--num); text-transform: uppercase; max-width: 16ch; }
.cta-band .btn { width: auto; }

/* ---------- Phone mockup (race screen, as in the design preview) ---------- */
.phone {
  width: 100%; max-width: 330px; aspect-ratio: 330 / 690; background: var(--bg); border-radius: 44px;
  border: 9px solid #1A1F22; box-shadow: 0 0 0 1px #2A3236, 0 40px 80px rgba(0,0,0,.55), 0 0 120px rgba(0,229,204,.08);
  overflow: hidden; display: flex; flex-direction: column;
}
.phone .status { height: 38px; flex: none; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; font: 600 14px/1 var(--num); }
.phone .map { position: relative; flex: 1 1 auto; min-height: 0; background: var(--map); }
.phone .map svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.phone .seg { position: absolute; right: 12px; top: 12px; display: inline-flex; background: rgba(19,24,27,.92); border-radius: 999px; padding: 3px; border: 1px solid var(--s2); }
.phone .seg span { font: 700 13px/1 var(--num); letter-spacing: .1em; padding: 7px 12px; border-radius: 999px; color: var(--text2); }
.phone .seg span.on { background: var(--s2); color: var(--text); }
.phone .sheet { flex: none; padding: 16px 18px 22px; display: flex; flex-direction: column; gap: 12px; }
.phone .gap-row { display: flex; align-items: baseline; justify-content: space-between; }
.phone .gap { font: 800 88px/.82 var(--num); color: var(--ghost); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.phone .gap small { font-size: 42px; font-weight: 700; margin-left: 2px; }
.phone .gap-txt { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
.phone .gap-txt b { font: 700 22px/1 var(--num); text-transform: uppercase; letter-spacing: .06em; color: var(--ghost); }
.phone .gap-txt span { font: 600 18px/1 var(--num); color: var(--text2); font-variant-numeric: tabular-nums; }
.phone .prog { position: relative; height: 22px; }
.phone .prog .track { position: absolute; left: 0; right: 0; top: 10px; height: 3px; border-radius: 2px; background: var(--s2); }
.phone .prog .fill { position: absolute; left: 0; top: 10px; height: 3px; border-radius: 2px; background: var(--text); }
.phone .prog .m { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; }
.phone .prog .me { background: var(--text); box-shadow: 0 0 0 3px var(--bg); }
.phone .prog .gh { background: var(--ghost-a50); border: 2px solid var(--ghost); box-shadow: 0 0 10px var(--ghost-a50); }
.phone .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.phone .stats div { display: flex; flex-direction: column; gap: 3px; }
.phone .stats .label { font-size: 11px; }
.phone .stats .v { font: 700 30px/1 var(--num); font-variant-numeric: tabular-nums; }

@keyframes ring { 0% { r: 24; opacity: .6; } 75%, 100% { r: 46; opacity: 0; } }
.pulse { animation: ring 1.6s ease-out infinite; }
@keyframes glide { from { transform: translate(0, 0); } to { transform: translate(8px, -6px); } }
.ghost-dot { animation: glide 2.4s ease-in-out infinite alternate; }
@media (prefers-reduced-motion: reduce) { .pulse, .ghost-dot { animation: none; } html { scroll-behavior: auto; } }

/* ---------- Auth pages (like the app's auth screens) ---------- */
.auth { max-width: 440px; margin: 0 auto; padding: 32px 0 24px; display: flex; flex-direction: column; gap: 28px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.auth h1 { font: 700 30px/1.2 var(--body); }
.divider { display: flex; align-items: center; gap: 14px; color: var(--text2); font-size: 14px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--s2); }
.tabs { display: grid; grid-template-columns: 1fr 1fr; background: var(--s1); border-radius: 12px; padding: 4px; gap: 4px; }
.tabs button { appearance: none; border: 0; background: none; color: var(--text2); font: 600 15px var(--body); min-height: 42px; border-radius: 9px; cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--s2); color: var(--text); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field input {
  min-height: 52px; padding: 0 16px; border-radius: 12px; border: 1.5px solid var(--s1);
  background: var(--s1); color: var(--text); font: 400 16px var(--body); outline: none; width: 100%;
}
.field input:focus { border-color: var(--s2); }
.error { color: var(--behind); font-size: 14px; }
.error:empty { display: none; }
.info { color: var(--text2); font-size: 14px; }
.info:empty { display: none; }
.code { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.code input {
  min-height: 66px; min-width: 0; text-align: center; border-radius: 12px; border: 1.5px solid var(--s1);
  background: var(--s1); color: var(--text); font: 700 38px var(--num); font-variant-numeric: tabular-nums; outline: none;
}
.code input:focus { border-color: var(--ghost); }
.card { background: var(--s1); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.card strong { font-size: 21px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 720px; margin: 0 auto; padding: 32px 0; display: flex; flex-direction: column; gap: 14px; }
.legal h1 { font: 800 48px/1 var(--num); text-transform: uppercase; margin-bottom: 8px; }
.legal h2 { font: 600 20px/1.3 var(--body); margin-top: 18px; }
.legal p { color: #C9D2D5; }
.placeholder { background: rgba(255, 90, 78, .14); color: var(--behind); padding: 0 4px; border-radius: 4px; }
