/* 设计变量与基础重置 */
:root {
  --bg-dark: #251943;
  --bg-paper: #DBD4ED;
  --text-main: #191523;
  --brand: #5214EB;
  --accent: #ED6E89;
  --white: #ffffff;
  --radius-card: 0;
  --radius-btn: 0;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --max-w: 1280px;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-body: 1.75;
  --lh-title: 1.1;
  --ls-title: -0.02em;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  line-height: var(--lh-body);
  color: var(--text-main);
  background: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--brand); text-decoration: none; transition: color 0.2s ease; }
a:hover { text-decoration: underline; }
ul, ol { list-style: none; }

/* 表面层颜色继承控制 */
.surface-dark { background: var(--bg-dark); color: var(--bg-paper); }
.surface-dark a { color: var(--accent); }
.surface-dark a:hover { text-decoration: underline; }
.surface-dark .hl { color: var(--accent); }
.surface-dark .eyebrow { color: var(--accent); }
.surface-dark .btn-primary { background: var(--accent); color: var(--bg-dark); }
.surface-dark .btn-secondary { border-color: var(--bg-paper); color: var(--bg-paper); }
.surface-dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.surface-dark table { color: var(--bg-paper); }
.surface-dark th, .surface-dark td { border-color: rgba(255, 255, 255, 0.1); }
.surface-dark details { border-color: rgba(255, 255, 255, 0.1); }
.surface-dark details[open] summary { border-color: rgba(255, 255, 255, 0.1); }
.surface-dark .card { background: rgba(255, 255, 255, 0.04); border-color: rgba(255, 255, 255, 0.1); color: var(--bg-paper); }

.surface-paper { background: var(--bg-paper); color: var(--text-main); }
.surface-paper a { color: var(--brand); }
.surface-paper a:hover { text-decoration: underline; }
.surface-paper .hl { color: var(--brand); }
.surface-paper .eyebrow { color: var(--brand); }
.surface-paper .btn-primary { background: var(--accent); color: var(--bg-dark); }
.surface-paper .btn-secondary { border-color: var(--text-main); color: var(--text-main); }
.surface-paper table { color: var(--text-main); }
.surface-paper th, .surface-paper td { border-color: rgba(0, 0, 0, 0.1); }
.surface-paper details { border-color: rgba(0, 0, 0, 0.1); }
.surface-paper details[open] summary { border-color: rgba(0, 0, 0, 0.1); }
.surface-paper .card { background: var(--white); border-color: var(--card-border); color: var(--text-main); }

/* 布局与排版 */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); border-bottom: 1px solid rgba(0,0,0,0.08); }
section:last-of-type { border-bottom: none; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--gap); }
@media (max-width: 768px) { .grid-2 { grid-template-columns: 1fr; } }

h1, h2, h3 { font-weight: 800; letter-spacing: var(--ls-title); line-height: var(--lh-title); }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1rem; }
h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
p { margin-bottom: 1rem; max-width: 38em; }
.eyebrow { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin-bottom: 0.5rem; }

/* 组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.875rem 1.5rem; font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer; border-radius: var(--radius-btn);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.btn svg { width: 20px; height: 20px; }

/* 组件：卡片 */
.card {
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }

/* 组件：表格 */
table { width: 100%; border-collapse: collapse; margin-bottom: 1rem; }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid rgba(0,0,0,0.1); text-align: left; vertical-align: top; word-break: break-word; }
th { font-weight: 600; white-space: normal; }
@media (max-width: 480px) {
  th, td { padding: 0.5rem 0.75rem; }
}

/* 组件：FAQ */
details { border-radius: var(--radius-card); margin-bottom: 0.75rem; }
summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; position: relative; padding-right: 2rem; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 1rem; top: 1rem; font-weight: 400; }
details[open] summary::after { content: "-"; }
details div { padding: 0 1rem 1rem 1rem; line-height: 1.7; }

/* 页头页脚 */
header { position: sticky; top: 0; background: rgba(219, 212, 237, 0.96); backdrop-filter: blur(8px); z-index: 100; border-bottom: 1px solid rgba(0,0,0,0.1); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.logo { display: flex; align-items: center; gap: 0.6rem; font-weight: 800; font-size: 1.2rem; color: var(--text-main); text-decoration: none; }
.logo img { width: 32px; height: 32px; }
nav ul { display: flex; gap: 1.5rem; }
nav a { color: var(--text-main); font-weight: 500; }
nav a:hover, nav a[aria-current="page"] { color: var(--brand); text-decoration: none; }
footer { background: var(--bg-dark); color: var(--bg-paper); padding: var(--section-y) 0; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gap); }
.footer-col h4 { color: var(--accent); margin-bottom: 1rem; font-weight: 700; }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { color: var(--bg-paper); }
.footer-col a:hover { color: var(--accent); }
.copyright { margin-top: var(--gap); padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,0.1); text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* SVG 动效系统 */
.hero-svg { width: 100%; height: auto; max-width: 600px; margin: 0 auto; }
.anim-orbit { animation: orbit-breathe 10s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: float-up 6s ease-in-out infinite; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-in 5s ease forwards; }

@keyframes orbit-breathe {
  0%, 100% { transform: scale(0.96); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 1; }
}
@keyframes float-up {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes dash-in {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
