/* =========================================
   设计变量与基础重置
   ========================================= */
:root {
  /* 配色：米白纸感 + 墨黑强对比 */
  --color-bg-primary: #F8F7F4;
  --color-bg-secondary: #EFF0EE;
  --color-bg-surface: #FFFFFF;
  --color-text-primary: #0A0A0A;
  --color-text-secondary: #4A4A4A;
  --color-text-muted: #6B6B6B;
  --color-border: #D0CDC7;
  --color-accent: #1A1A1A;
  --color-highlight: #25D366;

  /* 排版 */
  --font-heading: 'Inter', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: 'Source Han Sans CN', 'Noto Sans SC', system-ui, sans-serif;
  --space-unit: 8px;
  --container-max: 1200px;
  --radius-sm: 4px;
  --radius-md: 8px;
  --shadow-subtle: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.1);

  /* 动效 */
  --duration-fast: 0.2s;
  --duration-normal: 0.35s;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--color-bg-primary);
  color: var(--color-text-primary);
  line-height: 1.7;
  font-size: clamp(14px, 1vw + 0.5rem, 16px);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--duration-fast) ease; }
ul, ol { list-style: none; }

/* =========================================
  布局与容器
  ========================================= */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px);
}
section {
  padding: clamp(48px, 8vw, 96px) 0;
  border-bottom: 1px solid var(--color-border);
}
section:last-child { border-bottom: none; }
.section-title {
  font-family: var(--font-heading);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: clamp(16px, 2vw, 32px);
  line-height: 1.3;
  text-wrap: balance;
}
.grid-layout {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* =========================================
  页头与导航
  ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
  padding: 12px 0;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.brand-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
}
.nav-list {
  display: flex;
  gap: clamp(12px, 2vw, 24px);
}
.nav-link {
  font-size: 14px;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
  transition: border-color var(--duration-fast) ease;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  border-bottom-color: var(--color-text-primary);
}
.nav-toggle { display: none; }

/* =========================================
  页脚
  ========================================= */
.site-footer {
  background: var(--color-text-primary);
  color: #CCCCCC;
  padding: 48px 0 24px;
  font-size: 13px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-col h4 {
  color: #FFFFFF;
  font-size: 14px;
  margin-bottom: 12px;
  font-family: var(--font-heading);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom {
  border-top: 1px solid #333;
  padding-top: 24px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

/* =========================================
  组件：按钮
  ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 24px;
  font-size: 15px;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform var(--duration-fast) ease, box-shadow var(--duration-fast) ease, background var(--duration-fast) ease;
  border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary {
  background: var(--color-accent);
  color: #FFFFFF;
}
.btn-primary:hover {
  background: #2A2A2A;
  transform: translateY(-1px);
  box-shadow: var(--shadow-hover);
}
.btn-secondary {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-primary);
}
.btn-secondary:hover { border-color: var(--color-text-primary); }

/* =========================================
  组件：卡片与表格
  ========================================= */
.card {
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: box-shadow var(--duration-normal) ease, transform var(--duration-normal) ease;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.card-meta {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.card h3 {
  font-family: var(--font-heading);
  font-size: 16px;
  margin-bottom: 8px;
  font-weight: 600;
}
.card p { font-size: 14px; color: var(--color-text-secondary); line-height: 1.6; margin-bottom: 12px; }

.table-wrapper { overflow-x: auto; margin: 16px 0; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--color-bg-surface); }
th, td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg-secondary); font-weight: 600; color: var(--color-text-primary); }
tr:last-child td { border-bottom: none; }

/* =========================================
  组件：FAQ (details/summary)
  ========================================= */
.faq-item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 12px;
  background: var(--color-bg-surface);
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background var(--duration-fast) ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 18px;
  font-weight: 400;
  transition: transform var(--duration-normal) ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item summary:hover { background: var(--color-bg-secondary); }
.faq-answer { padding: 0 20px 16px; font-size: 14px; color: var(--color-text-secondary); line-height: 1.7; }

/* =========================================
  SVG 动效系统
  ========================================= */
.svg-graphic { width: 100%; height: auto; overflow: visible; }
.node-dot { transition: fill var(--duration-normal) ease; }
.grid-path {
  pathLength: 1;
  stroke-dasharray: 1;
  stroke-dashoffset: 0;
}
@keyframes pulseNode {
  0%, 100% { opacity: 0.3; r: 3; }
  50% { opacity: 1; r: 5; fill: var(--color-highlight); }
}
@keyframes drawLine {
  0% { stroke-dashoffset: 1; opacity: 0; }
  20% { opacity: 1; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes floatLayer {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}

.anim-node-light { animation: pulseNode 5s ease-in-out infinite alternate; }
.anim-draw-line { animation: drawLine 4.5s ease-in-out infinite alternate; }
.anim-float { animation: floatLayer 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }

/* 减少动态效果适配 */
@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;
  }
  .svg-graphic { visibility: visible; }
}

/* =========================================
  响应式调整
  ========================================= */
@media (max-width: 768px) {
  .nav-list { display: none; }
  .nav-toggle { display: block; background: none; border: none; cursor: pointer; }
  .grid-layout { grid-template-columns: 1fr; }
  .header-inner { height: 56px; }
  section { padding: 40px 0; }
  
  /* 修复 390px 视口横向溢出 8px */
  .container {
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero-grid, .scene-grid, .news-grid, .grid-layout, .feature-card, .related-grid {
    min-width: 0;
  }
  .svg-graphic {
    overflow: hidden;
  }
}

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
