/* === 设计变量与基础重置 === */
:root {
  --bg-dark: #13102D;
  --bg-paper: #F7F5F3;
  --text-body: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(23, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--bg-paper);
  color: var(--text-body);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
table { border-collapse: collapse; width: 100%; }
th, td { padding: 0.85em 1em; text-align: left; border-bottom: 1px solid var(--card-border); }
th { font-weight: 700; white-space: nowrap; }

/* === 面层上下文变量覆写 === */
.light-paper { background: var(--bg-paper); color: var(--text-body); }
.light-paper .eyebrow, .light-paper .link, .light-paper .hl { color: var(--color-brand); }
.light-paper h1, .light-paper h2, .light-paper h3, .light-paper p, .light-paper li { color: var(--text-body); }
.light-paper .card { background: var(--bg-paper); border: var(--card-border); color: var(--text-body); }

.dark-surface { background: var(--bg-dark); color: var(--bg-paper); }
.dark-surface .eyebrow, .dark-surface .link, .dark-surface .hl { color: var(--color-accent); }
.dark-surface h1, .dark-surface h2, .dark-surface h3, .dark-surface p, .dark-surface li { color: var(--bg-paper); }
.dark-surface .card {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--bg-paper);
}
.dark-surface .card .eyebrow, .dark-surface .card .hl { color: var(--color-accent); }

/* === 排版系统 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-block: var(--section-y); }
h1 {
  font-size: var(--h1-size, clamp(2.4rem, 6vw, 4.5rem));
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-bottom: var(--gap);
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: var(--gap);
}
h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--gap);
}
p { margin-bottom: 1em; max-width: 38em; }
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--gap);
  display: inline-block;
}
.hl { font-weight: 800; }
.link { text-decoration: underline; text-underline-offset: 3px; }

/* === 组件：按钮 === */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5em;
  padding: 0.75em 1.6em; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none; min-height: 52px;
}
.btn-primary { background: var(--color-accent); color: var(--bg-dark); }
.btn-primary:hover { transform: translateY(-2px); background-color: #7de063; }
.btn-secondary { background: transparent; border: 1px solid currentColor; color: inherit; }
.btn-secondary:hover { background: rgba(128, 128, 128, 0.1); transform: translateY(-1px); }
.btn:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* === 组件：卡片与面板 === */
.card {
  border-radius: var(--radius-card); padding: var(--gap);
  box-shadow: var(--card-shadow); transition: transform 0.2s ease;
}
.feature-panel {
  background: var(--bg-dark); border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2.5rem); aspect-ratio: 4/3;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; position: relative;
}
.dark-surface .feature-panel { background: rgba(0,0,0,0.2); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-col { display: flex; flex-direction: column; gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); }
.align-start { align-items: flex-start; }
.mt-md { margin-top: var(--gap); }
.mt-lg { margin-top: var(--section-y); }

/* === 组件：表格 === */
.spec-table th { width: 40%; }
.spec-table tr:last-child td { border-bottom: none; }

/* === 组件：FAQ === */
details {
  border: var(--card-border); border-radius: var(--radius-card);
  margin-bottom: var(--gap); overflow: hidden; background: var(--bg-paper);
}
.dark-surface details { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
summary {
  padding: 1em 1em 1em 2.2em; cursor: pointer; font-weight: 600;
  list-style: none; position: relative; user-select: none;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: '+'; position: absolute; left: 1em; top: 50%;
  transform: translateY(-50%); font-weight: 700; font-size: 1.1em;
}
details[open] summary::before { content: '−'; }
details > div { padding: 0 1em 1.2em; line-height: 1.65; }

/* === 导航与页脚 === */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 243, 0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
}
.nav-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8em var(--gap); max-width: var(--content-max); margin: 0 auto;
}
.logo { display: flex; align-items: center; gap: 0.6em; font-weight: 800; font-size: 1.2rem; }
.logo img { height: 32px; width: auto; }
nav ul { display: flex; gap: 1.6em; }
nav a { font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
nav a:hover, nav a[aria-current="page"] { opacity: 1; }
footer {
  background: var(--bg-dark); color: rgba(247, 245, 243, 0.8);
  padding: 3em var(--gap); text-align: center; font-size: 0.9rem;
}
footer a { color: var(--color-accent); }
.footer-links { display: flex; justify-content: center; gap: 1.5em; margin-bottom: 1em; flex-wrap: wrap; }

/* === SVG 动效关键帧 === */
@keyframes drawPath {
  0%, 100% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.35; fill: var(--color-brand); }
  50% { opacity: 1; fill: var(--color-accent); }
}
@keyframes floatUp {
  0%, 100% { transform: translateY(0); opacity: 0.85; }
  50% { transform: translateY(-6px); opacity: 1; }
}
@keyframes slideIn {
  0%, 100% { transform: translateX(-8px); opacity: 0; }
  20%, 80% { transform: translateX(0); opacity: 1; }
}
@keyframes typeDot {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
.anim-line { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawPath 5s ease-in-out infinite; }
.anim-node { animation: nodePulse 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: floatUp 7s ease-in-out infinite; }
.anim-slide { animation: slideIn 8s ease-in-out infinite; }
.anim-type span { display: inline-block; width: 5px; height: 5px; border-radius: 50%; background: currentColor; animation: typeDot 1.4s infinite ease-in-out both; }
.anim-type span:nth-child(1) { animation-delay: -0.32s; }
.anim-type span:nth-child(2) { animation-delay: -0.16s; }
.anim-type span:nth-child(3) { animation-delay: 0s; }

/* === 响应式与无障碍 === */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column; }
  nav ul { gap: 1em; }
  .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;
  }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
