:root {
  --color-dark: #121531;
  --color-paper: #E8E9EA;
  --color-body: #151723;
  --color-brand: #142CEB;
  --color-accent: #ED7D6E;
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 2px solid var(--color-body);
  --card-shadow: 4px 4px 0 var(--color-body);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 1120px;
  --font-main: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-body);
  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; }
button { font-family: inherit; cursor: pointer; }

.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
.section { padding-block: var(--section-y); position: relative; }

/* 排版 */
.h-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  margin-bottom: 0.6em;
  text-transform: uppercase;
}
.section .h-label { color: var(--color-brand); }
.section-dark .h-label { color: var(--color-accent); }
.section-light .h-label { color: var(--color-brand); }

h1 {
  font-size: clamp(2rem, 4.6vw, 3.4rem);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  margin-bottom: 0.8em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.6em;
  text-wrap: balance;
}
h3 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 0.5em;
}
p { max-width: 38em; margin-bottom: 1em; }
.hl { font-weight: 700; }
.section .hl { color: var(--color-brand); }
.section-dark .hl { color: var(--color-accent); }

/* 深色区块文字对比度修复 */
.section-dark p { color: #E8E9EA; }
.section-dark a.btn-secondary { color: #FFFFFF; border-color: #FFFFFF; }

/* 页头 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(232, 233, 234, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 23, 35, 0.08);
}
.site-dark .site-header { background: rgba(18, 21, 49, 0.92); border-color: rgba(232, 233, 234, 0.1); }
.header-inner {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.brand img { height: 28px; width: auto; }
nav { display: flex; gap: 24px; align-items: center; }
nav a { font-size: 0.95rem; font-weight: 500; padding: 6px 0; position: relative; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-brand); }
.site-dark nav a:hover, .site-dark nav a[aria-current="page"] { color: var(--color-accent); }
nav a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 2px; background: currentColor;
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: var(--radius-btn);
  font-size: 1rem; font-weight: 600; transition: transform 0.2s ease, background 0.2s ease;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: var(--color-dark); }
.btn-primary:hover { background: #d96a5c; transform: translateY(-2px); }
.btn-secondary { border: 2px solid var(--color-body); color: var(--color-body); background: transparent; }
.btn-secondary:hover { background: rgba(21, 23, 35, 0.06); transform: translateY(-2px); }
.section-dark .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.section-dark .btn-secondary:hover { background: rgba(232, 233, 234, 0.1); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease;
}
.card:hover { transform: translateY(-2px); }
.card-light-on-dark {
  background: var(--color-paper);
  border-color: var(--color-body);
  color: var(--color-body);
}
.card-light-on-dark .hl { color: var(--color-brand); }
.card-light-on-dark .h-label { color: var(--color-brand); }

/* 网格 */
.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); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--gap); align-items: center; }
.text-center { text-align: center; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid rgba(21, 23, 35, 0.12); }
th { font-weight: 700; background: rgba(21, 23, 35, 0.04); }
td:first-child { font-weight: 600; white-space: nowrap; }
.section-dark th, .section-dark td { border-color: rgba(232, 233, 234, 0.15); background: rgba(232, 233, 234, 0.04); }

/* FAQ */
.faq-item { margin-bottom: 16px; border: 1px solid rgba(21, 23, 35, 0.1); border-radius: 16px; overflow: hidden; }
.faq-item summary {
  padding: 16px 20px; font-weight: 600; cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 20px 16px; margin: 0; font-size: 0.95rem; color: rgba(21, 23, 35, 0.85); }

/* 步骤徽标 */
.step-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; background: var(--color-accent); color: var(--color-dark);
  border-radius: 8px; font-weight: 700; font-size: 0.9rem; margin-right: 10px; flex-shrink: 0;
}
.step-list li { display: flex; gap: 12px; margin-bottom: 20px; align-items: flex-start; }

/* SVG 容器 */
.svg-panel {
  width: 100%; height: auto; max-width: 100%;
  background: var(--color-dark); border-radius: 16px; padding: 24px;
  box-shadow: inset 0 0 0 2px rgba(232, 233, 234, 0.15);
}
.svg-panel svg { width: 100%; height: auto; }

/* SVG 动效 */
.anim-rotate { animation: geo-rotate 16s linear infinite; transform-box: fill-box; transform-origin: center; }
.anim-float { animation: soft-float 8s ease-in-out infinite alternate; }
.anim-breathe { animation: breath-scale 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide { animation: slide-in 12s ease-in-out infinite alternate; }
.anim-draw { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.anim-draw-line { animation: draw-path 10s ease-in-out infinite alternate; }

@keyframes geo-rotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}
@keyframes soft-float {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}
@keyframes breath-scale {
  0%, 100% { opacity: 0.4; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
@keyframes slide-in {
  0% { transform: translateX(12px); opacity: 0.6; }
  100% { transform: translateX(0); opacity: 1; }
}
@keyframes draw-path {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .hero-layout { flex-direction: column; }
  .hero-visual { order: 2; }
  .grid-3 { grid-template-columns: 1fr; }
  nav { gap: 16px; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
