/* Kaliputih Resto — webfont declarations for the web app.
 *
 * AUTHORED, not vendored. The design project's own tokens/fonts.css is deliberately
 * NOT copied into assets/brand/: it @imports the Google Fonts CDN (its only source of
 * Alegreya) and declares 15 @font-face rules, 11 of which point at font files this repo
 * does not ship — Copperplate x3, Rions x2, and the 9pt/72pt optical sizes. Vendoring it
 * would fire 11 404s the moment a .kp-btn rendered.
 *
 * So we self-host the four faces we actually use, from assets/fonts/*.woff2:
 *   Alegreya 700          --font-display  headings
 *   Google Sans Flex 400  --font-body     body and UI
 *   Google Sans Flex 500                  medium — labels, buttons
 *   Google Sans Flex 600                  semibold — figures, emphasis
 *
 * Copperplate (--font-secondary in the system) is substituted with Google Sans Flex in
 * kp-overrides.css. The brand's small-caps signal is the wide tracking, which any face
 * reproduces; Copperplate is an engraved display face and is hard to read at the 11-13px
 * this UI uses. invoice/brand.mjs made the same call for print.
 *
 * Served from /s/font/ — a STABLE prefix, deliberately not the per-deploy /s/<sha>/, so
 * shipping a CSS tweak never makes staff re-download 178 KB of fonts over 4G.
 *
 * woff2 only: supported by every browser since 2016, and 69% smaller than the TTFs
 * (564 KB -> 178 KB). The TTFs stay in the repo — the PDF pipeline base64-inlines those.
 *
 * font-display:swap everywhere — on a cold 4G load, text in a fallback face is far better
 * than a blank screen that looks like a broken deploy.
 */

@font-face {
  font-family: "Alegreya";
  src: url("/s/font/Alegreya-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("/s/font/GoogleSansFlex_24pt-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("/s/font/GoogleSansFlex_24pt-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans Flex";
  src: url("/s/font/GoogleSansFlex_24pt-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
