/**
 * @file fonts.css
 * Web font declarations for weg_canvas.
 *
 * Helvetica Neue is self-hosted in fonts/HelveticaNeue/ as woff2 subsets.
 * Each face is split into a "latin" and a "latin-ext" file using the same
 * unicode-range boundaries as Google Fonts, so a page only downloads the
 * latin-ext file when it actually contains one of those characters. Greek
 * and Cyrillic are not shipped; they fall back to the system font. The
 * subsets keep kerning and the source files' vertical metrics, which the
 * descent/ascent overrides below depend on. Regenerate them from the
 * licensed source woff2 files with fontTools, e.g.:
 *   pyftsubset HelveticaNeueRoman.woff2 --unicodes="<range below>"
 *     --layout-features='*' --name-IDs='*' --flavor=woff2 --desubroutinize
 *
 * Weight 500 (Medium) is added over the wealth_enhancement approach — required
 * for WEG button text (Utility/Button Text = 500 Medium per Figma).
 *
 * Cardone is the WEG display serif used for heading emphasis (*…* syntax in
 * Canvas). Both the upright and italic faces are self-hosted in fonts/Cardone/.
 * Source files: 205TF-Cardone-Light and 205TF-Cardone-LightItalic (woff + woff2).
 * These are the same files Cohesion/Site Studio used under public://cohesion/.
 *
 * You can customize these values without rebuilding the compiled CSS. Copy this
 * file to your web root, so it sits next to index.php, and clear Drupal's
 * cache. Then, any changes you make in this file should be reflected right away.
 */

/* Cardone Light — upright face (weight 300) */
@font-face {
  font-family: "Cardone";
  src:
    url("../fonts/Cardone/205TF-Cardone-Light.woff2") format("woff2"),
    url("../fonts/Cardone/205TF-Cardone-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Cardone LightItalic — the display italic face used for heading emphasis */
@font-face {
  font-family: "Cardone";
  src:
    url("../fonts/Cardone/205TF-Cardone-LightItalic.woff2") format("woff2"),
    url("../fonts/Cardone/205TF-Cardone-LightItalic.woff") format("woff");
  font-weight: 300;
  font-style: italic;
  font-display: swap;
}

/* Helvetica Neue Thin (200) */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Thin-latin.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Thin-latin-ext.woff2") format("woff2");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue Light (300) */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Light-latin.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Light-latin-ext.woff2") format("woff2");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue Roman (400) — preloaded in templates/includes/preload.twig */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Roman-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Roman-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue Italic (400) — body <em>; without it browsers synthesize an
 * oblique from the Roman. */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Italic-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Italic-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue Medium (500) — required for button text per Figma Utility/Button Text spec. */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Medium-latin.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Medium-latin-ext.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* Helvetica Neue Bold (700) */
@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Bold-latin.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Bold-latin-ext.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  descent-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* The same Roman face with its own ascent and descent, for text-entry
 * fields only (--font-field, applied in forms.css). Chromium renders an
 * input's placeholder in a box that is exactly the font's normal line height
 * and clips its overflow, with `line-height: initial !important` in the UA
 * stylesheet so no author rule can enlarge it. With descent-override: 0%
 * that box ends at the baseline, cutting off the descenders of g, j, p, q,
 * y and commas; even the file's own metrics (ascent 714, descent 198, cap
 * height 700) shave the tops of round capitals (S, O, C, G, Q) and the tails
 * of g and y.
 *
 * A line box centers ascent + descent, so capitals sit centered only when
 * ascent - descent equals the cap height (70%) — what the faces above get
 * from descent-override: 0%, and why buttons beside a field line up with
 * it. Each value must also clear the glyphs (overshoot ~72%, tails ~25%)
 * and their sum must stay under the fields' 1.5 line-height; change both
 * together. */
@font-face {
  font-family: "Helvetica Neue Field";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Roman-latin.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 100%;
  descent-override: 30%;
  line-gap-override: 0%;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: "Helvetica Neue Field";
  src: url("../fonts/HelveticaNeue/HelveticaNeue-Roman-latin-ext.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  ascent-override: 100%;
  descent-override: 30%;
  line-gap-override: 0%;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
    U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
