/**
 * @file
 * Bitstream Charter — self-hosted, two files only.
 *
 * Charter is the soul of the brand. Regular and Italic only; the browser
 * is instructed never to synthesize bold or oblique. Hierarchy comes from
 * scale, family contrast, italic, and color — not weight.
 *
 * Files live at /themes/custom/neopoet_theme/fonts/. Preload is wired in
 * neopoet_theme.libraries.yml under the `charter-preload` library and
 * attached site-wide via neopoet_theme.theme.
 */

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

@font-face {
  font-family: "Charter";
  src: url("../fonts/charter-italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

/**
 * Forbid synthesized bold and oblique on any element using the serif
 * stack. Without this, browsers will fake a 700 Charter by smearing
 * outlines, which directly contradicts the weight discipline.
 */
:root {
  font-synthesis: none;
}

/**
 * Editorial OpenType features for serif body and display:
 * old-style figures (onum) live with the editorial register; UI register
 * (sans) gets lining and tabular figures applied per-element where needed.
 */
.np-serif,
.np-poem,
.np-prose,
h1, h2, h3, h4, h5, h6 {
  font-family: var(--np-font-serif);
  font-feature-settings: "kern", "liga", "onum";
}
