/* === 设计变量与基础设定 === */
:root {
  --bg-dark: #271334;
  --bg-paper: #E9E8EA;
  --text: #1D1523;
  --brand: #8A13DD;
  --accent: #9EED6E;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--text);
  --card-shadow: 4px 4px 0 var(--text);
  
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg-paper);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* === 排版 === */
h1, h2, h3, h4 { font-weight: 500; line-height: 1.15; margin-top: 0; margin-bottom: var(--gap); letter-spacing: -0.02em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { margin-top: 0; margin-bottom: 1em; max-width: 38em; }
small, .caption { font-size: 0.875rem; opacity: 0.85; }

/* === 辅助类 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: var(--section-y) var(--gap); }
.section-dark { background: var(--bg-dark); color: var(--bg-paper); }
.section-dark a:not(.btn) { color: var(--accent); }
.section-dark .hl { color: var(--accent); }
.hl { color: var(--brand); }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  color: var(--brand);
}
.section-dark .eyebrow { color: var(--accent); }

/* === 按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding: 0 28px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  border: none; text-decoration: none;
}
.btn-primary { background: var(--accent); color: var(--bg-dark); }
.btn-secondary { background: transparent; color: var(--text); border: 2px solid var(--text); }
.section-dark .btn-secondary { color: var(--bg-paper); border-color: var(--bg-paper); }
.btn:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 1.5; fill: none; }

/* === 卡片与面板 === */
.card {
  background: var(--bg-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
}
.section-dark .card { background: var(--bg-dark); border-color: var(--bg-paper); box-shadow: 4px 4px 0 var(--bg-paper); }
.panel { background: var(--bg-dark); border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--card-shadow); }
.section-dark .panel { background: var(--bg-paper); border-color: var(--text); box-shadow: 4px 4px 0 var(--text); }

/* === 表格 === */
table { width: 100%; border-collapse: collapse; margin: var(--gap) 0; font-size: 0.95rem; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--text); vertical-align: top; }
th { font-weight: 600; white-space: nowrap; }
td { max-width: 40em; }
.section-dark th, .section-dark td { border-bottom-color: rgba(255,255,255,0.2); }

/* === 列表与步骤 === */
ol.steps { padding-left: 1.2em; margin: 0; }
ol.steps li { margin-bottom: 0.8em; position: relative; padding-left: 0.5em; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; background: var(--accent); color: var(--bg-dark);
  border-radius: 8px; font-weight: 700; font-size: 0.85rem; margin-right: 8px; vertical-align: middle;
}
ul.check-list { list-style: none; padding: 0; margin: 0; }
ul.check-list li { position: relative; padding-left: 24px; margin-bottom: 0.6em; }
ul.check-list li::before {
  content: ""; position: absolute; left: 0; top: 6px;
  width: 10px; height: 10px; border-radius: 3px; background: var(--brand);
}
.section-dark ul.check-list li::before { background: var(--accent); }

/* === FAQ === */
details.faq-item { margin-bottom: 12px; border: var(--card-border); border-radius: var(--radius-card); background: var(--bg-paper); }
.section-dark details.faq-item { background: var(--bg-dark); border-color: var(--bg-paper); }
details.faq-item summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
details.faq-item summary::-webkit-details-marker { display: none; }
details.faq-item summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
details.faq-item[open] summary::after { content: "−"; }
details.faq-item p { margin: 0 20px 16px; max-width: 38em; }

/* === 页头与页脚 === */
header { position: sticky; top: 0; z-index: 100; background: var(--bg-paper); border-bottom: 1px solid rgba(0,0,0,0.08); padding: 12px var(--gap); }
.section-dark header { background: var(--bg-dark); border-bottom-color: rgba(255,255,255,0.1); }
.nav-inner { max-width: var(--content-max); margin: 0 auto; display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.15rem; color: inherit; text-decoration: none; }
.brand img { height: 32px; width: auto; display: block; }
nav ul { list-style: none; display: flex; gap: 24px; margin: 0; padding: 0; }
nav a { color: inherit; font-weight: 500; padding: 8px 0; position: relative; }
nav a[aria-current="page"] { color: var(--brand); font-weight: 700; }
.section-dark nav a[aria-current="page"] { color: var(--accent); }
nav a::after { content: ""; position: absolute; bottom: 4px; left: 0; width: 0; height: 2px; background: currentColor; transition: width 0.2s; }
nav a:hover::after { width: 100%; }
footer { background: var(--bg-dark); color: var(--bg-paper); padding: 48px var(--gap); text-align: center; font-size: 0.9rem; }
footer a { color: var(--accent); }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; flex-wrap: wrap; }

/* === SVG 动效 === */
.svg-icon { width: 24px; height: 24px; stroke: currentColor; stroke-width: 1.5; fill: none; }
.grid-node { transform-box: fill-box; transform-origin: center; opacity: 0.3; transition: opacity 0.3s; }
.grid-node.active { opacity: 1; }
@keyframes nodePulse {
  0%, 100% { transform: scale(0.85); opacity: 0.25; }
  50% { transform: scale(1.15); opacity: 1; }
}
.node-anim { animation: nodePulse 4s ease-in-out infinite; }
.node-anim:nth-child(odd) { animation-delay: 0s; }
.node-anim:nth-child(even) { animation-delay: 0.8s; }
.node-anim.delay-1 { animation-delay: 0.4s; }
.node-anim.delay-2 { animation-delay: 1.2s; }

@keyframes dashFlow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.flow-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dashFlow 3.5s ease-in-out infinite; }
.bubble-pop { transform-box: fill-box; transform-origin: center; animation: popIn 3s ease-in-out infinite; }
@keyframes popIn {
  0%, 100% { transform: scale(0.95); opacity: 0.7; }
  50% { transform: scale(1.05); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .nav-inner { flex-direction: column; gap: 12px; }
  nav ul { gap: 16px; }
  .hero-layout { grid-template-columns: 1fr !important; }
  .feature-row { flex-direction: column; }
  .scenario-grid { grid-template-columns: 1fr !important; }
}
