*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + var(--sp-4));
}

body {
  margin: 0;
  font-family: var(--sans);
  font-size: var(--fs-md);
  line-height: var(--lh-relaxed);
  color: var(--body);
  background: var(--marble);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'kern','liga','onum';
  transition: background var(--dur-md) var(--ease), color var(--dur-md) var(--ease);
}

img, svg, video { display: block; max-width: 100%; height: auto; }

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--ink);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
}
h1 { font-size: var(--fs-4xl); font-weight: 900; }
h2 { font-size: var(--fs-2xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p { margin: 0 0 var(--sp-4); }

a {
  color: var(--brand);
  text-decoration: none;
  transition: color var(--dur-sm) var(--ease);
}
a:hover {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
}

em, i { font-style: italic; }
strong, b { font-weight: 600; color: var(--ink); }
small { font-size: var(--fs-sm); color: var(--muted); }
code, pre { font-family: var(--mono); font-size: 0.9em; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

::selection { background: var(--brand); color: var(--marble); }

/* ─── Layout primitives ─── */
.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}
.container--narrow { max-width: var(--container-sm); }
.container--xs     { max-width: var(--container-xs); }

.section { padding: var(--sp-8) 0; }
.section--soft { background: var(--stone-soft); }
.section--pt-0 { padding-top: 0; }
.section--pb-0 { padding-bottom: 0; }

/* ─── 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;
}
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--marble);
  padding: var(--sp-3) var(--sp-4);
  z-index: var(--z-toast); font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ─── Typography helpers ─── */
.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--brand);
  margin: 0 0 var(--sp-3);
  padding-bottom: 4px;
  border-bottom: 2px solid var(--gold);
}

.section__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
  padding-bottom: var(--sp-3);
  border-bottom: 2px solid var(--gold);
  flex-wrap: wrap;
}
.section__head h2 { margin: 0; }

.link-arrow {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--brand);
  white-space: nowrap;
}
.link-arrow:hover { color: var(--brand-deep); }

/* ─── Reading progress ─── */
.reading-progress {
  position: fixed; top: 0; left: 0; right: 0;
  height: 3px; background: transparent;
  z-index: calc(var(--z-sticky) + 1);
  pointer-events: none;
}
.reading-progress__bar {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--gold));
  transition: width 80ms linear;
}