/* ============================================================
   必佐营养 · 设计 tokens · v0.2
   源头：/Users/lingfeidiao/.hermes/profiles/brand/brand-design/DESIGN.md
   ============================================================ */

:root {
  /* 颜色 */
  --c-primary:        #2D5A47;
  --c-primary-dark:   #234539;
  --c-primary-deeper: #1D3329;
  --c-primary-soft:   #E8F0EC;
  --c-secondary:      #F5F0E8;
  --c-secondary-warm: #EFE9DC;  /* v0.2: 略深一点的暖米,做章节底色更稳 */
  --c-accent:         #C4915A;
  --c-accent-soft:    #EFE3D2;
  --c-ink:            #1A1A1A;
  --c-ink-soft:       #2A2A2A;
  --c-muted:          #6B6B5F;  /* WCAG AA 4.75:1 on F5F0E8, 5.26:1 on FDFCFA */
  --c-muted-2:        #8A8A7A;  /* v0.2: 更浅的灰,做次次要文字 */
  --c-surface:        #FDFCFA;
  --c-border:         #E8E4DC;
  --c-border-soft:    #EFECE4;
  --c-border-strong:  #D6D0C2;  /* v0.2: 更显眼的细分隔 */
  --c-error:          #B84A3C;
  --c-success:        #4A7B5A;
  --c-white:          #FFFFFF;

  /* 阴影（克制） */
  --shadow-sm:   0 1px 3px rgba(26,26,26,0.06);
  --shadow-md:   0 4px 12px rgba(26,26,26,0.08);
  --shadow-lg:   0 8px 24px rgba(26,26,26,0.10);
  --shadow-card: 0 2px 8px rgba(45,90,71,0.06);
  --shadow-card-hover: 0 12px 32px rgba(45,90,71,0.10);  /* v0.2: 卡片悬停更显 */

  /* 圆角 */
  --r-sm:   4px;
  --r-md:   8px;
  --r-lg:  16px;
  --r-pill: 9999px;

  /* 间距 */
  --s-1:  4px;
  --s-2:  8px;
  --s-3: 16px;
  --s-4: 24px;
  --s-5: 32px;
  --s-6: 48px;
  --s-7: 64px;
  --s-8: 96px;
  --s-9: 160px;

  /* 字体 */
  --font-display-zh: 'Noto Serif SC', 'Songti SC', 'STSong', 'SimSun', serif;
  --font-body-zh:    'Noto Sans SC', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  --font-display-en: 'Fraunces', 'Times New Roman', serif;
  --font-body-en:    'Inter', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:       'JetBrains Mono', 'SF Mono', 'Menlo', monospace;  /* v0.2: 等宽,做日期/版本号 */

  /* v0.2 · 字体特性 (OpenType) */
  --features-body:  "kern" 1, "liga" 1, "calt" 1, "palt" 0;
  --features-head:  "kern" 1, "liga" 1, "calt" 1, "ss01" 0;  /* 中文标题不开 ss01,留给英文展示体 */
  --features-num:   "tnum" 1, "lnum" 1, "kern" 1;            /* 表格数字 + lining */
  --features-frac:  "frac" 1, "kern" 1;                       /* 分数,如 3/7 */

  /* v0.2 · 字号刻度 (Display 用 Fraunces opsz 大尺寸,中文标题用 px) */
  --fs-eyebrow:    11px;   /* 小标签 */
  --fs-caption:    12px;
  --fs-body-sm:    14px;
  --fs-body:       16px;
  --fs-body-lg:    18px;
  --fs-h4:         18px;
  --fs-h3:         22px;
  --fs-h2:         clamp(28px, 3.6vw, 40px);
  --fs-h1:         clamp(36px, 5vw, 56px);
  --fs-display:    clamp(34px, 5.4vw, 64px);   /* 首屏主标 */
  --fs-mega:       clamp(48px, 9vw, 120px);    /* v0.2: 大段号 / 杂志感数字 */

  /* 容器 */
  --container-narrow:  640px;
  --container-default: 1200px;
  --container-wide:    1440px;
  --nav-h:             64px;

  /* v0.2 · 动效曲线 */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);   /* 强调,入场 */
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);   /* 呼吸,loop */
  --ease-std:    cubic-bezier(0.4, 0, 0.2, 1);     /* 通用 */
  --dur-fast:    180ms;
  --dur-base:    320ms;
  --dur-slow:    600ms;

  /* v0.2 · 纸感噪点 (data URI,1% 颗粒,可叠加) */
  --noise-1: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.13  0 0 0 0 0.10  0 0 0 0 0.07  0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.18'/></svg>");
}

::selection { background: var(--c-primary); color: var(--c-white); }

/* v0.2 · 全局字体特性 */
html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
body {
  font-feature-settings: var(--features-body);
}
/* Fraunces 等英文展示体启用光学尺寸 */
h1, h2, h3, h4, .serif-en, .hero-title em, .display-en {
  font-feature-settings: "kern" 1, "liga" 1, "calt" 1, "ss01" 1;
  font-optical-sizing: auto;
}
/* 价格/数字默认表格数字 */
.price, .n, .num, .data-row .n, .trust-cell .n, .key-takeaways li::before, .fmd-steps .num,
.method-toc li::before, .meta-num, .colophon time, .issue-tag, .footer-icp,
.founder-stamp .year, .hero-mark-line {
  font-variant-numeric: tabular-nums lining-nums;
  font-feature-settings: var(--features-num);
}
/* 分数样式 */
.frac, .meta-line .slash {
  font-feature-settings: var(--features-frac);
  font-style: normal;
}

/* v0.2 · 标题 balance,避免孤字 */
h1, h2, h3, h4 { text-wrap: balance; }
p, blockquote { text-wrap: pretty; }
