/* 设计变量与基础设置 */
:root {
  /* 颜色系统 */
  --color-dark-surface: #140E25;
  --color-paper: #F5F0E5;
  --color-text-body: #191523;
  --color-brand: #5214EB;
  --color-accent: #C8ED6E;
  --color-card-shadow: rgba(25, 21, 35, 0.3);
  
  /* 结构与间距 */
  --radius-card: 8px;
  --radius-btn: 6px;
  --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;
  --text-h1: clamp(2.6rem, 6.4vw, 5rem);
  --text-h2: clamp(1.6rem, 3vw, 2.4rem);
  --text-h3: clamp(1.2rem, 2vw, 1.5rem);
  --text-body: 1rem;
  --line-height-body: 1.55;
  --line-height-heading: 1.15;
}

/* 全局重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-body);
  line-height: var(--line-height-body);
  color: var(--color-text-body);
  background-color: var(--color-paper);
  max-width: 100%;
  overflow-x: hidden;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  text-decoration: none;
  color: inherit;
}

ul, ol {
  list-style: none;
}

/* 布局容器 */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

/* 页面头部 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--color-paper);
  border-bottom: 1px solid rgba(var(--color-text-body), 0.1);
  backdrop-filter: blur(8px);
  transition: box-shadow 0.3s ease;
}

.site-header.scrolled {
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--color-text-body);
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text-body);
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-brand);
}

/* 按钮系统 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-btn);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.btn:focus-visible {
  outline: 3px solid var(--color-brand);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark-surface);
  border: none;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 237, 110, 0.4);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-text-body);
  border: 1px solid var(--color-text-body);
}

.dark-surface .btn-secondary {
  color: var(--color-paper);
  border-color: var(--color-paper);
}

.btn-secondary:hover {
  background-color: rgba(0,0,0,0.05);
}

.dark-surface .btn-secondary:hover {
  background-color: rgba(255,255,255,0.1);
}

/* 区块通用样式 */
.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  position: relative;
}

.section + .section {
  border-top: 1px solid rgba(0,0,0,0.1);
}

.dark-surface {
  background-color: var(--color-dark-surface);
  color: var(--color-paper);
}

.dark-surface .section {
  border-top-color: rgba(255,255,255,0.1);
}

.section-header {
  margin-bottom: calc(var(--section-y) * 0.6);
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--color-brand);
  margin-bottom: 12px;
}

.dark-surface .section-label {
  color: var(--color-accent);
}

.section-title {
  font-size: var(--text-h2);
  font-weight: 500;
  line-height: var(--line-height-heading);
  margin-bottom: 16px;
  color: var(--color-text-body);
}

.dark-surface .section-title {
  color: var(--color-paper);
}

.section-title .hl {
  color: var(--color-brand);
}

.dark-surface .section-title .hl {
  color: var(--color-accent);
}

.section-desc {
  font-size: 1.1rem;
  line-height: 1.7;
  max-width: 720px;
  color: var(--color-text-body);
  opacity: 0.85;
}

.dark-surface .section-desc {
  color: var(--color-paper);
}

/* 标题关键词高亮 */
.hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-accent);
}

/* 卡片系统 */
.card {
  background-color: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: 24px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px -12px var(--color-card-shadow);
}

.dark-surface .card {
  background-color: var(--color-paper);
  color: var(--color-text-body);
}

/* 表格系统 */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin: 24px 0;
  font-size: 1rem;
}

.data-table th,
.data-table td {
  padding: 16px;
  text-align: left;
  border-bottom: 1px solid rgba(0,0,0,0.1);
}

.dark-surface .data-table th,
.dark-surface .data-table td {
  border-bottom-color: rgba(255,255,255,0.1);
}

.data-table th {
  font-weight: 700;
  color: var(--color-text-body);
  width: 40%;
}

.dark-surface .data-table th {
  color: var(--color-paper);
}

.data-table td {
  color: var(--color-text-body);
  opacity: 0.9;
}

.dark-surface .data-table td {
  color: var(--color-paper);
}

/* FAQ 系统 */
.faq-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.faq-item {
  border: 1px solid rgba(0,0,0,0.1);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.dark-surface .faq-item {
  border-color: rgba(255,255,255,0.1);
}

.faq-item summary {
  padding: 20px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  background-color: rgba(0,0,0,0.03);
}

.dark-surface .faq-item summary:hover {
  background-color: rgba(255,255,255,0.05);
}

.faq-answer {
  padding: 0 20px 20px;
  line-height: 1.7;
  color: var(--color-text-body);
}

.dark-surface .faq-answer {
  color: var(--color-paper);
}

/* 图标系统 */
.icon {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
  flex-shrink: 0;
}

/* 图文交错布局 */
.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(var(--section-y) * 0.8);
  align-items: center;
}

.split-section.reverse .split-text {
  order: 2;
}

.split-section.reverse .split-visual {
  order: 1;
}

.visual-panel {
  background-color: var(--color-dark-surface);
  border-radius: var(--radius-card);
  padding: 32px;
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.dark-surface .visual-panel {
  background-color: rgba(255,255,255,0.05);
}

/* 流程条 */
.flow-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.flow-node {
  flex: 1;
  min-width: 200px;
  text-align: center;
  padding: 24px;
  background-color: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.flow-arrow {
  flex: 0 0 40px;
  height: 2px;
  background-color: var(--color-brand);
  position: relative;
}

.flow-arrow::after {
  content: "";
  position: absolute;
  right: 0;
  top: -4px;
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--color-brand);
  border-top: 2px solid var(--color-brand);
  transform: rotate(45deg);
}

/* 新闻卡片网格 */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.news-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.news-date {
  font-size: 0.85rem;
  color: var(--color-brand);
  font-weight: 600;
}

.dark-surface .news-date {
  color: var(--color-accent);
}

.news-card h3 {
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.3;
}

.news-card p {
  font-size: 0.95rem;
  line-height: 1.6;
  opacity: 0.85;
}

/* 页脚 */
.site-footer {
  background-color: var(--color-dark-surface);
  color: var(--color-paper);
  padding: 64px 0 32px;
  margin-top: var(--section-y);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--color-accent);
}

.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--color-paper);
  opacity: 0.8;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 1;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 32px;
  text-align: center;
  font-size: 0.9rem;
  opacity: 0.6;
}

/* SVG 动效关键帧 */
@keyframes drawStroke {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@keyframes floatGentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

@keyframes breatheOpacity {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

@keyframes slideInRight {
  0% { transform: translateX(20px); opacity: 0; }
  20%, 80% { transform: translateX(0); opacity: 1; }
  100% { transform: translateX(20px); opacity: 0; }
}

@keyframes dashFlow {
  to { stroke-dashoffset: 24; }
}

.svg-draw {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawStroke 6s ease-in-out infinite;
}

.svg-float {
  animation: floatGentle 4s ease-in-out infinite;
}

.svg-breathe {
  animation: breatheOpacity 3s ease-in-out infinite;
}

.svg-slide {
  animation: slideInRight 5s ease-in-out infinite;
}

.svg-flow-line {
  stroke-dasharray: 6 6;
  animation: dashFlow 1.5s linear infinite;
}

/* 减少动态效果偏好 */
@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;
  }
  .svg-draw, .svg-float, .svg-breathe, .svg-slide, .svg-flow-line {
    animation: none !important;
  }
}

/* 响应式适配 */
@media (max-width: 1024px) {
  .split-section {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  
  .split-section.reverse .split-text,
  .split-section.reverse .split-visual {
    order: unset;
  }
  
  .flow-steps {
    flex-direction: column;
  }
  
  .flow-arrow {
    width: 2px;
    height: 40px;
    background-color: var(--color-brand);
    position: relative;
  }
  
  .flow-arrow::after {
    right: -4px;
    top: auto;
    bottom: 0;
    width: 10px;
    height: 10px;
    border-right: 2px solid var(--color-brand);
    border-top: 2px solid var(--color-brand);
    transform: rotate(45deg);
  }
}

@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }
  
  .nav-links {
    gap: 16px;
  }
  
  .nav-links a {
    font-size: 0.9rem;
  }
  
  .btn {
    height: 48px;
    padding: 0 16px;
    font-size: 0.95rem;
  }
  
  .section-title {
    font-size: var(--text-h2);
  }
  
  .news-grid {
    grid-template-columns: 1fr;
  }
}

/* 工具类 */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--gap); }
.mt-2 { margin-top: calc(var(--gap) * 2); }
.mb-1 { margin-bottom: var(--gap); }
.mb-2 { margin-bottom: calc(var(--gap) * 2); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
