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

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

@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;
  }
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-variation-settings: "wdth" 112;
  letter-spacing: -0.02em;
  overflow-wrap: break-word;
}

h1 {
  font-size: var(--fs-h1);
  line-height: 0.94;
  letter-spacing: -0.03em;
  font-variation-settings: "wdth" 118;
}

h2 {
  font-size: var(--fs-h2);
  line-height: 0.98;
  font-variation-settings: "wdth" 112;
}

h3 {
  font-size: var(--fs-h3);
  line-height: 1.15;
  font-variation-settings: "wdth" 105;
}

p {
  max-width: 62ch;
}

.mono {
  font-family: var(--font-mono);
  letter-spacing: 0.02em;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-eyebrow);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 500;
}

.text-dim {
  color: var(--text-dim);
}

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

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

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

.skip-link {
  position: absolute;
  left: var(--sp-2);
  top: -60px;
  z-index: var(--z-overlay);
  background: var(--signal);
  color: var(--on-signal);
  padding: var(--sp-1) var(--sp-3);
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  transition: top var(--dur) var(--ease);
}

.skip-link:focus-visible {
  top: var(--sp-2);
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: max(var(--gutter), 20px);
}

/* ---- Reveal system ---- */
/* Hidden-until-revealed only applies once JS confirms it can reveal it (see the
   html.classList.add('js') call in <head>) — without JS the content stays visible. */
html.js [data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
  transition-delay: var(--reveal-delay, 0ms);
}

html.js [data-reveal].is-in {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
