/*
 * OAPF Font Stack — self-hosted, no CDN
 * Overrides arura.css Colfax/Nulshock references with OAPF brand fonts
 * Per CLAUDE.md: Inter (headings), Georgia (body longform), JetBrains Mono (code)
 */

/* @font-face declarations — self-hosted woff2 */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/inter/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/inter/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/inter/inter-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/inter/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono/jetbrains-mono-400.woff2') format('woff2');
}

/* ── Aliases for legacy Colfax/Nulshock @font-face names from arura.css ──
   The arura.css declarations point to /fonts/colfax/* and /fonts/nulshock/*
   which don't exist in this project — Meteor's static handler falls through
   to the SPA route so the browser receives index.html (text/html), and the
   font sanitizer rightly rejects it.  Redefine the SAME family names here
   with valid src URLs that DO exist (Inter for body weights, JetBrains Mono
   for the display weights). Cascade: oapf-fonts.css loads after arura.css
   so these win. */
@font-face {
  font-family: 'Colfax-light';
  font-style: normal; font-weight: 300; font-display: swap;
  src: url('/fonts/inter/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Colfax-regular';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/inter/inter-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Colfax-medium';
  font-style: normal; font-weight: 500; font-display: swap;
  src: url('/fonts/inter/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Colfax-bold';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/inter/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Nulshock';
  font-style: normal; font-weight: 400; font-display: swap;
  src: url('/fonts/inter/inter-700.woff2') format('woff2');
}
@font-face {
  font-family: 'NulshockLt';
  font-style: normal; font-weight: 300; font-display: swap;
  src: url('/fonts/inter/inter-500.woff2') format('woff2');
}
@font-face {
  font-family: 'NulshockBd';
  font-style: normal; font-weight: 700; font-display: swap;
  src: url('/fonts/inter/inter-700.woff2') format('woff2');
}

/* Override arura.css font-family declarations */
:root {
  --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: Georgia, 'Times New Roman', serif;
  --font-business: 'Inter', Calibri, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-code: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', 'Consolas', monospace;
}

/* Override Colfax-regular references from arura.css */
body,
.oapf-app,
.oapf-nav,
.oapf-footer {
  font-family: var(--font-business) !important;
}

h1, h2, h3, h4, h5, h6,
.hero h1,
.hero-text h1,
.page-title {
  font-family: var(--font-heading) !important;
}

pre, code, kbd, samp,
.code-block,
pre code {
  font-family: var(--font-code) !important;
}

/* Body longform — essays, governance docs, standards */
.oapf-page p,
.oapf-page li,
.gov-doc p,
.std-draft p,
.essay-body p {
  font-family: var(--font-body);
}
