/* === 基础变量与色板 === */
:root {
  /* 色板 */
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;

  /* 设计 Token */
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --line-height-text: 1.65;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", sans-serif;
}

/* === 面与卡片取色系统 === */
.surface-dark {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --text-muted: rgba(244, 243, 247, 0.8);
  --accent: var(--color-accent);
  --brand: var(--color-accent);
  --card-bg: rgba(244, 243, 247, 0.06);
  --card-border-color: rgba(244, 243, 247, 0.15);
}

.surface-paper {
  --bg: var(--color-paper);
  --text: var(--color-text);
  --text-muted: var(--color-text);
  --accent: var(--color-accent);
  --brand: var(--color-brand);
  --card-bg: #ffffff;
  --card-border-color: rgba(25, 21, 35, 0.16);
}

.card-light {
  --bg: #ffffff;
  --text: var(--color-text);
  --text-muted: var(--color-text);
  --brand: var(--color-brand);
  --accent: var(--color-accent);
  --card-border-color: rgba(25, 21, 35, 0.16);
}

/* === 重置与基础排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-text);
  color: var(--text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 布局工具 === */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.text-block { max-width: 38em; }

/* === 表面容器 === */
.section {
  padding-block: var(--section-y);
  background: var(--bg);
  color: var(--text);
}
.section.dark { background: var(--color-dark); color: var(--color-paper); }
.section.paper { background: var(--color-paper); color: var(--color-text); }

.card {
  background: var(--card-bg);
  border: var(--card-border) var(--card-border-color);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}

/* === 排版组件 === */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.75rem;
  color: var(--brand);
}
.surface-dark .eyebrow { color: var(--accent); }

h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
}
p { margin-bottom: 1rem; }
.hl { color: var(--brand); }
.surface-dark .hl { color: var(--accent); }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background: var(--accent);
  color: var(--color-dark);
}
.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--text);
}
.surface-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* === 表格 === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--card-border-color);
  text-align: left;
}
.data-table th { font-weight: 700; color: var(--text-muted); }
.data-table td:last-child { font-weight: 600; }
.surface-dark .data-table th, .surface-dark .data-table td { color: var(--color-paper); }
.surface-dark .data-table th { color: var(--text-muted); }

/* === FAQ (Details/Summary) === */
.faq-item {
  border-bottom: 1px solid var(--card-border-color);
  padding: 1rem 0;
}
.faq-item summary {
  font-weight: 700;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: 0;
  top: 50%;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--brand);
  border-bottom: 2px solid var(--brand);
  transform: translateY(-60%) rotate(45deg);
  transition: transform 0.2s ease;
}
.surface-dark .faq-item summary::after { border-color: var(--accent); }
.faq-item[open] summary::after { transform: translateY(-60%) rotate(-135deg); }
.faq-item p { margin-top: 0.75rem; color: var(--text-muted); }
.surface-dark .faq-item p { color: var(--text-muted); }

/* === 时间轴 === */
.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 2px solid var(--card-border-color);
}
.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1rem;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -2.45rem;
  top: 0.25rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}
.timeline-time {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.25rem;
  display: block;
}

/* === 步骤条 === */
.steps-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--gap);
}
.step-card {
  flex: 1 1 200px;
  counter-increment: step;
}
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: var(--color-dark);
  font-weight: 800;
  border-radius: 10px;
  margin-bottom: 0.75rem;
  font-size: 0.9rem;
}

/* === 新闻卡片 === */
.news-card article {
  display: flex;
  flex-direction: column;
  height: 100%;
}
.news-card time {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.news-card h3 { font-size: 1.1rem; line-height: 1.35; }
.news-card p { font-size: 0.95rem; color: var(--text-muted); flex-grow: 1; }

/* === 提示框 === */
.callout {
  border-left: 4px solid var(--accent);
  background: var(--card-bg);
  padding: 1rem 1.25rem;
  border-radius: 0 var(--radius-card) var(--radius-card) 0;
  margin-top: 1rem;
  font-size: 0.95rem;
  color: var(--text-muted);
}

/* === 页头与页脚 === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(244, 243, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  padding: 1rem 0;
}
.surface-dark .site-header { background: rgba(33, 22, 60, 0.9); border-color: rgba(244, 243, 247, 0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.2rem; }
.logo img { width: 32px; height: 32px; }
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 600; font-size: 0.95rem; opacity: 0.8; transition: opacity 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--brand); }
.surface-dark .nav-links a { color: var(--color-paper); }
.surface-dark .nav-links a:hover, .surface-dark .nav-links a[aria-current="page"] { color: var(--accent); }
.site-footer {
  background: var(--color-dark);
  color: rgba(244, 243, 247, 0.7);
  padding: 3rem 0;
  font-size: 0.9rem;
}
.footer-inner { display: flex; flex-direction: column; gap: 1.5rem; align-items: center; text-align: center; }
.footer-nav { display: flex; gap: 1.5rem; }
.footer-nav a:hover { color: var(--accent); }

/* === SVG 动效 === */
.svg-container { width: 100%; height: auto; }
svg { width: 100%; height: auto; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-float-delayed { animation: float 7s ease-in-out infinite 1.5s; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 5s ease-in-out infinite alternate; }
.anim-slide-panel { animation: slidePanel 8s ease-in-out infinite alternate; }
.transform-center { transform-box: fill-box; transform-origin: center; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes drawPath {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes slidePanel {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .steps-row { flex-direction: column; }
  .header-inner { flex-wrap: wrap; gap: 1rem; }
  .nav-links { order: 3; width: 100%; justify-content: center; }
}
