/* ==================== 设计变量 ==================== */
:root {
  /* 色彩系统 */
  --bg-dark: #121531;
  --bg-paper: #E8E9EA;
  --text-main: #151723;
  --brand: #142CEB;
  --accent: #ED7D6E;
  --surface-dark: #1a1d3b;
  --surface-paper: #f0f1f2;

  /* 间距与布局 */
  --section-y: clamp(3.5rem, 7vw, 6rem);
  --gap: clamp(1rem, 2vw, 1.75rem);
  --content-max: 1120px;
  --header-h: 64px;

  /* 圆角与边界 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: none;

  /* 排版 */
  --font-sans: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --lh-base: 1.65;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  line-height: var(--lh-base);
  color: var(--text-main);
  background-color: var(--bg-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ==================== 排版层级 ==================== */
h1, h2, h3, h4 { font-weight: 700; letter-spacing: 0.02em; line-height: 1.25; }
h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); margin-bottom: var(--gap); }
h3 { font-size: 1.25rem; margin-bottom: calc(var(--gap) * 0.6); }
p { max-width: 38em; margin-bottom: var(--gap); }

.badge {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  color: var(--brand);
}
.dark-section .badge { color: var(--accent); }
.hl { color: var(--brand); }
.dark-section .hl { color: var(--accent); }

/* ==================== 布局容器 ==================== */
.container { max-width: var(--content-max); margin: 0 auto; padding: 0 var(--gap); }
section { padding-top: var(--section-y); padding-bottom: var(--section-y); }
.dark-section { background-color: var(--bg-dark); color: var(--bg-paper); }
.paper-card { background-color: var(--surface-paper); border-radius: var(--radius-card); padding: var(--gap); }
.dark-card { background-color: var(--surface-dark); border-radius: var(--radius-card); padding: var(--gap); }

/* ==================== 页头与导航 ==================== */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(232, 233, 234, 0.85);
  backdrop-filter: blur(10px);
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, background 0.3s;
}
header.scrolled { border-bottom-color: rgba(0,0,0,0.08); }
.nav-inner { display: flex; justify-content: space-between; align-items: center; width: 100%; height: 100%; }
.logo-img { height: 32px; width: auto; vertical-align: middle; }
nav ul { display: flex; list-style: none; gap: var(--gap); align-items: center; }
nav a { text-decoration: none; color: var(--text-main); font-weight: 500; padding: 0.5rem; border-radius: 8px; transition: color 0.2s, background 0.2s; }
nav a:hover, nav a[aria-current="page"] { color: var(--brand); background: rgba(20, 44, 235, 0.06); }
.dark-section header { background: rgba(18, 21, 49, 0.9); }
.dark-section nav a { color: var(--bg-paper); }
.dark-section nav a:hover, .dark-section nav a[aria-current="page"] { color: var(--accent); background: rgba(237, 125, 110, 0.1); }

/* ==================== 按钮组件 ==================== */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.85rem 1.75rem;
  font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-btn);
  text-decoration: none; cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
  white-space: nowrap;
}
.btn-primary { background-color: var(--accent); color: var(--bg-dark); }
.btn-secondary { background: transparent; border: 2px solid var(--text-main); color: var(--text-main); }
.dark-section .btn-secondary { border-color: var(--bg-paper); color: var(--bg-paper); }
.btn:hover { transform: translateY(-2px); }
.btn:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; }

/* ==================== 网格与列表 ==================== */
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.feature-group { margin-bottom: calc(var(--gap) * 2); }
.feature-group-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 0.6rem; color: var(--brand); }
.dark-section .feature-group-title { color: var(--accent); }
ul.styled-list { list-style: none; padding-left: 0; }
ul.styled-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; }
ul.styled-list li::before {
  content: ""; position: absolute; left: 0; top: 0.6em;
  width: 6px; height: 6px; border-radius: 50%;
  background-color: var(--brand);
}
.dark-section ul.styled-list li::before { background-color: var(--accent); }

/* ==================== 表格组件 ==================== */
table { width: 100%; border-collapse: collapse; margin-bottom: var(--gap); }
th, td { padding: 0.85rem; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
th { font-weight: 700; }
.dark-section th, .dark-section td { border-bottom-color: rgba(255,255,255,0.1); }
td:first-child { font-weight: 600; }

/* ==================== FAQ 组件 ==================== */
details { margin-bottom: var(--gap); border-radius: var(--radius-card); background: var(--surface-paper); overflow: hidden; }
.dark-section details { background: var(--surface-dark); }
summary { padding: 1rem; 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.2rem; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1rem 1rem; line-height: var(--lh-base); }

/* ==================== 资讯卡片 ==================== */
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { background: var(--surface-paper); border-radius: var(--radius-card); padding: var(--gap); display: flex; flex-direction: column; height: 100%; }
.news-date { font-size: 0.85rem; color: var(--brand); margin-bottom: 0.5rem; font-weight: 600; }
.dark-section .news-date { color: var(--accent); }

/* ==================== 步骤条 ==================== */
.steps-container { display: flex; gap: var(--gap); overflow-x: auto; padding-bottom: 1rem; }
.step-item { flex: 1; min-width: 220px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background-color: var(--accent); color: var(--bg-dark);
  font-weight: 800; margin-bottom: 0.5rem;
}

/* ==================== SVG 动效系统 ==================== */
svg { width: 100%; height: auto; display: block; }
@keyframes gridPulse {
  0%, 100% { stroke-dashoffset: 0; opacity: 0.3; }
  50% { stroke-dashoffset: 1; opacity: 1; }
}
.node-light {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  opacity: 0.3;
  animation: gridPulse 6s infinite ease-in-out;
}
.delay-1 { animation-delay: 0.4s; }
.delay-2 { animation-delay: 0.8s; }
.delay-3 { animation-delay: 1.2s; }
.delay-4 { animation-delay: 1.6s; }
.delay-5 { animation-delay: 2.0s; }
.delay-6 { animation-delay: 2.4s; }
.delay-7 { animation-delay: 2.8s; }
.delay-8 { animation-delay: 3.2s; }
.delay-9 { animation-delay: 3.6s; }

@keyframes floatBubble {
  0%, 100% { transform: translateY(0); opacity: 0.8; }
  50% { transform: translateY(-6px); opacity: 1; }
}
.bubble-float { animation: floatBubble 4s infinite ease-in-out; }
.bubble-float-2 { animation: floatBubble 4.5s infinite ease-in-out 1s; }
.bubble-float-3 { animation: floatBubble 5s infinite ease-in-out 2s; }

@keyframes dashDraw {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
.line-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: dashDraw 3s infinite ease-in-out;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .node-light, .bubble-float, .bubble-float-2, .bubble-float-3, .line-draw { animation: none !important; opacity: 0.8; stroke-dashoffset: 0; }
}

/* ==================== 响应式适配 ==================== */
@media (max-width: 768px) {
  .hero-layout { flex-direction: column; gap: var(--gap); }
  .steps-container { flex-direction: column; }
  nav ul { gap: 0.5rem; font-size: 0.9rem; }
  .btn { width: 100%; justify-content: center; }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
