/*
 * =============================================
 *   星月体 StarMoon Aura · 字体配置
 *   版本: v1.2 | 日期: 2026.07.25
 *   方案: A · Aura（极简星辉）
 * =============================================
 *
 * 使用方式:
 *   页面文字直接应用对应 CSS class，禁止在页面代码中单独定义字体属性
 *
 * 字重层级:
 *   .sm-display   → 展示标题     字重: 300 Light
 *   .sm-heading   → 页面标题     字重: 700 Bold
 *   .sm-body      → 正文内容     字重: 400 Regular
 *   .sm-caption   → 辅助小字     字重: 200 ExtraLight
 *
 * 字体加载策略:
 *   Outfit       → 系统本地 → 本地 WOFF2 → CDN 兜底
 *   Noto Sans SC → 系统本地 → CDN 兜底
 *   离线部署详见 docs/
 *
 * 20 项可控参数详见: fonts/星月体/spec.html
 * =============================================
 */


/* ===== Outfit 字体源（本地 WOFF2 优先） ===== */

@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: local('Outfit ExtraLight'),
       url('../../fonts/星月体/fonts/outfit-200-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;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: local('Outfit ExtraLight'),
       url('../../fonts/星月体/fonts/outfit-200-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: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Outfit Light'),
       url('../../fonts/星月体/fonts/outfit-300-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;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Outfit Light'),
       url('../../fonts/星月体/fonts/outfit-300-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: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Outfit Regular'),
       url('../../fonts/星月体/fonts/outfit-400-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;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Outfit Regular'),
       url('../../fonts/星月体/fonts/outfit-400-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: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Outfit Bold'),
       url('../../fonts/星月体/fonts/outfit-700-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;
}
@font-face {
  font-family: 'Outfit';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Outfit Bold'),
       url('../../fonts/星月体/fonts/outfit-700-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;
}


/* ===== Noto Sans SC 字体源（系统本地优先，CDN 兜底） ===== */

@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 200;
  font-display: swap;
  src: local('Noto Sans SC ExtraLight'),
       local('NotoSansSC-ExtraLight');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: local('Noto Sans SC Light'),
       local('NotoSansSC-Light');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: local('Noto Sans SC Regular'),
       local('NotoSansSC-Regular');
}
@font-face {
  font-family: 'Noto Sans SC';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: local('Noto Sans SC Bold'),
       local('NotoSansSC-Bold');
}


/* ===== CSS 自定义属性（可调参数集中管理） ===== */
:root {

  --sm-font-family: 'Outfit', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;

  --sm-display-weight: 300;
  --sm-display-spacing: 0.35em;
  --sm-display-line-height: 1.15;

  --sm-heading-weight: 700;
  --sm-heading-spacing: -0.02em;
  --sm-heading-line-height: 1.3;

  --sm-body-weight: 400;
  --sm-body-spacing: 0.05em;
  --sm-body-line-height: 2.0;

  --sm-caption-weight: 200;
  --sm-caption-spacing: 0.03em;
  --sm-caption-line-height: 1.6;

  --sm-baseline-offset: 2px;
  --sm-num-spacing: 0.08em;
  --sm-punct-scale: 0.88;

  --sm-fs-hero:    clamp(3rem, 8vw, 7rem);
  --sm-fs-display: clamp(2.25rem, 6vw, 3rem);
  --sm-fs-h1:      clamp(1.75rem, 4vw, 2.25rem);
  --sm-fs-h2:      clamp(1.5rem, 3vw, 1.75rem);
  --sm-fs-h3:      clamp(1.25rem, 2.5vw, 1.375rem);
  --sm-fs-body-lg: clamp(1rem, 2vw, 1.125rem);
  --sm-fs-body:    clamp(0.875rem, 1.5vw, 0.9375rem);
  --sm-fs-body-sm: clamp(0.8125rem, 1.2vw, 0.8125rem);
  --sm-fs-caption: clamp(0.6875rem, 1vw, 0.6875rem);
  --sm-fs-micro:   0.625rem;
}


/* ===== Display · 展示标题 ===== */
.sm-display {
  font-family: var(--sm-font-family);
  font-weight: var(--sm-display-weight);
  letter-spacing: var(--sm-display-spacing);
  line-height: var(--sm-display-line-height);
  text-transform: none;
  transform: skewX(-0.2deg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.sm-display--caps {
  text-transform: uppercase;
  letter-spacing: calc(var(--sm-display-spacing) * 2);
}


/* ===== Heading · 标题 ===== */
.sm-heading {
  font-family: var(--sm-font-family);
  font-weight: var(--sm-heading-weight);
  letter-spacing: var(--sm-heading-spacing);
  line-height: var(--sm-heading-line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ===== Body · 正文 ===== */
.sm-body {
  font-family: var(--sm-font-family);
  font-weight: var(--sm-body-weight);
  letter-spacing: var(--sm-body-spacing);
  line-height: var(--sm-body-line-height);
  vertical-align: baseline;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ===== Caption · 辅助小字 ===== */
.sm-caption {
  font-family: var(--sm-font-family);
  font-weight: var(--sm-caption-weight);
  letter-spacing: var(--sm-caption-spacing);
  line-height: var(--sm-caption-line-height);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}


/* ===== 数字等宽工具类 ===== */
.sm-num {
  font-family: 'Outfit', var(--sm-font-family);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--sm-num-spacing);
}


/* ===== 标点缩放工具类 ===== */
.sm-punct {
  font-size: calc(1em * var(--sm-punct-scale));
}


/* ===== 字号快捷类 ===== */
.sm-size-hero    { font-size: var(--sm-fs-hero);    }
.sm-size-display { font-size: var(--sm-fs-display); }
.sm-size-h1      { font-size: var(--sm-fs-h1);      }
.sm-size-h2      { font-size: var(--sm-fs-h2);      }
.sm-size-h3      { font-size: var(--sm-fs-h3);      }
.sm-size-body-lg { font-size: var(--sm-fs-body-lg); }
.sm-size-body    { font-size: var(--sm-fs-body);    }
.sm-size-body-sm { font-size: var(--sm-fs-body-sm); }
.sm-size-caption { font-size: var(--sm-fs-caption); }
.sm-size-micro   { font-size: var(--sm-fs-micro);   }


/* ===== 响应式字号适配 ===== */
@media (max-width: 768px) {
  :root {
    --sm-fs-hero:    3rem;
    --sm-fs-display: 2.25rem;
    --sm-fs-h1:      1.75rem;
    --sm-fs-h2:      1.375rem;
    --sm-fs-h3:      1.125rem;
    --sm-fs-body-lg: 1rem;
    --sm-fs-body:    0.875rem;
  }
}

@media (max-width: 480px) {
  :root {
    --sm-fs-hero:    2.25rem;
    --sm-fs-display: 1.75rem;
    --sm-fs-h1:      1.375rem;
    --sm-fs-h2:      1.125rem;
    --sm-fs-h3:      1rem;
    --sm-fs-body-lg: 0.9375rem;
    --sm-fs-body:    0.8125rem;
  }
}
