/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-dark: #251943;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED6E89;
  --color-light: #FDFBF5;

  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;

  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;

  --title-weight: 600;
  --title-tracking: 0;
  --title-lh: 1.25;
  --body-size: 16px;
  --body-lh: 1.75;

  --header-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: var(--body-size);
  line-height: var(--body-lh);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding-block: var(--section-y);
  position: relative;
}
.section + .section::before {
  content: "";
  position: absolute;
  top: 0;
  left: var(--gap);
  right: var(--gap);
  height: 1px;
  background: rgba(25, 21, 35, 0.12);
}
.surface-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.surface-dark .hl { color: var(--color-accent); }
.surface-dark a:not(.btn) { color: var(--color-accent); }
.surface-dark .eyebrow { color: var(--color-accent); }

.surface-paper {
  background-color: var(--color-paper);
  color: var(--color-text);
}
.surface-paper .hl { color: var(--color-brand); }
.surface-paper .eyebrow { color: var(--color-brand); }

.card {
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  background: var(--color-light);
  padding: var(--gap);
  border-radius: var(--radius-card);
}
.surface-dark .card {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--color-paper);
}

/* ==================== 排版系统 ==================== */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}
h1, h2, h3 {
  font-weight: var(--title-weight);
  letter-spacing: var(--title-tracking);
  line-height: var(--title-lh);
  margin-bottom: 0.6em;
}
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 0.2em; }
h3 { font-size: 1.25rem; margin-top: 0.5em; }
p { margin-bottom: 1em; max-width: 38em; }

/* ==================== 导航与页头 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  backdrop-filter: blur(8px);
  height: var(--header-h);
  display: flex;
  align-items: center;
}
.surface-dark .site-header {
  background: rgba(37, 25, 67, 0.95);
  border-bottom-color: rgba(255, 255, 255, 0.15);
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.6em;
  font-weight: 700;
  font-size: 1.1rem;
}
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: 1.5em; align-items: center; }
.nav a {
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.4em 0;
  position: relative;
}
.nav a[aria-current="page"], .nav a:hover { color: var(--color-brand); }
.surface-dark .nav a[aria-current="page"], .surface-dark .nav a:hover { color: var(--color-accent); }
.nav a::after {
  content: "";
  position: absolute;
  bottom: 0; left: 0;
  width: 0; height: 2px;
  background: currentColor;
  transition: width 0.2s ease;
}
.nav a:hover::after { width: 100%; }

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  height: 52px;
  padding: 0 1.5em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-secondary {
  background: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}
.surface-dark .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* ==================== 列表与定义列表 ==================== */
.def-list dt {
  font-weight: 600;
  margin-top: 1.2em;
  margin-bottom: 0.3em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.def-list dd {
  margin-left: 1.5em;
  margin-bottom: 1em;
  color: inherit;
  opacity: 0.9;
}
.step-list li {
  display: flex;
  gap: 1em;
  margin-bottom: 1.2em;
  align-items: flex-start;
}
.step-badge {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.9rem;
  display: grid;
  place-items: center;
  border-radius: var(--radius-card);
}

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; margin: 1em 0; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.8em 1em;
  border-bottom: var(--card-border);
}
.data-table th { font-weight: 600; opacity: 0.8; }
.data-table tr:last-child td { border-bottom: none; }

/* ==================== FAQ ==================== */
.faq-item { margin-bottom: 1em; border-bottom: var(--card-border); padding-bottom: 1em; }
.faq-item summary {
  font-weight: 600;
  cursor: pointer;
  padding: 0.5em 0;
  list-style: none;
  position: relative;
  padding-left: 1.5em;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  position: absolute;
  left: 0;
  font-weight: 400;
}
.faq-item[open] summary::before { content: "−"; }
.faq-item p { margin-top: 0.6em; font-size: 0.95rem; opacity: 0.9; }

/* ==================== SVG 动效核心 ==================== */
.hero-svg { width: 100%; height: auto; }
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s ease-out infinite alternate;
}
.anim-fade-up {
  opacity: 0;
  transform: translateY(12px);
  animation: fadeUp 5s ease-out infinite alternate;
}
.anim-grid-node {
  opacity: 0.3;
  animation: gridPulse 6s ease-in-out infinite alternate;
}
.anim-breathe {
  animation: breathe 4.5s ease-in-out infinite alternate;
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes gridPulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
/* 延迟类 */
.d-1 { animation-delay: 0.2s; }
.d-2 { animation-delay: 0.8s; }
.d-3 { animation-delay: 1.4s; }
.d-4 { animation-delay: 2.0s; }
.d-5 { animation-delay: 2.6s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-draw, .anim-fade-up, .anim-grid-node, .anim-breathe {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* ==================== 响应式微调 ==================== */
@media (max-width: 768px) {
  .nav { gap: 1em; }
  .hero-grid { grid-template-columns: 1fr !important; }
  .feature-grid { grid-template-columns: 1fr !important; }
  .news-grid { grid-template-columns: 1fr !important; }
}
