/* Optional self-hosted provider for the design-system font roles. */
@font-face {
  font-family: "Crimson Pro";
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url("./fonts/crimson-pro-roman.woff2") format("woff2");
}

@font-face {
  font-family: "Crimson Pro";
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url("./fonts/crimson-pro-italic.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("./fonts/inter.woff2") format("woff2");
}

/*
 * Bind Inter's interface alternates to the face itself. Applying this bundle
 * through the inherited font-feature-settings property lets its feature tags
 * acquire unrelated meanings when descendants switch to another font.
 */
@font-face {
  font-family: "Discern Inter UI";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  font-feature-settings:
    "liga" 1, "calt" 1, "dlig" 1, "tnum" 1, "zero" 1, "ss03" 1, "salt" 1;
  src: url("./fonts/inter.woff2") format("woff2");
}

/* Marketing only: calt contextual alternates; dlig discretionary ligatures;
 * tnum tabular numbers; ss01 alternate digits; ss02 Disambiguation;
 * ss03 round quotes & comma. Features stay with this face. */
@font-face {
  font-family: "Discern Inter Marketing";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  font-feature-settings:
    "calt" 1, "dlig" 1, "tnum" 1, "ss01" 1, "ss02" 1, "ss03" 1;
  src: url("./fonts/inter.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./fonts/jetbrains-mono.woff2") format("woff2");
}

/*
 * Iowan is a native first choice and never swaps. On hosts without it,
 * Crimson Pro becomes the loading target, so the serif alias stays calibrated
 * to Crimson rather than Iowan.
 */

@font-face {
  font-family: "Discern Crimson Fallback Georgia";
  font-style: normal;
  font-weight: 200 599;
  src: local("Georgia");
  size-adjust: 89.12%;
  ascent-override: 100.99%;
  descent-override: 23.56%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Crimson Fallback Georgia";
  font-style: normal;
  font-weight: 600 900;
  src: local("Georgia-Bold");
  size-adjust: 82.06%;
  ascent-override: 109.68%;
  descent-override: 25.59%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Crimson Fallback Georgia";
  font-style: italic;
  font-weight: 200 599;
  src: local("Georgia-Italic");
  size-adjust: 82.51%;
  ascent-override: 109.08%;
  descent-override: 25.45%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Crimson Fallback Georgia";
  font-style: italic;
  font-weight: 600 900;
  src: local("Georgia-BoldItalic");
  size-adjust: 78.31%;
  ascent-override: 114.93%;
  descent-override: 26.82%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Inter Fallback Helvetica";
  font-style: normal;
  font-weight: 200 599;
  src: local("HelveticaNeue");
  size-adjust: 105.51%;
  ascent-override: 91.93%;
  descent-override: 22.75%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Inter Fallback Helvetica";
  font-style: normal;
  font-weight: 600 900;
  src: local("HelveticaNeue-Bold");
  size-adjust: 102.45%;
  ascent-override: 94.68%;
  descent-override: 23.43%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Inter Fallback Arial";
  font-style: normal;
  font-weight: 200 599;
  src: local("ArialMT");
  size-adjust: 106.17%;
  ascent-override: 91.36%;
  descent-override: 22.61%;
  line-gap-override: 0%;
}

@font-face {
  font-family: "Discern Inter Fallback Arial";
  font-style: normal;
  font-weight: 600 900;
  src: local("Arial-BoldMT");
  size-adjust: 102.56%;
  ascent-override: 94.58%;
  descent-override: 23.4%;
  line-gap-override: 0%;
}

:where([data-discern-root]) {
  --discern-font-display: "Iowan Old Style", "Crimson Pro",
    "Discern Crimson Fallback Georgia", "Palatino Linotype", Georgia,
    ui-serif, serif;
  --discern-font-body: "Inter", "Discern Inter Fallback Helvetica",
    "Discern Inter Fallback Arial", "Helvetica Neue", Arial, system-ui,
    sans-serif;
  --discern-font-ui: "Discern Inter UI", "Inter",
    "Discern Inter Fallback Helvetica", "Discern Inter Fallback Arial",
    "Helvetica Neue", Arial, system-ui, sans-serif;
  --discern-font-marketing: "Discern Inter Marketing", "Inter",
    "Discern Inter Fallback Helvetica", "Discern Inter Fallback Arial",
    "Helvetica Neue", Arial, system-ui, sans-serif;
  --discern-font-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo,
    monospace;
}
