/* 设计变量与基础重置 */
:root {
  --color-dark: #13102D;
  --color-paper: #F7F5F3;
  --color-body: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(23, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  --font-title: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-body: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--color-body);
  background-color: var(--color-paper);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* 排版系统 */
h1, h2, h3, h4 { font-family: var(--font-title); font-weight: 500; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.6rem, 6.4vw, 5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.3rem, 2vw, 1.6rem); margin-bottom: calc(var(--gap) / 2); }
p { margin-bottom: var(--gap); max-width: 38em; }
strong { font-weight: 600; }
mark, .hl { font-weight: 600; }

/* 布局容器 */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding: var(--section-y) 0; position: relative; }
.section--dark { background-color: var(--color-dark); color: var(--color-paper); }
.section--dark .hl { color: var(--color-accent); }
.section--dark a { color: var(--color-accent); }
.section--dark a:hover { text-decoration: underline; }

/* 页头 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(247, 245, 243, 0.9); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--card-border);
  padding: 12px 0;
}
.section--dark .site-header { background: rgba(19, 16, 45, 0.9); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.logo-group { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.logo-img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: 24px; }
nav a { font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.section--dark nav a { color: var(--color-paper); }
.section--dark nav a:hover, .section--dark nav a[aria-current="page"] { color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 28px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; line-height: 1.2;
  transition: transform 0.2s ease, opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  cursor: pointer; border: none; text-align: center;
}
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--color-accent); color: #13102D; }
.btn-primary:hover { opacity: 0.9; }
.btn-secondary { background: transparent; border: 1px solid var(--color-body); color: var(--color-body); }
.section--dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.section--dark .btn-secondary:hover { background: rgba(255,255,255,0.08); }
.btn-icon { width: 20px; height: 20px; stroke-width: 2; }

/* 卡片与网格 */
.grid { display: grid; gap: var(--gap); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); }
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  display: flex; flex-direction: column; gap: var(--gap);
}
.section--dark .card { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); color: var(--color-paper); }
.card--light { background: var(--color-paper); border-color: var(--card-border); color: var(--color-body); }
.card__title { font-weight: 600; font-size: 1.1rem; }
.card__meta { font-size: 0.85rem; opacity: 0.8; margin-top: auto; }

/* 表格 */
.table-wrap { overflow-x: auto; margin: var(--gap) 0; border: var(--card-border); border-radius: var(--radius-card); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; min-width: 600px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--card-border); white-space: nowrap; }
@media (max-width: 768px) {
  th, td { white-space: normal; }
}
th { background: rgba(0,0,0,0.03); font-weight: 600; }
.section--dark th { background: rgba(255,255,255,0.05); }
td strong { color: var(--color-brand); }
.section--dark td strong { color: var(--color-accent); }

/* FAQ */
details { border: var(--card-border); border-radius: var(--radius-card); padding: var(--gap); margin-bottom: var(--gap); background: var(--color-paper); }
.section--dark details { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.1); }
summary { cursor: pointer; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-weight: 400; opacity: 0.6; }
details[open] summary::before { content: "-"; }
details p { margin-top: var(--gap); opacity: 0.9; }

/* 眉标 */
.eyebrow {
  display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: 8px;
}
.section:not(.section--dark) .eyebrow { color: var(--color-brand); }
.section--dark .eyebrow { color: var(--color-accent); }

/* 图文交错布局 */
.split-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); align-items: center; }
.split-row.reverse .split-text { order: 2; }
.split-row.reverse .split-visual { order: 1; }
.split-visual { background: var(--color-dark); border-radius: var(--radius-card); padding: 24px; display: flex; align-items: center; justify-content: center; min-height: 240px; }
.section--dark .split-visual { background: rgba(0,0,0,0.2); }
.split-visual svg { width: 100%; max-width: 320px; height: auto; }

/* 列表样式 */
.step-list { counter-reset: step; }
.step-list li { position: relative; padding-left: 40px; margin-bottom: var(--gap); }
.step-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 0;
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--color-accent); color: var(--color-dark);
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.section--dark .step-list li::before { background: var(--color-accent); }

/* 页脚 */
.site-footer { padding: 48px 0; border-top: 1px solid var(--card-border); text-align: center; font-size: 0.9rem; opacity: 0.8; }
.footer-links { display: flex; justify-content: center; gap: 24px; margin-bottom: 16px; }
.footer-links a:hover { text-decoration: underline; }

/* SVG 动效基础 */
.svg-anim { overflow: visible; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-float-delay-1 { animation-delay: -1.5s; }
.anim-float-delay-2 { animation-delay: -3s; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: draw-line 3s ease forwards; }
.anim-flow { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flow-path 4s linear infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
@keyframes flow-path {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}

/* 旋转/缩放 SVG 子元素修正 */
svg [class*="anim-"] { 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;
    animation: none !important;
  }
}

/* 响应式 */
@media (max-width: 768px) {
  .split-row { grid-template-columns: 1fr; }
  .split-row.reverse .split-text, .split-row.reverse .split-visual { order: unset; }
  nav ul { gap: 16px; }
  .grid-3 { grid-template-columns: 1fr; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
