/* ============================================================
   Stray Dog Media — Base
   Reset + element defaults built on the tokens. No component
   styling here; just sane, branded foundations.
   ============================================================ */

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Backstop: full-bleed pieces (marquee, hero video, mascot) must never
   make the page scroll sideways. Fix causes too — this only catches them. */
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: var(--weight-body);
  line-height: var(--leading-body);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100dvh;
  transition: background var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

/* ---- Film grain -------------------------------------------
   A single fixed noise layer over the whole page. It is what
   keeps the black from looking like flat CSS black — the same
   trick the brand art uses. Cheap: one inline SVG, no request. */
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 9000;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Vignette — pulls the eye to centre frame. Dark theme only. */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 8999;
  pointer-events: none;
  opacity: var(--vignette-opacity);
  background: radial-gradient(ellipse at center, transparent 42%, rgba(0,0,0,0.55) 100%);
  transition: opacity var(--dur) var(--ease-out);
}

/* Headings --------------------------------------------------
   Display sizes are set in caps: heavy, condensed, tight-packed.
   h3/h4 stay sentence case so the shouting stays rationed. */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  font-stretch: var(--display-width);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-display);
  color: var(--text);
  text-wrap: balance;
}
h1, h2 { text-transform: uppercase; }
h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); }
h3 {
  font-size: var(--step-2); line-height: var(--leading-snug);
  font-weight: 700; letter-spacing: var(--tracking-tight);
}
h4 {
  font-size: var(--step-1); line-height: var(--leading-snug);
  font-weight: 700; letter-spacing: var(--tracking-tight);
}

p { max-width: 62ch; text-wrap: pretty; }

a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 0.18em; }
a:hover { color: var(--accent-text); }

img, picture, svg, video { display: block; max-width: 100%; height: auto; }

ul, ol { padding-left: 1.2em; }

hr { border: 0; border-top: 1px solid var(--border); margin: var(--space-lg) 0; }

::selection { background: var(--accent); color: var(--accent-contrast); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-xs);
}

code, kbd, samp { font-family: var(--font-mono); font-size: 0.9em; }

/* Layout helpers ------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--space-2xl); position: relative; }
.stack > * + * { margin-top: var(--space-md); }

/* Reusable text utilities ---------------------------------- */
.kicker {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  color: var(--accent-text);
}
.lead { font-size: var(--step-1); color: var(--text-muted); max-width: 52ch; line-height: 1.5; }
.muted { color: var(--text-muted); }
.accent { color: var(--accent-text); }

/* .slab — the signature move: a headline word knifed out on a
   red block, straight off the brand art ("LIVE AND UNLEASHED").
   Use it once per page, on the word that matters. */
.slab {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.04em 0.24em 0.1em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

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