/* S4 — base: fonts, reset, type primitives, focus, layout helpers.
   Breakpoints (mobile-first): 700px (tablet), 900px (nav expands), 1100px (desktop). */

/* ---------- Archivo (self-hosted, SIL OFL 1.1) ---------- */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 400; font-display: swap; src: url('../assets/fonts/archivo-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 500; font-display: swap; src: url('../assets/fonts/archivo-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 600; font-display: swap; src: url('../assets/fonts/archivo-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 700; font-display: swap; src: url('../assets/fonts/archivo-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 800; font-display: swap; src: url('../assets/fonts/archivo-latin-800-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 900; font-display: swap; src: url('../assets/fonts/archivo-latin-900-normal.woff2') format('woff2'); }
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 600; font-display: swap; src: url('../assets/fonts/archivo-latin-600-italic.woff2') format('woff2'); } /* typed signatures on /register */
@font-face { font-family: 'Archivo'; font-style: italic; font-weight: 900; font-display: swap; src: url('../assets/fonts/archivo-latin-900-italic.woff2') format('woff2'); }

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
html.menu-open { overflow: hidden; }

body {
  margin: 0;
  min-width: 320px;
  background: var(--black);
  color: var(--text);
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
a:hover { opacity: 0.88; }
button, input, select, textarea { font: inherit; color: inherit; }
address { font-style: normal; }
[hidden] { display: none !important; }

/* Every in-page target clears the sticky header. */
[id] { scroll-margin-top: calc(var(--header-h) + 1px); }

/* ---------- Grounds ---------- */
.ground-panel { background: var(--panel); }

/* Grain over the whole page (tokens: --grain*). A document-sized absolute layer,
   not background-attachment: fixed (which iOS ignores). Over the sticky header (50)
   and menu (49) so they get it too; under the skip link (100). */
body { position: relative; }
body::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 60;
  pointer-events: none;
  background: var(--grain) 0 0 / var(--grain-size);
  opacity: var(--grain-opacity);
}

/* ---------- Type primitives ---------- */
.headline {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.045em;
  line-height: 0.9;
  overflow-wrap: break-word;
}
.eyebrow {
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red-text);
}
.eyebrow--muted { color: var(--text-subtle); }
@media (min-width: 700px) {
  .eyebrow { font-size: 12px; }
}

.h2 { font-size: var(--fs-h2); }
.body-text { font-size: var(--fs-body); line-height: 1.55; color: var(--text-muted); }

/* Brand red for large type only ("MAT."); small red text uses --red-text. */
.red { color: var(--red); }

/* Line breaks that only apply on wide screens (phones wrap naturally). */
.br-wide { display: none; }
@media (min-width: 700px) {
  .br-wide { display: inline; }
}

/* ---------- Focus ---------- */
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
[tabindex="-1"]:focus { outline: none; }

/* ---------- Layout ---------- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }

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

.skip-link {
  position: absolute;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 12px 16px;
  background: var(--text);
  color: var(--black);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; outline-color: var(--red); }

/* Honeypot: off-screen, not display:none (some bots skip hidden fields). */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

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