/* === 设计变量与全局重置 === */
:root {
  --color-dark: #17203F;
  --color-paper: #FCFCFD;
  --color-text: #151823;
  --color-brand: #1441EB;
  --color-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: 1280px;
  
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --line-height-body: 1.75;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* === 容器与排版 === */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

.badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.bg-paper .badge { color: var(--color-brand); }
.bg-dark .badge { color: var(--color-accent); }

h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}
h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: 0.02em;
  margin-bottom: 1.5rem;
}
h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.35;
  margin-bottom: 0.75rem;
}
p { margin-bottom: 1rem; max-width: 38em; }
p:last-child { margin-bottom: 0; }

.hl { font-weight: 800; }
.bg-paper .hl { color: var(--color-brand); }
.bg-dark .hl { color: var(--color-accent); }

/* === 主题面 === */
.bg-paper { background: var(--color-paper); color: var(--color-text); }
.bg-dark { background: var(--color-dark); color: var(--color-paper); }
.bg-dark h2, .bg-dark h3, .bg-dark p { color: var(--color-paper); }
.bg-dark .hl { color: var(--color-accent); }

.card-light {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  color: var(--color-text);
}
.card-light h2, .card-light h3, .card-light p { color: var(--color-text); }
.card-light .hl { color: var(--color-brand); }

/* === 页头与导航 === */
.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.08);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.logo { display: flex; align-items: center; gap: 0.75rem; font-weight: 800; font-size: 1.1rem; }
.logo img { width: 32px; height: 32px; object-fit: contain; }
.nav { display: flex; gap: 1.5rem; align-items: center; }
.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); }
.nav a[aria-current="page"] { font-weight: 700; }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}
.btn:focus-visible { outline: 2px solid var(--color-brand); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(110, 237, 189, 0.4); }
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
}
.bg-paper .btn-secondary { color: var(--color-text); border-color: var(--color-text); }
.bg-dark .btn-secondary { color: var(--color-paper); border-color: var(--color-paper); }
.btn-secondary:hover { opacity: 0.85; }

/* === 卡片网格 === */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}
.card {
  border: 1px solid rgba(21, 24, 35, 0.08);
  border-radius: var(--radius-card);
  padding: var(--gap);
  background: var(--color-paper);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--card-shadow); }
.card-title { font-weight: 700; margin-bottom: 0.5rem; }
.card-meta { font-size: 0.85rem; opacity: 0.7; margin-bottom: 0.75rem; }
.card p { font-size: 0.95rem; line-height: 1.6; }

/* === 表格 === */
.table-wrap { overflow-x: auto; margin: 1.5rem 0; border: 1px solid rgba(21, 24, 35, 0.1); border-radius: var(--radius-card); }
table { width: 100%; border-collapse: collapse; min-width: 400px; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid rgba(21, 24, 35, 0.08); }
th { background: rgba(21, 24, 35, 0.03); font-weight: 600; }
td strong { font-weight: 600; }
tr:last-child td { border-bottom: none; }

/* === FAQ === */
.faq-item { border-bottom: 1px solid rgba(21, 24, 35, 0.1); }
.faq-item summary {
  padding: 1.25rem 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before {
  content: "+";
  font-weight: 700;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: rgba(20, 65, 235, 0.08);
  color: var(--color-brand);
  flex-shrink: 0;
}
details[open] .faq-item summary::before { content: "-"; }
.faq-item p { padding-bottom: 1.25rem; line-height: 1.7; }

/* === 时间线 === */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: rgba(21, 24, 35, 0.1);
}
.step { position: relative; margin-bottom: 2rem; }
.step::before {
  content: attr(data-step);
  position: absolute;
  left: -2.75rem;
  top: 0;
  width: 36px;
  height: 36px;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.step h3 { margin-bottom: 0.5rem; }

/* === 流程条 === */
.flow {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  margin: 2rem 0;
}
.flow-node {
  flex: 1;
  min-width: 180px;
  padding: 1rem;
  border: 1px solid rgba(21, 24, 35, 0.1);
  border-radius: var(--radius-card);
  text-align: center;
}
.flow-arrow {
  font-size: 1.25rem;
  color: var(--color-brand);
  opacity: 0.6;
}

/* === SVG 基础样式 === */
.svg-visual { width: 100%; height: auto; max-width: 600px; }
.svg-rect { fill: none; stroke: currentColor; stroke-width: 1.5; }
.svg-line { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.svg-fill { fill: currentColor; }
.svg-circle { fill: none; stroke: currentColor; stroke-width: 1.5; }

/* === SVG 动效 Keyframes === */
@keyframes orbit-breathe {
  0%, 100% { transform: scale(1); opacity: 0.4; }
  50% { transform: scale(1.08); opacity: 0.8; }
}
@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes dash-draw {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
@keyframes fade-up {
  0%, 100% { opacity: 0.6; transform: translateY(4px); }
  50% { opacity: 1; transform: translateY(0); }
}

/* === 动效类绑定 === */
.anim-orbit { animation: orbit-breathe 6s ease-in-out infinite; transform-origin: center; transform-box: fill-box; }
.anim-float { animation: float-gentle 5s ease-in-out infinite; }
.anim-draw { stroke-dasharray: 1; stroke-dashoffset: 0; animation: dash-draw 4s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-fadeup { animation: fade-up 4.5s ease-in-out infinite; }

/* === 响应式 === */
@media (max-width: 768px) {
  .nav { display: none; } /* 简化移动端，实际可加汉堡菜单，此处保持静态结构 */
  .flow { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
  h1 { font-size: clamp(1.8rem, 6vw, 2.8rem); }
}

@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;
  }
}
