/* === 设计变量与基础重置 === */
:root {
  --color-dark: #271334;
  --color-paper: #E9E8EA;
  --color-text: #1D1523;
  --color-brand: #8A13DD;
  --color-accent: #9EED6E;
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 2px solid var(--color-text);
  --card-shadow: 4px 4px 0 var(--color-text);
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1280px;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

*, *::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: 1.65;
  color: var(--color-text);
  background: var(--color-paper);
  -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 {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); align-items: start; }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }

/* === 色彩主题层 === */
.light-paper { background: var(--color-paper); color: var(--color-text); }
.dark-bg { background: var(--color-dark); color: var(--color-paper); }
.dark-bg .eyebrow, .dark-bg .hl, .dark-bg a:not(.btn) { color: var(--color-accent); }
.light-paper .eyebrow, .light-paper .hl, .light-paper a:not(.btn) { color: var(--color-brand); }
.card-on-dark {
  background: var(--color-paper);
  color: var(--color-text);
  border-color: var(--color-text);
}
.panel-dark {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: var(--radius-card);
  padding: var(--gap);
}

/* === 排版 === */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: 0.02em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); margin-bottom: 0.5em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 0.6em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 0.4em; }
p { margin-bottom: 1em; max-width: 38em; }
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
}
.hl { font-weight: 800; }
.section-title { margin-bottom: calc(var(--gap) * 1.5); }

/* === 组件：按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.85em 1.6em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, filter 0.2s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 3px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  border: 2px solid transparent;
}
.btn-primary:hover { filter: brightness(0.95); }
.btn-secondary {
  background: transparent;
  color: var(--color-text);
  border: 2px solid var(--color-text);
}
.dark-bg .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.dark-bg .btn-secondary:hover { background: rgba(255,255,255,0.08); }

/* === 组件：卡片 === */
.card {
  background: var(--color-paper);
  color: var(--color-text);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: var(--gap);
  display: flex;
  flex-direction: column;
  gap: 0.8em;
}
.card-on-dark { background: var(--color-paper); color: var(--color-text); border-color: var(--color-text); }

/* === 组件：表格 === */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 480px; table-layout: fixed; }
th, td { padding: 0.8em 1em; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); overflow-wrap: anywhere; word-break: break-word; }
th { font-weight: 700; background: rgba(0,0,0,0.03); }
td:last-child { font-weight: 500; }
.dark-bg th, .dark-bg td { border-color: rgba(255,255,255,0.1); background: transparent; }
.dark-bg th { background: rgba(255,255,255,0.06); }

/* === 组件：FAQ === */
details {
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 1em 1.2em;
  margin-bottom: 0.8em;
  background: var(--color-paper);
  color: var(--color-text);
}
details[open] { background: rgba(0,0,0,0.03); }
.summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.summary::-webkit-details-marker { display: none; }
.summary::after { content: "+"; font-size: 1.2em; font-weight: 400; }
details[open] .summary::after { content: "−"; }
.details-content { margin-top: 0.6em; line-height: 1.7; }

/* === 导航与页脚 === */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  backdrop-filter: blur(8px);
}
.dark-bg .header { background: var(--color-dark); border-color: rgba(255,255,255,0.08); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.6em; font-weight: 800; font-size: 1.1rem; }
.brand img { width: 28px; height: 28px; object-fit: contain; }
.nav-links { display: flex; gap: 1.5em; align-items: center; }
.nav-links a { font-weight: 500; opacity: 0.85; transition: opacity 0.2s; }
.nav-links a:hover, .nav-links a[aria-current="page"] { opacity: 1; }
.nav-links a[aria-current="page"] { color: var(--color-brand); font-weight: 700; }
.dark-bg .nav-links a[aria-current="page"] { color: var(--color-accent); }

.footer {
  padding: 3em 0;
  border-top: 1px solid rgba(0,0,0,0.08);
  margin-top: var(--section-y);
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.8;
}
.dark-bg .footer { border-color: rgba(255,255,255,0.08); }
.footer-links { display: flex; justify-content: center; gap: 1.5em; margin-bottom: 1em; }
.footer-links a { opacity: 0.7; transition: opacity 0.2s; }
.footer-links a:hover { opacity: 1; }

/* === SVG 响应式与动效 === */
.svg-responsive { width: 100%; height: auto; }
.anim-orbit { animation: orbit-breathe 8s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.anim-bubble { animation: bubble-rise 6s ease-in-out infinite alternate; opacity: 0.8; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-draw 4s linear infinite alternate; }
.anim-slide { animation: slide-in-right 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
@keyframes orbit-breathe {
  0% { transform: scale(0.96) rotate(0deg); opacity: 0.8; }
  100% { transform: scale(1.04) rotate(3deg); opacity: 1; }
}
@keyframes bubble-rise {
  0% { transform: translateY(0); opacity: 0.7; }
  100% { transform: translateY(-10px); opacity: 1; }
}
@keyframes dash-draw {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes slide-in-right {
  0% { transform: translateX(24px); opacity: 0; }
  100% { transform: translateX(0); opacity: 1; }
}

/* === 减少动态效果 === */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .nav-links { gap: 1em; font-size: 0.9rem; }
  .hero-layout { flex-direction: column-reverse; }
  .timeline { flex-direction: column; }
  .step-item { flex-direction: column; align-items: flex-start; }
  p { max-width: 100%; }
}
