/* ================= 设计变量与基础重置 ================= */
:root {
  --color-dark: #271334;
  --color-paper: #E9E8EA;
  --color-text: #1D1523;
  --color-brand: #8A13DD;
  --color-accent: #9EED6E;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  
  --font-body: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  --line-height-base: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  line-height: var(--line-height-base);
  color: var(--color-text);
  background: var(--color-paper);
  -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; }
button, input { font: inherit; }

/* ================= 容器与排版 ================= */
.container {
  width: min(var(--content-max), 100% - 32px);
  margin-inline: auto;
}
.section {
  padding-block: var(--section-y);
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap);
  color: var(--text, var(--color-text));
}
.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand, var(--color-brand));
  margin-bottom: 12px;
}
.section-label::before {
  content: "";
  display: block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.text-content {
  max-width: 40em;
  font-size: clamp(1rem, 1.1vw, 1.125rem);
  line-height: var(--line-height-base);
  color: var(--text, var(--color-text));
}
.hl { color: var(--brand, var(--color-brand)); font-weight: 700; }
.dark-surface .hl, .dark-surface .hl { color: var(--accent, var(--color-accent)); }

/* ================= 表面上下文 ================= */
.paper-surface { background: var(--color-paper); color: var(--color-text); }
.dark-surface { background: var(--color-dark); color: var(--color-paper); }
.paper-surface .section-label { color: var(--color-brand); }
.dark-surface .section-label { color: var(--color-accent); }
.paper-surface .text-content { color: var(--color-text); }
.dark-surface .text-content { color: var(--color-paper); }

/* ================= 按钮 ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 24px;
  height: 52px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease;
  border: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); background: #8ddb5c; }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}
.dark-surface .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dark-surface .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* ================= 卡片与面板 ================= */
.card {
  background: var(--bg, var(--color-paper));
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 24px;
  position: relative;
}
.panel {
  background: var(--bg, var(--color-dark));
  border-radius: 24px;
  padding: 24px;
  position: relative;
  overflow: hidden;
}
.dark-panel { background: var(--color-dark); border: 2px solid var(--color-paper); }
.paper-panel { background: var(--color-paper); border: 2px solid var(--color-text); }

/* ================= 表格 ================= */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 16px;
}
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  text-align: left;
}
.dark-surface .data-table th, .dark-surface .data-table td { border-bottom-color: rgba(255,255,255,0.15); }
.data-table th { font-weight: 700; color: var(--text, var(--color-text)); }
.data-table td { color: var(--text, var(--color-text)); }

/* ================= FAQ ================= */
.faq-item {
  border: var(--card-border);
  border-radius: var(--radius-card);
  margin-bottom: 12px;
  background: var(--bg, var(--color-paper));
}
.faq-item summary {
  padding: 16px 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-left: 32px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--brand, var(--color-brand));
  font-weight: 800;
}
.faq-item[open] summary::before { content: "-"; }
.faq-item p { padding: 0 20px 16px; color: var(--text, var(--color-text)); line-height: 1.7; }

/* ================= 导航与页脚 ================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(233, 232, 234, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  padding: 12px 0;
}
.dark-surface .site-header { background: rgba(39, 19, 52, 0.9); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo-wrap { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 1.2rem; }
.logo-img { height: 32px; width: auto; }
.nav-list { display: flex; gap: 24px; }
.nav-link { font-weight: 500; position: relative; }
.nav-link[aria-current="page"] { color: var(--brand, var(--color-brand)); font-weight: 700; }
.dark-surface .nav-link[aria-current="page"] { color: var(--accent, var(--color-accent)); }
.nav-link:hover { color: var(--brand, var(--color-brand)); }
.dark-surface .nav-link:hover { color: var(--accent, var(--color-accent)); }
.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0 24px;
  border-top: 2px solid rgba(255,255,255,0.1);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 { font-size: 1rem; margin-bottom: 12px; color: var(--color-accent); }
.footer-col a { display: block; padding: 6px 0; opacity: 0.8; }
.footer-col a:hover { opacity: 1; }
.copyright { text-align: center; font-size: 0.85rem; opacity: 0.6; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.1); }

/* ================= SVG 动效系统 ================= */
.svg-container { width: 100%; height: auto; }
.svg-container svg { width: 100%; height: auto; }
.anim-grid-node { animation: gridPulse 6s ease-in-out infinite; }
.anim-float { animation: floatY 5s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide-in { animation: slideIn 8s ease-in-out infinite; }
.anim-flow-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 6s linear infinite; }
.anim-draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawStroke 8s ease-in-out infinite; }

@keyframes gridPulse {
  0%, 100% { opacity: 0.25; }
  40%, 60% { opacity: 1; fill: var(--color-accent); stroke: var(--color-accent); }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(0); opacity: 0.8; }
  10% { transform: translateX(12px); opacity: 1; }
  20% { transform: translateX(0); opacity: 0.8; }
}
@keyframes flowDash {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}
@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  20% { stroke-dashoffset: 0; }
  80% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -1; }
}

/* 变换中心与盒模型 */
.transform-center { transform-box: fill-box; transform-origin: center; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  .anim-grid-node, .anim-float, .anim-breathe, .anim-slide-in, .anim-flow-line, .anim-draw-path {
    animation: none !important;
    opacity: 1 !important;
    stroke-dashoffset: 0 !important;
  }
}

/* ================= 响应式适配 ================= */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .two-col { grid-template-columns: 1fr !important; }
  .scenario-row:nth-child(even) { direction: ltr; }
  .feature-row { flex-direction: column !important; }
  .feature-text { order: 2; }
  .feature-visual { order: 1; margin-bottom: 16px; }
}
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: var(--gap); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-lg { gap: 48px; }
.mb-md { margin-bottom: var(--gap); }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
