/* === 设计变量 === */
:root {
  --color-dark: #19102D;
  --color-paper: #F4F3F7;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #D66EED;
  --color-divider: rgba(25, 21, 35, 0.12);
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 0;
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --transition-base: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
table { border-collapse: collapse; width: 100%; border-spacing: 0; }

/* === 容器与布局 === */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-top: var(--section-y); padding-bottom: var(--section-y); border-bottom: 1px solid var(--color-divider); position: relative; }
.section:last-child { border-bottom: none; }
.bg-dark { background-color: var(--color-dark); }
.bg-paper { background-color: var(--color-paper); }
.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); }

/* === 排版层级 === */
.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  display: block;
}
.bg-dark .eyebrow { color: var(--color-accent); }
.bg-paper .eyebrow { color: var(--color-brand); }

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.15;
  margin-bottom: 1.25rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  margin-bottom: 1rem;
  text-wrap: balance;
}
h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}
p { margin-bottom: 1rem; max-width: 38em; }
.hl { font-weight: 700; }
.bg-dark .hl { color: var(--color-accent); }
.bg-paper .hl { color: var(--color-brand); }

/* === 按钮组件 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform var(--transition-base), background-color var(--transition-base), color var(--transition-base), border-color var(--transition-base);
  border: 2px solid transparent;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { background-color: #c45de0; transform: translateY(-2px); }
.btn-secondary {
  background: transparent;
}
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.bg-paper .btn-secondary { color: var(--color-text); border-color: var(--color-text); }
.btn-secondary:hover { opacity: 0.85; transform: translateY(-2px); }

/* === 卡片与面板 === */
.card {
  background: rgba(0, 0, 0, 0.03);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: background var(--transition-base);
}
.bg-dark .card { background: rgba(255, 255, 255, 0.06); }
.card:hover { background: rgba(0, 0, 0, 0.05); }
.bg-dark .card:hover { background: rgba(255, 255, 255, 0.1); }

/* === 表格 === */
.table-wrapper { overflow-x: auto; }
table th, table td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--color-divider); }
table th { font-weight: 700; background: rgba(0,0,0,0.03); }
.bg-dark table th { background: rgba(255,255,255,0.05); }
table tr:last-child td { border-bottom: none; }

/* === FAQ === */
details { border-bottom: 1px solid var(--color-divider); padding: 1.25rem 0; }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
summary::-webkit-details-marker { display: none; }
summary::marker { display: none; }
summary::before { content: "+"; font-weight: 700; color: var(--color-brand); }
details[open] summary::before { content: "−"; }
details p { margin-top: 0.75rem; color: var(--color-text); opacity: 0.9; }

/* === 页头与页脚 === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(244, 243, 247, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-divider);
}
.bg-dark .header { background: rgba(25, 16, 45, 0.95); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.25rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
nav { display: flex; gap: 2rem; align-items: center; }
nav a { font-weight: 500; font-size: 0.95rem; }
nav a:hover { color: var(--color-brand); }
.bg-dark nav a { color: var(--color-paper); }
.bg-dark nav a:hover { color: var(--color-accent); }
nav a[aria-current="page"] { font-weight: 700; }
.footer { padding: 4rem 0; border-top: 1px solid var(--color-divider); background: var(--color-paper); }
.bg-dark .footer { background: var(--color-dark); border-top-color: rgba(255,255,255,0.1); color: var(--color-paper); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-weight: 700; margin-bottom: 1rem; }
.footer-col a { display: block; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-col a:hover { opacity: 1; }
.copyright { text-align: center; margin-top: 3rem; opacity: 0.6; font-size: 0.875rem; }

/* === SVG 动效系统 === */
.svg-panel { width: 100%; height: auto; overflow: visible; }
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s ease-in-out infinite alternate;
}
.anim-float {
  animation: floatY 5s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-breathe {
  animation: breatheOp 3.5s ease-in-out infinite;
}
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.8s; }
.delay-3 { animation-delay: 1.2s; }

@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breatheOp {
  0%, 100% { opacity: 0.7; }
  50% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    animation-delay: 0ms !important;
  }
  .anim-draw, .anim-float, .anim-breathe { transform: none !important; opacity: 1 !important; }
}
