/* ============================================================
   「Naturesphere」电商 UI 设计系统 — 设计令牌 (Design Tokens)
   品牌理念：有机自然 · 大气明朗
   风格：暖沙大地 · 草木生机 · 开阔留白 · 面向年轻用户 · 全平台响应式
   作者：UI Designer
   ============================================================ */

:root {
  /* ---------- 品牌主色：暖沙大地棕 ---------- */
  --brand-50:   #fbf7f1;   /* 底色微暖 */
  --brand-100:  #f3ead9;
  --brand-200:  #e6d4b4;
  --brand-300:  #d5b88a;
  --brand-400:  #c19a63;
  --brand-500:  #a97f45;   /* 主品牌沙棕 — 大地、温润、高级 */
  --brand-600:  #8f6937;
  --brand-700:  #75542c;
  --brand-800:  #5c4123;
  --brand-900:  #44301a;

  /* ---------- 辅助色：草木绿（有机） ---------- */
  --leaf-100:   #e7f0e0;
  --leaf-300:   #b6d3a4;
  --leaf-500:   #7fa965;   /* 有机生长的点缀 */
  --leaf-700:   #5d8347;

  /* ---------- 辅助色：天空蓝（信息/链接） ---------- */
  --accent-500: #5b8db0;

  /* ---------- 语义色 ---------- */
  --success-500: #22c55e;
  --success-100: #dcfce7;
  --warning-500: #f59e0b;
  --warning-100: #fef3c7;
  --error-500:   #ef4444;
  --error-100:   #fee2e2;
  --info-500:    #0ea5e9;
  --info-100:    #e0f2fe;

  /* ---------- 中性色（灰阶） ---------- */
  --neutral-50:   #fafaf9;
  --neutral-100:  #f5f5f4;
  --neutral-200:  #e7e5e4;
  --neutral-300:  #d6d3d1;
  --neutral-400:  #a8a29e;
  --neutral-500:  #78716c;
  --neutral-600:  #57534e;
  --neutral-700:  #44403c;
  --neutral-800:  #292524;
  --neutral-900:  #1c1917;

  /* ---------- 文本与背景语义化映射 ---------- */
  --color-bg:        #fdfcfa;   /* 页面底色 暖白 */
  --color-surface:   #ffffff;   /* 卡片/Nav 表面 */
  --color-surface-dim:#f5f5f4;  /* 次级区块 */
  --color-text:      var(--neutral-900);
  --color-text-strong: #14100d;
  --color-text-muted: var(--neutral-500);
  --color-border:    var(--neutral-200);
  --color-border-strong: var(--neutral-300);

  /* ---------- 字体 ---------- */
  --font-display: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-body:    "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", system-ui, sans-serif;

  /* 字号梯度（移动端/桌面端双曲线可在此微调） */
  --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 — 首屏主标题 */

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

  /* 行高 */
  --leading-tight: 1.2;
  --leading-normal: 1.5;
  --leading-loose: 1.75;

  /* ---------- 间距（8pt 体系） ---------- */
  --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 */

  /* ---------- 圆角（柔和自然核心） ---------- */
  --radius-sm:   0.5rem;    /*  8px */
  --radius-md:   0.75rem;   /* 12px */
  --radius-lg:   1rem;      /* 16px */
  --radius-xl:   1.5rem;    /* 24px */
  --radius-full: 9999px;

  /* ---------- 阴影（柔和的暖调投影） ---------- */
  --shadow-sm: 0 1px 2px rgba(60, 45, 30, 0.06);
  --shadow-md: 0 4px 12px rgba(60, 45, 30, 0.08);
  --shadow-lg: 0 12px 28px rgba(60, 45, 30, 0.12);
  --shadow-glow: 0 0 0 4px rgba(249, 115, 22, 0.12);

  /* ---------- 动效 ---------- */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 150ms;
  --dur-normal: 280ms;
  --dur-slow: 420ms;

  /* ---------- 布局 ---------- */
  --container-max: 1200px;
  --container-pad-mobile: var(--space-4);
  --container-pad-desktop: var(--space-8);
  --header-height: 64px;

  /* ---------- 触控目标 ---------- */
  --touch-min: 44px;
}

/* ---------- 暗色模式（可选，随 system 切换） ---------- */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg:  #16130f;
    --color-surface: #201c18;
    --color-surface-dim: #1a1712;
    --color-text: #e7e5e4;
    --color-text-strong: #fafaf9;
    --color-text-muted: #a8a29e;
    --color-border: #322d28;
    --color-border-strong: #44403c;
    --brand-500: #fb923c;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
    --shadow-lg: 0 12px 28px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 0 4px rgba(251, 146, 60, 0.18);
  }
}
