/* ============================================================
   base.css — 设计 token、reset、排版基础
   风格：Editorial / 杂志感（浅米色底 + 墨蓝字 + 琥珀强调色）
   ============================================================ */

:root {
  /* —— 色板 —— */
  --paper:        #f4ede0;   /* 主底色：暖米 */
  --paper-2:      #ece4d2;   /* 略深米色：用于分区底 */
  --paper-3:      #e3d9c3;   /* 更深：用于分割/装饰 */
  --ink:          #1a2238;   /* 主文字：深墨蓝 */
  --ink-soft:     #34405e;   /* 次要文字 */
  --muted:        #6b6f7f;   /* 辅助文字 */
  --line:         #c9bfa8;   /* 边线：低饱和驼色 */
  --line-2:       #b3a98d;   /* 较深边线 */

  --accent:       #b8621d;   /* 琥珀橙：主强调 */
  --accent-soft:  #e7a663;   /* 浅橙 */
  --accent-2:     #2f6f5e;   /* 墨绿：副强调 */
  --accent-3:     #5a4a8a;   /* 紫：副强调 */

  /* 类目色 */
  --cat-工具:     #2c5d8f;
  --cat-风险:     #b54040;
  --cat-行业:     #3a7a4f;
  --cat-学习:     #b8861d;
  --cat-社会:     #6b4a8a;
  --cat-总结:     #4a4a4a;

  /* —— 字体 —— */
  --font-serif:   "Source Han Serif SC", "Songti SC", "STSong", "SimSun", "Times New Roman", Georgia, serif;
  --font-sans:    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-mono:    "SF Mono", "JetBrains Mono", "Cascadia Code", "Consolas", "Courier New", monospace;

  /* —— 尺寸 —— */
  --wrap-max: 1180px;
  --wrap-pad: 32px;
  --radius-sm: 6px;
  --radius:    12px;
  --radius-lg: 18px;

  /* —— 阴影 —— */
  --shadow-1: 0 1px 0 rgba(26,34,56,.05);
  --shadow-2: 0 8px 30px -10px rgba(26,34,56,.18);
  --shadow-3: 0 18px 50px -12px rgba(26,34,56,.22);
}

/* —— Reset —— */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background:
    radial-gradient(1100px 600px at 12% -8%, rgba(184,98,29,.10), transparent 60%),
    radial-gradient(900px 500px at 95% 10%, rgba(47,111,94,.08), transparent 60%),
    radial-gradient(800px 500px at 50% 100%, rgba(90,74,138,.06), transparent 60%),
    var(--paper);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

button { font-family: inherit; cursor: pointer; }

/* —— 排版基础 —— */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: 700;
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(40px, 6.2vw, 72px); line-height: 1.04; letter-spacing: -0.03em; }
h2 { font-size: clamp(28px, 4vw, 44px); line-height: 1.15; letter-spacing: -0.02em; }
h3 { font-size: 20px; line-height: 1.35; }
p  { margin: 0 0 1em; }

/* 数字用等宽数字 + 拉开字距 */
.tabular,
.stat b,
.time,
.issue-no,
.cat-dot,
.hl-num,
.gold-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: 0.01em;
}

/* 衬线斜体小字（杂志副标题/导语专用） */
.editorial {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--ink-soft);
}

/* 选中色 */
::selection { background: rgba(184,98,29,.22); color: var(--ink); }

/* 减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* —— 公共工具类 —— */
.wrap { width: min(var(--wrap-max), calc(100% - var(--wrap-pad))); margin-inline: auto; position: relative; z-index: 1; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* 鼠标光晕层（默认隐藏，body 加 .glow-on 时显示） */
.cursor-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background: radial-gradient(280px 280px at var(--mx,50%) var(--my,50%),
              rgba(184,98,29,.14), transparent 70%);
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity .25s ease;
}
body.glow-on .cursor-glow { opacity: 1; }

/* 入场动画基础 */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
