/* ==========================================================
   Base: reset, typography, browser surfaces
   ========================================================== */

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

[hidden] { display: none !important; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 1rem);
  color-scheme: dark;
  scrollbar-color: var(--c-slab-3) var(--c-void);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--c-slab);
  color: var(--t-body);
  font-family: var(--f-text);
  font-size: var(--fs-base);
  line-height: 1.6;
  font-variant-numeric: lining-nums;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.is-locked { overflow: hidden; }

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

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--f-sign);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  color: var(--t-strong);
  text-wrap: balance;
}

h1 { font-size: var(--fs-3xl); }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); line-height: 1.05; }

p { margin: 0; text-wrap: pretty; }
p + p { margin-top: var(--s-4); }

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--c-red);
}
a:hover { text-decoration-thickness: 2px; }

strong { color: var(--t-strong); font-weight: 600; }

ul, ol { margin: 0; padding: 0; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }

::selection { background: var(--c-red); color: var(--c-paint); }

:focus-visible {
  outline: 2px solid var(--c-paint);
  outline-offset: 3px;
  border-radius: 2px;
}
.on-concrete :focus-visible { outline-color: var(--c-void); }

::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: var(--c-void); }
::-webkit-scrollbar-thumb { background: var(--c-slab-3); border: 3px solid var(--c-void); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #3a3a37; }

.tabular { font-variant-numeric: tabular-nums lining-nums; }

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

.skip-link {
  position: absolute; left: var(--s-4); top: -100px; z-index: 100;
  padding: var(--s-3) var(--s-4);
  background: var(--c-paint); color: var(--c-void);
  font-weight: 600;
}
.skip-link:focus { top: var(--s-4); }

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

/* ---------- Motion pre-states ----------
   Above-the-fold content is hidden from first paint until motion.js takes over, so it never flashes
   in and out. If scripts fail, a 3 s failsafe shows it anyway; reduced motion never hides anything. */
@keyframes ape-failsafe { to { opacity: 1; visibility: visible; } }
@media (prefers-reduced-motion: no-preference) {
  .js:not(.motion-ready):not(.motion-off) :is(.hero-copy > *, .quote, .page-hero .wrap > *) {
    opacity: 0;
    animation: ape-failsafe 0.4s 3s forwards;
  }
}
