:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 960px;
  --body-lh: 1.65;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--body-lh);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 容器与分节 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.section--paper { background-color: var(--color-paper); }
.section--dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
}
.section--dark .hl { color: var(--color-accent); }
.section--dark .label { color: var(--color-accent); }
.section--dark a { color: var(--color-accent); }
.section--dark .card {
  background-color: var(--color-paper);
  color: var(--color-text);
  border-color: rgba(25, 21, 35, 0.16);
}
.section--dark .card h3, .section--dark .card p { color: var(--color-text); }
.section--dark .card .meta { color: var(--color-text); opacity: 0.7; }

/* 标题系统 */
.label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 0.75rem;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: var(--gap);
}
h3 {
  font-size: 1.125rem;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 0.5rem;
}
.hl { color: var(--color-brand); }
p { margin-bottom: 1rem; max-width: 38em; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  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-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-2px); }
.btn--primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: 2px solid transparent;
}
.btn--primary:hover { background-color: #d9825f; }
.btn--secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.section--dark .btn--secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

/* 卡片与面板 */
.card {
  background: #fff;
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}
.panel {
  background-color: var(--color-dark);
  border-radius: var(--radius-card);
  padding: clamp(1.5rem, 3vw, 2.5rem);
  overflow: hidden;
  position: relative;
}

/* 网格布局 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.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.reverse-mobile { flex-direction: row-reverse; }
}

/* 列表与定义 */
dl.feature-list { display: grid; gap: var(--gap); }
dt { font-weight: 700; margin-bottom: 0.25rem; color: var(--color-brand); }
dd { margin-left: 0; margin-bottom: 1rem; }

/* 表格 */
.table-spec { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.table-spec th, .table-spec td {
  text-align: left;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}
.table-spec th { font-weight: 700; width: 40%; }
.table-spec tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(25, 21, 35, 0.1); }
.faq-item summary {
  padding: 1rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  position: relative;
  padding-right: 2rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 1rem;
  font-weight: 400;
}
.faq-item[open] summary::after { content: "-"; }
.faq-item p { margin: 0.5rem 0 1rem; line-height: var(--body-lh); }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(244, 243, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
}
.section--dark .site-header { background-color: rgba(33, 22, 60, 0.95); border-bottom-color: rgba(244, 243, 247, 0.1); }
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}
.nav-links { display: flex; gap: 1.5rem; }
.nav-links a { font-size: 0.95rem; font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; color: var(--color-brand); }
.section--dark .nav-links a { color: #191523; }
.section--dark .nav-links a:hover, .section--dark .nav-links a[aria-current="page"] { color: var(--color-brand); }
.site-footer {
  border-top: 1px solid rgba(25, 21, 35, 0.1);
  padding: 2rem 0;
  font-size: 0.9rem;
  opacity: 0.8;
}

/* SVG 基础与动效 */
.svg-panel { width: 100%; height: auto; }
.flow-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s ease-in-out infinite alternate;
}
.float-element {
  animation: floatY 6s ease-in-out infinite alternate;
}
.pulse-dot {
  animation: pulseOpacity 3s ease-in-out infinite;
}
.slide-in {
  animation: slideIn 5s ease-out infinite alternate;
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes floatY {
  from { transform: translateY(0); }
  to { transform: translateY(-8px); }
}
@keyframes pulseOpacity {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(-10px); opacity: 0.4; }
  to { transform: translateX(0); opacity: 1; }
}
/* SVG 子元素变换中心 */
.transform-center {
  transform-box: fill-box;
  transform-origin: center;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  html { scroll-behavior: auto; }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .nav-links { display: none; } /* 简化移动端，实际项目可加汉堡菜单 */
}
