/* BASE — fonts, reset, element defaults, shared primitives. Only file allowed bare element selectors. */

@font-face {
  font-family: 'Archivo Variable';
  src: url('../assets/fonts/archivo-variable-full.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('../assets/fonts/space-mono-latin-400-normal.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Space Mono';
  src: url('../assets/fonts/space-mono-latin-700-normal.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

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

html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  background: var(--void);
  color: var(--bone);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  min-height: 100vh;
}

/* content sits above the frame-splice layer (z 1, injected by sections.js) */
main, #topbar, #hud, #footer { position: relative; z-index: 2; }

img, video { display: block; max-width: 100%; }
button { background: none; border: none; color: inherit; font: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

::selection { background: var(--signal); color: var(--void); }

:focus-visible { outline: 1px solid var(--amber); outline-offset: 3px; }
:focus:not(:focus-visible) { outline: none; }

/* shared primitives */
.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ash);
}

.display {
  font-family: var(--font-display);
  font-size: var(--text-h2);
  line-height: 0.9;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  color: var(--bone);
}

.line { display: block; }
.line-heavy { font-variation-settings: 'wdth' 122, 'wght' 840; letter-spacing: -0.035em; }
.line-light { font-variation-settings: 'wdth' 88, 'wght' 340; letter-spacing: -0.015em; }

/* asymmetric section rhythm — more air before a section opens than after it closes.
   Hybrid vh+vw clamp (not vh-only) so the gap actually shrinks on narrow/tall
   phone screens instead of staying pinned to viewport height regardless of width. */
.section { padding: clamp(3.25rem, 3vh + 8vw, 12.5rem) var(--gutter) clamp(2rem, 2vh + 5vw, 7.5rem); position: relative; }

.marker { margin-bottom: 1.4rem; }

.statement {
  max-width: 30em;
  color: color-mix(in srgb, var(--bone) 92%, transparent);
  margin-top: 1.6rem;
}

.section-head { margin-bottom: clamp(2.5rem, 6vh, 4.5rem); }

/* scroll-velocity RGB split — applied to headings only */
.rgb-split, .rgb-split .line {
  text-shadow:
    calc(var(--rgb) * 1px) 0 rgba(255, 61, 129, 0.55),
    calc(var(--rgb) * -1px) 0 rgba(62, 102, 255, 0.55);
}

/* reduced motion floor */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
