/* === 基础重置 & 全局排版 === */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.8;
  color: var(--text-primary);
  background: var(--bg-cream);
  overflow-x: hidden;
}

/* === 排版 === */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.5rem, 5vw, var(--text-5xl)); }
h2 { font-size: clamp(1.8rem, 3.5vw, var(--text-4xl)); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

p {
  margin-bottom: var(--space-sm);
}

a {
  color: var(--brand-primary-bright);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
  color: var(--gold-dark);
}

ul, ol {
  padding-left: 1.5em;
  margin-bottom: var(--space-sm);
}

li {
  margin-bottom: var(--space-xs);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* === 容器 === */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* === Section 通用 === */
.section {
  padding: var(--space-2xl) 0;
  position: relative;
}

.section-dark {
  background: var(--bg-dark);
  color: #fff;
}

.section-light {
  background: var(--bg-cream);
}

.gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* === 辅助类 === */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--gold); }

.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;
}

/* === SVG图标通用样式 === */
.icon-svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.icon-svg svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
}

/* === 页面容器（Hash路由切换） === */
.page {
  display: none;
}

.page.active {
  display: block;
}

.page#page-home {
  padding-top: 0;
}

.page:not(#page-home) {
  padding-top: calc(var(--nav-height, 80px) + 40px);
}
