/*
 * 字体 —— 自托管，不走 Google Fonts。
 *
 * 为什么自托管：原来 <link> 到 fonts.googleapis.com 是一个**阻塞渲染**的
 * 第三方请求 —— 浏览器要先解析 DNS、建连接、下 12KB CSS，才能知道去哪下字体，
 * 期间页面白屏。实测那个请求要 475ms。
 * 现在浏览器拿到 HTML 就同时开始下字体，省掉整趟往返。
 *
 * 文件是从 Google Fonts 下载的 latin / latin-ext 子集（它是变量字体，
 * 一个文件覆盖全部字重，所以只有 4 个文件）。
 * 中文不在这里 —— 中文走系统字体（见 tokens.css 的 --font-body 回退栈），
 * 因为中文字体文件动辄几 MB，自己托管不划算。
 *
 * ⚠️ 这些文件名不带内容哈希，所以 _headers 里给的缓存时间不能是 immutable。
 *    换字体时要同时改文件名，否则老访客拿不到。
 */

/* ---------- Plus Jakarta Sans（正文 + 标题）---------- */
/* latin：覆盖英文 + 破折号 — 省略号 … 中点 ·，站上全部特殊字符都在这 */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;          /* 变量字体，一个文件覆盖全部字重 */
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-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;
}
/* latin-ext：带重音的欧洲字符，只有遇到才下（多 21KB） */
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/fonts/plus-jakarta-sans-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（小标签、数字、规格）---------- */
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/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;
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url('/fonts/jetbrains-mono-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;
}
