/* ==================== 设计变量 ==================== */
:root {
  --color-dark: #13102D;
  --color-paper: #F7F5F3;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  --color-brand-light: rgba(39, 20, 235, 0.08);
  --color-dark-overlay: rgba(19, 16, 45, 0.85);

  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid;
  --card-shadow: none;

  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1120px;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  --line-height-body: 1.55;
  --line-height-heading: 1.1;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-body);
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* ==================== 排版系统 ==================== */
.container { width: 100%; max-width: var(--content-max); margin-inline: auto; padding-inline: var(--gap); }
.section { padding-block: var(--section-y); }

.text-h1 {
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 800;
  line-height: var(--line-height-heading);
  letter-spacing: -0.02em;
  word-break: break-word;
}
.text-h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: calc(var(--gap) * 2);
}
.text-h3 {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--gap);
}
p { margin-bottom: var(--gap); max-width: 38em; }
.small { font-size: 0.875rem; color: var(--color-text); opacity: 0.8; }

.hl { color: var(--color-brand); font-weight: 600; }
.dark-bg .hl { color: var(--color-accent); }

/* 眉标 */
.section-label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.8rem; font-weight: 700; letter-spacing: 0.05em;
  text-transform: uppercase; margin-bottom: var(--gap);
  color: var(--color-brand);
}
.dark-bg .section-label { color: var(--color-accent); }
.section-label::before { content: ""; width: 16px; height: 2px; background: currentColor; border-radius: 2px; }

/* ==================== 布局辅助 ==================== */
.grid-auto { display: grid; gap: var(--gap); }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-col { display: flex; flex-direction: column; }
.gap-sm { gap: calc(var(--gap) * 0.5); }
.gap-md { gap: var(--gap); }

/* ==================== 组件：按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px; padding-inline: 24px; border-radius: var(--radius-btn);
  font-weight: 600; font-size: 1rem; cursor: pointer; transition: transform 0.2s ease, background 0.2s ease;
  border: none; white-space: nowrap;
}
.btn-primary {
  background: var(--color-accent); color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); filter: brightness(0.95); }
.btn-secondary {
  background: transparent; border: 2px solid var(--color-text); color: var(--color-text);
}
.dark-bg .btn-secondary { border-color: var(--color-paper); color: var(--color-paper); }
.btn-secondary:hover { background: rgba(0,0,0,0.05); }
.dark-bg .btn-secondary:hover { background: rgba(255,255,255,0.1); }
.btn:focus-visible { outline: 3px solid var(--color-brand); outline-offset: 2px; }
.dark-bg .btn:focus-visible { outline-color: var(--color-accent); }
.btn svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }

/* ==================== 组件：卡片 ==================== */
.card {
  background: var(--color-paper);
  border: var(--card-border) rgba(23, 21, 35, 0.16);
  border-radius: var(--radius-card);
  padding: var(--gap);
  position: relative;
}
.dark-bg .card.card-light {
  background: var(--color-paper); color: var(--color-text);
  border-color: rgba(23, 21, 35, 0.1);
}
.card-icon { width: 48px; height: 48px; border-radius: 12px; background: var(--color-brand-light); display: flex; align-items: center; justify-content: center; margin-bottom: var(--gap); }
.dark-bg .card-icon { background: rgba(137, 237, 110, 0.15); }
.card-icon svg { width: 24px; height: 24px; stroke: var(--color-brand); stroke-width: 1.8; fill: none; }
.dark-bg .card-icon svg { stroke: var(--color-accent); }

/* ==================== 组件：表格 ==================== */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; min-width: 320px; }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(23, 21, 35, 0.1); }
th { font-weight: 600; background: rgba(0,0,0,0.03); }
.dark-bg th { background: rgba(255,255,255,0.05); }

/* ==================== 组件：FAQ ==================== */
details { border: var(--card-border) rgba(23, 21, 35, 0.12); border-radius: 16px; margin-bottom: var(--gap); overflow: hidden; }
summary {
  padding: 16px 20px; cursor: pointer; font-weight: 600; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.details-content { padding: 0 20px 16px; color: var(--color-text); opacity: 0.9; }
.dark-bg details { border-color: rgba(255,255,255,0.15); }
.dark-bg .details-content { color: var(--color-paper); }

/* ==================== 组件：步骤条 ==================== */
.steps-row { display: flex; flex-wrap: wrap; gap: var(--gap); counter-reset: step; }
.step-item { flex: 1 1 200px; position: relative; padding-left: 48px; }
.step-num {
  position: absolute; left: 0; top: 0; width: 32px; height: 32px;
  background: var(--color-accent); color: var(--color-dark);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 0.9rem;
}
.dark-bg .step-num { background: var(--color-accent); color: var(--color-dark); }

/* ==================== 页头与页脚 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100; background: rgba(247, 245, 243, 0.9);
  backdrop-filter: blur(12px); border-bottom: 1px solid rgba(23, 21, 35, 0.08);
}
.dark-bg.site-header { background: rgba(19, 16, 45, 0.9); border-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 1.1rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: 24px; }
.nav-link { font-weight: 500; position: relative; padding: 4px 0; }
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-brand); }
.dark-bg .nav-link:hover, .dark-bg .nav-link[aria-current="page"] { color: var(--color-accent); }
.nav-link[aria-current="page"]::after { content: ""; position: absolute; bottom: -2px; left: 0; width: 100%; height: 2px; background: currentColor; border-radius: 2px; }

.site-footer { background: var(--color-dark); color: var(--color-paper); padding: 48px 0 24px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { font-size: 0.9rem; font-weight: 600; margin-bottom: 16px; color: var(--color-accent); }
.footer-col a { display: block; padding: 6px 0; opacity: 0.8; transition: opacity 0.2s; }
.footer-col a:hover { opacity: 1; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 24px; text-align: center; font-size: 0.85rem; opacity: 0.7; }

/* ==================== 背景覆盖类 ==================== */
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-dark p, .bg-dark li { color: var(--color-paper); }
.bg-dark .section-label { color: var(--color-accent); }
.bg-dark .text-h2 { color: var(--color-paper); }

/* ==================== SVG 动效核心 ==================== */
.svg-panel { width: 100%; height: auto; }
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-float-delay { animation: float 6s ease-in-out infinite 2s; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: drawLine 4s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide-in { animation: slideIn 5s ease-out forwards; }
.anim-pulse { animation: pulse 4s ease-in-out infinite; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}
@keyframes slideIn {
  from { transform: translateX(24px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

/* 变换原点设置 */
.transform-center { 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-delay: 0ms !important;
  }
  .anim-float, .anim-float-delay, .anim-draw, .anim-breathe, .anim-slide-in, .anim-pulse {
    animation: none !important;
  }
}

/* ==================== 响应式微调 ==================== */
@media (max-width: 767px) {
  .header-inner { flex-wrap: wrap; height: auto; padding: 12px 0; }
  .nav-list { order: 3; width: 100%; justify-content: center; margin-top: 12px; }
  .hero-layout { flex-direction: column-reverse; }
  .hero-text { text-align: center; align-items: center; }
  .steps-row { flex-direction: column; }
}
@media (min-width: 768px) {
  .hero-layout { display: flex; align-items: center; gap: 48px; }
  .hero-text { flex: 1; align-items: flex-start; }
  .hero-visual { flex: 1; position: relative; }
}
