/* === 设计变量与基础重置 === */
:root {
  --bg-primary: #050505;
  --bg-surface: #0f0f0f;
  --bg-card: #141414;
  --border-subtle: #262626;
  --border-accent: #3a3a3a;
  --gold-primary: #c9a84c;
  --gold-hover: #dfc36a;
  --gold-dim: rgba(201, 168, 76, 0.15);
  --text-main: #ececec;
  --text-secondary: #a0a0a0;
  --text-muted: #666666;
  --font-serif: 'Noto Serif SC', 'Source Han Serif SC', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --max-width: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --transition-base: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* === 排版系统 === */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  letter-spacing: 0.02em;
  text-wrap: balance;
  margin-bottom: var(--space-md);
}
h1 { font-size: clamp(2rem, 4vw + 0.5rem, 3.5rem); line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw + 0.5rem, 2.25rem); margin-top: var(--space-xl); }
h3 { font-size: clamp(1.1rem, 2vw + 0.25rem, 1.4rem); margin-top: var(--space-lg); }
p { margin-bottom: var(--space-md); max-width: 65ch; }
a { color: var(--gold-primary); text-decoration: none; transition: color var(--transition-base); }
a:hover { color: var(--gold-hover); }

/* === 布局容器 === */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-lg); }
.section { padding: var(--space-xl) 0; position: relative; }
.grid-asym { display: grid; gap: var(--space-lg); align-items: center; }
@media (min-width: 768px) {
  .grid-asym.two-cols { grid-template-columns: 1.2fr 0.8fr; }
  .grid-asym.three-cols { grid-template-columns: repeat(3, 1fr); }
  .grid-asym.reverse { grid-template-columns: 0.8fr 1.2fr; }
}

/* === 页头与页脚 === */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(5, 5, 5, 0.85); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-subtle);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: var(--space-sm); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand span { font-family: var(--font-serif); font-size: 1.1rem; font-weight: 500; color: var(--text-main); }
nav ul { display: flex; gap: var(--space-lg); list-style: none; }
nav a { font-size: 0.9rem; color: var(--text-secondary); padding: var(--space-xs) 0; border-bottom: 1px solid transparent; }
nav a:hover, nav a[aria-current="page"] { color: var(--gold-primary); border-bottom-color: var(--gold-primary); }
.mobile-toggle { display: none; background: none; border: none; color: var(--text-main); cursor: pointer; }
@media (max-width: 768px) {
  .mobile-toggle { display: block; }
  nav ul { display: none; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--bg-surface); padding: var(--space-lg); border-bottom: 1px solid var(--border-subtle); }
  nav.open ul { display: flex; }
}

.site-footer { border-top: 1px solid var(--border-subtle); padding: var(--space-xl) 0 var(--space-lg); margin-top: var(--space-xl); background: var(--bg-surface); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); margin-bottom: var(--space-lg); }
.footer-col h4 { font-size: 0.95rem; color: var(--text-secondary); margin-bottom: var(--space-sm); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: var(--space-xs); }
.footer-bottom { text-align: center; font-size: 0.8rem; color: var(--text-muted); border-top: 1px solid var(--border-subtle); padding-top: var(--space-lg); }

/* === 组件：按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xs);
  padding: 0.75rem 1.5rem; font-size: 0.95rem; font-weight: 500; border-radius: var(--radius-md);
  cursor: pointer; transition: all var(--transition-base); border: 1px solid transparent;
}
.btn-primary { background: linear-gradient(135deg, var(--gold-primary), #b8953a); color: #000; }
.btn-primary:hover { background: linear-gradient(135deg, var(--gold-hover), #c9a84c); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--border-accent); color: var(--text-main); }
.btn-outline:hover { border-color: var(--gold-primary); color: var(--gold-primary); }
.btn:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }

/* === 组件：卡片 === */
.card {
  background: var(--bg-card); border: 1px solid var(--border-subtle); border-radius: var(--radius-md);
  padding: var(--space-lg); transition: border-color var(--transition-base), transform var(--transition-base);
}
.card:hover { border-color: var(--border-accent); transform: translateY(-2px); }
.card-icon { width: 40px; height: 40px; margin-bottom: var(--space-md); stroke: var(--gold-primary); }
.card-title { font-size: 1.1rem; font-weight: 600; margin-bottom: var(--space-xs); color: var(--text-main); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: var(--space-sm); }

/* === 组件：表格 === */
.table-wrapper { overflow-x: auto; margin: var(--space-lg) 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: var(--space-md); text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { background: var(--bg-surface); color: var(--text-secondary); font-weight: 500; }
td { color: var(--text-main); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,0.02); }

/* === 组件：FAQ (Details/Summary) === */
.faq-list { margin-top: var(--space-lg); }
details { border-bottom: 1px solid var(--border-subtle); }
summary {
  padding: var(--space-md) 0; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; justify-content: space-between; align-items: center; user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: '+'; font-size: 1.2rem; color: var(--gold-primary); transition: transform var(--transition-base); }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: var(--space-md) 0 var(--space-lg); color: var(--text-secondary); line-height: 1.6; }
details p ul { margin-left: 1.2rem; margin-top: var(--space-xs); }
details p li { margin-bottom: var(--space-xs); }

/* === 组件：步骤与列表 === */
.steps-list { counter-reset: step; list-style: none; padding-left: 0; }
.steps-list li { position: relative; padding-left: 2.5rem; margin-bottom: var(--space-lg); }
.steps-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0; width: 2rem; height: 2rem;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--gold-primary); border-radius: 50%; color: var(--gold-primary);
  font-size: 0.9rem; font-weight: 600; background: var(--bg-surface);
}
.checklist { list-style: none; padding-left: 0; }
.checklist li { position: relative; padding-left: 1.5rem; margin-bottom: var(--space-sm); color: var(--text-secondary); }
.checklist li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 6px; height: 6px; background: var(--gold-primary); border-radius: 50%; }

/* === SVG 动效系统 === */
.svg-motion-container { width: 100%; max-width: 100%; overflow: hidden; position: relative; }
.geo-shape { fill: none; stroke: var(--gold-primary); stroke-width: 1.5; opacity: 0.8; }
.geo-fill { fill: var(--gold-dim); stroke: var(--gold-primary); stroke-width: 1; opacity: 0.6; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }

@keyframes rotate-slow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes rotate-reverse {
  0% { transform: rotate(360deg); }
  100% { transform: rotate(0deg); }
}
@keyframes pulse-scale {
  0%, 100% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.08); opacity: 0.9; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50%, 100% { stroke-dashoffset: 0; }
}
@keyframes float-y {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.anim-rotate-1 { animation: rotate-slow 24s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-rotate-2 { animation: rotate-reverse 32s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse-scale 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-draw { animation: draw-line 6s ease-in-out infinite; }
.anim-float { animation: float-y 6s ease-in-out infinite; }

/* 减少动态效果适配 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    animation: none !important;
  }
}

/* === 焦点与无障碍 === */
:focus-visible { outline: 2px solid var(--gold-primary); outline-offset: 2px; }
.skip-link { position: absolute; top: -40px; left: 0; background: var(--gold-primary); color: #000; padding: 8px; z-index: 1000; transition: top 0.2s; }
.skip-link:focus { top: 0; }
.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; }
