/* ==========================================================================
   Marquee — global styles
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: auto;
  background: var(--c-ink);            /* behind everything: no white flash on overscroll */
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  font-weight: 450;
  line-height: var(--lh-body);
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
  min-height: 100vh;
}

/* Print-shop grain over the whole page: light texture, never blocks clicks */
body::after {
  content: "";
  position: fixed; inset: 0;
  z-index: 80;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img, picture, video, svg, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { padding: 0; list-style: none; }
table { border-collapse: collapse; width: 100%; }

/* ---- Headings: poster type -------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 900;
  font-stretch: var(--stretch-wide);
  line-height: var(--lh-head);
  letter-spacing: var(--ls-display);
  text-transform: uppercase;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); line-height: var(--lh-tight); }
h2 { font-size: var(--fs-h2); line-height: var(--lh-tight); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.025em; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.01em; font-weight: 800; font-stretch: 100%; }

p { text-wrap: pretty; }
strong, b { font-weight: 750; }
::selection { background: var(--hi); color: var(--c-ink); }

/* ---- Focus: visible, high contrast, never removed ------------------------------------ */
:focus-visible {
  outline: 3px solid var(--fg);
  outline-offset: 3px;
  border-radius: 4px;
}
[data-surface="ink"] :focus-visible { outline-color: var(--hi); }

.skip-link {
  position: fixed; left: var(--s-4); top: var(--s-4);
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--hi); color: var(--c-ink);
  border-radius: var(--r-pill);
  font-weight: 700;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* ---- Entrance helpers (IntersectionObserver adds .is-in) -------------------------------- */
.js [data-reveal],
.js [data-reveal-group] > * {
  opacity: 0;
  transform: translateY(1.5rem);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.js [data-reveal].is-in,
.js [data-reveal-group].is-in > * { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}
.no-motion [data-reveal], .no-motion [data-reveal-group] > * { opacity: 1 !important; transform: none !important; }

/* Titles split by motion.js stay hidden only until the split is ready */
.js [data-split] { visibility: hidden; }
.no-motion [data-split] { visibility: visible; }

/* The hidden attribute must always win over component display rules (filters rely on it) */
[hidden] { display: none !important; }
