/* Fonts (self-hosted, latin subset, SIL OFL) */
@font-face {
  font-family: "Archivo";
  src: url("../assets/fonts/archivo-latin-var.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4-latin-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../assets/fonts/source-serif-4-latin-italic-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + var(--s-5));
}
body {
  min-height: 100vh;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
input, select, textarea, button { font: inherit; color: inherit; }
button { cursor: pointer; }
a, button, summary, label, select { touch-action: manipulation; -webkit-tap-highlight-color: rgb(196 122 82 / 0.25); }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--c-accent); color: var(--c-bg); }

/* Focus */
:focus-visible {
  outline: 2px solid var(--c-focus);
  outline-offset: 3px;
}
:focus:not(:focus-visible) { outline: none; }

/* Typography */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 520;
  line-height: var(--lh-heading);
  overflow-wrap: break-word;
  text-wrap: balance;
}
.display {
  font-size: var(--fs-display);
  font-variation-settings: "wdth" var(--wdth-display);
  line-height: var(--lh-display);
  letter-spacing: -0.02em;
}
h1, .h1 {
  font-size: var(--fs-h1);
  font-variation-settings: "wdth" 115;
  letter-spacing: -0.015em;
  line-height: 1.02;
}
h2, .h2 {
  font-size: var(--fs-h2);
  font-variation-settings: "wdth" var(--wdth-heading);
  font-weight: 500;
  letter-spacing: -0.01em;
}
h3, .h3 {
  font-size: var(--fs-h3);
  font-variation-settings: "wdth" 100;
  font-weight: 600;
  line-height: 1.25;
}
@media (max-width: 25rem) {
  h1, .h1 { font-variation-settings: "wdth" 100; }
}
p, li, dd { text-wrap: pretty; }
:where(.prose, .prose-block__body) p + p { margin-top: 1em; }
.lead {
  font-size: var(--fs-lead);
  line-height: 1.5;
  color: var(--c-text);
  max-width: var(--measure-tight);
}
.prose { max-width: var(--measure); }
.muted { color: var(--c-text-muted); }
.faint { color: var(--c-text-faint); }
.label {
  font-family: var(--font-display);
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--c-brass);
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.2em; }
a:hover { color: var(--c-accent-text); }
strong { font-weight: 600; }

/* Layout primitives */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: var(--section-y); }
.section + .section--ruled { border-top: var(--rule); }
.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gap);
}
.stack > * + * { margin-top: var(--stack-gap, var(--s-5)); }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: absolute;
  left: var(--s-4);
  top: var(--s-4);
  z-index: var(--z-skip);
  padding: var(--s-3) var(--s-4);
  background: var(--c-text);
  color: var(--c-bg);
  font-family: var(--font-display);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }

/* Spacing utilities (used sparingly instead of inline styles) */
.mt-3 { margin-top: var(--s-3); }
.mt-4 { margin-top: var(--s-4); }
.mt-5 { margin-top: var(--s-5); }
.mt-6 { margin-top: var(--s-6); }
.mt-7 { margin-top: var(--s-7); }
