/**
 * 站点全部字体 — 只从当前站点 /fonts/ 加载，禁止 OSS/CDN。
 *
 * 来源目录：website/public/fonts/（构建时复制到站点 public/fonts/）
 * 引入方式：index.html → <link rel="stylesheet" href="/fonts/fonts.css" />
 * 请勿在 Vue/CSS 里用 url('@/assets/fonts/...')，否则会被 Vite 打进 OSS。
 */

/* ========== 正文：Noto Sans SC（简体子集） ========== */
@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/NotoSansSC-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+F900-FAFF, U+3000-303F, U+FF00-FFEF;
}

@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/NotoSansSC-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+F900-FAFF, U+3000-303F, U+FF00-FFEF;
}

@font-face {
  font-family: 'Noto Sans SC';
  src: url('/fonts/NotoSansSC-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  unicode-range: U+4E00-9FFF, U+3400-4DBF, U+F900-FAFF, U+3000-303F, U+FF00-FFEF;
}

/* 无 unicode-range 兜底（部分国产浏览器） */
@font-face {
  font-family: 'Noto Sans SC Fallback';
  src: url('/fonts/NotoSansSC-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC Fallback';
  src: url('/fonts/NotoSansSC-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Noto Sans SC Fallback';
  src: url('/fonts/NotoSansSC-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========== 展示：钉钉进步体 ========== */
@font-face {
  font-family: 'DingTalk JinBuTi';
  src: url('/fonts/DingTalk-JinBuTi.woff2') format('woff2'),
       url('/fonts/DingTalk-JinBuTi.woff') format('woff'),
       url('/fonts/DingTalk-JinBuTi.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'DingTalk JinBuTi';
  src: url('/fonts/DingTalk-JinBuTi.woff2') format('woff2'),
       url('/fonts/DingTalk-JinBuTi.woff') format('woff'),
       url('/fonts/DingTalk-JinBuTi.ttf') format('truetype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ========== 展示：杨任东竹石体 ========== */
@font-face {
  font-family: 'YangRenDongZhuShiTi';
  src: url('/fonts/YangRenDongZhuShiTi-Semibold.woff2') format('woff2'),
       url('/fonts/YangRenDongZhuShiTi-Semibold.ttf') format('truetype'),
       url('/fonts/杨任东竹石体-Semibold.woff2') format('woff2'),
       url('/fonts/杨任东竹石体-Semibold.ttf') format('truetype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ========== 全站正文（与 Vite 打包 CSS 无关，部署本文件即可生效） ========== */
:root {
  --site-font-family: 'Noto Sans SC', 'Noto Sans SC Fallback', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', '微软雅黑', 'Helvetica Neue', Helvetica,
    Arial, sans-serif;
  --el-font-family: var(--site-font-family);
}

html,
body,
#app {
  font-family: var(--site-font-family) !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
