/* ==========================================================================
   base.css · 重置 / 排版 / 布局基元 / 工具类
   ========================================================================== */

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

* { margin: 0; padding: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 12px);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: var(--lh-normal);
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

img { height: auto; }

a { color: inherit; text-decoration: none; }

ul,
ol { list-style: none; }

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
}

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- 排版默认 ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-serif);
  font-weight: var(--fw-semibold);
  line-height: var(--lh-tight);
  letter-spacing: var(--ls-tight);
  color: var(--ink);
}

p { color: var(--ink-soft); }

strong, b { font-weight: var(--fw-semibold); color: var(--ink); }

::selection {
  background: var(--gold-soft);
  color: var(--ink);
}

/* ---------- 布局基元 ---------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-py); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4.5rem); }

.bg-cream-2 { background: var(--cream-2); }
.bg-white { background: var(--white); }
.bg-gold-tint { background: var(--gold-tint); }
.bg-ink { background: var(--ink); color: var(--cream); }
.bg-ink p, .bg-ink .muted { color: rgba(251, 247, 241, 0.72); }

/* ---------- 章节标题（宋体大标题 + 金色短线 + 英文副标） ---------- */
.sec-head {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
  margin-bottom: clamp(2rem, 4vw, 3.25rem);
}

.sec-head--left { text-align: left; margin-inline: 0; }

.sec-head .eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  font-size: var(--fs-display-en);
  letter-spacing: var(--ls-wide);
  color: var(--gold);
  text-transform: uppercase;
  display: block;
  margin-bottom: var(--space-3);
}

.sec-head h2 {
  font-size: var(--fs-h2);
  position: relative;
  display: inline-block;
}

.sec-head--left h2 { display: block; }

.sec-head .divider {
  width: 56px;
  height: 2px;
  background: var(--grad-gold);
  margin: var(--space-4) auto var(--space-4);
  border-radius: 2px;
}
.sec-head--left .divider { margin-inline: 0; }

.sec-head .sub {
  font-size: var(--fs-lead);
  color: var(--muted);
  line-height: var(--lh-normal);
  max-width: 560px;
  margin-inline: auto;
}

/* ---------- 文字工具类 ---------- */
.lead { font-size: var(--fs-lead); line-height: var(--lh-normal); color: var(--ink-soft); }
.muted { color: var(--muted); }
.italic { font-style: italic; }
.gold-text { color: var(--gold-deep); }
.center { text-align: center; }
.numeric { font-family: var(--font-display); font-feature-settings: "lnum"; }

.eyebrow {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: var(--ls-wide);
  color: var(--gold);
  text-transform: uppercase;
  font-size: var(--fs-display-en);
}

/* ---------- 工具：flex / grid 间距速记 ---------- */
.stack > * + * { margin-top: var(--space-4); }
.cluster { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; }

/* ---------- 滚动 reveal 动画 ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
  will-change: opacity, transform;
}
.reveal.is-in { opacity: 1; transform: none; }

.reveal--delay-1 { transition-delay: 0.08s; }
.reveal--delay-2 { transition-delay: 0.16s; }
.reveal--delay-3 { transition-delay: 0.24s; }
.reveal--delay-4 { transition-delay: 0.32s; }

/* 错落网格子项逐个 reveal */
.stagger > * {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out);
}
.stagger.is-in > * { opacity: 1; transform: none; }
.stagger.is-in > *:nth-child(1) { transition-delay: 0.05s; }
.stagger.is-in > *:nth-child(2) { transition-delay: 0.12s; }
.stagger.is-in > *:nth-child(3) { transition-delay: 0.19s; }
.stagger.is-in > *:nth-child(4) { transition-delay: 0.26s; }
.stagger.is-in > *:nth-child(5) { transition-delay: 0.33s; }
.stagger.is-in > *:nth-child(6) { transition-delay: 0.40s; }
.stagger.is-in > *:nth-child(7) { transition-delay: 0.47s; }
.stagger.is-in > *:nth-child(8) { transition-delay: 0.54s; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .stagger > * { opacity: 1 !important; transform: none !important; }
}

/* ---------- 装饰：金色细线分隔 ---------- */
.hr-gold {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-soft) 30%, var(--gold-soft) 70%, transparent);
  margin-block: var(--space-7);
}
