/* ============================================
   Design Tokens — Yiwu Yixiang Arts & Crafts
   设计令牌系统 v1.0
   ============================================
   所有视觉决策集中管理，全站统一调用。
   修改这里，全站生效。
   ============================================ */

:root {
  /* ===== Color System 颜色系统 ===== */
  /* Primary: 深墨绿（呼应金属币的沉稳质感） */
  --color-ink-50: #f0f4f4;
  --color-ink-100: #d9e4e4;
  --color-ink-200: #b3c9c9;
  --color-ink-300: #8daeae;
  --color-ink-400: #679393;
  --color-ink-500: #4d7a7a;
  --color-ink-600: #3c6060;
  --color-ink-700: #2b4646;
  --color-ink-800: #1a2c2c;
  --color-ink-900: #0f2e2e;
  --color-ink-950: #081818;

  /* Accent: 古铜金（呼应金属币的金属光泽） */
  --color-gold-50: #faf6ed;
  --color-gold-100: #f3e9d2;
  --color-gold-200: #e7d2a5;
  --color-gold-300: #dbbb78;
  --color-gold-400: #c9a96e;
  --color-gold-500: #b8944f;
  --color-gold-600: #a07d3e;
  --color-gold-700: #836434;
  --color-gold-800: #6b522e;
  --color-gold-900: #594428;

  /* Background 背景色 */
  --color-bg: #faf8f3;           /* 米白主背景（温暖、不刺眼） */
  --color-surface: #ffffff;        /* 卡片白 */
  --color-surface-alt: #f7fafc;   /* 交替背景 */

  /* Text 文字色 */
  --color-text: #1a2c2c;           /* 主文字（深墨绿黑） */
  --color-text-secondary: #4a5568;  /* 次要文字 */
  --color-text-muted: #718096;      /* 辅助文字 */
  --color-text-inverse: #ffffff;     /* 反白文字 */

  /* Border 边框 */
  --color-border: #e2e8f0;
  --color-border-light: #edf2f7;

  /* Semantic 语义色 */
  --color-success: #16a34a;
  --color-success-bg: #f0fff4;
  --color-warning: #d97706;
  --color-warning-bg: #fffbeb;
  --color-danger: #dc2626;
  --color-danger-bg: #fff5f5;
  --color-info: #2563eb;
  --color-info-bg: #eff6ff;

  /* ===== Typography 字体系统 ===== */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;

  /* Type Scale 排版比例（1.25 比例） */
  --text-xs: 0.75rem;      /* 12px */
  --text-sm: 0.875rem;     /* 14px */
  --text-base: 1rem;       /* 16px */
  --text-lg: 1.125rem;     /* 18px */
  --text-xl: 1.25rem;      /* 20px */
  --text-2xl: 1.5rem;      /* 24px */
  --text-3xl: 1.875rem;    /* 30px */
  --text-4xl: 2.25rem;     /* 36px */
  --text-5xl: 3rem;        /* 48px */
  --text-6xl: 3.75rem;     /* 60px */

  /* Font Weight 字重 */
  --font-light: 300;
  --font-regular: 400;
  --font-medium: 500;
  --font-semibold: 600;
  --font-bold: 700;
  --font-extrabold: 800;
  --font-black: 900;

  /* Line Height 行高 */
  --leading-tight: 1.25;
  --leading-normal: 1.5;
  --leading-relaxed: 1.75;

  /* ===== Spacing 间距系统（4px基准） ===== */
  --space-0: 0;
  --space-1: 0.25rem;     /* 4px */
  --space-2: 0.5rem;      /* 8px */
  --space-3: 0.75rem;     /* 12px */
  --space-4: 1rem;        /* 16px */
  --space-5: 1.25rem;     /* 20px */
  --space-6: 1.5rem;      /* 24px */
  --space-8: 2rem;        /* 32px */
  --space-10: 2.5rem;     /* 40px */
  --space-12: 3rem;        /* 48px */
  --space-16: 4rem;        /* 64px */
  --space-20: 5rem;        /* 80px */
  --space-24: 6rem;        /* 96px */

  /* ===== Border Radius 圆角系统 ===== */
  --radius-none: 0;
  --radius-sm: 0.375rem;   /* 6px */
  --radius-md: 0.625rem;   /* 10px */
  --radius-lg: 1rem;       /* 16px */
  --radius-xl: 1.5rem;     /* 24px */
  --radius-2xl: 2rem;      /* 32px */
  --radius-full: 9999px;

  /* ===== Shadow 阴影系统 ===== */
  --shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  --shadow-inner: inset 0 2px 4px 0 rgba(0, 0, 0, 0.05);

  /* ===== Z-Index 层级系统 ===== */
  --z-dropdown: 1000;
  --z-sticky: 1100;
  --z-fixed: 1200;
  --z-modal: 1300;
  --z-popover: 1400;
  --z-toast: 1500;
  --z-tooltip: 1600;

  /* ===== Transition 过渡动画 ===== */
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 300ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);

  /* ===== Layout 布局 ===== */
  --container-max: 1200px;
  --container-narrow: 800px;
  --container-wide: 1400px;
  --header-height: 72px;

  /* ===== Breakpoints 断点 ===== */
  --bp-sm: 640px;
  --bp-md: 768px;
  --bp-lg: 1024px;
  --bp-xl: 1280px;
  --bp-2xl: 1536px;
}

/* ===== Dark Mode 深色模式（预留） ===== */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #081818;
    --color-surface: #0f2e2e;
    --color-surface-alt: #1a2c2c;
    --color-text: #f0f4f4;
    --color-text-secondary: #b3c9c9;
    --color-text-muted: #8daeae;
    --color-border: #2b4646;
  }
}

/* ===== Reduced Motion 减少动画（无障碍） ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
