/* ========================================
   字体定义
   ======================================== */

/* Noto Sans SC - 思源黑体（主要正文字体） */
@font-face {
    font-family: 'Noto Sans SC';
    src: url('../webfonts/NotoSansSC-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Noto Serif SC - 思源宋体（标题字体） */
@font-face {
    font-family: 'Noto Serif SC';
    src: url('../webfonts/NotoSerifSC-VariableFont_wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
}

/* Merriweather - 英语衬线字体 */
@font-face {
    font-family: 'Merriweather';
    src: url('../webfonts/Merriweather-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: 300 900;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Merriweather';
    src: url('../webfonts/Merriweather-Italic-VariableFont_opsz,wdth,wght.ttf') format('truetype');
    font-weight: 300 900;
    font-style: italic;
    font-display: swap;
}

/* Cinzel - 古典拉丁字体 */
@font-face {
    font-family: 'Cinzel';
    src: url('../webfonts/Cinzel-VariableFont_wght.ttf') format('truetype');
    font-weight: 400 900;
    font-style: normal;
    font-display: swap;
}

/* Amiri - 阿拉伯字体 */
@font-face {
    font-family: 'Amiri';
    src: url('../webfonts/Amiri-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('../webfonts/Amiri-Italic.ttf') format('truetype');
    font-weight: 400;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('../webfonts/Amiri-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Amiri';
    src: url('../webfonts/Amiri-BoldItalic.ttf') format('truetype');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}


/* ========================================
   CSS 变量定义
   ======================================== */

:root {
    /* === 字体族 === */
    --font-family-base: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-heading: 'Noto Serif SC', 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-family-en-serif: 'Merriweather', Georgia, "Times New Roman", Times, serif;
    --font-family-classic: 'Cinzel', Georgia, "Times New Roman", Times, serif;
    --font-family-arabic: 'Amiri', serif;

    /* === 字体大小 === */
    --font-size-xs: 0.75rem;    /* 12px */
    --font-size-sm: 0.875rem;   /* 14px */
    --font-size-base: 1rem;     /* 16px */
    --font-size-lg: 1.125rem;   /* 18px */
    --font-size-xl: 1.25rem;    /* 20px */
    --font-size-2xl: 1.5rem;    /* 24px */
    --font-size-3xl: 1.875rem;  /* 30px */
    --font-size-4xl: 2.25rem;   /* 36px */
    --font-size-5xl: 3rem;      /* 48px */

    /* === 字重 === */
    --font-weight-light: 300;
    --font-weight-normal: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;

    /* === 行高 === */
    --line-height-tight: 1.25;
    --line-height-normal: 1.5;
    --line-height-relaxed: 1.75;
    --line-height-loose: 2;

    /* === 字间距 === */
    --letter-spacing-tight: -0.025em;
    --letter-spacing-normal: 0;
    --letter-spacing-wide: 0.025em;

    /* === 颜色主题 === */
    --color-primary: #9f1239;      /* 深粉红色 - 主色调 */
    --color-secondary: #991b1b;    /* 深红色 - 次要色调 */
    --color-brown: #92400e;        /* 深棕色 - 国家模块 */
    --color-yellow: #ca8a04;       /* 黄色 - 寄主植物模块 */

    /* === 文字颜色 === */
    --text-primary: #1f2937;       /* 主要文字 */
    --text-secondary: #4b5563;     /* 次要文字 */
    --text-muted: #9ca3af;         /* 辅助文字 */
    --text-light: #6b7280;        /* 浅色文字 */
}


/* ========================================
   全局样式应用
   ======================================== */

html {
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-normal);
    line-height: var(--line-height-normal);
    letter-spacing: var(--letter-spacing-normal);
    color: var(--text-primary);
}

/* 标题字体应用 */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-heading);
    font-weight: var(--font-weight-bold);
    line-height: var(--line-height-tight);
    color: var(--text-primary);
}

h1 { font-size: var(--font-size-4xl); }
h2 { font-size: var(--font-size-3xl); }
h3 { font-size: var(--font-size-2xl); }
h4 { font-size: var(--font-size-xl); }
h5 { font-size: var(--font-size-lg); }
h6 { font-size: var(--font-size-base); }
