/* ============================================================
   草屋 · 设计令牌
   宋代浅色系审美：米白为纸，茶褐为墨，灰青为骨。
   禁止：高饱和亮色、霓虹、重古风大红大绿。
   ============================================================ */

:root {
  /* ---- 纸与墨 ---- */
  --paper:          #F7F4EC;  /* 米白，主背景 */
  --paper-warm:     #FAF7F0;  /* 淡牙白，卡片/浮层 */
  --paper-deep:     #F0EBE0;  /* 稍沉的纸色，用于分区 */

  --ink:            #4A3F35;  /* 茶褐，正文          9.3:1 */
  --ink-soft:       #6B5F52;  /* 次级正文            5.7:1 */
  --ink-faint:      #7C7266;  /* 弱化文字、注释      4.7:1 */
  --ink-wash:       #8A8073;  /* 极弱，眉标/落款     3.8:1 */

  /* ---- 点缀：灰青 / 浅赭石 ---- */
  --qing:           #547372;  /* 灰青，主点缀/链接   4.7:1 */
  --qing-soft:      #44615F;  /* 灰青加深，悬停      6.1:1 */
  --zhe:            #A9724F;  /* 浅赭石，次点缀/印章 */
  --zhe-soft:       #C0937A;

  /* ---- 线条：细弱，绝不夺目 ---- */
  --line:           #DED7CA;
  --line-soft:      #E8E2D8;
  --line-qing:      #C3D2D1;

  /* ---- 字体 ---- */
  --font-song: "Source Han Serif SC", "Noto Serif SC", "Songti SC",
               "STSong", "SimSun", "Times New Roman", serif;
  --font-fang: "FangSong", "STFangsong", "Source Han Serif SC",
               "Songti SC", serif;

  /* ---- 尺度：疏朗排版 ---- */
  --measure:        34rem;   /* 正文最佳阅读宽度 */
  --gutter:         clamp(1.5rem, 6vw, 5rem);
  --section-gap:    clamp(5rem, 14vh, 9rem);   /* 分区之间的大留白 */
  --block-gap:      clamp(1.6rem, 4vh, 2.6rem);

  /* ---- 行距与字距：宋式书册感 ---- */
  --leading-loose:  2.0;
  --leading-normal: 1.85;
  --tracking:       0.06em;
  --tracking-wide:  0.18em;
  --tracking-xwide: 0.34em;   /* 仅用于眉标/落款 */

  /* ---- 圆角：柔和不硬朗 ---- */
  --radius-sm:      3px;
  --radius:         6px;
  --radius-lg:      12px;

  /* ---- 动效：缓慢过渡，服务留白 ---- */
  --ease:           cubic-bezier(0.22, 0.61, 0.36, 1);
  --ease-slow:      cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast:       320ms;
  --dur:            620ms;
  --dur-slow:       1100ms;

  --shadow-soft:    0 1px 2px rgba(74, 63, 53, 0.03),
                    0 8px 28px rgba(74, 63, 53, 0.045);
}

/* 尊重用户的减少动效偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
