/* 设计变量 */
:root {
  --color-dark: #140E25;
  --color-paper: #FCFCFD;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #6EEDD2;
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 2px solid var(--color-body);
  --card-shadow: 4px 4px 0 var(--color-body);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-main);
  background: var(--color-paper);
  color: var(--color-body);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* 容器 */
.container {
  width: min(var(--content-max), 100% - 2rem);
  margin-inline: auto;
}

/* 排版层级 */
h1, h2, h3, h4 { line-height: 1.25; font-weight: 600; letter-spacing: 0; text-wrap: balance; }
h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); margin-bottom: 0.75rem; }
p { margin: 0 0 1rem; max-width: 38em; }
.hero-intro { font-size: clamp(1rem, 1.2vw, 1.125rem); opacity: 0.9; margin-bottom: 2rem; }

/* 眉标与高亮 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.bg-dark .eyebrow { color: var(--color-accent); }
.paper .eyebrow { color: var(--color-brand); }
.hl { font-weight: 700; }
.bg-dark .hl { color: var(--color-accent); }
.paper .hl { color: var(--color-brand); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.75rem 1.25rem; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent); color: var(--color-dark); border: none;
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary {
  background: transparent; color: var(--color-body); border: 2px solid var(--color-body);
}
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { transform: translateY(-2px); filter: brightness(0.9); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.bg-dark .card { background: var(--color-paper); }

/* 网格布局 */
.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)); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
@media (min-width: 768px) {
  .flex-row-alternate > div:nth-child(even) { order: 2; }
  .flex-row-alternate > div:nth-child(odd) { order: 1; }
}
@media (max-width: 767px) {
  .flex-row-alternate > div { order: unset; }
}

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 0; }
th, td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-body); }
th { font-weight: 700; }
td:first-child { font-weight: 600; white-space: nowrap; }

/* 导航与页脚 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(252, 252, 253, 0.95); backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.bg-dark.site-header { background: rgba(20, 14, 37, 0.95); border-bottom-color: rgba(252, 252, 253, 0.1); }
.header-inner {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.nav-links { display: flex; gap: 1.5rem; align-items: center; }
.nav-links a { font-weight: 500; font-size: 0.95rem; }
.nav-links a:hover { color: var(--color-brand); }
.bg-dark .nav-links a { color: var(--color-paper); }
.bg-dark .nav-links a:hover { color: var(--color-accent); }
.nav-links a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.bg-dark .nav-links a[aria-current="page"] { color: var(--color-accent); }
.logo-img { height: 32px; width: auto; object-fit: contain; }

.site-footer {
  padding: var(--section-y) 0; border-top: 1px solid rgba(25, 21, 35, 0.1);
  margin-top: auto;
}
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.footer-col h4 { margin-bottom: 0.75rem; font-size: 1rem; }
.footer-col a { display: block; padding: 0.25rem 0; opacity: 0.8; }
.footer-col a:hover { opacity: 1; text-decoration: underline; }
.copyright { text-align: center; margin-top: 2rem; opacity: 0.6; font-size: 0.875rem; }

/* FAQ */
details { border: var(--card-border); border-radius: var(--radius-card); margin-bottom: 0.75rem; overflow: hidden; }
summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.25rem; transition: transform 0.2s; }
details[open] summary::after { content: "−"; }
.details-content { padding: 0 1.25rem 1rem; }
details + details { margin-top: 0; }

/* 区块背景 */
.section-hero, .section-dark { background: var(--color-dark); color: var(--color-paper); }
.section-paper { background: var(--color-paper); color: var(--color-body); }
.section-alt { background: #F4F4F6; }
.section-alt .card { background: var(--color-paper); }

/* SVG 动效基础 */
.svg-visual { width: 100%; height: auto; max-width: 100%; }
.svg-visual path, .svg-visual circle, .svg-visual rect { transition: none; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 6s infinite ease-in-out; }
.anim-float { animation: float-up 4s infinite ease-in-out; transform-box: fill-box; transform-origin: center; }
.anim-pulse { animation: pulse-opacity 3s infinite ease-in-out; }
.anim-spin { animation: spin-slow 12s infinite linear; transform-box: fill-box; transform-origin: center; }

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  40%, 60% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 减少动态效果 */
@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;
  }
  .anim-draw, .anim-float, .anim-pulse, .anim-spin { animation: none !important; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .header-inner { flex-direction: row; }
  .nav-links { gap: 1rem; }
  .hero-grid { flex-direction: column; }
}
