/* ==========================================================================
   TBEATZ Web — 自托管字体
   --------------------------------------------------------------------------
   全部本地托管，无 CDN、无 Google Fonts 请求（离线与中国网络约束）。
   由 bin/build-fonts.py 从 fonts-src/ 生成，改文案后需重跑（见 README.md）。

   字体分工：
     衬线  Source Serif 4（拉丁） + 源古宋體（中日韩）—— 同属思源超家族，中西同源
     无衬线 Inter（拉丁） + 系统 CJK 无衬线
     等宽  IBM Plex Mono

   栈顺序的作用：拉丁字体排在中日韩字体之前，所以英文永远走 Source Serif 4 /
   Inter，中文才落到源古宋體。源古宋體子集里带的少量拉丁字母只是保底，
   正常情况下不会被用到。
   ========================================================================== */

/* ---- 拉丁衬线：Source Serif 4（可变字重 200–900）------------------------ */
@font-face {
  font-family: "Source Serif 4";
  src: url("source-serif-4-var.woff2") format("woff2-variations"),
       url("source-serif-4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

/* ---- 拉丁无衬线：Inter（可变字重 100–900）------------------------------- */
@font-face {
  font-family: "Inter";
  src: url("inter-var.woff2") format("woff2-variations"),
       url("inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---- 中日韩衬线：源古宋體 -----------------------------------------------
   unicode-range 限定在中日韩区段：纯英文/法文页面不会下载这 169 KB。 */
@font-face {
  font-family: "Yuangu Songti";
  src: url("yuangu-songti.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+2E80-2EFF,    /* 中日韩部首补充 */
    U+3000-303F,    /* 中日韩符号和标点 */
    U+3200-4DBF,    /* 带圈字符、扩展A */
    U+4E00-9FFF,    /* 中日韩统一表意文字 */
    U+F900-FAFF,    /* 兼容表意文字 */
    U+FE30-FE4F,    /* 中日韩兼容形式 */
    U+FF00-FFEF;    /* 半角及全角形式 */
}

/* ---- 等宽：IBM Plex Mono ------------------------------------------------ */
@font-face {
  font-family: "IBM Plex Mono";
  src: url("ibm-plex-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("ibm-plex-mono-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
