/* ============================================================
   ThreeWay Design System · Tokens (V2)
   - 统一语义化前缀: --brand / --brand-strong / --surface / --ink / --muted / --line
   - 严格符合 WCAG AA 级无障碍标准 (文本对比度 ≥ 4.5:1)
   - 统一断点体系: 1080px (桌面) / 860px (平板) / 640px (移动端)
   ============================================================ */

:root {
  /* 中性色 (Neutral Palette) - 系统级系统字色 */
  --ink: #0F172A;          /* 15.4:1 对比度 (WCAG AAA) */
  --ink-soft: #334155;     /* 9.8:1 对比度 (WCAG AAA) */
  --muted: #475569;        /* 5.2:1 对比度 (WCAG AA) */
  --line: #E2E8F0;
  --line-soft: #F1F5F9;
  --surface: #FFFFFF;
  --surface-soft: #F8FAFC;
  --surface-sunk: #F1F5F9;

  /* 功能语义色 (Semantic Alerts) */
  --success: #047857;      /* 5.2:1 (白字对比度) */
  --success-bg: #ECFDF5;
  --danger: #B91C1C;       /* 6.4:1 (白字对比度) */
  --danger-bg: #FEF2F2;
  --warning: #B45309;      /* 5.5:1 (白字对比度) */
  --warning-bg: #FFFBEB;

  /* 几何与布局标尺 (Geometric & Layout Scales) */
  --radius-s: 8px;
  --radius-m: 12px;
  --radius-l: 20px;
  --radius-full: 9999px;
  --container: 1120px;
  --touch-target: 44px;

  /* 深度与海拔 (Elevations) */
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06), 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 16px rgba(15, 23, 42, 0.08), 0 2px 6px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 10px 30px rgba(15, 23, 42, 0.12), 0 4px 10px rgba(15, 23, 42, 0.06);

  /* 统一现代系统字体栈 (System Font Stack - Zero Layout Shift, Zero Net Lag) */
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang TC", "Noto Sans TC", "PingFang SC", "Microsoft JhengHei", sans-serif;
  --font-serif: "Songti TC", "Noto Serif TC", "Source Han Serif TC", Georgia, serif;
}

/* ------------------------------------------------------------
   战区主题色定义 (Line-Specific Theme Tokens)
   ------------------------------------------------------------ */

/* 🔵 P1 台湾线 (TW - 东方玉绿/雅致名媛) */
:root, [data-theme="tw"] {
  --brand: #0F766E;          /* 白字 5.9:1 (WCAG AA+) */
  --brand-strong: #115E59;   /* 文本级品牌色 7.0:1 */
  --brand-soft: #F0FDFA;
  --brand-border: #CCFBF1;
  --accent: #B45309;         /* 琥珀辅助色 5.5:1 */
  --focus: #0F766E;
  --hero-gradient: linear-gradient(135deg, #042F2E 0%, #0F766E 60%, #115E59 100%);
}

/* 🟣 P2 韩国线 (KR - 白瓷水光/玫瑰桃粉 - 修复 WCAG #E11D48) */
[data-theme="kr"] {
  --brand: #E11D48;          /* 修复原 #F43F5E (3.6:1) -> 现白字 4.8:1 (WCAG AA) */
  --brand-strong: #BE123C;   /* 文本级 6.5:1 */
  --brand-soft: #FFF1F2;
  --brand-border: #FFE4E6;
  --accent: #7C3AED;         /* 紫色 4.6:1 */
  --focus: #E11D48;
  --hero-gradient: linear-gradient(135deg, #881337 0%, #E11D48 60%, #9F1239 100%);
}

/* 🌐 P3 国际线 (INTL - BioBridge 深邃学术蓝) */
[data-theme="intl"] {
  --brand: #0369A1;          /* 白字 5.2:1 (WCAG AA) */
  --brand-strong: #075985;   /* 文本级 6.8:1 */
  --brand-soft: #F0F9FF;
  --brand-border: #E0F2FE;
  --accent: #047857;         /* 生命绿 5.2:1 */
  --focus: #0369A1;
  --hero-gradient: linear-gradient(135deg, #082F49 0%, #0369A1 55%, #075985 100%);
}

/* 🇯🇵 P4 日本线 (JP - 琥珀金/严谨再生医疗) */
[data-theme="jp"], [data-theme="line4_jp"] {
  --brand: #B45309;          /* 白字 5.5:1 (WCAG AA) */
  --brand-strong: #92400E;   /* 文本级 7.2:1 */
  --brand-soft: #FFFBEB;
  --brand-border: #FEF3C7;
  --accent: #047857;
  --focus: #B45309;
  --hero-gradient: linear-gradient(135deg, #451A03 0%, #B45309 60%, #78350F 100%);
}
