/* ============================================================
   base.css · self-hosted fonts, reset, core typography.
   ============================================================ */

/* ---- Self-hosted variable fonts (font-display: swap) -------- */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-var.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url("../fonts/jetbrains-mono-var.woff2") format("woff2");
}

/* ---- Reset ------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  font-feature-settings: "ss01", "cv05", "cv11";
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;            /* belt-and-braces against h-scroll */
  text-wrap: pretty;
}

img, picture, svg, canvas, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
ul, ol { list-style: none; }
:focus-visible {
  outline: 2px solid var(--c-signal);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---- Selection -------------------------------------------- */
::selection { background: var(--c-signal); color: var(--c-signal-ink); }

/* ---- Typography primitives -------------------------------- */
h1, h2, h3 {
  font-weight: 600;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  text-wrap: balance;
}

.display {
  font-size: var(--t-display);
  font-weight: 700;
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tighter);
}
.h1 { font-size: var(--t-h1); }
.h2 { font-size: var(--t-h2); }
.h3 { font-size: var(--t-h3); font-weight: 500; }

.lead {
  font-size: var(--t-lead);
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--c-text);
  max-width: var(--measure);
}
.body { max-width: var(--measure); color: var(--c-muted); }
.muted { color: var(--c-muted); }

/* ---- Mono metadata: the instrument voice ------------------- */
.mono {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--c-muted);
}
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--t-mono);
  font-weight: 500;
  letter-spacing: var(--ls-mono);
  text-transform: uppercase;
  color: var(--c-signal);
  display: inline-flex;
  align-items: center;
  gap: var(--s-3);
}
.eyebrow::before {
  content: "";
  width: 1.6em;
  height: var(--hairline);
  background: var(--c-signal);
  opacity: 0.8;
}

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

/* Accessible visually-hidden utility */
.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;
}

/* Skip link */
.skip-link {
  position: absolute; left: var(--s-4); top: -100%;
  background: var(--c-signal); color: var(--c-signal-ink);
  padding: var(--s-3) var(--s-5); border-radius: var(--radius-pill);
  font-weight: 600; z-index: 100;
  transition: top var(--dur-1) var(--ease-instrument);
}
.skip-link:focus { top: var(--s-4); }
