/* laps.racing site: home (/), LAPS Pro (/pro) and events (/events). Tokens from design/laps-redesign.pen (App v2 / Site). */

@font-face { font-family: 'Space Grotesk'; src: url('/site/fonts/space-grotesk.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('/site/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/site/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --bg: #0F0F0F;
  --bg-alt: #141414;
  --surface: #1A1A1A;
  --border: #2A2A2A;
  --border-strong: #3A3A3A;
  --text: #F0F2F5;
  --text-2: #B5B8BC;
  --muted: #787C82;
  --crimson: #C41E3A;
  --blue: #38BDF8;
  --green: #4A9E6E;
  --display: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --ui: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;
  --gutter: 120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 16px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
[id] { scroll-margin-top: 80px; }

.wrap { width: 100%; max-width: calc(1200px + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.muted { color: var(--muted); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.i { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* Type */
.eyebrow { font: 600 12px/1 var(--ui); letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); margin-bottom: 18px; }
h1 { font: 600 72px/1.05 var(--display); letter-spacing: -0.5px; }
.hero-text h1 { max-width: 1000px; }
.h-40 { font: 600 40px/1.1 var(--display); }
.h-38 { font: 600 38px/1.1 var(--display); }
.h-36 { font: 600 36px/1.1 var(--display); }
.h-34 { font: 600 34px/1.1 var(--display); }
.body-17 { font-size: 17px; line-height: 1.55; color: var(--text-2); }
.body-15 { font-size: 15px; line-height: 1.5; color: var(--text-2); }
.tag { font: 600 10px/1 var(--ui); letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); }
.tag-green { color: var(--green); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 8px; border: 1px solid transparent;
  font: 600 15px/1 var(--ui); white-space: nowrap;
}
.btn .i { width: 16px; height: 16px; }
.btn-primary { background: var(--crimson); color: #fff; }
.btn-primary:hover { filter: brightness(1.1); }
.btn-primary:disabled { opacity: 0.6; cursor: default; filter: none; }
.btn-secondary { background: var(--bg-alt); border-color: var(--border-strong); color: var(--text); }
.btn-secondary:hover { border-color: var(--muted); }
.btn-small { height: 36px; padding: 0 16px; font-size: 14px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 10; background: rgba(15, 15, 15, 0.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--border); }
.nav-row { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 18px/1 var(--display); letter-spacing: 1px; }
.logo { width: 32px; height: 32px; border-radius: 8px; background: var(--crimson); color: #fff; display: grid; place-items: center; letter-spacing: 0; }
.links { display: flex; gap: 32px; font-size: 14px; color: var(--text-2); }
.links a:hover, .links a[aria-current] { color: var(--text); }
.links a[aria-current] { font-weight: 600; }

/* Hero */
.hero { padding-top: 88px; overflow: hidden; }
.hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; }
.hero-text .eyebrow { margin: 0; }
.lede { max-width: 720px; font-size: 19px; line-height: 1.5; color: var(--text-2); }
.ctas { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }
.note { font-size: 13px; color: var(--muted); }
.hero-visual { margin-top: 8px; border: 1px solid var(--border-strong); border-bottom: 0; border-radius: 12px 12px 0 0; overflow: hidden; aspect-ratio: 1200 / 520; }
.hero-visual img { width: 100%; }

/* Bands */
.band { padding: 96px 0; background: var(--bg); }
.band-alt { background: var(--bg-alt); }
.top-rule { border-top: 1px solid var(--border); }
.stack-40 { display: flex; flex-direction: column; gap: 40px; }
.stack-32 { display: flex; flex-direction: column; gap: 32px; }
.stack-32 .eyebrow, .stack-40 .eyebrow { margin-bottom: 26px; }

/* Totals */
.head-row { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: end; }
.head-row .body-17 { padding-bottom: 6px; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.tiles li { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.tiles strong { font: 600 44px/1.1 var(--display); }
.tiles small { font: 400 18px var(--ui); color: var(--text-2); margin-left: 6px; }
.tiles span { font-size: 14px; color: var(--muted); }
.totals-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.panel { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; }
.by-year { padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.by-year figcaption { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; }
.by-year figcaption .muted { font-size: 12px; font-weight: 400; }
.bars { display: grid; grid-template-columns: repeat(5, 1fr); height: 210px; align-items: end; border-bottom: 1px solid var(--border-strong); margin-bottom: 28px; }
.bars div { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.bars i { width: 24px; height: calc(var(--v) * 10px); background: var(--blue); border-radius: 2px 2px 0 0; }
.bars b { font: 400 11px var(--mono); color: var(--text-2); }
.bars span { position: absolute; top: calc(100% + 14px); font: 400 11px var(--mono); color: var(--muted); }
.by-vehicle table { width: 100%; border-collapse: collapse; font-size: 13px; }
.by-vehicle th, .by-vehicle td { padding: 14px 12px; border-bottom: 1px solid var(--border); text-align: right; }
.by-vehicle th:first-child { text-align: left; padding-left: 24px; }
.by-vehicle td:last-child, .by-vehicle th:last-child { padding-right: 24px; }
.by-vehicle thead th { font: 600 10px/1 var(--ui); letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); }
.by-vehicle tbody th { font-weight: 600; font-size: 14px; white-space: nowrap; }
.by-vehicle .vehicle { display: inline-flex; align-items: center; gap: 12px; vertical-align: middle; }
.by-vehicle td { font-family: var(--mono); }
.visited { display: flex; align-items: center; gap: 10px; padding: 14px 24px; font-size: 13px; color: var(--text-2); }
.visited .i { width: 15px; height: 15px; color: var(--muted); }

/* Cards */
.cards-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.changes li { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.changes .today { font-size: 15px; line-height: 1.45; color: var(--muted); padding-bottom: 14px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.changes .with { font-size: 17px; line-height: 1.4; font-weight: 600; }

/* Features */
.feature-row { display: grid; grid-template-columns: 528px 1fr; gap: 72px; align-items: center; }
.feature-row.reverse > :first-child { order: 2; }
.feature-row .shot, .feature-row .friends { justify-self: end; }
.feature-row.reverse .shot, .feature-row.reverse .friends { justify-self: start; }
.feature-row.reverse { grid-template-columns: 1fr 528px; }
.feature-text { display: flex; flex-direction: column; gap: 20px; }
.feature-text .eyebrow { margin: 0; }
.shot { width: 600px; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); }
.bullets { display: flex; flex-direction: column; gap: 14px; margin-top: 4px; }
.bullets li { display: flex; gap: 14px; }
.bullets .i { color: var(--green); margin-top: 2px; }
.bullets div { display: flex; flex-direction: column; gap: 3px; }
.bullets strong { font-size: 16px; font-weight: 600; }
.bullets span { font-size: 14px; line-height: 1.5; color: var(--muted); }

/* Friends panel (community) */
.friends { width: 560px; background: var(--bg-alt); }
.friends-head { display: flex; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--border); font-size: 14px; font-weight: 600; }
.friends-head .muted { font-weight: 400; font-size: 13px; }
.friend { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.friend > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.friend strong { font-size: 14px; font-weight: 600; }
.friend span { font-size: 13px; color: var(--text-2); }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--surface); border: 1px solid var(--border-strong); display: grid; place-items: center; font: 600 12px var(--ui) !important; color: var(--text) !important; flex: none; }
.chip { flex: none; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--border-strong); background: var(--surface); display: inline-flex; align-items: center; font-size: 13px !important; font-weight: 600; color: var(--text) !important; }
.going { display: flex; align-items: center; gap: 10px; padding: 14px 18px; background: var(--surface); font-size: 13px; color: var(--text-2); }
.going .i { width: 16px; height: 16px; color: var(--muted); }

/* Getting started */
.steps li { background: var(--bg-alt); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.steps .num { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong); background: var(--surface); display: grid; place-items: center; font: 600 13px var(--mono); }
.steps strong { font-size: 18px; font-weight: 600; margin-top: 4px; }
.steps li > span:last-child { font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* Other audiences */
.doors { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.door { display: flex; align-items: center; gap: 16px; text-align: left; padding: 24px; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; }
.door:hover { border-color: var(--border-strong); background: #121212; }
.door-icon { width: 48px; height: 48px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.door-text { flex: 1; display: flex; flex-direction: column; gap: 6px; }
.door-text strong { font-size: 18px; font-weight: 600; }
.door-text span { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.door-text em { font: 400 12px var(--mono); font-style: normal; color: var(--muted); }
.door-arrow { color: var(--text-2); }

/* Final call to action */
.final-inner { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 24px; }
.chequered { width: 124px; height: 68px; fill: #F0F2F5; }
.inline-join { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 8px; width: 100%; max-width: 560px; }
.inline-join input[type=email] { flex: 1; min-width: 220px; }
.inline-join .form-status { flex-basis: 100%; }
input[type=email] {
  height: 48px; padding: 0 16px; border-radius: 8px; border: 1px solid var(--border-strong);
  background: var(--bg); color: var(--text); font: 400 15px var(--ui);
}
input[type=email]::placeholder { color: var(--muted); }
input[type=email]:focus { outline: none; border-color: var(--blue); }
.trap { position: absolute !important; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.form-status { font-size: 14px; min-height: 20px; color: var(--text-2); }
.form-status.ok { color: var(--green); }
.form-status.error { color: #F87171; }
.privacy { font-size: 12px; color: var(--muted); }

/* Footer */
.footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 48px 0; }
.footer-row { display: grid; grid-template-columns: 1fr auto; gap: 64px; }
.footer-brand { font: 600 18px var(--display); letter-spacing: 1px; margin-bottom: 12px; }
.footer .muted { font-size: 14px; }
.footer nav { display: flex; flex-direction: column; gap: 10px; font-size: 14px; color: var(--text-2); min-width: 200px; }
.footer nav .tag { margin-bottom: 6px; font-size: 11px; }
.footer nav a:hover { color: var(--text); }

/* Waiting list dialog */
dialog.join {
  width: min(480px, calc(100vw - 32px)); padding: 28px; border-radius: 12px;
  background: var(--bg-alt); color: var(--text); border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
}
dialog.join::backdrop { background: rgba(0, 0, 0, 0.65); }
dialog.join h2 { font: 600 24px/1.2 var(--display); margin: 0 32px 10px 0; }
.join-close { position: absolute; top: 16px; right: 16px; }
.join-close button { width: 32px; height: 32px; border-radius: 6px; border: 0; background: transparent; color: var(--muted); display: grid; place-items: center; }
.join-close button:hover { color: var(--text); background: var(--surface); }
.join-form { display: flex; flex-direction: column; gap: 12px; margin: 20px 0 16px; }
.join-form fieldset { border: 0; padding: 0; margin: 0 0 6px; display: flex; flex-direction: column; gap: 8px; }
.join-form legend, .field-label { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.join-form fieldset label { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.join-form input[type=radio] { accent-color: var(--crimson); width: 16px; height: 16px; margin: 0; }
.field-label { margin-bottom: -4px; }


/* Pro and events pages */
.h1-56 { font: 600 56px/1.08 var(--display); letter-spacing: -0.4px; }
.narrow { max-width: 960px; }
.measure { max-width: 820px; margin-top: -8px; }
.hero-split { padding-bottom: 96px; }
.split { display: grid; grid-template-columns: 536px 1fr; gap: 64px; align-items: center; }
.split-text { display: flex; flex-direction: column; gap: 24px; }
.split-text .eyebrow { margin: 0; }
.split-text .lede { font-size: 18px; }
.split-text .ctas { justify-content: flex-start; }
.split .panel-img { justify-self: end; }
.panel-img { width: 100%; max-width: 601px; height: auto; border-radius: 12px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45); }
.panel-img.flat { box-shadow: none; }
.feature-row .panel-img { justify-self: end; }
.feature-row.reverse .panel-img { justify-self: start; }
.feature-row.booking .panel-img { max-width: 481px; }
.phone-img { width: 300px; justify-self: center !important; border-radius: 40px; border: 8px solid #262B3D; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.facts li { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 10px; }
.facts .i { width: 20px; height: 20px; margin-bottom: 4px; }
.facts strong { font-size: 18px; font-weight: 600; }
.facts span { font-size: 14px; line-height: 1.5; color: var(--text-2); }
.audiences { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.audience { background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.audience h3 { display: flex; align-items: center; gap: 14px; font: 600 26px/1.2 var(--display); }
.audience > p { font-size: 16px; line-height: 1.5; color: var(--text-2); }

/* Narrower screens */
@media (max-width: 1240px) {
  :root { --gutter: 40px; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr 1fr; gap: 48px; }
  .shot, .friends { width: 100%; }
  .split { grid-template-columns: 1fr 1fr; gap: 40px; }
}
@media (max-width: 960px) {
  :root { --gutter: 24px; }
  h1 { font-size: 52px; }
  .h-40, .h-38, .h-36, .h-34 { font-size: 30px; }
  .band { padding: 72px 0; }
  /* The links move to a second row under the logo and button. */
  .nav-row { height: auto; flex-wrap: wrap; row-gap: 0; padding-top: 12px; }
  .links { order: 3; width: 100%; gap: 24px; padding: 12px 0; margin-top: 12px; border-top: 1px solid var(--border); }
  .head-row, .totals-row, .doors { grid-template-columns: 1fr; gap: 24px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .cards-3 { grid-template-columns: 1fr; }
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; gap: 36px; }
  .feature-row.reverse > :first-child { order: 0; }
  .feature-row .shot, .feature-row .friends, .feature-row .panel-img { justify-self: stretch; max-width: none; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split .panel-img { justify-self: stretch; max-width: none; }
  .h1-56 { font-size: 44px; }
  .facts { grid-template-columns: 1fr 1fr; }
  .audiences { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  h1 { font-size: 40px; }
  .lede { font-size: 17px; }
  .hero { padding-top: 56px; }
  .links { gap: 20px; font-size: 13px; }
  .nav .btn-small { padding: 0 12px; font-size: 13px; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .tiles li:last-child { grid-column: 1 / -1; }
  .tiles strong { font-size: 36px; }
  .h1-56 { font-size: 36px; }
  .facts { grid-template-columns: 1fr; }
  .audience h3 { font-size: 22px; }
  .split-text .ctas .btn { width: 100%; }
  .by-vehicle th, .by-vehicle td { padding: 12px 6px; }
  .by-vehicle th:first-child { padding-left: 14px; }
  .by-vehicle td:last-child, .by-vehicle th:last-child { padding-right: 14px; }
  .by-vehicle thead th:nth-child(4), .by-vehicle tbody td:nth-child(4) { display: none; }
  .by-vehicle .vehicle img { display: none; }
  .friend { flex-wrap: wrap; }
  .friend .chip { margin-left: 44px; }
  .footer-row { grid-template-columns: 1fr; gap: 32px; }
  .ctas .btn { width: 100%; }
  .inline-join .btn { width: 100%; }
}
