/* === 设计变量与基础重置 === */
:root {
  /* 色板 */
  --color-dark: #17203F;
  --color-paper: #FCFCFD;
  --color-text: #151823;
  --color-brand: #1441EB;
  --color-accent: #6EEDBD;

  /* 结构 Token */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21, 24, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;

  /* 排版 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --lh-tight: 1.15;
  --lh-normal: 1.75;
}

*, *::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: var(--lh-normal);
  color: var(--color-text);
  background-color: var(--color-paper);
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器与布局 === */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  padding-block: var(--section-y);
  position: relative;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}
@media (min-width: 768px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; }
}

/* === 表面层颜色控制 === */
.surface-dark {
  background-color: var(--color-dark);
  color: var(--color-paper);
  --_accent: var(--color-accent);
  --_brand: var(--color-accent);
}
.surface-light {
  background-color: var(--color-paper);
  color: var(--color-text);
  --_accent: var(--color-brand);
  --_brand: var(--color-brand);
}
.surface-light .card { background: var(--color-paper); color: var(--color-text); }
.surface-dark .card { background: var(--color-paper); color: var(--color-text); }

/* === 排版组件 === */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--_accent);
  margin-bottom: 0.75rem;
}
.kicker::before {
  content: "";
  display: block;
  width: 1.5rem;
  height: 2px;
  background-color: var(--_accent);
}
h1 {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: var(--lh-tight);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.25;
  margin-bottom: 1.5rem;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.75rem;
}
p { margin-bottom: 1rem; max-width: 38em; }
.hl { color: var(--_accent); font-weight: 600; }
.surface-light .hl { color: var(--_brand); }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 52px;
  padding-inline: 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
}
.btn-primary {
  background-color: var(--_accent);
  color: var(--color-dark);
}
.surface-light .btn-primary { background-color: #153feb; color: #ffffff; }
.surface-dark .btn-primary { background-color: var(--color-accent); color: var(--color-dark); }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--_accent);
  color: var(--_accent);
}
.surface-light .btn-secondary { border-color: var(--color-text); color: var(--color-text); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 2px solid var(--_accent); outline-offset: 2px; }

/* === 卡片与网格 === */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: box-shadow 0.3s ease;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

/* === 表格 === */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}
th, td {
  padding: 0.75rem 1rem;
  text-align: left;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
th { font-weight: 600; }

/* === FAQ === */
details {
  border: 1px solid rgba(128,128,128,0.2);
  border-radius: var(--radius-card);
  margin-bottom: 1rem;
  padding: 1rem;
  transition: background-color 0.2s;
}
summary {
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s;
}
details[open] summary::after { transform: rotate(45deg); }
details p { margin-top: 0.75rem; font-size: 0.95rem; }

/* === 页头与页脚 === */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-paper);
  border-bottom: 1px solid rgba(128,128,128,0.15);
  padding: 0.75rem 0;
  backdrop-filter: blur(8px);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 700;
  font-size: 1.1rem;
}
.nav { display: flex; gap: 1.5rem; align-items: center; }
.nav a { font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--_brand); }
.footer {
  background: var(--color-dark);
  color: var(--color-paper);
  padding: 3rem 0;
  margin-top: auto;
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  text-align: center;
}
@media (min-width: 768px) {
  .footer-inner { flex-direction: row; justify-content: space-between; text-align: left; }
}

/* === SVG 动效定义 === */
.svg-container {
  width: 100%;
  height: auto;
  overflow: hidden;
}
.svg-container svg {
  width: 100%;
  height: auto;
}
.anim-float {
  animation: float 6s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-float-delayed {
  animation: float 7s cubic-bezier(0.4, 0, 0.6, 1) infinite alternate-reverse;
  transform-box: fill-box;
  transform-origin: center;
}
.anim-breathe {
  animation: breathe 4s ease-in-out infinite;
}
.anim-slide-in {
  animation: slideIn 8s ease-in-out infinite;
}
.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 12s linear infinite;
}

@keyframes float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-10px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  0%, 15% { transform: translateX(110%); opacity: 0; }
  25%, 85% { transform: translateX(0); opacity: 1; }
  95%, 100% { transform: translateX(-110%); opacity: 0; }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

/* === 减少动态效果 === */
@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-float, .anim-float-delayed, .anim-breathe, .anim-slide-in, .anim-draw {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

/* 兜底：裁掉横向溢出 */
div.grid-2 {
  overflow-x: clip;
}
