@import './tokens.css';

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

html, body { margin: 0; padding: 0; }

html {
  background: var(--bg);
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, video { max-width: 100%; display: block; }

h1, h2, h3 {
  font-weight: 300;
  letter-spacing: -0.02em;
  margin: 0;
}

p { margin: 0; }

a { color: inherit; }

button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 400;
}

.accent { color: var(--gold); }

.numeral, .stat-figure {
  font-family: var(--serif);
}

/* Gold focus rings everywhere — never outline:none without a replacement (Part VII) */
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--gold-dim);
  color: var(--ink);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Line-mask reveal (§5.4) — clipped block, translated up into view once. */
.mask-reveal { overflow: hidden; }
.mask-reveal .mask-reveal-inner {
  display: block;
  transform: translateY(110%);
  transition: transform 650ms var(--ease-entrance);
  will-change: transform;
}
.mask-reveal.is-revealed .mask-reveal-inner {
  transform: translateY(0);
}

/* Grain + vignette (§5.5) — the "shot on film" detail. Inline SVG feTurbulence,
   never a raster texture. Disabled under reduced motion only in spirit (it's
   static, not animated) but hidden anyway to keep the surface calm. */
.grain-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: overlay;
}
.grain-overlay svg { width: 100%; height: 100%; }

.vignette-overlay {
  position: fixed;
  inset: 0;
  z-index: 998;
  pointer-events: none;
  background: radial-gradient(120% 100% at 50% 40%, transparent 40%, rgba(0, 0, 0, 0.45) 100%);
}

/* prefers-reduced-motion: reduce fully disables motion effects — Part VII gate.
   Individual motion modules check this too; this is the CSS-level backstop. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
