/* Self-hosted brand fonts. No external font CDN, deliberately: the site is under
   cookie-consent obligations and a CDN font request is a third-party call.

   Five type roles, four families (see docs/design-system.md §4.1):
     display  Zing Rust      hero H1 and page-title bands ONLY, never inside content
     headline Barlow Cond.   H1-H6 inside content
     label    Barlow Cond.   buttons, nav, eyebrows, table headers
     body     Figtree        paragraphs, lists, captions
     script   Caveat         POLAROID CAPTIONS ONLY. Nothing else, ever.

   Zing Rust is one weight with no italics, which is why it is scoped to display
   only. Barlow Condensed carries the hierarchy underneath it.

   CAVEAT IS AN EXCEPTION, ADDED 2026-09-08 ON DAN'S INSTRUCTION. The system was
   three families on purpose and this makes four. It exists for one component:
   the handwritten caption on a polaroid frame, where set type reads as a label
   printed on the frame rather than as something a person wrote on the photo.
   That is the entire justification and it does not extend past that component.
   If it starts appearing in headings or pull quotes, the rule has been lost.
   Brand is normally read-only and this should be reflected in the portal. */

@font-face {
  font-family: "Zing Rust";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/zingrustg2-base-webfont.woff2") format("woff2"),
       url("../fonts/zingrustg2-base-webfont.woff") format("woff");
}

@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-500.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Barlow Condensed";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/barlow-condensed-latin-700.woff2") format("woff2");
}

@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/figtree-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/figtree-latin-400-italic.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/figtree-latin-600.woff2") format("woff2");
}
@font-face {
  font-family: "Figtree";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/figtree-latin-700.woff2") format("woff2");
}

/* Metric-matched stand-ins for Barlow Condensed, shown during the font-display:swap
   window before the woff2 arrives. A plain 'Arial Narrow' fallback is ~20% WIDER
   than Barlow Condensed, so every nav label shrank when the real face landed and
   the whole header menu slid sideways (measured 2026-10-16: items 139px -> 120px).
   size-adjust scales the local face to Barlow's advance widths, so the swap changes
   the letterforms but not the width of a line.

   One face per weight, because one ratio cannot serve both: Barlow's 600 is
   relatively narrower than its 700 against the same Arial Narrow Bold. Ratios were
   measured in Chromium against these exact local() faces: 600 on the header nav
   labels themselves (the thing that moved), 700 on section headings, 400-500 on
   mixed labels and headings. Arial is the second stand-in, for machines with no
   Arial Narrow. These are local system fonts: nothing is requested, so nothing
   changes for consent. */
@font-face {
  font-family: "Barlow Condensed Fallback";
  font-weight: 400 500;
  src: local("Arial Narrow"), local("ArialNarrow");
  size-adjust: 85%;
}
@font-face {
  font-family: "Barlow Condensed Fallback";
  font-weight: 600;
  src: local("Arial Narrow Bold"), local("ArialNarrow-Bold");
  size-adjust: 80.5%;
}
@font-face {
  font-family: "Barlow Condensed Fallback";
  font-weight: 700;
  src: local("Arial Narrow Bold"), local("ArialNarrow-Bold");
  size-adjust: 87%;
}
@font-face {
  font-family: "Barlow Condensed Fallback Arial";
  font-weight: 400 500;
  src: local("Arial"), local("ArialMT");
  size-adjust: 70%;
}
@font-face {
  font-family: "Barlow Condensed Fallback Arial";
  font-weight: 600;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 66%;
}
@font-face {
  font-family: "Barlow Condensed Fallback Arial";
  font-weight: 700;
  src: local("Arial Bold"), local("Arial-BoldMT");
  size-adjust: 71%;
}

/* Caveat, SIL Open Font License 1.1, so self-hosting is permitted. Variable on
   the weight axis, latin subset, one file for the whole range. Scoped to
   .dfc-polaroid figcaption; see the note at the top of this file. */
@font-face {
  font-family: "Caveat";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/caveat-latin-variable.woff2") format("woff2-variations");
}
