/* ==================== 基础重置与变量 ==================== */
*, *::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, "Noto Sans SC", sans-serif;
  line-height: 1.75;
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, summary { cursor: pointer; }

/* ==================== 设计 Token 与主题覆盖 ==================== */
:root {
  --color-dark: #140E25;
  --color-paper: #FCFCFD;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #6EEDD2;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  --font-display: "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
}

/* 纸面取色（默认） */
.bg-paper {
  --bg: var(--color-paper);
  --text: var(--color-text);
  --brand: var(--color-brand);
  --accent: var(--color-accent);
}

/* 深色面取色 */
.bg-dark {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --brand: var(--color-accent);
  --accent: var(--color-accent);
}

/* 深色面内的浅色卡片回退到纸面取色 */
.card-light {
  --bg: var(--color-paper);
  --text: var(--color-text);
  --brand: var(--color-brand);
  --accent: var(--color-accent);
}

/* ==================== 布局与容器 ==================== */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  background-color: var(--bg);
  color: var(--text);
  padding-block: var(--section-y);
  position: relative;
}
.section-divider {
  height: 8px;
  background-color: var(--brand);
  margin-bottom: var(--section-y);
  border-radius: 4px;
}

/* ==================== 排版与标题 ==================== */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.75rem;
}
h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-top: 2rem; }
h3 { font-size: 1.25rem; margin-top: 1.5rem; }
p { margin-bottom: 1.25rem; max-width: 38em; }
.text-hl { color: var(--brand); }
.bg-dark .text-hl { color: var(--accent); }

/* ==================== 按钮组件 ==================== */
.btn-group { display: flex; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding-inline: 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none;
}
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary {
  background-color: transparent;
  color: var(--text);
  border: 2px solid var(--text);
}
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); filter: brightness(0.9); }
.btn-icon { width: 20px; height: 20px; flex-shrink: 0; }

/* ==================== 卡片与面板 ==================== */
.card {
  background-color: var(--bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  margin-bottom: var(--gap);
}
.feature-panel {
  background-color: var(--bg);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  min-height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.feature-panel .panel-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--brand);
  margin-bottom: 0.5rem;
}

/* ==================== 表格 ==================== */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--text);
  text-align: left;
}
th { font-weight: 700; }
.bg-dark th, .bg-dark td { border-color: rgba(255,255,255,0.15); }

/* ==================== FAQ ==================== */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  overflow: hidden;
}
.faq-item summary {
  padding: 1rem var(--gap);
  font-weight: 600;
  cursor: pointer;
  background-color: var(--bg);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { padding: 0 var(--gap) 1rem; margin: 0; }

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-paper);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding-block: 1rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-list { display: flex; gap: 1.5rem; }
.nav-link { font-weight: 500; opacity: 0.8; }
.nav-link:hover, .nav-link[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.site-footer {
  background-color: var(--color-dark);
  color: var(--color-paper);
  padding-block: 3rem;
  margin-top: auto;
}
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 2rem; }
.footer-col h4 { margin-bottom: 1rem; color: var(--color-accent); }
.footer-col a { display: block; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }

/* ==================== SVG 动效系统 ==================== */
.svg-responsive {
  width: 100%;
  height: auto;
}
.svg-layer { transform-box: fill-box; transform-origin: center; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-slide-in { animation: slideIn 5s ease-in-out infinite; }
.anim-flow { animation: flowLine 8s linear infinite; }
.anim-spin-slow { animation: spinSlow 12s linear infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  50% { transform: translateX(12px); opacity: 1; }
}
@keyframes flowLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes spinSlow {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
.anim-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  stroke-linecap: round;
}
.anim-path.flow { animation: flowLine 6s ease-in-out infinite; }
.anim-path.draw { animation: drawPath 5s ease-in-out infinite; }
@keyframes drawPath {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}

/* 修复绝对定位 SVG 溢出：限制容器宽度，防止动画位移导致横向滚动条 */
.svg-hero-container {
  overflow: hidden;
  position: relative;
}

/* ==================== 响应式与无障碍 ==================== */
@media (max-width: 768px) {
  .grid-2col { grid-template-columns: 1fr !important; }
  .nav-list { gap: 1rem; }
  .btn-group { flex-direction: column; }
  .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  [class*="anim-"] { animation: none !important; }
}
.grid-2col { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.mt-sm { margin-top: 1rem; }
.mb-md { margin-bottom: 2rem; }
.max-w-prose { max-width: 38em; }
.inline-flex-center { display: inline-flex; align-items: center; justify-content: center; }
