/* 设计变量 */
:root {
  --color-dark: #271231;
  --color-paper: #F6F3F7;
  --color-text: #1F1523;
  --color-brand: #9E13DD;
  --color-accent: #ED6EC0;
  --color-text-rgb: 31, 21, 35;
  --color-border: rgba(var(--color-text-rgb), 0.16);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid;
  --card-shadow: none;
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-base: 1.65;
}

/* 基础重置与排版 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  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; }

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}
.section + .section { border-top: 1px solid var(--color-border); }
.section-dark {
  background: var(--color-dark);
  color: var(--color-paper);
}
.theme-light-card {
  background: var(--color-paper);
  color: var(--color-text);
}

/* 标题与眉标 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  color: var(--color-brand);
}
.section-dark .eyebrow { color: var(--color-accent); }
h1, h2, h3 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.8em; }
h3 { font-size: 1.25rem; margin-bottom: 0.5em; }
.hl { color: var(--color-brand); }
.section-dark .hl { color: var(--color-accent); }
.text-wrap-balance { text-wrap: balance; }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 1px solid var(--color-text);
}
.section-dark .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}
.btn-secondary:hover { opacity: 0.85; transform: translateY(-2px); }
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* 卡片与网格 */
.card {
  background: var(--color-paper);
  border: var(--card-border) var(--color-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-4px); }
.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); }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}
.data-table th { font-weight: 700; width: 40%; }

/* FAQ */
details {
  border-bottom: 1px solid var(--color-border);
  padding: 16px 0;
}
summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-weight: 400; }
details[open] summary::after { content: "−"; }
details p { margin-top: 12px; color: inherit; }

/* 导航与页脚 */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246, 243, 247, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.section-dark .header { background: rgba(39, 18, 49, 0.9); }
.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; }
.nav-links { display: flex; gap: 24px; }
.nav-links a { font-weight: 500; position: relative; }
.nav-links a[aria-current="page"], .nav-links a:hover { color: var(--color-brand); }
.section-dark .nav-links a[aria-current="page"], .section-dark .nav-links a:hover { color: var(--color-accent); }
.footer {
  padding: 48px 0;
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
  color: rgba(var(--color-text-rgb), 0.7);
}
.section-dark .footer { border-color: rgba(255,255,255,0.1); color: rgba(246,243,247,0.7); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.footer-col h4 { margin-bottom: 12px; font-weight: 700; color: var(--color-text); }
.section-dark .footer-col h4 { color: var(--color-paper); }
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { text-decoration: underline; }

/* SVG 动效基础 */
.svg-visual { width: 100%; height: auto; }
.orbit-path {
  fill: none;
  stroke-width: 1.5;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
.bubble-group { transform-box: fill-box; transform-origin: center; }
.notify-card { transform-box: fill-box; transform-origin: center; }
.typing-dot { transform-box: fill-box; transform-origin: center; }
.flow-line {
  fill: none;
  stroke-width: 2;
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}

/* 动效关键帧 */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.3; }
  50% { transform: scale(1.08); opacity: 0.7; }
}
@keyframes bubble-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes notify-slide {
  0%, 100% { transform: translateX(0); opacity: 1; }
  15% { transform: translateX(-12px); opacity: 0; }
  25% { transform: translateX(0); opacity: 1; }
}
@keyframes typing-blink {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes dash-flow {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 动效类绑定 */
.anim-orbit { animation: orbit-breathe 6s ease-in-out infinite; }
.anim-orbit-2 { animation: orbit-breathe 8s ease-in-out infinite reverse; }
.anim-orbit-3 { animation: orbit-breathe 10s ease-in-out infinite; }
.anim-bubble { animation: bubble-float 4s ease-in-out infinite; }
.anim-bubble-delay { animation: bubble-float 4s ease-in-out infinite 1.5s; }
.anim-notify { animation: notify-slide 7s ease-in-out infinite; }
.anim-typing { animation: typing-blink 1.8s steps(3) infinite; }
.anim-flow { animation: dash-flow 4s linear infinite; }

/* 响应式与无障碍 */
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .hero-layout { flex-direction: column-reverse !important; }
  h1 br { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-name: none;
  }
}
/* 焦点可见性 */
:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.section-dark :focus-visible { outline-color: var(--color-accent); }
