/* 设计变量与基础重置 */
:root {
  --color-dark: #10112D;
  --color-paper: #F5F0E5;
  --color-text: #151523;
  --color-brand: #1416EB;
  --color-accent: #89ED6E;
  --color-text-on-dark: #F5F0E5;
  --color-accent-on-dark: #89ED6E;
  
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 0;
  --card-shadow: 0 10px 28px -14px rgba(21, 21, 35, 0.3);
  --section-y: clamp(5rem, 10vw, 9rem);
  --gap: clamp(1.5rem, 3vw, 2.5rem);
  --content-max: 960px;
  
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.75;
  color: var(--color-text);
  background: var(--color-paper);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* 布局容器 */
.container {
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: var(--gap);
}
.section {
  position: relative;
  padding-block: var(--section-y);
}
.section + .section::before {
  content: "";
  display: block;
  height: 1px;
  background: var(--color-text);
  opacity: 0.12;
  max-width: var(--content-max);
  margin-inline: auto;
}
.bg-dark { background: var(--color-dark); color: var(--color-text-on-dark); }
.bg-paper { background: var(--color-paper); }

/* 排版系统 */
h1, h2, h3, h4 { line-height: 1.1; letter-spacing: -0.02em; margin-top: 0; }
h1 { font-size: clamp(2.4rem, 6vw, 4.5rem); font-weight: 800; text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3vw, 2.4rem); font-weight: 800; line-height: 1.25; margin-bottom: 1.5rem; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); font-weight: 700; line-height: 1.3; margin-bottom: 1rem; }
p { max-width: 38em; margin-bottom: 1.25rem; }
mark, .hl { font-weight: 700; }
.paper-theme .hl, .paper-theme .brand { color: var(--color-brand); }
.dark-theme .hl, .dark-theme .accent { color: var(--color-accent); }

/* 眉标 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding: 4px 12px;
  border-radius: 999px;
}
.paper-theme .badge { background: rgba(20, 22, 235, 0.08); color: var(--color-brand); }
.dark-theme .badge { background: rgba(137, 237, 110, 0.15); color: var(--color-accent); }

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 24px;
  border-radius: var(--radius-btn);
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  cursor: pointer;
}
.btn:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: var(--color-dark);
  box-shadow: 0 4px 12px rgba(137, 237, 110, 0.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 16px rgba(137, 237, 110, 0.5); }
.btn-secondary {
  background: transparent;
  border: 2px solid var(--color-text);
  color: var(--color-text);
}
.dark-theme .btn-secondary { border-color: var(--color-text-on-dark); color: var(--color-text-on-dark); }
.btn-secondary:hover { filter: brightness(0.9); transform: translateY(-1px); }

/* 卡片 */
.card {
  background: var(--color-paper);
  border-radius: var(--radius-card);
  box-shadow: var(--card-shadow);
  padding: var(--gap);
  border: var(--card-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 14px 32px -12px rgba(21, 21, 35, 0.35); }
.card-dark { background: var(--color-dark); color: var(--color-text-on-dark); }

/* 网格与图文交错 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: var(--gap); }
.flex-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap); }
.flex-row.reverse { direction: rtl; }
.flex-row.reverse > * { direction: ltr; }
.text-col { flex: 1 1 380px; }
.visual-col { flex: 1 1 400px; display: flex; align-items: center; justify-content: center; }

/* 表格 */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid rgba(0,0,0,0.1); }
.data-table th { font-weight: 700; width: 40%; }
.dark-theme .data-table th, .dark-theme .data-table td { border-bottom-color: rgba(255,255,255,0.15); }

/* FAQ */
.faq-item { border-bottom: 1px solid rgba(0,0,0,0.1); padding: 16px 0; }
.dark-theme .faq-item { border-bottom-color: rgba(255,255,255,0.15); }
.faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; align-items: center; gap: 8px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::before { content: "+"; font-weight: 700; color: var(--color-brand); }
.dark-theme .faq-item summary::before { color: var(--color-accent); }
.faq-item[open] summary::before { content: "−"; }
.faq-item p { margin-top: 12px; margin-bottom: 0; font-size: 0.95rem; opacity: 0.9; }

/* 时间线 */
.timeline { position: relative; padding-left: 32px; border-left: 2px solid rgba(0,0,0,0.15); }
.dark-theme .timeline { border-left-color: rgba(255,255,255,0.2); }
.timeline-step { position: relative; margin-bottom: 2.5rem; }
.timeline-step::before {
  content: attr(data-step);
  position: absolute;
  left: -44px;
  top: 0;
  width: 28px;
  height: 28px;
  background: var(--color-accent);
  color: var(--color-dark);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
}
.timeline-step h4 { margin: 0 0 8px; font-size: 1.1rem; }
.timeline-step p { margin: 0; font-size: 0.95rem; }

/* 新闻卡片 */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--gap); }
.news-card { display: flex; flex-direction: column; height: 100%; }
.news-card time { font-size: 0.8rem; opacity: 0.7; margin-bottom: 8px; display: block; }
.news-card h4 { margin: 0 0 12px; font-size: 1.1rem; }
.news-card p { margin: 0; font-size: 0.95rem; opacity: 0.85; flex-grow: 1; }

/* 页头页脚 */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 240, 229, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(0,0,0,0.08);
  transition: background 0.3s;
}
.dark-theme .site-header { background: rgba(16, 17, 45, 0.9); border-bottom-color: rgba(255,255,255,0.1); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.logo img { height: 32px; width: auto; vertical-align: middle; }
.nav { display: flex; gap: 24px; align-items: center; }
.nav a { text-decoration: none; font-weight: 500; opacity: 0.8; transition: opacity 0.2s; }
.nav a:hover, .nav a[aria-current="page"] { opacity: 1; }
.site-footer { background: var(--color-dark); color: var(--color-text-on-dark); padding: 48px 0; margin-top: auto; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 32px; }
.footer-links a { color: var(--color-text-on-dark); text-decoration: none; opacity: 0.7; margin-right: 24px; }
.footer-links a:hover { opacity: 1; }

/* SVG 动效基础 */
.hero-svg, .panel-svg { width: 100%; height: auto; display: block; }
.anim-float { animation: float 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-breathe { animation: breathe 4s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-slide-in { animation: slideIn 5s ease-out infinite; transform-box: fill-box; transform-origin: center; }
.anim-flow { stroke-dasharray: 1; stroke-dashoffset: 0; animation: flowDash 4s linear infinite; }
.anim-pulse { animation: pulse 3s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes breathe { 0%, 100% { opacity: 0.6; transform: scale(1); } 50% { opacity: 1; transform: scale(1.05); } }
@keyframes slideIn { 0% { transform: translateX(20px); opacity: 0; } 15%, 85% { transform: translateX(0); opacity: 1; } 100% { transform: translateX(-20px); opacity: 0; } }
@keyframes flowDash { 0% { stroke-dashoffset: 1; } 100% { stroke-dashoffset: 0; } }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 0.8; } }

/* 减少动态效果 */
@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;
  }
}

/* 响应式微调 */
@media (max-width: 768px) {
  .flex-row { flex-direction: column; }
  .visual-col { order: -1; }
  .nav { gap: 16px; }
  .header-inner .btn { display: none; }
}
