/* ==========================================================================
   Flosaic - Mozaic HUM webfont layer
   Built 2026-08-03 (website plan stage 3). Consumed by the website, the
   project-finance dashboard and client HTML one-pagers.

   Font files: Assets/fonts/ - byte-identical copies of the foundry-supplied
   WOFF2 web cuts (TipoType order #78538). Served AS-IS by licence: the
   TipoType Web EULA s8 prohibits converting, subsetting or generating font
   software from the supplied files (read 2026-08-03, detail in
   Fonts/Mozaic/mozaic-font-notes.md). Do not subset, do not convert.
   Self-host on flosaic.com.au only; licence cap 10,000 page views/month.

   Three weights ship (the site's full set - each weight is a separate
   download, and GEO is never needed because all logos are outlined SVGs):
     Extra Light 200 - large display lines only
     Light       300 - body copy
     Medium      500 - headings, lead paragraphs, stat labels
   font-weight values are declared explicitly because the fonts' own
   usWeightClass values are non-standard (135/210/480) and browsers would
   mis-match if left to infer.

   Preload snippet for the site <head> - the two most-used files:

     <link rel="preload" href="fonts/mozaichum-light-digital.woff2"  as="font" type="font/woff2" crossorigin>
     <link rel="preload" href="fonts/mozaichum-medium-digital.woff2" as="font" type="font/woff2" crossorigin>

   (Extra Light is deliberately not preloaded: one display line does not
   warrant delaying the two faces that render everything else.)
   ========================================================================== */

@font-face {
  font-family: 'Mozaic HUM';
  src: local('Mozaic HUM Extra Light'), local('MozaicHUM-ExtraLight'),
       url('fonts/mozaichum-extralight-digital.woff2') format('woff2');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mozaic HUM';
  src: local('Mozaic HUM Light'), local('MozaicHUM-Light'),
       url('fonts/mozaichum-light-digital.woff2') format('woff2');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Mozaic HUM';
  src: local('Mozaic HUM Medium'), local('MozaicHUM-Medium'),
       url('fonts/mozaichum-medium-digital.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

/* Metric-matched fallback, so the font-display swap does not visibly reflow.
   Overrides measured 2026-08-03 with fontTools against the actual files:
   Mozaic HUM typo ascent/descent 1638/-410 on 2048 upm -> 80% / 20% / 0 gap;
   size-adjust from real text advances (representative sentence, Mozaic HUM
   Light 110.9 em vs Arial 103.5 em -> 107.12%). Arial is the one metric
   fallback worth shipping: it is present on the Windows and macOS corporate
   machines this site must degrade gracefully on. */
@font-face {
  font-family: 'Mozaic HUM Fallback';
  src: local('Arial');
  size-adjust: 107.12%;
  ascent-override: 80%;
  descent-override: 20%;
  line-gap-override: 0%;
}

body {
  /* ss05 gives lowercase l a tail so l / I / 1 stop colliding in kL, ML/day,
     1.5 L/s. ss05 ONLY - Word can carry exactly one stylistic set, and the
     reports use ss05, so any other set here would make the site disagree
     with the reports inside the same brand. */
  font-feature-settings: 'ss05' 1;

  /* A weight that was not shipped must fail visibly in testing, not ship as
     a browser-smeared fake. */
  font-synthesis: none;
}

/* GOTCHA: font-feature-settings REPLACES rather than adds. Any rule that
   sets it must repeat the whole list or ss05 is silently dropped there.
   Use this helper for numeric columns instead of writing tnum alone: */
.tabular-figures {
  font-feature-settings: 'ss05' 1, 'tnum' 1;
}
/* Alternative for new code: font-variant-numeric: tabular-nums composes with
   font-feature-settings instead of replacing it, so it cannot drop ss05.
   Either route is fine; never write font-feature-settings: 'tnum' 1 alone. */
