/* 设计变量与基础重置 */
:root {
  --bg-dark: #17203F;
  --bg-paper: #FCFCFD;
  --text-body: #151823;
  --brand: #1441EB;
  --accent: #6EEDBD;
  --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;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.75;
  color: var(--text-body);
  background: var(--bg-paper);
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* 排版系统 */
.container {
  width: min(100% - var(--gap) * 2, var(--content-max));
  margin-inline: auto;
}

p {
  max-width: 38em;
  margin-block: 1em 0;
}

h1, h2, h3, h4 {
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--text-body);
}

.dark-bg h1, .dark-bg h2, .dark-bg h3, .dark-bg h4 {
  color: var(--bg-paper);
}

h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); margin-bottom: var(--gap); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); margin-bottom: 0.6em; }

.hl {
  color: var(--brand);
}

.dark-bg .hl {
  color: var(--accent);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 0.8em;
}

.dark-bg .eyebrow {
  color: var(--accent);
}

.section-divider {
  border-top: 1px solid rgba(21, 24, 35, 0.08);
  margin-block: var(--section-y);
}

/* 布局模块 */
.grid-2 {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
}

.flex-col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.content-narrow {
  max-width: 720px;
}

/* 组件：按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.btn-primary {
  background: var(--accent);
  color: var(--bg-dark);
}

.btn-secondary {
  background: transparent;
  border: 1px solid var(--text-body);
  color: var(--text-body);
}

.dark-bg .btn-secondary {
  border-color: var(--bg-paper);
  color: var(--bg-paper);
}

.btn-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* 组件：卡片与面板 */
.card {
  background: var(--bg-paper);
  border-radius: var(--radius-card);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -12px rgba(21, 24, 35, 0.35);
}

.panel {
  background: var(--bg-dark);
  border-radius: 16px;
  padding: var(--gap);
  position: relative;
  overflow: hidden;
}

.dark-bg .panel {
  background: var(--bg-paper);
  color: var(--text-body);
}

/* 组件：表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid rgba(21, 24, 35, 0.08);
}

.data-table th {
  font-weight: 600;
  color: var(--text-body);
}

.dark-bg .data-table th {
  color: var(--bg-paper);
}

.data-table tr:last-child td {
  border-bottom: none;
}

/* 组件：FAQ */
.faq-item {
  border-bottom: 1px solid rgba(21, 24, 35, 0.08);
  padding-block: 16px;
}

.faq-item summary {
  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-weight: 400;
  color: var(--brand);
}

.faq-item[open] summary::after {
  content: "−";
}

.faq-item p {
  margin-top: 8px;
  font-size: 0.95rem;
  color: var(--text-body);
}

.dark-bg .faq-item p {
  color: var(--bg-paper);
}

/* 组件：步骤徽标 */
.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--bg-dark);
  font-weight: 700;
  font-size: 0.9rem;
  margin-right: 12px;
  flex-shrink: 0;
}

/* 页头与页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(252, 252, 253, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(21, 24, 35, 0.06);
  padding: 12px 0;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-list {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-weight: 500;
  font-size: 0.95rem;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  opacity: 1;
  color: var(--brand);
}

.dark-bg .nav-link {
  color: var(--bg-paper);
}

.dark-bg .site-header {
  background: rgba(23, 32, 63, 0.9);
  border-bottom-color: rgba(252, 252, 253, 0.08);
}

.site-footer {
  background: var(--bg-dark);
  color: var(--bg-paper);
  padding: var(--section-y) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--gap);
}

.footer-col h4 {
  color: var(--bg-paper);
  margin-bottom: 12px;
}

.footer-col a {
  display: block;
  margin-bottom: 8px;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-col a:hover {
  opacity: 1;
  color: var(--accent);
}

/* SVG 动效规则 */
.svg-panel {
  width: 100%;
  height: auto;
}

.anim-draw {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: draw-line 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.anim-flow {
  stroke-dasharray: 0.06 0.14;
  stroke-dashoffset: 0;
  animation: flow-path 3s linear infinite;
}

.anim-float {
  animation: float-bubble 4.5s ease-in-out infinite;
}

.anim-pulse {
  animation: pulse-opacity 3s ease-in-out infinite;
}

@keyframes draw-line {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes flow-path {
  0% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -0.2; }
}

@keyframes float-bubble {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes pulse-opacity {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 1; }
}

/* 减少动态效果适配 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .grid-2 { grid-template-columns: 1fr; }
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .nav-list { order: 3; width: 100%; justify-content: center; }
}
