/* 设计变量与基础重置 */
:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  --color-white: #F4F3F7;

  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --title-lh: 1.1;
  --body-lh: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  background: var(--color-paper);
  color: var(--color-text);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 布局容器 */
.wrap { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }

/* 页头 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-paper);
  border-bottom: var(--card-border);
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: 24px; }
.nav a { font-weight: 600; font-size: 0.95rem; opacity: 0.8; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.nav a[aria-current="page"] { color: var(--color-brand); }
.header-cta { margin-left: 16px; }

/* 区块基础 */
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.section--dark { background: var(--color-dark); color: var(--color-paper); }
.section--paper { background: var(--color-paper); color: var(--color-text); }

.badge {
  display: inline-block;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  margin-bottom: 12px; text-transform: uppercase;
}
.section--paper .badge { color: var(--color-brand); }
.section--dark .badge { color: var(--color-accent); }

.hl { color: var(--color-brand); }
.section--dark .hl { color: var(--color-accent); }

h1, h2, h3 { font-weight: 800; letter-spacing: -0.02em; line-height: var(--title-lh); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 16px; }
h3 { font-size: 1.25rem; margin-bottom: 8px; }
p { line-height: var(--body-lh); max-width: 38em; margin-bottom: 16px; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn); cursor: pointer;
  transition: transform 0.2s ease, opacity 0.2s ease;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 2px solid var(--color-text); color: var(--color-text); }
.section--dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }

/* 卡片与网格 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
  transition: transform 0.2s ease;
}
.section--dark .card { background: var(--color-dark); border-color: rgba(244, 243, 247, 0.16); color: var(--color-paper); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }

/* 表格 */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: var(--card-border); }
th { font-weight: 700; }
td:first-child { font-weight: 600; color: var(--color-text); }
.section--dark td:first-child { color: var(--color-paper); }

/* FAQ */
details {
  border: var(--card-border); border-radius: var(--radius-card);
  margin-bottom: 12px; overflow: hidden;
}
summary {
  padding: 16px 24px; cursor: pointer; font-weight: 600;
  list-style: none; position: relative; padding-right: 40px;
}
summary::-webkit-details-marker { display: none; }
summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-weight: 400; opacity: 0.6;
}
details[open] summary::after { content: "−"; }
.details-content { padding: 16px 24px; line-height: var(--body-lh); }

/* 页脚 */
.site-footer {
  background: var(--color-dark); color: var(--color-paper);
  padding: 48px 0; border-top: var(--card-border);
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 700; margin-bottom: 16px; letter-spacing: 0.05em; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a { opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.copyright { text-align: center; margin-top: 48px; opacity: 0.6; font-size: 0.9rem; }

/* SVG 容器与动效基类 */
.svg-visual { width: 100%; height: auto; }
.svg-visual svg { width: 100%; height: auto; }

/* 动画关键帧 */
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0% { transform: translateX(-12px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes flowDot {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes pulseRing {
  0% { transform: scale(0.9); opacity: 0.8; }
  100% { transform: scale(1.1); opacity: 0; }
}

.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s ease-in-out infinite alternate; }
.anim-float { animation: float 5s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide { animation: slideIn 0.8s ease-out forwards; }
.anim-flow { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDot 2s linear infinite; }
.anim-pulse { animation: pulseRing 2s ease-out infinite; }

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 响应式调整 */
@media (max-width: 768px) {
  .nav { display: none; }
  .mobile-menu-btn { display: block; }
  h1 { font-size: clamp(2rem, 8vw, 3.2rem); }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .timeline-line { left: 16px; }
}
@media (min-width: 769px) {
  .mobile-menu-btn { display: none; }
}
