/* ============================================================
   Base — Reset & Foundations
   ============================================================ */

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

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

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

body {
  font-family: var(--sans);
  font-size: var(--t-base);
  font-weight: 400;
  line-height: 1.65;
  color: var(--ink);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ── Typography defaults ────────────────────────────────── */

h1, h2, h3, h4, h5 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--ink);
}

p {
  line-height: 1.7;
  color: var(--ink-2);
}

p + p {
  margin-top: var(--s-4);
}

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

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

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  font-family: inherit;
  border: none;
  background: none;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* ── Layout utilities ───────────────────────────────────── */

.container {
  width: 100%;
  max-width: var(--max-w);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.section {
  padding-top: var(--s-24);
  padding-bottom: var(--s-24);
}

@media (max-width: 768px) {
  .section {
    padding-top: var(--s-16);
    padding-bottom: var(--s-16);
  }
}

/* ── Accessibility ──────────────────────────────────────── */

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

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

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 200;
  background-color: var(--accent);
  color: var(--ink-inv);
  font-family: var(--sans);
  font-size: var(--t-sm);
  padding: var(--s-3) var(--s-5);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--s-3);
}

.img-failed {
  opacity: 0;
}

/* ── Type utilities ─────────────────────────────────────── */

.eyebrow {
  font-family: var(--sans);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.eyebrow--inv {
  color: var(--ink-inv-2);
}

/* ── Scroll reveal ──────────────────────────────────────── */

/* Content is visible by default. main.js adds .pre-reveal only to elements
   below the first viewport, so nothing on screen ever waits for a reveal. */
html.js [data-reveal] {
  transition:
    opacity var(--ease-s) var(--delay, 0ms),
    transform var(--ease-s) var(--delay, 0ms);
}

html.js [data-reveal].pre-reveal {
  opacity: 0;
  transform: translateY(20px);
}

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