/* === 设计 Token 与基础变量 === */
:root {
  /* 色板 */
  --color-dark: #13102D;
  --color-paper: #F7F5F3;
  --color-text: #171523;
  --color-brand: #2714EB;
  --color-accent: #89ED6E;
  
  /* 边界与阴影 */
  --radius-card: 24px;
  --radius-btn: 999px;
  --card-border: 1px solid rgba(23, 21, 35, 0.16);
  --card-shadow: none;
  
  /* 节奏与密度 */
  --section-y: clamp(2.5rem, 5vw, 4rem);
  --gap: clamp(0.75rem, 1.5vw, 1.25rem);
  --content-max: 960px;
  
  /* 字体 */
  --font-title-weight: 600;
  --line-height-body: 1.55;
  
  /* 布局 */
  --header-h: 64px;
}

/* === 全局重置 === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans SC", sans-serif;
  background-color: var(--color-paper);
  color: var(--color-text);
  line-height: var(--line-height-body);
  font-size: 16px;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

/* === 容器 === */
.container {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 0 var(--gap);
}

.section {
  padding-top: var(--section-y);
  padding-bottom: var(--section-y);
  border-bottom: 1px solid rgba(23, 21, 35, 0.08);
}

.section:last-child {
  border-bottom: none;
}

/* === 头部与底部 === */
.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(23, 21, 35, 0.08);
  height: var(--header-h);
  display: flex;
  align-items: center;
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 700;
  font-size: 1.1rem;
}

.brand img {
  height: 32px;
  width: auto;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links a {
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.2s;
}

.nav-links a:hover, .nav-links a[aria-current="page"] {
  color: var(--color-brand);
}

.site-footer {
  background-color: var(--color-dark);
  color: var(--color-paper);
  padding: 48px 0;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  opacity: 0.8;
  transition: opacity 0.2s;
}

.footer-links a:hover {
  opacity: 1;
  color: var(--color-accent);
}

/* === 按钮 === */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 48px;
  padding: 0 28px;
  border-radius: var(--radius-btn);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: transform 0.2s, background-color 0.2s, box-shadow 0.2s;
}

.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-dark);
}

.btn-primary:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.btn-secondary {
  background-color: transparent;
  border: 1px solid var(--color-text);
  color: var(--color-text);
}

.dark-surface .btn-secondary {
  border-color: var(--color-paper);
  color: var(--color-paper);
}

.btn:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* === 眉标与标题 === */
.section-label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
  color: var(--color-brand);
}

.dark-surface .section-label {
  color: var(--color-accent);
}

.section-title {
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: var(--font-title-weight);
  line-height: 1.25;
  margin-bottom: 24px;
}

.hl {
  color: var(--color-brand);
}

.dark-surface .hl {
  color: var(--color-accent);
}

/* === 文本排版 === */
.text-body {
  max-width: 38em;
  margin-bottom: 16px;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--gap);
}

.card {
  background-color: var(--color-paper);
  border: var(--card-border);
  border-radius: var(--radius-card);
  padding: 24px;
  box-shadow: var(--card-shadow);
}

.dark-surface .card {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
}

.card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* 暗色背景文字对比度修复 */
.dark-surface .container.split-layout p.text-body,
.dark-surface .container.split-layout .hero-facts span,
.dark-surface .container .card p {
  color: var(--color-paper);
}

/* === 表格 === */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 24px;
  font-size: 0.95rem;
}

.spec-table th, .spec-table td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(23, 21, 35, 0.1);
}

.spec-table th {
  font-weight: 600;
  width: 40%;
}

.dark-surface .spec-table th,
.dark-surface .spec-table td {
  border-color: rgba(255, 255, 255, 0.1);
}

/* === FAQ === */
.faq-item {
  border-bottom: 1px solid rgba(23, 21, 35, 0.1);
}

.faq-item summary {
  padding: 16px 0;
  cursor: pointer;
  font-weight: 600;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.2rem;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: 16px;
  font-size: 0.95rem;
  opacity: 0.85;
}

/* === 布局辅助 === */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

@media (max-width: 768px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

.hero-actions {
  display: flex;
  gap: 16px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.hero-facts {
  margin-top: 16px;
  font-size: 0.85rem;
  opacity: 0.7;
  display: flex;
  gap: 16px;
}

/* === SVG 动效基础 === */
svg {
  overflow: visible;
}

svg path, svg circle, svg rect, svg line {
  transition: all 0.3s ease;
}

.grid-node {
  fill: transparent;
  stroke: var(--color-brand);
  stroke-width: 2;
}

.dark-surface .grid-node {
  stroke: var(--color-accent);
}

.node-light {
  animation: nodePulse 3s infinite alternate ease-in-out;
}

@keyframes nodePulse {
  0% {
    fill: transparent;
    stroke-width: 1;
    opacity: 0.3;
  }
  50% {
    fill: var(--color-brand);
    stroke-width: 2;
    opacity: 1;
  }
  100% {
    fill: transparent;
    stroke-width: 1;
    opacity: 0.3;
  }
}

.dark-surface .node-light {
  animation-name: nodePulseDark;
}

@keyframes nodePulseDark {
  0% {
    fill: transparent;
    stroke-width: 1;
    opacity: 0.3;
  }
  50% {
    fill: var(--color-accent);
    stroke-width: 2;
    opacity: 1;
  }
  100% {
    fill: transparent;
    stroke-width: 1;
    opacity: 0.3;
  }
}

.draw-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
  animation: drawLine 4s infinite alternate ease-in-out;
}

@keyframes drawLine {
  0% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: -1; }
  100% { stroke-dashoffset: 0; }
}

.float-element {
  animation: floatY 4s infinite alternate ease-in-out;
}

@keyframes floatY {
  0% { transform: translateY(0); }
  100% { transform: translateY(-8px); }
}

.pulse-dot {
  animation: pulseDot 2s infinite alternate ease-in-out;
}

@keyframes pulseDot {
  0% { opacity: 0.4; r: 3; }
  100% { opacity: 1; r: 5; }
}

.breathing-dots circle {
  animation: breathe 1.5s infinite ease-in-out;
}

.breathing-dots circle:nth-child(2) {
  animation-delay: 0.2s;
}

.breathing-dots circle:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes breathe {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* === 减少动态效果 === */
@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;
  }
}
