/* ========== Base：Reset + 通用样式 ========== */

/* Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.7;
  color: var(--c-stone);
  background: var(--c-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
img { -webkit-user-drag: none; }
a { color: inherit; text-decoration: none; transition: color var(--t-fast) ease-out; }
ul, ol { list-style: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
table { border-collapse: collapse; width: 100%; }

/* 排版 */
h1, h2, h3, h4, h5 { font-family: var(--font-serif); font-weight: 600; line-height: 1.2; letter-spacing: 0.01em; color: var(--c-ink); }
h1 { font-size: clamp(32px, 5vw, 64px); }
h2 { font-size: clamp(26px, 3.5vw, 42px); }
h3 { font-size: clamp(20px, 2.2vw, 28px); }
h4 { font-size: 18px; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 700; color: var(--c-ink); }

/* 容器 */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
.container-narrow { max-width: 880px; }
.container-wide { max-width: 1600px; }

/* 区块 */
.section { padding: var(--s-9) 0; }
.section--tight { padding: var(--s-7) 0; }
.section--dark { background: var(--c-ink); color: #c9c6c1; }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: #fff; }
.section--bone { background: var(--c-bone); }

/* 章节标题 */
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--s-7); }
.section-head .eyebrow {
  display: inline-block; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--c-brass); margin-bottom: var(--s-3);
}
.section-head h2 { margin-bottom: var(--s-3); }
.section-head .lead { color: var(--c-mist); font-size: 17px; }
.section-head--left { text-align: left; margin-left: 0; }

/* 分隔线 */
.divider { height: 1px; background: var(--c-brass-soft); border: 0; }
.divider-dark { height: 1px; background: rgba(255,255,255,0.12); border: 0; }

/* 字号工具 */
.text-mono { font-family: var(--font-mono); }
.text-serif { font-family: var(--font-serif); }
.text-brass { color: var(--c-brass); }
.text-mist { color: var(--c-mist); }
.text-white { color: #fff; }
.italic { font-style: italic; }

/* 链接金色 */
.link-brass { color: var(--c-brass); border-bottom: 1px solid var(--c-brass-soft); transition: all var(--t-fast) ease-out; }
.link-brass:hover { color: var(--c-brass-deep); border-color: var(--c-brass); }

/* 进入动效（IntersectionObserver 触发） */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--t-slow) var(--ease-out), transform var(--t-slow) var(--ease-out); }
.reveal.is-visible { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 100ms; }
.reveal-delay-2 { transition-delay: 200ms; }
.reveal-delay-3 { transition-delay: 300ms; }

/* 无障碍 */
:focus-visible { outline: 2px solid var(--c-brass); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: var(--z-toast);
  background: var(--c-ink); color: #fff; padding: 12px 20px;
}
.skip-link:focus { left: 0; }

/* 选中文本 */
::selection { background: var(--c-brass); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--c-bone); }
::-webkit-scrollbar-thumb { background: var(--c-mist); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: var(--c-stone); }

/* reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}
