/* ==========================================================================
   apex-v2 base — self-hosted fonts, reset, typographic primitives
   Zero external requests: all @font-face src URLs are same-origin.
   Source Sans 3 ships no 700 file — strong/b cap at 600, never faux-bold.
   ========================================================================== */

@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display/400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display/400-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display/700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Playfair Display";
  src: url("/assets/fonts/playfair-display/900.woff2") format("woff2");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3/300.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3/400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/assets/fonts/source-sans-3/600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime/400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Courier Prime";
  src: url("/assets/fonts/courier-prime/700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ── reset ──────────────────────────────────────────────────────────────── */

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

html {
  background: var(--surface-deep);
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

img,
svg {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
p,
figure,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul[class],
ol[class] {
  padding: 0;
  list-style: none;
}

/* Source Sans 3 has no 700 file — never faux-bold in the body face. */
strong,
b {
  font-weight: 600;
}

/* ── links ──────────────────────────────────────────────────────────────── */

a {
  color: inherit;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  transition: color var(--transition), text-decoration-thickness var(--transition);
}

a:hover {
  text-decoration-thickness: 2px;
}

::selection {
  background: var(--accent);
  color: var(--text-primary);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

/* ── skip link ──────────────────────────────────────────────────────────── */

.skip-link {
  position: fixed;
  top: 0;
  left: var(--gutter);
  z-index: 100;
  padding: 10px 14px;
  background: var(--surface-deep);
  color: var(--text-on-dark);
  font-family: var(--font-data);
  font-size: var(--fs-nav);
  text-transform: uppercase;
  letter-spacing: var(--track-tight);
  transform: translateY(-150%);
  transition: transform var(--transition);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── typographic primitives ─────────────────────────────────────────────── */

.serif {
  font-family: var(--font-display);
}

.balance {
  text-wrap: balance;
}

@media (max-width: 620px) {
  body {
    font-size: 15px;
  }
}
