/* =========================================
   1. 设计变量与基础重置
   ========================================= */
:root {
  /* 色板 */
  --color-dark: #140E25;
  --color-paper: #F7F5F3;
  --color-text: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;

  /* 取色变量：纸面环境 */
  --bg-surface: var(--color-paper);
  --text-primary: var(--color-text);
  --text-secondary: rgba(25, 21, 35, 0.7);
  --brand-color: var(--color-brand);
  --accent-color: var(--color-accent);

  /* 取色变量：深色环境 */
  .dark-surface {
    --bg-surface: var(--color-dark);
    --text-primary: var(--color-paper);
    --text-secondary: rgba(247, 245, 243, 0.7);
    --brand-color: var(--color-accent);
    --accent-color: var(--color-accent);
  }

  /* 结构变量 */
  --radius-card: 8px;
  --radius-btn: 6px;
  --card-border: 1px solid rgba(25, 21, 35, 0.16);
  --card-shadow: none;
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 1280px;
  
  /* 字体 */
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-family: var(--font-sans);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--bg-surface);
  color: var(--text-primary);
  line-height: 1.55;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* =========================================
   2. 通用排版与组件
   ========================================= */
.container {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding: var(--section-y) 0;
  position: relative;
}

.dark-surface {
  background-color: var(--color-dark);
  color: var(--color-paper);
}

/* 眉标 */
.kicker {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand-color);
  margin-bottom: var(--gap);
  display: inline-block;
}

/* 标题 */
h1 {
  font-size: clamp(2.2rem, 5vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: var(--gap);
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: var(--gap);
  letter-spacing: 0.02em;
}

h3 {
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--gap);
}

.hl {
  color: var(--brand-color);
}

.dark-surface .hl {
  color: var(--accent-color);
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  height: 48px;
  padding: 0 24px;
  font-weight: 600;
  font-size: 1rem;
  border-radius: var(--radius-btn);
  transition: transform 0.2s ease, opacity 0.2s ease;
  cursor: pointer;
  border: none;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--accent-color);
  color: var(--color-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--text-primary);
  color: var(--text-primary);
}

.dark-surface .btn-outline {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

/* 卡片 */
.card {
  background-color: var(--bg-surface);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: var(--gap);
  box-shadow: var(--card-shadow);
}

.dark-surface .card {
  background-color: rgba(247, 245, 243, 0.05);
  border-color: rgba(247, 245, 243, 0.1);
}

/* 表格 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.data-table th, .data-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
}

.dark-surface .data-table th,
.dark-surface .data-table td {
  border-bottom-color: rgba(247, 245, 243, 0.1);
}

.data-table th {
  font-weight: 600;
  color: var(--text-secondary);
}

/* 列表 */
.feature-list li {
  position: relative;
  padding-left: 24px;
  margin-bottom: 8px;
}

.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  background-color: var(--brand-color);
  border-radius: 50%;
}

.dark-surface .feature-list li::before {
  background-color: var(--accent-color);
}

/* 图标 */
.icon {
  width: 20px;
  height: 20px;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
  vertical-align: middle;
}

/* 响应式网格 */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: var(--gap);
}

@media (min-width: 768px) {
  .grid-2 {
    grid-template-columns: 1fr 1fr;
  }
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* =========================================
   3. 页头与页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 245, 243, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(25, 21, 35, 0.08);
  padding: 12px 0;
}

.dark-surface .site-header {
  background-color: rgba(20, 14, 37, 0.9);
  border-bottom-color: rgba(247, 245, 243, 0.08);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover, .nav-link[aria-current="page"] {
  color: var(--brand-color);
}

.dark-surface .nav-link:hover,
.dark-surface .nav-link[aria-current="page"] {
  color: var(--accent-color);
}

.site-footer {
  padding: 48px 0;
  border-top: 1px solid rgba(25, 21, 35, 0.08);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.dark-surface .site-footer {
  border-top-color: rgba(247, 245, 243, 0.08);
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* =========================================
   4. SVG 动效系统
   ========================================= */
.svg-container {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* 呼吸动画 (Typing dots) */
@keyframes breathe {
  0%, 100% { opacity: 0.3; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

.animate-breathe-1 { animation: breathe 1.4s infinite ease-in-out; }
.animate-breathe-2 { animation: breathe 1.4s infinite ease-in-out 0.2s; }
.animate-breathe-3 { animation: breathe 1.4s infinite ease-in-out 0.4s; }

/* 浮动动画 (Bubbles/Elements) */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-float { animation: float 4s infinite ease-in-out; }
.animate-float-delayed { animation: float 4s infinite ease-in-out 1.5s; }

/* 路径描边流动 (Path dash offset) */
@keyframes draw-path {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}

.animate-flow {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: draw-path 2s linear infinite;
}

/* 元素滑入 (Slide In) */
@keyframes slide-in {
  from { opacity: 0; transform: translateX(-10px); }
  to { opacity: 1; transform: translateX(0); }
}

.animate-slide-in {
  opacity: 0;
  animation: slide-in 0.8s ease-out forwards;
}
.animate-slide-in-delayed {
  opacity: 0;
  animation: slide-in 0.8s ease-out 0.3s forwards;
}

/* 减少动态效果 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   5. 特殊模块样式
   ========================================= */
.hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.hero-meta {
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  display: flex;
  gap: 16px;
}

/* 图文交错 */
.split-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: calc(var(--gap) * 2);
  align-items: center;
}

.split-row.reverse {
  direction: rtl;
}

.split-row.reverse > * {
  direction: ltr;
}

@media (min-width: 900px) {
  .split-row {
    grid-template-columns: 1fr 1fr;
  }
}

.visual-panel {
  background-color: var(--color-dark);
  border-radius: 12px;
  padding: 24px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.dark-surface .visual-panel {
  background-color: rgba(247, 245, 243, 0.05);
}

/* 横向滚动功能带 */
.feature-strip-wrapper {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 16px;
  scrollbar-width: thin;
  scrollbar-color: var(--brand-color) transparent;
}

.feature-strip {
  display: flex;
  gap: 16px;
  min-width: max-content;
}

.feature-strip .card {
  width: 280px;
  flex-shrink: 0;
}

/* 流程条 */
.flow-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

@media (min-width: 600px) {
  .flow-steps {
    flex-direction: row;
    align-items: center;
  }
}

.flow-node {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
}

.flow-arrow {
  flex: 0 0 40px;
  height: 2px;
  background-color: var(--brand-color);
  position: relative;
}

.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -3px;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--brand-color);
  border-right: 2px solid var(--brand-color);
  transform: rotate(45deg);
}

.dark-surface .flow-arrow,
.dark-surface .flow-arrow::after {
  background-color: var(--accent-color);
  border-color: var(--accent-color);
}

/* FAQ */
details {
  border-bottom: 1px solid rgba(25, 21, 35, 0.1);
  padding: 16px 0;
}

.dark-surface details {
  border-bottom-color: rgba(247, 245, 243, 0.1);
}

summary {
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  position: relative;
  padding-right: 24px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  font-weight: 400;
  color: var(--brand-color);
}

details[open] summary::after {
  content: "-";
}

details p {
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* 新闻卡片 */
.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

@media (min-width: 768px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .news-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.news-date {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-bottom: 8px;
  display: block;
}

/* 步骤编号 */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background-color: var(--accent-color);
  color: var(--color-dark);
  font-weight: 700;
  font-size: 0.85rem;
  border-radius: 6px;
  margin-right: 8px;
}
