/* ============================================================
   BASE — reset, typography, and the small details
   ============================================================ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
/* Lenis drives scrolling; native smooth would fight it. */
html.lenis { scroll-behavior: auto; }
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  background: var(--c-ink);
  color: var(--fg);
  font-family: var(--f-body);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

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

/* ---- display type ---- */
.display {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-mega);
  text-transform: uppercase;
  text-wrap: balance;
}

/* ---- the small caps label used to number and title every section ---- */
.label {
  font-family: var(--f-display);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--fg-muted);
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.label::before {
  content: '';
  width: clamp(1.5rem, 4vw, 3.5rem);
  height: 1px;
  background: currentColor;
  opacity: 0.5;
  flex: none;
}
.label__num { color: var(--accent); font-variant-numeric: tabular-nums; }

.lede {
  font-size: var(--t-md);
  line-height: 1.5;
  color: var(--fg);
  max-width: 46ch;
  text-wrap: pretty;
}
.body-copy {
  color: var(--fg-muted);
  max-width: 62ch;
  text-wrap: pretty;
}
.body-copy + .body-copy { margin-top: 1.15em; }

/* ---- selection + scrollbar + focus ---- */
::selection { background: var(--c-green); color: var(--c-black); }

html { scrollbar-width: thin; scrollbar-color: var(--c-teal) var(--c-ink); }
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: var(--c-ink); }
::-webkit-scrollbar-thumb {
  background: var(--c-gray);
  border: 2px solid var(--c-ink);
  border-radius: 99px;
}
::-webkit-scrollbar-thumb:hover { background: var(--c-teal); }

:focus-visible {
  outline: 2px solid var(--c-green);
  outline-offset: 4px;
  border-radius: 2px;
}
:focus:not(:focus-visible) { outline: none; }

.skip-link {
  position: fixed;
  top: 0; left: 50%;
  transform: translate(-50%, -120%);
  z-index: calc(var(--z-preload) + 10);
  background: var(--c-green);
  color: var(--c-black);
  font-family: var(--f-display);
  font-size: var(--t-sm);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  padding: 0.9rem 1.6rem;
  transition: transform var(--d-fast) var(--e-out);
}
.skip-link:focus-visible { transform: translate(-50%, 0); }

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

/* ============================================================
   REDUCED MOTION — every animation resolves to its end state
   ============================================================ */
@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;
    scroll-behavior: auto !important;
  }
  .marquee__track { animation: none !important; transform: none !important; }
  .cursor { display: none !important; }
}
