/* ==========================================================================
   后院计划 Lab / Coppice Lab — Design Tokens
   全站唯一的颜色 / 字号 / 间距 / 动效来源。
   组件层与页面层禁止出现字面色值（例外：#fff / #000）。
   ========================================================================== */

:root {
  /* ---------- 1. 纸 —— 背景层 ---------- */
  --paper:        #F4F1E9;  /* 主背景：温暖米白 */
  --paper-2:      #EFEBE0;  /* 次级底：卡片 / 面板 */
  --paper-3:      #E7E2D5;  /* 三级底：色块 / hover */
  --paper-4:      #DCD6C6;  /* 四级底：深一档的块面 */

  /* ---------- 2. 墨 —— 文字层 ---------- */
  --ink:          #1E211D;  /* 正文 */
  --ink-2:        #4C5148;  /* 次级文字 */
  --ink-3:        #7E8479;  /* 三级 / 元信息 */
  --ink-4:        #A5AA9F;  /* 弱化 / 占位 */

  /* ---------- 3. 线 ---------- */
  --line:         #D9D2C0;  /* 常规分割线 */
  --line-2:       #C7C0AC;  /* 强调分割线 / 边框 */
  --line-3:       #E4DED0;  /* 极弱分割线 */

  /* ---------- 4. 植物绿 —— 主强调 ---------- */
  --green:        #66715C;
  --green-2:      #4C5544;  /* 深一档：hover / 标题 */
  --green-3:      #8B977E;  /* 浅一档 */
  --leaf:         #DDE2D7;  /* 浅绿叶色块底 */
  --leaf-2:       #EBEFE6;  /* 极浅叶色底 */

  /* ---------- 5. 泥土棕 —— 次级强调 ---------- */
  --brown:        #9A6B4F;
  --brown-2:      #7A5340;
  --brown-soft:   #C9A78F;
  --clay:         #EFE3D9;  /* 浅泥色块底 */

  /* ---------- 6. 生长状态色（全站统一） ---------- */
  --st-seed:      #A8875E;  /* 种子 —— 只是一个想法 */
  --st-sprouting: #8A9A6B;  /* 发芽 —— 开始验证 */
  --st-growing:   #66715C;  /* 生长 —— 持续开发 */
  --st-shipped:   #9A6B4F;  /* 长成 —— 正式上线 */
  --st-dormant:   #A5AA9F;  /* 休眠 —— 暂时停止 */

  /* ---------- 7. 字体栈 ---------- */
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI",
               "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei",
               "Noto Sans SC", system-ui, sans-serif;
  --font-serif: "Iowan Old Style", "Songti SC", "Hiragino Mincho ProN",
                "Source Han Serif SC", "Noto Serif SC", Georgia,
                "Times New Roman", serif;
  --font-mono: "SFMono-Regular", ui-monospace, "JetBrains Mono", Menlo,
               Consolas, "Liberation Mono", monospace;

  /* ---------- 8. 字号 ---------- */
  --fs-display:  clamp(2.5rem, 6.4vw, 4.75rem);  /* 通用大标题（404 等） */
  /* Hero 主标语：锁单行。整行文本宽 ≈ 13.9 × 字号，1200px 容器（可用 1088px）下单行上限约 78px，
     76px 即原上限，留约 3% 余量防字体回退后重新折行；6.3vw 让窄视口同步收窄 */
  --fs-hero:     min(76px, 6.3vw);
  --fs-h1:       clamp(2.1rem, 4.6vw, 3.4rem);
  --fs-h2:       clamp(1.55rem, 3vw, 2.15rem);
  --fs-h3:       clamp(1.15rem, 1.8vw, 1.4rem);
  --fs-h4:       1.0625rem;
  --fs-lead:     clamp(1.0625rem, 1.5vw, 1.25rem);
  --fs-body:     1rem;
  --fs-sm:       0.875rem;
  --fs-xs:       0.8125rem;
  --fs-label:    0.6875rem;  /* 等宽大写标签 */
  --fs-micro:    0.625rem;

  /* ---------- 9. 行高与字距 ---------- */
  --lh-tight:    1.06;
  --lh-snug:     1.24;
  --lh-normal:   1.6;
  --lh-relaxed:  1.8;

  --ls-display:  -0.035em;
  --ls-heading:  -0.02em;
  --ls-label:    0.14em;
  --ls-label-lg: 0.22em;

  /* ---------- 10. 间距 ---------- */
  --sp-1:  4px;
  --sp-2:  8px;
  --sp-3:  12px;
  --sp-4:  16px;
  --sp-5:  24px;
  --sp-6:  32px;
  --sp-7:  48px;
  --sp-8:  64px;
  --sp-9:  88px;
  --sp-10: 120px;
  --sp-11: 168px;

  /* ---------- 11. 布局 ---------- */
  --container:      1200px;
  --container-text: 720px;   /* 正文行长 */
  --container-wide: 1400px;
  --gutter:         clamp(20px, 5vw, 56px);
  --nav-h:          68px;

  /* ---------- 12. 圆角 ---------- */
  --r-xs:  2px;
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-xl:  22px;
  --r-pill: 999px;

  /* ---------- 13. 阴影（极克制，纸张感） ---------- */
  --shadow-none: none;
  --shadow-xs: 0 1px 2px rgba(30, 33, 29, 0.04);
  --shadow-sm: 0 1px 3px rgba(30, 33, 29, 0.05),
               0 6px 16px -8px rgba(30, 33, 29, 0.07);
  --shadow-md: 0 2px 6px rgba(30, 33, 29, 0.05),
               0 16px 40px -20px rgba(30, 33, 29, 0.14);

  /* ---------- 14. 动效 ---------- */
  --ease:      cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast:  140ms;
  --dur-base:  240ms;
  --dur-slow:  520ms;
  --dur-reveal: 720ms;

  /* ---------- 15. 层级 ---------- */
  --z-base:    1;
  --z-sticky:  100;
  --z-overlay: 200;
  --z-top:     300;
}

/* 尊重系统减弱动效偏好 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --dur-fast: 0ms;
    --dur-base: 0ms;
    --dur-slow: 0ms;
    --dur-reveal: 0ms;
  }
}
