/* ════════════════════════════════════════════════════════════════════
   BASE — reset, body, headings, links, scrollbar, focus, selection
   ──────────────────────────────────────────────────────────────────── */

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

html, body { margin: 0; padding: 0; }

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

body {
  background: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  font-size: var(--t-16);
  line-height: var(--leading-normal);
  font-feature-settings: 'ss01','ss02','cv11';
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { max-width: 100%; display: block; height: auto; }
svg { fill: currentColor; }
svg.icon, svg.chevron, svg.forge-seal { display: inline-block; }

button { font: inherit; color: inherit; }
a, button { cursor: pointer; }

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

[id] { scroll-margin-top: calc(var(--header-h) + 16px); }

/* Headings */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-snug);
  color: var(--foreground);
  text-wrap: balance;
  margin: 0;
}
h1 { font-size: var(--type-4xl); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: 0.95; }
h2 { font-size: var(--type-3xl); font-weight: 800; letter-spacing: var(--tracking-tight); line-height: 1.02; }
h3 { font-size: var(--type-xl); font-weight: 700; letter-spacing: var(--tracking-snug); }
h4 { font-size: var(--t-18); font-weight: 600; letter-spacing: -0.01em; }
h5 { font-size: var(--t-14); font-weight: 600; }

p {
  color: var(--ink-2);
  text-wrap: pretty;
  max-width: var(--measure-body);
  margin: 0;
}
p.lead { font-size: var(--t-18); line-height: var(--leading-normal); color: var(--ink-2); }

/* Editorial italic — Gambarino */
.italic-display,
em.italic,
.italic {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  color: var(--accent);
  font-feature-settings: normal;
}

/* Mono */
.mono,
code, kbd, samp {
  font-family: var(--font-mono);
  font-feature-settings: 'zero','ss01';
}

code.inline {
  background: var(--white-2);
  color: var(--foreground);
  padding: 1px 6px;
  border-radius: var(--r-sm);
  font-size: 0.9em;
}

ul, ol { padding: 0; margin: 0; }
ul.bare, ol.bare { list-style: none; padding: 0; margin: 0; }

/* Selection */
::selection { background: var(--accent); color: var(--accent-foreground); }

/* Focus ring */
:focus-visible {
  outline: 2px solid var(--ring);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bone); }
::-webkit-scrollbar-thumb { background: var(--ink-5); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: var(--ink-3); }

/* Skip link */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  padding: 12px 16px;
  background: var(--navy);
  color: var(--bone);
  font-weight: 600;
  z-index: 1000;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
}

/* Visually-hidden helper */
.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;
}
