/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  /* 配色系统：米白纸感 + 墨黑强对比 */
  --bg-paper: #F7F6F2;
  --bg-white: #FFFFFF;
  --ink-black: #1A1A1A;
  --ink-gray: #666666;
  --border-color: #E5E5E5;
  
  /* 品牌色 */
  --brand-primary: #00A884;
  --brand-hover: #008f72;
  --brand-light: #E6F9F4;

  /* 字体栈：高瘦浓缩体标题 + 标准正文 */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'SF Mono', 'Menlo', monospace;

  /* 间距与圆角 */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 40px;
  --space-xxl: 64px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 24px;

  /* 阴影 */
  --shadow-card: 0 4px 16px rgba(0, 0, 0, 0.04);
  --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-paper);
  color: var(--ink-black);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

ul, ol {
  list-style: none;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* =========================================
   排版系统
   ========================================= */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
}

section {
  padding: var(--space-xxl) 0;
}

.section-title {
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-lg);
  text-wrap: balance;
}

.text-intro {
  font-size: clamp(1.125rem, 2vw, 1.25rem);
  color: var(--ink-gray);
  max-width: 720px;
  margin-bottom: var(--space-xl);
  text-wrap: balance;
}

/* =========================================
   通用组件：按钮
   ========================================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  padding: 12px 24px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  border: 1px solid transparent;
  text-wrap: nowrap;
}

.btn:focus-visible {
  outline: 2px solid var(--ink-black);
  outline-offset: 2px;
}

.btn-primary {
  background-color: var(--ink-black);
  color: var(--bg-paper);
}

.btn-primary:hover {
  background-color: #333;
  transform: translateY(-1px);
}

.btn-secondary {
  background-color: transparent;
  border-color: var(--border-color);
  color: var(--ink-black);
}

.btn-secondary:hover {
  border-color: var(--ink-black);
}

.btn-brand {
  background-color: var(--brand-primary);
  color: #fff;
}

.btn-brand:hover {
  background-color: var(--brand-hover);
  transform: translateY(-1px);
}

/* =========================================
   页头与导航
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(247, 246, 242, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-color);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-weight: 700;
  font-size: 1.125rem;
}

.brand-logo img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.main-nav ul {
  display: flex;
  gap: var(--space-xl);
}

.main-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ink-gray);
  position: relative;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: var(--ink-black);
}

.main-nav a[aria-current="page"]::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background-color: var(--ink-black);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--space-sm);
}

/* =========================================
   页脚
   ========================================= */
.site-footer {
  background-color: var(--ink-black);
  color: #aaa;
  padding: var(--space-xxl) 0;
  margin-top: auto;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-xl);
}

.footer-col h4 {
  color: #fff;
  margin-bottom: var(--space-md);
  font-size: 1rem;
}

.footer-col ul li {
  margin-bottom: var(--space-sm);
}

.footer-col ul li a:hover {
  color: #fff;
}

.footer-bottom {
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid #333;
  font-size: 0.875rem;
  text-align: center;
}

/* =========================================
   布局工具：Bento Grid
   ========================================= */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--space-lg);
}

.card {
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: var(--space-lg);
  transition: box-shadow 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.card:hover {
  box-shadow: var(--shadow-hover);
  transform: translateY(-2px);
}

.card-icon {
  width: 40px;
  height: 40px;
  margin-bottom: var(--space-md);
  stroke: var(--ink-black);
  stroke-width: 1.5;
  fill: none;
}

.card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.card p {
  font-size: 0.9375rem;
  color: var(--ink-gray);
  flex-grow: 1;
}

/* =========================================
   表格样式
   ========================================= */
.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: var(--space-md);
  background-color: var(--bg-white);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.spec-table th,
.spec-table td {
  padding: var(--space-md);
  text-align: left;
  border-bottom: 1px solid var(--border-color);
  font-size: 0.9375rem;
}

.spec-table th {
  background-color: #f0efeb;
  font-weight: 600;
  color: var(--ink-black);
}

.spec-table tr:last-child td {
  border-bottom: none;
}

/* =========================================
   FAQ (Details/Summary)
   ========================================= */
.faq-item {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: var(--space-md);
}

.faq-item summary {
  padding: var(--space-lg) 0;
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  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.25rem;
  font-weight: 400;
  transition: transform 0.2s;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  padding-bottom: var(--space-lg);
  color: var(--ink-gray);
  line-height: 1.7;
}

/* =========================================
   新闻卡片
   ========================================= */
.news-card {
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #fff;
}

.news-card-body {
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.news-date {
  font-size: 0.8125rem;
  color: var(--brand-primary);
  margin-bottom: var(--space-sm);
  font-weight: 500;
}

.news-card h3 {
  font-size: 1.125rem;
  margin-bottom: var(--space-sm);
  font-weight: 600;
}

.news-card p {
  font-size: 0.9375rem;
  color: var(--ink-gray);
  margin-bottom: var(--space-md);
  flex-grow: 1;
}

.link-arrow {
  font-size: 0.9375rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: var(--space-xs);
}

.link-arrow::after {
  content: '→';
  transition: transform 0.2s;
}

.link-arrow:hover::after {
  transform: translateX(4px);
}

/* =========================================
   SVG 动效关键帧
   ========================================= */
@keyframes node-pulse {
  0%, 100% {
    fill: #ccc;
    transform: scale(0.95);
  }
  50% {
    fill: var(--brand-primary);
    transform: scale(1.05);
  }
}

@keyframes draw-line {
  0% {
    stroke-dashoffset: 1;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.grid-node {
  transform-origin: center;
  transition: fill 0.3s ease;
}

.node-1 { animation: node-pulse 4s infinite 0.0s; }
.node-2 { animation: node-pulse 4s infinite 0.4s; }
.node-3 { animation: node-pulse 4s infinite 0.8s; }
.node-4 { animation: node-pulse 4s infinite 1.2s; }
.node-5 { animation: node-pulse 4s infinite 1.6s; }

@media (prefers-reduced-motion: reduce) {
  .grid-node {
    animation: none !important;
    fill: var(--brand-primary) !important;
  }
  .draw-line-path {
    animation: none !important;
    stroke-dashoffset: 0 !important;
  }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .main-nav {
    display: none;
  }
  
  .mobile-menu-btn {
    display: block;
  }
  
  .bento-grid {
    grid-template-columns: 1fr;
  }

  .spec-table {
    font-size: 0.875rem;
  }
  
  .spec-table th,
  .spec-table td {
    padding: var(--space-sm);
  }
}
