*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  font-size: 18px;
  line-height: 1.75;
  color: var(--text);
  background-color: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

:root {
  --color-dark: #1B1231;
  --color-paper: #DBD4ED;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #9977EE;
  
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;
  
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1280px;
}

/* 上下文取色变量 */
.dark-surface {
  --bg: var(--color-dark);
  --text: var(--color-paper);
  --accent: var(--color-accent);
  --link: var(--color-accent);
  --border: color-mix(in srgb, var(--color-paper) 12%, transparent);
  --card-bg: color-mix(in srgb, var(--color-paper) 8%, transparent);
}
.paper-surface {
  --bg: var(--color-paper);
  --text: var(--color-text);
  --accent: var(--color-brand);
  --link: var(--color-brand);
  --border: color-mix(in srgb, var(--color-text) 10%, transparent);
  --card-bg: #FFFFFF;
}

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
section {
  padding-block: var(--section-y);
  position: relative;
}
.section-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  border: none;
}

/* 排版 */
h1, h2, h3, h4 {
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: 1.25rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: 1rem; }
p { margin-bottom: 1.5em; max-width: 38em; }
.hl { color: var(--accent); font-weight: 600; }
.subtitle {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
  display: block;
}

/* 对比度修复：深色背景上的 accent 文字 */
.dark-surface .subtitle,
.paper-surface .dark-surface .subtitle {
  color: #ffffff;
}

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--color-paper) 85%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  font-size: 1.25rem;
}
.brand img { height: 32px; width: auto; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }
.nav .btn { height: 40px; font-size: 14px; padding-inline: 20px; }

.site-footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding-block: 48px;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
  justify-content: space-between;
}
.footer-col h4 { color: var(--color-accent); margin-bottom: 16px; font-size: 1rem; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 12px; }
.footer-col a { color: var(--color-paper); text-decoration: none; opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; color: var(--color-accent); }
.copyright { text-align: center; margin-top: 48px; opacity: 0.6; font-size: 0.875rem; }

/* 按钮组件 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding-inline: 24px;
  font-size: 16px;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-secondary { background: transparent; border: 2px solid var(--text); color: var(--text); }
.dark-surface .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.icon-svg { width: 20px; height: 20px; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; fill: none; }

/* 卡片与网格 */
.card {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  padding: 32px;
  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); }

/* 表格 */
.table-wrapper { overflow-x: auto; border-radius: var(--radius-card); }
table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card-bg);
  border-radius: var(--radius-card);
  overflow: hidden;
}
th, td { padding: 16px 24px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: color-mix(in srgb, var(--bg) 85%, white); font-weight: 600; }
td:last-child { font-weight: 500; color: var(--accent); }

/* FAQ 折叠面板 */
details {
  background: var(--card-bg);
  border-radius: var(--radius-card);
  margin-bottom: 16px;
  overflow: hidden;
}
summary {
  padding: 20px 24px;
  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.5rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details p { padding: 0 24px 20px; margin-bottom: 0; }

/* SVG 动效系统 */
@keyframes draw {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes float {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(-6px); opacity: 0.85; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
.draw-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw 4s ease-in-out infinite alternate;
}
.float-element {
  animation: float 6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.breathing-dot {
  animation: breathe 2s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}
.delay-1 { animation-delay: 0.5s; }
.delay-2 { animation-delay: 1s; }
.delay-3 { animation-delay: 1.5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.flex-center { display: flex; justify-content: center; align-items: center; }
.step-list { counter-reset: step; list-style: none; display: grid; gap: 24px; }
.step-list li { position: relative; padding-left: 48px; }
.step-list li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  background: var(--accent);
  color: var(--color-dark);
  font-weight: 700;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.news-grid article { height: 100%; display: flex; flex-direction: column; }
.news-grid time { font-size: 0.8rem; color: var(--accent); margin-bottom: 8px; display: block; }
.news-grid h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.news-grid p { font-size: 0.95rem; opacity: 0.85; margin-bottom: 0; flex-grow: 1; }

/* 响应式适配 */
@media (max-width: 768px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .step-list { grid-template-columns: 1fr; }
  .header-inner { flex-direction: column; height: auto; padding: 16px 0; }
  .nav { flex-wrap: wrap; justify-content: center; margin-top: 16px; }
}
