@charset "utf-8";
/* ==========================================================================
   font-unify.css —— 全站字体统一（歌润地板 / floorgreen.cn）
   --------------------------------------------------------------------------
   西文、数字：Inter
   中文：思源黑体（Noto Sans SC）

   两者均为「可变字体」，单个文件即覆盖 100–900 全部字重，
   因此不会再出现浏览器合成加粗（fake bold）导致的笔画发糊。

   文件体积：
     static/font/inter-var.woff2          约  50 KB（正体）
     static/font/inter-var-italic.woff2   约  55 KB（斜体）
     static/font/noto-sans-sc-var.woff2   约 315 KB（中文，已按本组页面实际用字子集化）
   合计约 420 KB，且只需下载一次（浏览器强缓存）。

   中文子集包含的字符见同目录 subset-chars.txt；
   页面新增文案后若要补字，重新生成该文件即可（方法见文件末尾注释）。
   ========================================================================== */


/* --------------------------------------------------------------------------
   1. 字体注册
   -------------------------------------------------------------------------- */

/* 西文正体 */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../font/inter-var.woff2") format("woff2");
}

/* 西文斜体 */
@font-face {
  font-family: "Inter";
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
  src: url("../font/inter-var-italic.woff2") format("woff2");
}

/* 中文：思源黑体 */
@font-face {
  font-family: "Noto Sans SC";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../font/noto-sans-sc-var.woff2") format("woff2");
}


/* --------------------------------------------------------------------------
   2. 全局字体栈
   顺序说明：Inter 在前负责西文与数字，它没有中文字形，
   遇到汉字时浏览器会自动落到第二个 Noto Sans SC，这就是「中西分离」的效果。
   后面几个是 Web 字体未加载成功时的系统回退。
   -------------------------------------------------------------------------- */
:root {
  --font-sans: "Inter", "Noto Sans SC",
               -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;

  /* 兼容页面内已有的自定义变量（如 product-cork.html 的 --cx-sans / --cx-serif） */
  --cx-sans: var(--font-sans);
  --cx-serif: var(--font-sans);
}


/* --------------------------------------------------------------------------
   3. 统一应用到全部文字元素
   -------------------------------------------------------------------------- */
html,
body,
h1, h2, h3, h4, h5, h6,
p, a, span, div, strong, b, em, small, u, s, sub, sup, mark, time,
li, ul, ol, dl, dt, dd, blockquote, q, cite, address,
label, legend, button, input, select, textarea, optgroup, option,
table, thead, tbody, tfoot, tr, th, td, caption,
figure, figcaption, summary, details, output, video, audio, canvas {
  font-family: var(--font-sans) !important;
}


/* --------------------------------------------------------------------------
   4. 图标字体必须保留，否则图标会全部变成方块
      （本组页面 FontAwesome 用了 146 处、Flaticon 用了 10 处）
   -------------------------------------------------------------------------- */
.fa,
[class^="fa-"], [class*=" fa-"],
[class^="fa "], [class*=" fa "] {
  font-family: FontAwesome !important;
}

.flaticon,
[class^="flaticon-"], [class*=" flaticon-"] {
  font-family: Flaticon !important;
}

.glyphicon,
[class^="glyphicon-"], [class*=" glyphicon-"] {
  font-family: "Glyphicons Halflings" !important;
}


/* --------------------------------------------------------------------------
   5. 渲染平滑度对齐
   同一字体在 Windows（ClearType 次像素渲染）与 macOS（灰度抗锯齿）下
   笔画粗细会有细微差别，这一行让两端观感更接近。
   -------------------------------------------------------------------------- */
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* --------------------------------------------------------------------------
   6. 可选：保留原来的「装饰性英文衬线斜体」（Georgia）
   站内共有 9 处金色英文小标用了 Georgia 斜体。默认已一并统一为 Inter，
   如果你希望这些地方保留原来的衬线质感，把下面这段的注释去掉即可，
   其余字体仍保持统一。
   --------------------------------------------------------------------------
.pc-hero-meta .num,
.pc-corium-banner h2 .en,
.pc-craft-step .step-num,
.pc-product-visual .product-initial,
.pc-series-visual .series-en,
.pc-cat-visual .visual-label .vl-sub,
.pc-cat-content .cat-en,
.pc-compare-table thead th .en,
.cx-en {
  font-family: Georgia, "Times New Roman", serif !important;
}
   -------------------------------------------------------------------------- */


/* --------------------------------------------------------------------------
   附：中文子集补充说明
   若日后页面新增了文案、出现文字回退成系统字体的情况，按下面三步补字：
     1) 把新增文案里的字补进 static/font/subset-chars.txt
     2) 安装 fonttools 与 brotli
     3) 执行：
        pyftsubset NotoSansSC[wght].ttf \
          --text-file=static/font/subset-chars.txt \
          --flavor=woff2 --no-hinting \
          --output-file=static/font/noto-sans-sc-var.woff2
   源字体 NotoSansSC[wght].ttf 可从 Google Fonts 仓库获取（SIL OFL 授权，可商用）。
   -------------------------------------------------------------------------- */
