/* Tare — self-hosted fonts (latin subset, woff2)
 * Space Grotesk 400/500/600/700 + JetBrains Mono 400/500/700.
 * font-display: swap avoids invisible-text blocking; the "Fallback" faces
 * below are metric-matched to the real fonts (size-adjust/ascent-override/
 * descent-override computed from each font's own hhea/OS-2 tables against
 * Arial for Space Grotesk and Courier New for JetBrains Mono) so the
 * system-font paint and the webfont swap land at ~the same box height,
 * cutting layout shift (CLS) during the swap.
 */

@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/space-grotesk-400.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/space-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/fonts/space-grotesk-600.woff2') format('woff2');
}
@font-face {
  font-family: 'Space Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/space-grotesk-700.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-400.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-500.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-700.woff2') format('woff2');
}

/* Metric-matched fallbacks — sized/shaped to approximate Space Grotesk and
 * JetBrains Mono so local system fonts hold the same footprint until the
 * webfont paints in, minimizing reflow. Values derived from each webfont's
 * own unitsPerEm/ascent/descent (fonttools dump) vs. Arial / Courier New. */
@font-face {
  font-family: 'Space Grotesk Fallback';
  src: local('Arial');
  ascent-override: 81.34%;
  descent-override: 24.14%;
  line-gap-override: 0%;
  size-adjust: 120.98%;
}
@font-face {
  font-family: 'JetBrains Mono Fallback';
  src: local('Courier New');
  ascent-override: 102.02%;
  descent-override: 30.0%;
  line-gap-override: 0%;
  size-adjust: 99.98%;
}
