/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #0a0a0c;
  --color-surface: #141418;
  --color-surface-alt: #1a1a1f;
  --color-border: rgba(212, 175, 55, 0.25);
  --color-border-light: rgba(255, 255, 255, 0.08);
  --color-text: #e8e6e1;
  --color-text-muted: #9a9893;
  --color-accent: #d4af37;
  --color-accent-hover: #f0cc5c;
  --color-danger: #ff5a5a;
  --font-serif: 'Noto Serif SC', 'Songti SC', 'SimSun', serif;
  --font-sans: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius: 8px;
  --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
  --transition: 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-accent-hover);
}

ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: var(--space-xs);
}

/* =========================================
   排版与层级
   ========================================= */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

h2 {
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  color: var(--color-accent);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-xs);
  margin-bottom: var(--space-md);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  color: var(--color-text);
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-sm);
  max-width: 68ch;
  color: var(--color-text);
}

.text-muted {
  color: var(--color-text-muted);
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (max-width: 480px) {
  .container {
    padding: 0 1rem;
  }
}

section {
  padding: var(--space-xl) 0;
}

.grid-auto {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-split {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  align-items: start;
}

/* =========================================
   页头与页脚
   ========================================= */
header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 12, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text);
}

.brand img {
  height: 32px;
  width: auto;
}

nav ul {
  display: flex;
  gap: var(--space-md);
  list-style: none;
  margin: 0;
  padding: 0;
}

nav a {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
}

nav a:hover,
nav a[aria-current="page"] {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

footer {
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  gap: var(--space-md);
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  margin-bottom: var(--space-md);
}

.footer-col h4 {
  font-size: 1rem;
  margin-bottom: var(--space-sm);
  color: var(--color-accent);
}

.footer-col ul {
  list-style: none;
  padding: 0;
}

.footer-col li {
  margin-bottom: var(--space-xs);
}

.copyright {
  text-align: center;
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-border-light);
  color: var(--color-text-muted);
  font-size: 0.9rem;
}

/* =========================================
   通用组件
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: 0.85rem 1.8rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--color-accent);
  color: #0a0a0c;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  background: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
}

.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: var(--space-md);
  transition: border-color var(--transition), transform var(--transition);
}

.card:hover {
  border-color: var(--color-accent);
  transform: translateY(-4px);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-sm) 0;
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: hidden;
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

th, td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border-light);
}

th {
  background: var(--color-surface-alt);
  font-weight: 600;
  color: var(--color-accent);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover {
  background: rgba(212, 175, 55, 0.04);
}

/* FAQ 原生折叠 */
details {
  margin-bottom: var(--space-sm);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--color-surface);
}

summary {
  padding: 1rem;
  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-weight: bold;
  color: var(--color-accent);
  font-size: 1.2rem;
}

details[open] summary::after {
  content: '−';
}

details .faq-content {
  padding: 0 1rem 1rem;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* 焦点样式 */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 4px;
}

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-visual {
  width: 100%;
  height: auto;
  max-width: 420px;
  margin: 0 auto;
}

.geo-line {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1.5;
  pathLength: 1;
}

@keyframes syncRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes strokeDash {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}

@keyframes gentleFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-rotate {
  animation: syncRotate 14s linear infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.anim-draw {
  animation: strokeDash 8s ease-in-out infinite;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

.anim-float {
  animation: gentleFloat 6s ease-in-out infinite;
}

@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;
  }
}
