/*
 * Kantumruy Pro — self-hosted.
 *
 * Served from this app rather than from Google Fonts: the admin is used on
 * networks where a third-party font host is slow or blocked, and a missing
 * Khmer face is not a cosmetic problem — it is unreadable text.
 *
 * Two variable files cover every weight from 100 to 700 in upright and italic,
 * which is two requests instead of fourteen. Browsers without variable-font
 * support fall back to the static weights declared at the bottom.
 *
 * Licence: SIL Open Font License 1.1 — see OFL.txt beside this file.
 * Converted from the TTFs shipped by Google Fonts to WOFF2 (about 65% smaller).
 */

/* ---- Variable: one file per style, all weights ---------------------- */
@font-face {
  font-family: 'Kantumruy Pro';
  src: url('KantumruyPro-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Kantumruy Pro';
  src: url('KantumruyPro-Italic-VariableFont_wght.woff2') format('woff2');
  font-weight: 100 700;
  font-style: italic;
  font-display: swap;
}

/* ---- Static fallback, for engines with no variable-font support ------
 * Declared under a second family name and applied only inside the @supports
 * block below, so a browser that understands variable fonts never downloads
 * any of these.
 */
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Thin.woff2') format('woff2');            font-weight: 100; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-ThinItalic.woff2') format('woff2');      font-weight: 100; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-ExtraLight.woff2') format('woff2');      font-weight: 200; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-ExtraLightItalic.woff2') format('woff2');font-weight: 200; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Light.woff2') format('woff2');           font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-LightItalic.woff2') format('woff2');     font-weight: 300; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Regular.woff2') format('woff2');         font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Italic.woff2') format('woff2');          font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Medium.woff2') format('woff2');          font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-MediumItalic.woff2') format('woff2');    font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-SemiBold.woff2') format('woff2');        font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-SemiBoldItalic.woff2') format('woff2');  font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-Bold.woff2') format('woff2');            font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Kantumruy Pro Static'; src: url('static/KantumruyPro-BoldItalic.woff2') format('woff2');      font-weight: 700; font-style: italic; font-display: swap; }

/*
 * The whole app's type stack, in one place. Khmer first, then a Latin face for
 * anything Kantumruy Pro does not cover, then the system stack.
 */
:root {
  --font-khmer: 'Kantumruy Pro', 'Battambang', 'Khmer OS', sans-serif;
  --font-ui: 'Kantumruy Pro', 'Inter', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

@supports not (font-variation-settings: normal) {
  :root {
    --font-khmer: 'Kantumruy Pro Static', 'Battambang', 'Khmer OS', sans-serif;
    --font-ui: 'Kantumruy Pro Static', 'Inter', 'Source Sans Pro', system-ui, -apple-system, 'Segoe UI', sans-serif;
  }
}
