/* === 设计变量与基础 Token === */
:root {
  /* 颜色系统 */
  --color-dark: #140E25;
  --color-paper: #F5F0E5;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;
  --color-surface-dark-text: #F5F0E5;
  --color-surface-paper-text: #191523;

  /* 圆角与边界 */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(25, 21, 35, 0.3);
  --card-shadow-hover: 0 14px 32px -12px rgba(25, 21, 35, 0.4);

  /* 节奏与间距 */
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --container-padding: clamp(1rem, 3vw, 2rem);

  /* 内容宽度 */
  --content-max: 1280px;

  /* 排版 */
  --font-main: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-body: 16px;
  --line-height-body: 1.55;
}

/* === 基础重置与全局 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-main);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: 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; transition: color 0.2s ease; }
ul, ol { list-style: none; }

/* === 容器与分节 === */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}
.section {
  padding: var(--section-y) 0;
  position: relative;
}
.paper-surface { background-color: var(--color-paper); color: var(--color-surface-paper-text); }
.dark-surface { background-color: var(--color-dark); color: var(--color-surface-dark-text); }
.dark-surface .hl { color: var(--color-accent); }
.paper-surface .hl { color: var(--color-brand); }

/* === 眉标与标题 === */
.breadcrumb {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 0.5em;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
.paper-surface .breadcrumb { color: var(--color-brand); }
.dark-surface .breadcrumb { color: var(--color-accent); }
.breadcrumb::before {
  content: "";
  display: inline-block;
  width: 16px;
  height: 2px;
  background: currentColor;
}
.section-number {
  font-size: 3.5rem;
  font-weight: 800;
  opacity: 0.15;
  position: absolute;
  top: var(--section-y);
  left: calc(var(--container-padding) + 1rem);
  pointer-events: none;
  user-select: none;
}
.paper-surface .section-number {
  color: rgba(25, 21, 35, 0.6);
}
.dark-surface .section-number {
  color: rgba(245, 240, 229, 0.6);
}
.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 500;
  line-height: 1.15;
  margin-bottom: var(--gap);
  letter-spacing: -0.01em;
}
.hero-title {
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 1.5em;
}
p { margin-bottom: 1em; max-width: 38em; }
strong { font-weight: 600; }

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 1.5em;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  border: none;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}
.btn-primary:hover { background-color: #d4f582; }
.btn-secondary {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}
.paper-surface .btn-secondary { color: var(--color-text); border-color: var(--color-text); }
.dark-surface .btn-secondary { color: var(--color-surface-dark-text); border-color: var(--color-surface-dark-text); }
.btn-secondary:hover { opacity: 0.85; }

/* === 卡片与网格 === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
  gap: var(--gap);
}
.card {
  background: var(--color-paper);
  border: var(--card-border);
  box-shadow: var(--card-shadow);
  border-radius: var(--radius-card);
  padding: 1.5em;
  transition: box-shadow 0.3s ease, transform 0.2s ease;
}
.dark-surface .card { background: #1c1530; color: var(--color-surface-dark-text); }
.card:hover { box-shadow: var(--card-shadow-hover); transform: translateY(-2px); }
.card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 0.75em; }
.card p { font-size: 0.95rem; line-height: 1.6; }

/* === 表格 === */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  margin-top: 1em;
}
.data-table th, .data-table td {
  padding: 0.75em 1em;
  text-align: left;
  border-bottom: 1px solid rgba(128,128,128,0.2);
}
.data-table th { font-weight: 600; width: 40%; }
.dark-surface .data-table td { color: var(--color-surface-dark-text); }

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid rgba(128,128,128,0.2);
  padding: 1em 0;
}
details summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.05rem;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5em;
}
details summary::-webkit-details-marker { display: none; }
details summary::before {
  content: "+";
  font-weight: 700;
  color: var(--color-brand);
  transition: transform 0.2s;
}
.dark-surface details summary::before { color: var(--color-accent); }
details[open] summary::before { transform: rotate(45deg); }
details p { margin-top: 0.75em; color: inherit; opacity: 0.9; }

/* === 时间线 === */
.timeline { position: relative; padding-left: 2em; }
.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-brand), var(--color-accent));
  opacity: 0.4;
}
.timeline-step {
  position: relative;
  margin-bottom: 2em;
  padding-left: 1.5em;
}
.timeline-step::before {
  content: attr(data-num);
  position: absolute;
  left: -2.1em;
  top: 0;
  width: 1.8em;
  height: 1.8em;
  background: var(--color-accent);
  color: var(--color-dark);
  font-weight: 800;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  z-index: 1;
}
.dark-surface .timeline-step::before { background: var(--color-accent); color: var(--color-dark); }

/* === 流程条 === */
.flow-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 1em;
  align-items: center;
  margin: 1.5em 0;
  padding: 1em;
  background: rgba(128,128,128,0.05);
  border-radius: var(--radius-card);
}
.flow-node {
  flex: 1 1 140px;
  text-align: center;
  font-weight: 600;
  padding: 0.5em;
  border-radius: 4px;
  background: rgba(128,128,128,0.1);
}
.flow-arrow {
  font-size: 1.2rem;
  color: var(--color-brand);
  opacity: 0.6;
}
.dark-surface .flow-arrow { color: var(--color-accent); }

/* === 资讯卡片 === */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
}
.news-card {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-card);
  padding: 1.25em;
  transition: border-color 0.2s;
}
.news-card:hover { border-color: var(--color-accent); }
.news-card time {
  display: block;
  font-size: 0.8rem;
  opacity: 0.7;
  margin-bottom: 0.5em;
}
.news-card h3 { font-size: 1rem; font-weight: 600; margin-bottom: 0.5em; }
.news-card p { font-size: 0.9rem; opacity: 0.85; margin-bottom: 0; }

/* === 图标 SVG 通用 === */
.icon-svg {
  width: 20px;
  height: 20px;
  stroke-width: 1.8;
  stroke: currentColor;
  fill: none;
  vertical-align: -0.25em;
}

/* === SVG 动效关键帧 === */
.anim-float { animation: float 6s ease-in-out infinite; }
.anim-breathe { animation: breathe 3s ease-in-out infinite; }
.anim-slide-in { animation: slideIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.anim-flow { animation: flowDash 4s linear infinite; }
.anim-grid-light { animation: gridLight 5s ease-in-out infinite; }
.anim-draw { animation: drawLine 2.5s ease-in-out infinite alternate; }

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}
@keyframes breathe {
  0%, 100% { opacity: 0.4; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.1); }
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes flowDash {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes gridLight {
  0%, 100% { opacity: 0.2; fill: var(--color-brand); }
  50% { opacity: 1; fill: var(--color-accent); }
}
@keyframes drawLine {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

/* 延迟错开动画 */
.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .anim-float, .anim-breathe, .anim-slide-in, .anim-flow, .anim-grid-light, .anim-draw {
    animation: none !important;
  }
}

/* === 响应式微调 === */
@media (max-width: 768px) {
  .hero-layout { flex-direction: column; }
  .hero-visual { margin-top: 2em; }
  .section-number { display: none; }
  .flow-bar { flex-direction: column; }
  .flow-arrow { transform: rotate(90deg); }
}
