/* 极致轻盈字体方案 */
/* 所有字体均符合SIL Open Font License 1.1开源许可协议 */

/* 字体定义 - 使用系统字体作为回退，避免FOIT */
:root {
  /* 中文字体 - 使用系统字体作为回退 */
  --font-chinese: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  
  /* 英文字体 - 使用系统字体作为回退 */
  --font-english: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
  
  /* 衬线字体 - 使用系统字体作为回退 */
  --font-serif: Georgia, 'Times New Roman', 'Songti SC', serif;
}

/* 字体加载完成后的自定义字体 - 极致轻盈方案 */
.fonts-loaded {
  /* 中文字体 - 思源黑体 Light */
  --font-chinese: 'Noto Sans SC', 'Source Han Sans SC', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* 英文字体 - Inter Light */
  --font-english: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* 衬线字体 - 思源宋体 Light + Playfair Display Light */
  --font-serif: 'Noto Serif SC', 'Playfair Display', 'Source Han Serif SC', Georgia, serif;
}

/* 字体加载失败时的回退方案 */
.fonts-failed {
  --font-chinese: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --font-english: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-serif: Georgia, 'Times New Roman', 'Songti SC', serif;
}

/* ============================================
   Inter字体 - 英文无衬线字体
   授权: SIL Open Font License 1.1
   来源: https://fonts.google.com/specimen/Inter
   ============================================ */

/* ExtraLight (200) - 极轻字重，适合大标题 */
@font-face {
  font-family: 'Inter';
  src: local('Inter ExtraLight'), 
       local('Inter-ExtraLight'),
       url('../fonts/Inter-ExtraLight.woff2') format('woff2'),
       url('../fonts/Inter-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Light (300) - 轻字重，适合正文 */
@font-face {
  font-family: 'Inter';
  src: local('Inter Light'), 
       local('Inter-Light'),
       url('../fonts/Inter-Light.woff2') format('woff2'),
       url('../fonts/Inter-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Regular (400) - 常规字重，适合强调内容 */
@font-face {
  font-family: 'Inter';
  src: local('Inter Regular'), 
       local('Inter-Regular'),
       url('../fonts/Inter-Regular.woff2') format('woff2'),
       url('../fonts/Inter-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Playfair Display字体 - 英文衬线字体
   授权: SIL Open Font License 1.1
   来源: https://fonts.google.com/specimen/Playfair+Display
   ============================================ */

/* ExtraLight (200) - 极轻字重，适合大标题 */
@font-face {
  font-family: 'Playfair Display';
  src: local('Playfair Display ExtraLight'), 
       local('PlayfairDisplay-ExtraLight'),
       url('../fonts/PlayfairDisplay-ExtraLight.woff2') format('woff2'),
       url('../fonts/PlayfairDisplay-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Light (300) - 轻字重，适合副标题 */
@font-face {
  font-family: 'Playfair Display';
  src: local('Playfair Display Light'), 
       local('PlayfairDisplay-Light'),
       url('../fonts/PlayfairDisplay-Light.woff2') format('woff2'),
       url('../fonts/PlayfairDisplay-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Regular (400) - 常规字重，适合正文 */
@font-face {
  font-family: 'Playfair Display';
  src: local('Playfair Display Regular'), 
       local('PlayfairDisplay-Regular'),
       url('../fonts/PlayfairDisplay-Regular.woff2') format('woff2'),
       url('../fonts/PlayfairDisplay-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Noto Serif SC字体 - 中文衬线字体（思源宋体）
   授权: SIL Open Font License 1.1
   来源: https://fonts.google.com/noto/specimen/Noto+Serif+SC
   ============================================ */

/* ExtraLight (200) - 极轻字重，适合大标题 */
@font-face {
  font-family: 'Noto Serif SC';
  src: local('Noto Serif SC ExtraLight'), 
       local('NotoSerifSC-ExtraLight'),
       url('../fonts/NotoSerifSC-ExtraLight.woff2') format('woff2'),
       url('../fonts/NotoSerifSC-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Light (300) - 轻字重，适合正文 */
@font-face {
  font-family: 'Noto Serif SC';
  src: local('Noto Serif SC Light'), 
       local('NotoSerifSC-Light'),
       url('../fonts/NotoSerifSC-Light.woff2') format('woff2'),
       url('../fonts/NotoSerifSC-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Regular (400) - 常规字重，适合强调内容 */
@font-face {
  font-family: 'Noto Serif SC';
  src: local('Noto Serif SC Regular'), 
       local('NotoSerifSC-Regular'),
       url('../fonts/NotoSerifSC-Regular.woff2') format('woff2'),
       url('../fonts/NotoSerifSC-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   Noto Sans SC字体 - 中文无衬线字体（思源黑体）
   授权: SIL Open Font License 1.1
   来源: https://fonts.google.com/noto/specimen/Noto+Sans+SC
   ============================================ */

/* ExtraLight (200) - 极轻字重，适合大标题 */
@font-face {
  font-family: 'Noto Sans SC';
  src: local('Noto Sans SC ExtraLight'), 
       local('NotoSansSC-ExtraLight'),
       url('../fonts/NotoSansSC-ExtraLight.woff2') format('woff2'),
       url('../fonts/NotoSansSC-ExtraLight.woff') format('woff');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Light (300) - 轻字重，适合正文 */
@font-face {
  font-family: 'Noto Sans SC';
  src: local('Noto Sans SC Light'), 
       local('NotoSansSC-Light'),
       url('../fonts/NotoSansSC-Light.woff2') format('woff2'),
       url('../fonts/NotoSansSC-Light.woff') format('woff');
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* Regular (400) - 常规字重，适合强调内容 */
@font-face {
  font-family: 'Noto Sans SC';
  src: local('Noto Sans SC Regular'), 
       local('NotoSansSC-Regular'),
       url('../fonts/NotoSansSC-Regular.woff2') format('woff2'),
       url('../fonts/NotoSansSC-Regular.woff') format('woff');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   字体应用规则 - 极致轻盈视觉层级
   ============================================ */

/* 全局基础字体 - Light字重 */
body {
  font-family: var(--font-chinese);
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* 英文内容 - Light字重 */
.font-english,
.logo,
.nav-link,
.btn {
  font-family: var(--font-english);
  font-weight: 300;
}

/* 大标题 - ExtraLight字重，极致轻盈 */
h1 {
  font-family: var(--font-serif);
  font-weight: 200;
  letter-spacing: 0.02em;
}

/* 副标题 - Light字重 */
h2, h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  letter-spacing: 0.01em;
}

/* 强调内容 - Regular字重 */
strong, b {
  font-weight: 400;
}

/* 按钮文本 - Regular字重，确保可读性 */
.btn {
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* 导航链接 - Light字重 */
.nav-link {
  font-weight: 300;
  letter-spacing: 0.02em;
}

/* Logo - ExtraLight字重，极致轻盈 */
.logo {
  font-weight: 200;
  letter-spacing: 0.1em;
}

/* 特殊类名 - 用于需要不同字重的场景 */
.font-extra-light {
  font-weight: 200 !important;
}

.font-light {
  font-weight: 300 !important;
}

.font-regular {
  font-weight: 400 !important;
}
