/* ============================================================
   HYPERDRIVE SIM RACING — design system
   Flat graphic motorsport-poster system. No gradients.
   ============================================================ */

:root{
  --carbon:#0A0A0B; --surface:#141417; --surface-2:#1C1C1F; --line:#26262B;
  --red:#FF1E1E; --red-press:#D81616; --blue:#2D7DFF;
  --ink:#E9E9EE; --muted:#9A9A9F; --white:#fff;
  --maxw:1200px; --gut:clamp(20px,5vw,80px); --r:2px;
  --f-display:'Chakra Petch',system-ui,sans-serif;
  --f-body:'Sora',system-ui,sans-serif;
  --f-mono:'JetBrains Mono',ui-monospace,monospace;
  --step:clamp(56px,9vw,140px);
  --header-h:64px;
}

/* ---------- reset & base ---------- */
*,*::before,*::after{ box-sizing:border-box; margin:0; padding:0; }
html{ scroll-behavior:smooth; -webkit-text-size-adjust:100%; scroll-padding-top:var(--header-h); }
@media (prefers-reduced-motion:reduce){ html{ scroll-behavior:auto; } }
body{ background-color:var(--carbon); color:var(--ink); font-family:var(--f-body);
  font-size:16px; line-height:1.6; -webkit-font-smoothing:antialiased; overflow-x:hidden;
  /* faint blueprint/telemetry grid for depth (lines only, no gradient) */
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88'%3E%3Cpath d='M88 0H0V88' fill='none' stroke='%23ffffff' stroke-opacity='0.028' stroke-width='1'/%3E%3C/svg%3E"); }
img,svg{ display:block; max-width:100%; }
a{ color:inherit; text-decoration:none; }
button{ font:inherit; }
h1,h2,h3,h4{ font-family:var(--f-display); font-weight:700; line-height:.92;
  letter-spacing:-.01em; text-transform:uppercase; }
h1{ font-size:clamp(44px,9vw,108px); }
h2{ font-size:clamp(32px,6vw,68px); }
h3{ font-size:clamp(20px,3vw,28px); }
h4{ font-size:18px; }
p{ color:var(--ink); }

/* ---------- helpers ---------- */
.muted{ color:var(--muted); }
.mono{ font-family:var(--f-mono); letter-spacing:.14em; text-transform:uppercase; font-size:12px; }
.kicker{ font-family:var(--f-mono); color:var(--blue); letter-spacing:.28em;
  text-transform:uppercase; font-size:clamp(11px,1.4vw,13px); display:inline-block; }
.red{ color:var(--red); } .blue{ color:var(--blue); }
.container{ max-width:var(--maxw); margin-inline:auto; padding-inline:var(--gut); }
.container--wide{ max-width:1340px; }
.section{ padding-block:var(--step); position:relative; }
.section__head{ max-width:60ch; margin-bottom:clamp(28px,4vw,48px); }
.section__head .lede{ color:var(--muted); font-size:clamp(16px,2vw,19px); margin-top:14px; }
.lede{ font-size:clamp(16px,2.2vw,20px); color:var(--muted); }
.visually-hidden{ position:absolute!important; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; border:0; }
:focus-visible{ outline:2px solid var(--blue); outline-offset:3px; }
.divider{ height:1px; background:var(--line); border:0; margin:0; }

/* ---------- buttons ---------- */
.btn{ display:inline-flex; align-items:center; gap:8px; font-family:var(--f-display);
  font-weight:600; text-transform:uppercase; letter-spacing:.06em; font-size:14px;
  padding:14px 26px; border-radius:var(--r); border:1px solid transparent; cursor:pointer;
  transition:transform .15s, background .15s, border-color .15s, color .15s; white-space:nowrap; }
.btn:hover{ transform:translateY(-2px); }
.btn--red{ background:var(--red); color:var(--white); }
.btn--red:hover{ background:var(--red-press); }
.btn--ghost{ border-color:var(--line); color:var(--ink); }
.btn--ghost:hover{ border-color:var(--blue); color:var(--white); }
.btn--lg{ padding:18px 34px; font-size:16px; }
.btn--block{ width:100%; justify-content:center; }

/* ---------- prominent animated nav "Book Now" CTA ---------- */
.site-header .nav a.btn--red{ position:relative; color:var(--white); font-weight:700;
  padding-inline:30px; letter-spacing:.09em;
  box-shadow:0 6px 22px rgba(255,30,30,.4); animation:bookPulse 2.6s ease-in-out infinite; }
.site-header .nav a.btn--red:hover{ color:var(--white); }
.site-header .nav a.btn--red::after{ content:"›"; font-weight:700; margin-left:2px;
  transition:transform .2s; }
.site-header .nav a.btn--red:hover{ background:var(--red); transform:translateY(-2px);
  box-shadow:0 8px 30px rgba(255,30,30,.7); }
.site-header .nav a.btn--red:hover::after{ transform:translateX(4px); }
@keyframes bookPulse{
  0%,100%{ box-shadow:0 0 0 0 rgba(255,30,30,.55), 0 6px 22px rgba(255,30,30,.32); }
  50%{ box-shadow:0 0 0 8px rgba(255,30,30,0), 0 8px 26px rgba(255,30,30,.5); }
}
@media (prefers-reduced-motion:reduce){ .site-header .nav a.btn--red{ animation:none; } }

/* ---------- header / nav ---------- */
.site-header{ position:sticky; top:0; z-index:50; background:rgba(10,10,11,.86);
  backdrop-filter:blur(10px); -webkit-backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.site-header__bar{ display:flex; align-items:center; justify-content:space-between; height:var(--header-h); }
.brand{ display:inline-flex; align-items:center; font-family:var(--f-display); font-weight:700; letter-spacing:.14em; font-size:19px; }
.brand b{ color:var(--red); }
.brand img{ height:30px; width:auto; display:block; }
.nav{ display:flex; align-items:center; gap:26px; }
.nav a{ font-size:13px; font-weight:600; letter-spacing:.05em; text-transform:uppercase;
  color:var(--muted); transition:color .15s; }
.nav a:not(.btn):hover, .nav a[aria-current="page"]:not(.btn){ color:var(--ink); }
.nav a[aria-current="page"]:not(.btn){ color:var(--ink); }
.nav-toggle{ display:none; background:none; border:0; color:var(--ink); font-size:22px; line-height:1; padding:6px; cursor:pointer; }
@media (max-width:920px){
  .nav{ position:fixed; inset:var(--header-h) 0 auto 0; flex-direction:column; align-items:stretch; gap:0;
    background:var(--carbon); border-bottom:1px solid var(--line);
    transform:translateY(-130%); transition:transform .3s ease; padding:6px 0 12px; }
  .nav[data-open="true"]{ transform:none; }
  .nav a{ padding:15px var(--gut); border-top:1px solid var(--line); font-size:15px; }
  .nav a.btn{ margin:12px var(--gut) 0; border:1px solid transparent; }
  .nav-toggle{ display:block; }
}

/* persistent mobile book CTA */
.book-fab{ position:fixed; left:0; right:0; bottom:0; z-index:45; display:none;
  padding:10px var(--gut) calc(10px + env(safe-area-inset-bottom));
  background:rgba(10,10,11,.94); border-top:1px solid var(--line); }
@media (max-width:920px){ .book-fab{ display:block; } body.has-fab{ padding-bottom:78px; } }

/* ---------- footer ---------- */
.site-footer{ border-top:1px solid var(--line); background:var(--surface);
  padding-block:56px 40px; margin-top:var(--step); }
.site-footer .grid{ display:grid; grid-template-columns:1.6fr 1fr 1fr 1.2fr; gap:32px; }
@media (max-width:820px){ .site-footer .grid{ grid-template-columns:1fr 1fr; gap:28px; } }
@media (max-width:520px){ .site-footer .grid{ grid-template-columns:1fr; } }
.site-footer h4{ font-family:var(--f-mono); font-size:11px; letter-spacing:.18em; color:var(--muted);
  text-transform:uppercase; margin-bottom:14px; font-weight:500; }
.site-footer a{ color:var(--muted); font-size:14px; line-height:2.1; transition:color .15s; }
.site-footer a:hover{ color:var(--ink); }
.site-footer .brand{ font-size:22px; margin-bottom:10px; display:inline-flex; }
.site-footer .brand img{ height:42px; }
.footer-bottom{ display:flex; justify-content:space-between; flex-wrap:wrap; gap:12px;
  margin-top:40px; padding-top:22px; border-top:1px solid var(--line); color:var(--muted); font-size:12px; }

/* ---------- grids & cards ---------- */
.grid-3{ display:grid; grid-template-columns:repeat(3,1fr); gap:20px; }
.grid-2{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; }
.grid-4{ display:grid; grid-template-columns:repeat(4,1fr); gap:16px; }
@media (max-width:920px){ .grid-3,.grid-4{ grid-template-columns:repeat(2,1fr); } }
@media (max-width:680px){ .grid-3,.grid-2,.grid-4{ grid-template-columns:1fr; } }
.card{ background:var(--surface); border:1px solid var(--line); border-radius:var(--r); padding:28px; }
.card--feature{ border-left:3px solid var(--red); }
.card h3{ margin-bottom:10px; }
.card .num-badge{ font-family:var(--f-mono); color:var(--blue); font-size:12px; letter-spacing:.16em; }
.card--price{ display:flex; flex-direction:column; }
.card--popular{ border-color:var(--red); }
.price{ font-family:var(--f-display); font-size:clamp(40px,6vw,56px); font-weight:700; line-height:1; margin:6px 0; }
.price small{ font-size:16px; color:var(--muted); font-family:var(--f-body); font-weight:400; letter-spacing:0; }
.tag{ display:inline-block; font-family:var(--f-mono); font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--white); background:var(--red); padding:5px 11px; border-radius:var(--r); align-self:flex-start; }
.tag--blue{ background:var(--blue); }
.checklist{ list-style:none; margin-top:18px; margin-bottom:24px; }
.checklist li{ padding-left:28px; position:relative; margin-bottom:11px; color:var(--muted); }
.checklist li::before{ content:"✓"; position:absolute; left:0; color:var(--red); font-weight:700; }
.card--price .btn{ margin-top:auto; }

/* ---------- membership tier accents (Morning Shift = teal, Pro Member = orange) ---------- */
.tier{ border-color:var(--accent,var(--line)); border-top:3px solid var(--accent,var(--red)); }
.tier--teal{ --accent:#17C3C9; --accent-press:#129AA0; }
.tier--orange{ --accent:#FF7A1A; --accent-press:#E56806; }
.tier .tag{ background:var(--accent); color:var(--carbon); }
.tier .num-badge{ color:var(--accent); }
.tier .checklist li::before{ color:var(--accent); }
.btn--tier{ background:var(--accent,var(--red)); color:var(--carbon); border-color:transparent; font-weight:700; }
.btn--tier:hover{ background:var(--accent-press,var(--red-press)); color:var(--carbon); }

/* ---------- stat counters ---------- */
.stats{ display:flex; flex-wrap:wrap; gap:clamp(28px,5vw,56px); }
.stat .num{ font-family:var(--f-display); font-size:clamp(40px,7vw,72px); font-weight:700; line-height:1; }
.stat .num .unit{ font-size:.45em; color:var(--red); margin-left:2px; }
.stat .lbl{ font-family:var(--f-mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase; color:var(--muted); margin-top:8px; }

/* ---------- flat speed streaks (decor, no gradient) ---------- */
.streak{ position:absolute; height:6px; background:var(--red); pointer-events:none; z-index:0; }
.streak--blue{ background:var(--blue); }

/* ---------- image placeholder ---------- */
.ph{ position:relative; background-color:var(--surface-2);
  /* set a real photo via  style="--img:url('/assets/img/...')"  (placeholder texture otherwise) */
  background-image:var(--img, repeating-linear-gradient(135deg,transparent 0 15px,#ffffff05 15px 16px));
  background-size:cover; background-position:center;
  border:1px solid var(--line); border-radius:var(--r); display:grid; place-items:center; aspect-ratio:16/9;
  overflow:hidden; }
.ph::after{ content:attr(data-label); font-family:var(--f-mono); font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted); text-align:center; padding:16px; max-width:80%; z-index:1; }
/* framed-image corner ticks so empty slots read as intentional photo frames */
.ph::before{ content:""; position:absolute; top:10px; left:10px; width:18px; height:18px;
  border-top:2px solid var(--red); border-left:2px solid var(--red); }
/* when a real image is set via --img, hide the placeholder label + corner tick */
.ph[style*="--img"]::before, .ph[style*="--img"]::after{ display:none; }
.ph--square{ aspect-ratio:1; } .ph--portrait{ aspect-ratio:3/4; } .ph--wide{ aspect-ratio:21/9; }
.ph--tall{ aspect-ratio:auto; }
.ph-cap{ font-family:var(--f-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase;
  color:var(--muted); margin-top:10px; display:flex; gap:8px; align-items:center; }
.ph-cap::before{ content:""; width:7px; height:7px; background:var(--red); display:inline-block; }

/* ---------- circuit chips ---------- */
.circuit{ background:var(--surface); border:1px solid var(--line); border-left:3px solid var(--blue);
  border-radius:var(--r); padding:18px 20px; }
.circuit .name{ font-family:var(--f-display); font-size:20px; text-transform:uppercase; }
.circuit .meta{ font-family:var(--f-mono); font-size:11px; letter-spacing:.12em; color:var(--muted); margin-top:4px; }

/* ---------- leaderboard rows ---------- */
.lb-row{ display:grid; grid-template-columns:48px 1fr auto; align-items:center; gap:14px;
  padding:14px 18px; border:1px solid var(--line); border-radius:var(--r); background:var(--surface); margin-bottom:8px; }
.lb-row .pos{ font-family:var(--f-display); font-size:22px; color:var(--red); }
.lb-row .who{ font-family:var(--f-mono); letter-spacing:.06em; }
.lb-row .time{ font-family:var(--f-mono); color:var(--blue); }

/* ---------- steps (how it works) ---------- */
.steps{ display:grid; grid-template-columns:repeat(2,1fr); gap:20px; counter-reset:step; }
@media (max-width:680px){ .steps{ grid-template-columns:1fr; } }
.step{ position:relative; padding:26px 26px 26px 84px; border:1px solid var(--line);
  border-radius:var(--r); background:var(--surface); counter-increment:step; }
.step::before{ content:counter(step,decimal-leading-zero); position:absolute; left:24px; top:22px;
  font-family:var(--f-display); font-size:34px; color:var(--red); }

/* ---------- callout (beginner on-ramp) ---------- */
.callout{ border:1px solid var(--blue); border-radius:var(--r); padding:26px 28px; background:var(--surface);
  display:flex; gap:22px; align-items:center; flex-wrap:wrap; }
.callout .mono{ color:var(--blue); }

/* ---------- FAQ ---------- */
.faq details{ border-top:1px solid var(--line); padding:20px 0; }
.faq details:last-child{ border-bottom:1px solid var(--line); }
.faq summary{ font-family:var(--f-display); text-transform:uppercase; font-size:clamp(17px,2.4vw,21px);
  cursor:pointer; list-style:none; display:flex; justify-content:space-between; gap:16px; }
.faq summary::-webkit-details-marker{ display:none; }
.faq summary::after{ content:"+"; color:var(--red); font-size:24px; line-height:1; }
.faq details[open] summary::after{ content:"–"; }
.faq details p{ color:var(--muted); margin-top:14px; max-width:70ch; }

/* ---------- forms ---------- */
.field{ margin-bottom:18px; }
.field label{ display:block; font-family:var(--f-mono); font-size:11px; letter-spacing:.14em;
  text-transform:uppercase; color:var(--muted); margin-bottom:8px; }
.field input,.field textarea,.field select{ width:100%; background:var(--surface-2); border:1px solid var(--line);
  border-radius:var(--r); color:var(--ink); padding:13px 15px; font-family:var(--f-body); font-size:15px; }
.field input:focus,.field textarea:focus{ border-color:var(--blue); outline:none; }

/* ---------- hero (full-viewport, full-bleed background image) ---------- */
.hero{ position:relative; min-height:calc(100vh - var(--header-h));
  min-height:calc(100svh - var(--header-h)); display:flex; align-items:center;
  padding-block:48px; overflow:hidden; }
.hero__bg{ position:absolute; inset:0; z-index:0; background-color:var(--surface-2);
  /* client: set the photo via  style="--hero-img:url('/assets/img/hero.jpg')"  on .hero */
  background-image:var(--hero-img, repeating-linear-gradient(135deg,transparent 0 15px,#ffffff05 15px 16px));
  background-size:cover; background-position:center; }
.hero__scrim{ position:absolute; inset:0; z-index:1; background:rgba(7,7,9,.66); } /* solid tint, NOT a gradient */
.hero__bg-cap{ position:absolute; right:14px; bottom:14px; z-index:2; font-family:var(--f-mono);
  font-size:10px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted);
  background:rgba(10,10,11,.7); border:1px solid var(--line); padding:6px 10px; }
.hero .container{ position:relative; z-index:3; }
.hero .streak{ z-index:2; }
.hero__copy{ max-width:780px; }
.hero__copy h1{ max-width:15ch; }
.hero__copy .lede{ max-width:46ch; margin-top:20px; }
.hero__cta{ display:flex; flex-wrap:wrap; gap:14px; margin:32px 0 44px; }
@media (max-width:680px){
  .hero__copy h1{ font-size:clamp(40px,12vw,66px); }
  .hero .stats{ gap:22px 30px; }
}

/* ---------- media feature (big image + content, alternating) ---------- */
.media-feature{ display:grid; grid-template-columns:1fr 1fr; gap:clamp(28px,5vw,64px); align-items:center; }
.media-feature--rev .media-feature__media{ order:-1; }
.media-feature .ph{ aspect-ratio:4/3; }
@media (max-width:860px){ .media-feature{ grid-template-columns:1fr; gap:24px; }
  .media-feature--rev .media-feature__media{ order:0; } }

/* ---------- gallery strip ---------- */
.gallery{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; }
.gallery .ph{ aspect-ratio:1; }
.gallery .ph::after{ font-size:10px; }
@media (max-width:860px){ .gallery{ grid-template-columns:repeat(2,1fr); } }

/* ---------- page hero (interior) — image-background band ---------- */
.page-hero{ padding-top:clamp(56px,9vw,120px); padding-bottom:clamp(44px,6vw,80px);
  position:relative; overflow:hidden; }
/* placeholder bg image (client sets background-image; see /HANDOFF.md) */
.page-hero::before{ content:""; position:absolute; inset:0; z-index:0; background-color:var(--surface-2);
  /* client: set per-page photo via  style="--ph-img:url('/assets/img/x.jpg')"  on .page-hero */
  background-image:var(--ph-img, repeating-linear-gradient(135deg,transparent 0 15px,#ffffff05 15px 16px));
  background-size:cover; background-position:center; }
.page-hero::after{ content:""; position:absolute; inset:0; z-index:1; background:rgba(7,7,9,.62); } /* solid scrim */
.page-hero > *{ position:relative; z-index:2; }
.page-hero h1{ max-width:18ch; margin-top:12px; }
.page-hero .lede{ max-width:54ch; margin-top:18px; }
.breadcrumb{ font-family:var(--f-mono); font-size:11px; letter-spacing:.14em; text-transform:uppercase; color:var(--muted); margin-bottom:10px; }
.breadcrumb a:hover{ color:var(--ink); }

/* ---------- The Lap (homepage) ---------- */
#lap{ position:relative; }
.lap-line{ position:absolute; top:0; left:0; width:100%; height:100%; z-index:0; pointer-events:none; }
/* stroke must be set in CSS — SVG presentation attributes don't resolve CSS vars */
#lapPath{ stroke:var(--red); }
#lap > :not(.lap-line){ position:relative; z-index:1; }
.corner-marker{ font-family:var(--f-mono); font-size:11px; letter-spacing:.16em; text-transform:uppercase;
  color:var(--blue); display:inline-flex; align-items:center; gap:10px; margin-bottom:16px; }
.corner-marker::before{ content:""; width:11px; height:11px; background:var(--red); display:inline-block; flex:none; }
.lap-progress{ position:fixed; top:calc(var(--header-h) + 14px); right:16px; width:92px; height:92px; z-index:40;
  border:1px solid var(--line); background:rgba(10,10,11,.72); padding:9px; display:none; }
.lap-progress .lbl{ position:absolute; top:5px; left:8px; font-family:var(--f-mono); font-size:8px; letter-spacing:.14em; color:var(--blue); }
@media (min-width:921px){ .lap-progress{ display:block; } }

/* ---------- reveal animations (only hide when JS is present) ---------- */
.js .reveal{ opacity:0; transform:translateY(26px); }
.js .reveal.is-in{ opacity:1; transform:none; transition:opacity .6s ease, transform .6s ease; }
@media (prefers-reduced-motion:reduce){
  .js .reveal{ opacity:1!important; transform:none!important; }
  .btn:hover{ transform:none; }
}

/* ---------- finish / cta band ---------- */
.cta-band{ border:1px solid var(--line); border-left:4px solid var(--red); border-radius:var(--r);
  padding:clamp(32px,5vw,56px); background:var(--surface); }
.nap{ font-family:var(--f-mono); font-size:13px; letter-spacing:.06em; line-height:2; color:var(--muted); }
.nap strong{ color:var(--ink); }
