* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --ink: #ffffff;
  --bg: #04060a;
  --muted: #a9b1bc;
  --f1-red: #e10600;
  --cyan: #00d2be;
  --blue: #0600ef;
}

html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, Segoe UI, Roboto, "Open Sans", sans-serif;
  font-weight: 300;
  background: var(--bg);
  color: var(--ink);
  overflow-x: hidden;
}

.background {
  background-image:
    radial-gradient(1400px 700px at 50% -15%, #0b1b34 0%, rgba(4,6,10,0.5) 60%, #04060a 85%),
    url("https://images.unsplash.com/photo-1504608524841-42fe6f032b4b?q=80&w=1920&auto=format&fit=crop"); /* night lights bokeh */
  background-position: center top;
  background-size: cover;
  width: 100vw; height: 100vh;
  position: relative;
  z-index: 1;
  box-shadow: 0 50px 50px rgba(0,0,0,0.85);
  overflow: hidden;
}

h1 {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 120;
  font-family: "Gruppo", cursive, system-ui;
  text-transform: uppercase;
  letter-spacing: .5rem;
  font-size: clamp(2rem, 6vw, 3.6rem);
  color: #fff;
  text-shadow: 0 10px 30px rgba(0,0,0,0.6);
  white-space: nowrap;
}

.scroll-hint {
  position: absolute; left: 50%; bottom: 18px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: .4rem;
  color: var(--muted); font-size: .9rem;
  opacity: .85; z-index: 130;
  animation: bob 1.8s ease-in-out infinite;
}
@keyframes bob { 0%,100%{transform: translate(-50%,0)} 50%{transform: translate(-50%,-6px)} }

.layer {
  position: absolute; inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  will-change: transform;
  pointer-events: none;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.layer-stars {
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, #cfe3ff 0 50%, transparent 55%),
    radial-gradient(1.2px 1.2px at 78% 28%, #cfe3ff 0 50%, transparent 55%),
    radial-gradient(2px 2px     at 42% 62%, #d8e7ff 0 50%, transparent 55%),
    radial-gradient(1px 1px     at 86% 46%, #cfe3ff 0 50%, transparent 55%),
    radial-gradient(1.3px 1.3px at 25% 70%, #cfe3ff 0 50%, transparent 55%),
    transparent;
  z-index: 30; opacity: .75;
}

.layer-lights {
  background:
    radial-gradient(500px 260px at 70% -10%, rgba(114,173,255,.35), transparent 60%),
    radial-gradient(360px 220px at 20% 0%, rgba(255,210,150,.25), transparent 70%);
  z-index: 35;
}

.layer-city {
  background-image: url("https://images.unsplash.com/photo-1520975916090-3105956dac38?q=80&w=1920&auto=format&fit=crop");
  background-position: center bottom;
  filter: saturate(.9) brightness(.8);
  opacity:.55; z-index: 40;
}

.layer-stand {
  background-image: url("https://images.unsplash.com/photo-1518546305927-5c7ee25338ce?q=80&w=1920&auto=format&fit=crop");
  background-position: center bottom;
  filter: saturate(.9) brightness(.85);
  opacity:.8; z-index: 60;
}

.layer-track {
  background-image:
    linear-gradient(to top, rgba(0,0,0,0) 40%, #000 95%),
    url("https://images.unsplash.com/photo-1517256064527-09c73fc73e38?q=80&w=1920&auto=format&fit=crop"); /* asphalt */
  background-position: center bottom;
  z-index: 70;
}

.layer-rails {
  background:
    repeating-linear-gradient(90deg, #fff 0 30px, #d00 30px 60px);
  mask-image: linear-gradient(to top, black 35%, transparent 70%);
  opacity:.2; z-index: 80;
}

.layer-smoke {
  background:
    url("https://images.unsplash.com/photo-1543269664-7eef42226a21?q=80&w=1600&auto=format&fit=crop") center/cover no-repeat;
  mix-blend-mode: screen;
  opacity:.18; z-index: 90;
}

.layer-flags {
  background:
    conic-gradient(from 45deg, #000 0 25%, #fff 0 50%, #000 0 75%, #fff 0 100%);
  background-size: 80px 80px;
  opacity:.06; z-index: 95;
}

.layer-fire {
  background:
    radial-gradient(6px 6px at 20% 20%, #ffd166 0 40%, transparent 45%),
    radial-gradient(6px 6px at 70% 30%, #ef476f 0 40%, transparent 45%),
    radial-gradient(6px 6px at 40% 60%, #06d6a0 0 40%, transparent 45%),
    radial-gradient(6px 6px at 85% 50%, #118ab2 0 40%, transparent 45%);
  opacity:.35; z-index: 100;
}

.content {
  position: relative;
  font-size: 1.1rem;
  line-height: 1.7;
  background-image: url("https://images.unsplash.com/photo-1519680772-8b5b0b0a0f6d?q=80&w=1920&auto=format&fit=crop"); /* pitlane vibe */
  background-size: cover;
  background-attachment: fixed;
  min-height: 160vh;
}

.car {
  position: absolute;
  z-index: 1000;
  width: 360px; height: auto;
  left: 8%;
  top: 58%;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,.6));
  will-change: transform;
  pointer-events: none;
}
.car-2 { left: 28%; top: 64%; }
.car-3 { left: 52%; top: 60%; }

.text {
  max-width: 1000px;
  padding: 5rem 2rem 8rem 2rem;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0,0,0,0.35);
}
.text h2 { font-size: 2rem; margin-bottom: .5rem; letter-spacing: .02em; }
.text h3 { margin-top: 2rem; font-size: 1.4rem; color: #dbe3ee; }

.footer {
  position: relative;
  z-index: 1001;
  padding: 3rem 2rem 6rem;
  color: var(--muted);
  text-align: center;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.footer a { color: var(--ink); }

@media (max-width: 1200px) {
  h1 { font-size: 2rem; letter-spacing: .2rem; white-space: normal; text-align: center; }
  .car { display: none; } 
  .text { padding: 2rem 1.2rem 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  .layer, .car { transform: none !important; animation: none !important; }
  .content { background-attachment: scroll; }
}
.chapter {
  position: relative;
  min-height: 220vh;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,.6) 40%, #000 100%);
}
.chapter__pin {
  position: sticky; top: 10vh;
  max-width: 900px; margin: 0 auto; padding: 2.5rem 1.5rem 3rem;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px;
  background: rgba(255,255,255,0.03);
  backdrop-filter: blur(6px);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}
.chapter h2 { font-size: 2rem; margin-bottom: .4rem; letter-spacing: .02em; }
.chapter__lead { color: #dbe3ee; margin-bottom: 1rem; }
.chapter__data { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.chapter__data strong { display: block; font-size: .85rem; color: #9fb0c8; letter-spacing: .06em; }
.chapter__data span { font-size: 1.25rem; opacity: 0; transform: translateY(12px); transition: .5s ease; }
.chapter__data span.revealed { opacity: 1; transform: translateY(0); }
@media (max-width: 900px) {
  .chapter__data { grid-template-columns: 1fr; }
}



