/* 设计 Token 与基础变量 */
:root {
  --color-dark: #21163C;
  --color-paper: #F4F3F7;
  --color-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #ED926E;
  
  --radius-card: 20px;
  --radius-btn: 12px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  
  --font-sans: ui-sans-serif, system-ui, -apple-system, "PingFang SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
  
  /* 上下文取色变量 */
  --text-primary: var(--color-body);
  --text-inverse: var(--color-paper);
  --text-highlight: var(--color-brand);
  --text-highlight-dark: var(--color-accent);
  --surface-bg: var(--color-paper);
  --border-subtle: rgba(25, 21, 35, 0.08);
}

/* 深色面上下文覆盖 */
.bg-dark {
  background-color: var(--color-dark);
  color: var(--text-inverse);
  --text-primary: var(--color-paper);
  --text-highlight: var(--color-accent);
  --border-subtle: rgba(244, 243, 247, 0.12);
}

/* 浅色卡片在深色面上的取色重置 */
.card-light {
  background-color: var(--color-paper);
  color: var(--color-body);
  --text-highlight: var(--color-brand);
}

/* 全局重置与基础排版 */
*, *::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.75;
  color: var(--text-primary);
  background-color: var(--surface-bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--text-highlight); text-decoration: none; transition: opacity 0.2s; }
a:hover { opacity: 0.8; }
a:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 2px; }

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
}

/* 排版层级 */
.eyebrow {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-highlight);
  margin-bottom: 0.75rem;
}
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
  color: inherit;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 1.25rem;
  color: inherit;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.75rem;
  color: inherit;
}
p { margin-bottom: 1rem; max-width: 38em; }
.hl { color: var(--text-highlight); font-weight: 700; }

/* 按钮组件 */
.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, box-shadow 0.2s;
  text-align: center;
  white-space: nowrap;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
  border: none;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(237, 146, 110, 0.35); }
.btn-secondary {
  background-color: transparent;
  color: var(--text-primary);
  border: 1px solid currentColor;
}
.btn-secondary:hover { background-color: rgba(255,255,255,0.05); }
.bg-dark .btn-secondary { color: var(--text-inverse); }

/* 卡片与面板 */
.card {
  background-color: var(--surface-bg);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 14px 32px -12px rgba(25, 21, 35, 0.35); }
.panel {
  background-color: var(--color-dark);
  border-radius: 24px;
  padding: 2rem;
  position: relative;
  overflow: hidden;
}
.bg-dark .panel { background-color: rgba(255,255,255,0.04); border: 1px solid var(--border-subtle); }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius-card); border: 1px solid var(--border-subtle); }
table { width: 100%; border-collapse: collapse; min-width: 480px; }
th, td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--border-subtle); }
th { font-weight: 700; background-color: rgba(255,255,255,0.03); }
td:first-child { font-weight: 600; width: 35%; }

/* FAQ Details */
details {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  padding: 1.25rem;
  transition: background-color 0.2s;
}
details[open] { background-color: rgba(255,255,255,0.02); }
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
summary::-webkit-details-marker { display: none; }
summary::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  background-color: var(--text-highlight);
  border-radius: 2px;
  transform: rotate(45deg);
  transition: transform 0.2s;
}
details[open] summary::before { transform: rotate(135deg); }
details p { margin-top: 0.75rem; color: var(--text-primary); opacity: 0.9; }

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(244, 243, 247, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}
.bg-dark .site-header { background-color: rgba(33, 22, 60, 0.9); }
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: inherit; }
.brand img { height: 28px; width: auto; }
nav { display: flex; gap: 1.5rem; align-items: center; }
nav a { font-weight: 500; font-size: 0.95rem; opacity: 0.8; }
nav a[aria-current="page"], nav a:hover { opacity: 1; color: var(--text-highlight); }
.bg-dark nav a[aria-current="page"], .bg-dark nav a:hover, .bg-dark nav a { color: var(--color-paper); }
.site-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 3rem 0;
  font-size: 0.9rem;
  opacity: 0.85;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; }
.footer-links { display: flex; gap: 1.5rem; }

/* SVG 响应式基类 */
.svg-responsive { width: 100%; height: auto; display: block; }
.svg-icon-inline {
  display: inline-block;
  width: 1em;
  height: 1em;
  vertical-align: -0.125em;
}

/* SVG 动效 Keyframes */
@keyframes drawStroke {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes floatSoft {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breatheOpacity {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
@keyframes slidePanel {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* 动效应用类 */
.anim-draw { animation: drawStroke 6s ease forwards; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-float { animation: floatSoft 7s ease-in-out infinite; }
.anim-breathe { animation: breatheOpacity 5s ease-in-out infinite; }
.anim-slide { animation: slidePanel 5s ease forwards; }
.anim-spin { animation: spinSlow 20s linear infinite; transform-box: fill-box; transform-origin: center; }

/* 减少动态效果适配 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .anim-draw, .anim-float, .anim-breathe, .anim-slide, .anim-spin {
    animation: none !important;
    stroke-dashoffset: 0 !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 响应式网格 */
.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); }
@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 1rem 0; gap: 1rem; }
  h1 { font-size: 2rem; }
}
