*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--void);
  color: var(--fg);
  font-family: var(--face-body);
  font-variation-settings: var(--normal);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body[data-stage="locked"] { overflow: hidden; height: 100dvh; }

img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--lcd);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--needle); color: #fff; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* Fine film grain over everything — a garage at night is never clean. */
.grain {
  position: fixed;
  inset: -50%;
  z-index: 100;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/></filter><rect width='140' height='140' filter='url(%23n)'/></svg>");
  mix-blend-mode: overlay;
}

.eyebrow {
  margin: 0 0 var(--s-4);
  font-size: var(--t-xs);
  font-weight: 600;
  font-variation-settings: var(--narrow);
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--fg-3);
}
.eyebrow--center { text-align: center; }

.sechead { margin-bottom: var(--s-7); }
.sechead--center { text-align: center; }
.sechead--center .sechead__title,
.sechead--center .sechead__note { margin-inline: auto; }

/* measures live on the text itself, so each ch is that element's own ch */
.sechead__title {
  max-width: 18ch;
  margin: 0 0 var(--s-3);
  font-size: var(--t-xl);
  font-weight: 800;
  font-variation-settings: var(--wide);
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.sechead__note { max-width: 46ch; margin: 0; color: var(--fg-2); font-size: var(--t-md); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 var(--s-6);
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: var(--t-sm);
  font-weight: 700;
  font-variation-settings: var(--narrow);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease-out),
              border-color var(--d-fast) var(--ease-out),
              color var(--d-fast) var(--ease-out),
              opacity var(--d-fast) var(--ease-out);
}

.btn--primary {
  background: var(--lcd);
  color: var(--void);
}
.btn--primary:hover { background: #fff; }

.btn--ghost {
  background: transparent;
  border-color: rgba(238, 241, 243, 0.22);
  color: var(--fg-2);
}
.btn--ghost:hover { border-color: var(--fg-2); color: var(--fg); }

.btn:active { opacity: 0.85; }

/* Headlight blowout used between ignition and reveal. */
.flash {
  position: fixed;
  inset: 0;
  z-index: var(--z-flash);
  background: #fff;
  opacity: 0;
  pointer-events: none;
}
.flash.is-firing { animation: blowout 1400ms var(--ease-out) forwards; }

@keyframes blowout {
  0%   { opacity: 0; }
  14%  { opacity: 1; }
  40%  { opacity: 1; }
  100% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .flash.is-firing { animation: none; }
}

[hidden] { display: none !important; }
