/* ============================================================
   BASE — reset, foundations, shared utilities
   ============================================================ */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg0);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: var(--fs-body);
  font-variation-settings: "wdth" 100, "wght" 400;
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

/* while the slate preloader is up, freeze scroll */
body[data-loading] { overflow: hidden; }

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

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }

::selection { background: var(--acc); color: #0b0b0c; }

:focus-visible {
  outline: 2px solid var(--acc);
  outline-offset: 3px;
}

/* ---------- typography helpers ---------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.serif {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
}

.acc { color: var(--acc); }

strong { font-variation-settings: "wdth" 100, "wght" 700; font-weight: 700; }

/* ---------- layout ---------- */
.section {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: var(--space-6) var(--gutter) 0;
}

.sec-head { margin-bottom: var(--space-4); }

.sec-kicker {
  color: var(--acc);
  margin-bottom: var(--space-2);
}

.sec-title {
  font-size: var(--fs-h2);
  font-variation-settings: "wdth" 118, "wght" 860;
  font-weight: 860;
  font-stretch: 118%;
  line-height: 0.95;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.sec-title--xl { font-size: var(--fs-h2-xl); }

.sec-title .serif { font-size: 1.04em; }

.sec-note { color: var(--ink3); margin-top: var(--space-2); }

/* ---------- reveal-on-scroll primitives (activated by scroll.js) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }

.reveal-line { overflow: hidden; }
.reveal-line > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 1s var(--ease-snap);
}
.reveal-line.is-in > span { transform: none; }

/* stagger children when a parent gets .is-in */
[data-stagger] > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}
[data-stagger].is-in > * { opacity: 1; transform: none; }

/* JS sets --i per child for the delay */
[data-stagger].is-in > :nth-child(n) { transition-delay: calc(var(--i, 0) * 70ms); }

/* ---------- status dots ---------- */
.dot {
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  margin-right: 0.5em;
  vertical-align: 1px;
}
.dot--ok { background: var(--ok); box-shadow: 0 0 8px var(--ok); animation: pulse 2.2s infinite; }
.dot--amber { background: var(--amber); box-shadow: 0 0 8px var(--amber); animation: pulse 2.2s infinite; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

/* ---------- reduced motion: kill it all ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
  .reveal, .reveal-line > span, [data-stagger] > * {
    opacity: 1 !important;
    transform: none !important;
  }
}
