/* ============================================================
   DSXmas 设计 Token（来源：docs/01-design/design-tokens.md）
   同步关系：design-tokens.md = demo/assets/css/style.css = 本文件
   三者改动必须同步；禁止在 theme.css 出现 token 之外的魔法值
   ============================================================ */

/* ---------- Fonts（本地托管，latin 子集；preload 见 inc/setup.php） ---------- */
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("../fonts/fraunces-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("../fonts/inter-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

/* ---------- Design Tokens ---------- */
:root {
  /* 色板 */
  --color-brand-green: #17402E;
  --color-brand-green-light: #2C5C45;
  --color-brand-green-dark: #10291E;
  --color-brand-red: #B3252B;
  --color-brand-red-dark: #8E1D22;
  --color-brand-gold: #C9A24B;
  --color-gold-light: #F3D9A0;
  --color-bg: #FFFFFF;
  --color-bg-soft: #F8F6F1;
  --color-text: #26251F;
  --color-text-muted: #6B6A62;
  --color-border: #E8E4DA;
  --color-success: #2F7D4F;
  --color-error: #C0392B;

  /* 字体 */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  --text-h1: 34px;   /* 移动优先，桌面在断点放大 */
  --text-h2: 28px;
  --text-h3: 22px;
  --text-h4: 18px;
  --text-page-title: 28px; /* 内页 H1（政策/归档/搜索/类目），KOC 内页 24px 的对位 */
  --text-body: 16px;
  --text-small: 14px;
  --text-card: 16px;
  --text-price: 18px;

  /* 间距 */
  --space-1: 4px;  --space-2: 8px;  --space-3: 12px; --space-4: 16px;
  --space-5: 24px; --space-6: 32px; --space-7: 48px; --space-8: 64px;
  --space-section: 56px;
  --container-max: 1280px;
  --container-narrow: 860px;
  --width-sidebar: 340px; /* blog 详情右侧栏（KOC 无此结构，站长指定差异化） */
  --gutter: 16px;

  /* 圆角/阴影 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --shadow-card: 0 2px 10px rgba(38, 37, 31, .06);
  --shadow-card-hover: 0 8px 24px rgba(38, 37, 31, .12);
  --focus-ring: 0 0 0 3px rgba(179, 37, 43, .35);

  /* 动效 */
  --motion-fast: 150ms;
  --motion-base: 240ms;
}

@media (min-width: 1024px) {
  :root {
    --text-h1: 56px; --text-h2: 40px; --text-h3: 28px; --text-h4: 20px;
    --text-page-title: 38px;
    --text-body: 17px; --text-card: 17px; --text-price: 20px;
    --space-section: 96px; --gutter: 24px;
  }
}
/* 宽屏杂志感：更大标题 + 更宽容器 */
@media (min-width: 1440px) {
  h1 { font-size: 64px; }
}
@media (min-width: 1600px) {
  :root { --container-max: 1400px; }
  h1 { font-size: 72px; }
}
