/**
 * 字体替换层（最后加载，覆盖参考站的商业字体）
 * ----------------------------------------------------------------------------
 * 被替换掉的（商业授权，不能商用）：
 *   din            → DIN Condensed Bold（Monotype）
 *   butler         → Helvetica Neue Thin（Monotype）
 *   PTDIN          → 未提供字体文件（原本就不生效）
 *   Arciform       → 未提供字体文件（原本就不生效）
 *   "microsoft yahei" → 微软雅黑（系统商业字体）
 *   Helvetica      → 系统商业字体
 *
 * 替换为（全部 SIL OFL / 开源，可免费商用）：
 *   Oswald        → 数字、年份、时间（DIN 观感）
 *   Inter         → 英文细体、英文小标题（Helvetica Neue 观感）
 *   NotoSansHans  → 中文正文（= Noto Sans SC，本地文件，不再走对方远程地址）
 *   Montserrat    → 原样保留（本身就是 OFL）
 */

/* ---------- 1. 本地中文字体（替代 acstyle.css 里的远程 URL） ---------- */
@font-face {
    font-family: "NotoSansHans";
    src: url("/static/ref/acnew/fonts/NotoSansHans-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;   /* 字体没下完先显示系统字体，避免白屏 */
}

/* ---------- 2. 数字字体：Oswald（DIN 替代） ---------- */
@font-face {
    font-family: "JF Digits";
    src: url("/static/theme/fonts/oswald-latin-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}
@font-face {
    font-family: "JF Digits";
    src: url("/static/theme/fonts/oswald-latin-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
}

/* ---------- 3. 英文细体：Inter（Helvetica Neue Thin 替代） ---------- */
@font-face {
    font-family: "JF Sans";
    src: url("/static/theme/fonts/inter-latin-300.woff2") format("woff2");
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "JF Sans";
    src: url("/static/theme/fonts/inter-latin-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

/* =====================================================================
 * 4. 覆盖：把用到商业字体的选择器全部改到上面的免费字体
 *    （参考站的规则写死了 font-family，必须用同等选择器 + !important 覆盖）
 * ===================================================================== */

/* 4.1 中文正文：body / pre / html（原来 NotoSansHans 远程 + 微软雅黑） */
html,
body,
pre {
    font-family: "NotoSansHans", "Noto Sans SC", "PingFang SC", "Hiragino Sans GB",
                 "Source Han Sans SC", "WenQuanYi Micro Hei", sans-serif !important;
}

/* 4.2 数字 / 年份 / 时间（原 din、PTDIN） */
.bbs .bb .n,
.history ul li .year,
.newsText ul li a .time,
.newsText2 ul li a .time,
.news ul li a .info .time,
.newsImg ul li a .time,
.newsImg2 ul li .info .time {
    font-family: "JF Digits", "Oswald", "Barlow Condensed", "Arial Narrow", sans-serif !important;
    font-weight: 700;
}

/* 4.3 英文细体 / 小标题（原 butler = Helvetica Neue Thin、Arciform） */
.proGG ul li .pdes,
.swiperNomal .swiper-pagination-bullet,
.common_title p,
.contactBox .cbl ul li .info .p,
.z_banner_text .en {
    font-family: "JF Sans", "Inter", "Segoe UI Light", "Helvetica Neue", Arial, sans-serif !important;
    font-weight: 300;
    font-style: normal;
}

/* 4.4 英文按钮/副标题（原 montserrat，本身 OFL，这里统一成本地 JF Sans，
       避免依赖参考站目录里的字体文件） */
.moreBtn,
.introBox .title p,
.subTitle p,
.hotTel a,
.slide3 .words,
.mapBox .name p,
.mapBox ul li .txt p {
    font-family: "JF Sans", "Inter", "Montserrat", "Segoe UI", Arial, sans-serif !important;
}

/* 4.5 兜底：任何残留的 Helvetica / 微软雅黑 / DIN 写法 */
[style*="font-family:Helvetica"],
[style*="font-family: Helvetica"],
[style*="font-family:'Helvetica'"],
[style*="font-family:DIN"],
[style*="font-family: DIN"],
[style*="微软雅黑"] {
    font-family: "NotoSansHans", "JF Sans", Arial, sans-serif !important;
}
