/* The approved faces, self-hosted, declared ONCE for every DDM web surface.
 *
 * WHY THIS FILE EXISTS. These four @font-face rules lived inside
 * `ddm-launch.css`, where PERFORMANCE-BUDGET §1 ("Third-party | 0 bytes in the
 * critical path") is enforced by a test. The Wagtail marketing site, which is
 * the other half of the same brand, went on linking
 * `https://fonts.googleapis.com/css2?...` from `ddm/base.html` for the same
 * three families whose files were already committed here. So the rule was kept
 * on one surface and not on the other, and the launch page's own test docstring
 * -- "This is the check that caught DP-9's base template still linking
 * fonts.googleapis.com" -- described a fix that had never been made.
 *
 * Two surfaces linking one file is the point: the faces DDM uses are one fact,
 * and a second declaration of them is a second thing to drift.
 *
 * VISUAL-SYSTEM §1 owns which faces these are; this file only says where they
 * come from. */

@font-face {
  font-family: "Instrument Serif"; font-style: normal; font-weight: 400;
  font-display: swap; src: url("../font/instrument-serif-400.woff2") format("woff2");
}
@font-face {
  font-family: "Instrument Serif"; font-style: italic; font-weight: 400;
  font-display: swap; src: url("../font/instrument-serif-400-italic.woff2") format("woff2");
}
/* ONE FILE FOR THREE WEIGHTS. The latin subset is a variable font covering the
 * whole axis, so a weight range is the honest declaration -- three @font-face
 * rules pointing at one file would make the browser fetch it once and think it
 * had three. */
@font-face {
  font-family: "IBM Plex Sans"; font-style: normal; font-weight: 100 700;
  font-display: swap; src: url("../font/ibm-plex-sans-var.woff2") format("woff2");
}
/* MONO IS ONE WEIGHT, AND THAT IS A REAL LOSS, RECORDED. VISUAL-SYSTEM §1 lists
 * IBM Plex Mono at 400 and 500; only the 500 file is committed, so a 400 mono
 * label (the breadcrumb sets no weight) renders in the 500 face rather than
 * synthesising a lighter one. The alternative -- a fifth file for one weight of
 * a minor voice -- costs more than the difference is worth, and the launch page
 * has shipped this way since it was built. */
@font-face {
  font-family: "IBM Plex Mono"; font-style: normal; font-weight: 500;
  font-display: swap; src: url("../font/ibm-plex-mono-500.woff2") format("woff2");
}

/* METRICS-TUNED FALLBACK (§3, mitigation 2). The H1 is display type above the
 * fold, so a naive swap shifts the whole hero. Georgia at these overrides
 * occupies close to Instrument Serif's box, so the swap moves almost nothing. */
@font-face {
  font-family: "Instrument Fallback"; src: local("Georgia"), local("Times New Roman");
  size-adjust: 92%; ascent-override: 90%; descent-override: 22%; line-gap-override: 0%;
}
