/* ============================================================
   base.css —— 全局变量 · 重置 · 字体 · 基础排版
   水墨江南风格：米色宣纸底 + 墨色 / 墨绿 / 朱红（无紫色）
   ============================================================ */

:root {
  /* ---- 配色（取自 logo 水墨色调，禁用紫色）---- */
  --bg:          #faf7f0;   /* 宣纸米白 */
  --bg-alt:      #f2ecdf;   /* 略深米色，用于分区 */
  --bg-card:     #fffdf8;   /* 卡片底 */
  --ink:         #2b2b2b;   /* 墨黑 —— 主文字/标题 */
  --ink-soft:    #4a4a4a;   /* 次级文字 */
  --muted:       #8a8270;   /* 灰褐 —— 辅助/描述文字 */
  --green:       #3a4a3f;   /* 墨绿 —— 标题条/主强调 */
  --green-deep:  #2c3a30;   /* 深墨绿 */
  --red:         #b5402f;   /* 朱红 —— 印章红点缀 */
  --gold:        #a8884c;   /* 赭金 —— 细节描边 */
  --line:        rgba(43, 43, 43, 0.12);  /* 分隔线 */
  --line-soft:   rgba(43, 43, 43, 0.06);

  /* ---- 字体 ---- */
  --font-cn: "Noto Serif SC", "Songti SC", "STSong", "SimSun", serif;          /* 中文宋体 */
  --font-en: "Playfair Display", Georgia, "Times New Roman", "Noto Serif SC", serif; /* 英文衬线 */

  /* ---- 尺寸 ---- */
  --maxw: 1180px;        /* 内容最大宽度 */
  --header-h: 68px;      /* 顶栏高度 */
  --radius: 4px;
  --radius-img: 8px;

  /* ---- 阴影 ---- */
  --shadow-sm: 0 4px 14px rgba(43, 43, 43, 0.08);
  --shadow:    0 10px 34px rgba(43, 43, 43, 0.14);
  --shadow-lg: 0 24px 60px rgba(43, 43, 43, 0.28);

  /* ---- 过渡 ---- */
  --ease: 0.32s cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* ---------------- 重置 ---------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* 锚点跳转时为吸顶顶栏 + 分类导航留出空间 */
  scroll-padding-top: calc(var(--header-h) + 56px);
  /* 禁止整页横向滚动：挡住关闭状态下移出视口的汉堡抽屉 */
  overflow-x: hidden;   /* 兜底（全浏览器支持） */
  overflow-x: clip;     /* 现代浏览器优先用 clip：裁剪但不产生滚动容器，不破坏 sticky 吸顶 */
}

body {
  margin: 0;
  font-family: var(--font-cn);
  font-size: 16px;
  line-height: 1.75;
  color: var(--ink);
  background-color: var(--bg);
  /* 宣纸质感：极淡的双向渐晕 */
  background-image:
    radial-gradient(120% 80% at 50% -10%, rgba(58, 74, 63, 0.05), transparent 60%),
    radial-gradient(100% 70% at 50% 110%, rgba(168, 136, 76, 0.05), transparent 60%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

/* 锁定滚动（lightbox 打开时） */
body.no-scroll { overflow: hidden; }

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

img { height: auto; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease);
}

ul, li { list-style: none; margin: 0; padding: 0; }

h1, h2, h3, h4, p { margin: 0; }

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
  padding: 0;
}

/* ---------------- 基础排版 ---------------- */
.font-en { font-family: var(--font-en); }

::selection {
  background: var(--green);
  color: #fff;
}

/* 通用容器 */
.section-head {
  text-align: center;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

.section-label {
  display: inline-block;
  font-size: 0.95rem;
  letter-spacing: 0.4em;
  color: var(--red);
  padding-left: 0.4em;          /* 抵消字间距造成的右偏 */
  margin-bottom: 0.6rem;
}

.section-title {
  font-family: var(--font-en);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.1rem);
  line-height: 1.15;
  color: var(--ink);
  letter-spacing: 0.01em;
}

/* 标题下方水墨小分隔 */
.section-head::after {
  content: "";
  display: block;
  width: 64px;
  height: 2px;
  margin: 1.1rem auto 0;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
