/* ==========================================================================
   保嘉达国际物流 — 字体加载层 (Self-hosted, 大陆可访问)
   --------------------------------------------------------------------------
   策略（依据 DESIGN.md「Loading」条款）:
   1. 拉丁字符与数字自托管 woff2 —— 不依赖 fonts.googleapis.com（大陆被墙）。
   2. 中文正文走系统字体栈 —— 完整中文字库数 MB，会拖垮 4G 首屏 LCP。
   3. 字体族 token 只在本文件定义；字号 token 见 style.css 的 --text-*。
      两者命名空间必须分开：曾因 --font-body 同名承载「族」与「字号」
      两种值，导致 font-family: 16px 无效，全站正文回落浏览器默认衬线体。
   ========================================================================== */

/* --------------------------------------------------------------------------
   Cabinet Grotesk (Fontshare, 免费商用) — 展示字体
   仅用于大数字 13 / 5 / 20-25 / 35 / 100+ 与英文展示标题。
   Cabinet Grotesk 不在 Google Fonts 上（css2 返回 400），必须自托管。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Cabinet Grotesk';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../assets/fonts/cabinet-grotesk-500.woff2') format('woff2');
}
@font-face {
  font-family: 'Cabinet Grotesk';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../assets/fonts/cabinet-grotesk-700.woff2') format('woff2');
}
@font-face {
  font-family: 'Cabinet Grotesk';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('../assets/fonts/cabinet-grotesk-800.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   Source Sans 3 (可变字体, 200–900) — 拉丁与数字正文
   一个可变文件覆盖全部字重；unicode-range 让 latin-ext 只在需要时下载。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-latin.woff2') format('woff2');
  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: 'Source Sans 3';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('../assets/fonts/source-sans-3-latin-ext.woff2') format('woff2');
  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;
}

/* --------------------------------------------------------------------------
   JetBrains Mono (可变字体, 100–800) — 运单号 / 港口代码 / ETA
   防止 O/0、I/1 混淆。仅拉丁子集。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('../assets/fonts/jetbrains-mono-latin.woff2') format('woff2');
  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;
}

/* --------------------------------------------------------------------------
   字体族 Token
   拉丁字体排在中文字体之前：拉丁与数字取自托管 webfont，
   汉字自动落到系统中文字体，这是混排的标准做法。
   -------------------------------------------------------------------------- */
:root {
  /* 中文系统字体栈 —— 按平台覆盖率排序 */
  --font-cjk:
    'PingFang SC',            /* macOS / iOS */
    'HarmonyOS Sans SC',      /* 华为 / 鸿蒙 */
    'MiSans',                 /* 小米 */
    'Source Han Sans SC',     /* Adobe / Google 开源 */
    'Noto Sans CJK SC',       /* Android / Linux */
    'Hiragino Sans GB',       /* 旧版 macOS */
    'Microsoft YaHei',        /* Windows */
    'WenQuanYi Micro Hei',    /* Linux 兜底 */
    sans-serif;

  /* 展示字体：大数字与英文展示标题。汉字回落中文系统栈 */
  --font-display: 'Cabinet Grotesk', var(--font-cjk);

  /* 正文字体：拉丁与数字用 Source Sans 3，汉字用系统中文栈 */
  --font-body: 'Source Sans 3', var(--font-cjk);

  /* 等宽字体：运单号、港口代码、ETA */
  --font-mono: 'JetBrains Mono', 'SFMono-Regular', ui-monospace, Consolas,
               'Liberation Mono', Menlo, monospace;
}
