/* =========================================
   全站共享样式：设计变量、基础排版、布局、组件、SVG动效
   ========================================= */
:root {
  --color-primary: #128C7E;
  --color-primary-dark: #075E54;
  --color-accent: #25D366;
  --color-gradient-hero: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 60%, var(--color-accent) 100%);
  --color-bg: #F6F7F9;
  --color-surface: #FFFFFF;
  --color-text-main: #1A1A1A;
  --color-text-secondary: #4A5568;
  --color-border: #E2E8F0;
  --color-focus: #0F2B2A;
  --font-display: 'PingFang SC', 'SF Pro Display', 'Microsoft YaHei', system-ui, sans-serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --space-xs: 0.25rem;
  --space-sm: 0.5rem;
  --space-md: 1rem;
  --space-lg: 2rem;
  --space-xl: 4rem;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 12px rgba(15, 43, 42, 0.08);
  --shadow-hover: 0 8px 24px rgba(15, 43, 42, 0.12);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  color: var(--color-text-main);
  background: var(--color-bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* 排版与全局容器 */
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-md);
  text-wrap: balance;
}
.section-desc {
  font-size: 1.05rem;
  color: var(--color-text-secondary);
  max-width: 720px;
  margin-bottom: var(--space-lg);
  line-height: 1.7;
}

/* 页头与导航 */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: var(--space-sm); text-decoration: none; color: var(--color-text-main); font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-list { display: flex; gap: var(--space-md); list-style: none; }
.nav-link {
  text-decoration: none; color: var(--color-text-secondary); font-weight: 500; padding: var(--space-xs) var(--space-sm); border-radius: var(--radius-sm); transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link[aria-current="page"] { color: var(--color-primary); background: rgba(37, 211, 102, 0.08); }

/* 通用组件：按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; font-size: 1rem; font-weight: 600;
  border-radius: var(--radius-md); border: none; cursor: pointer;
  text-decoration: none; transition: transform .2s, box-shadow .2s, background .2s;
}
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }
.btn-primary { background: var(--color-gradient-hero); color: #FFF; box-shadow: 0 4px 10px rgba(18, 140, 126, 0.3); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(18, 140, 126, 0.4); }
.btn-secondary { background: transparent; color: var(--color-primary); border: 1.5px solid var(--color-primary); }
.btn-secondary:hover { background: rgba(37, 211, 102, 0.05); }

/* 网格与卡片 */
.grid-auto { display: grid; gap: var(--space-lg); }
.card {
  background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--space-lg);
  box-shadow: var(--shadow-card); transition: box-shadow .25s, transform .25s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-title { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; margin-bottom: var(--space-sm); color: var(--color-primary-dark); }
.card-meta { font-size: 0.85rem; color: var(--color-text-secondary); margin-top: var(--space-sm); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.data-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.data-table th { background: #F8FAFC; font-weight: 600; color: var(--color-primary-dark); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #FDFBF9; }

/* FAQ (Details/Summary) */
.faq-item { margin-bottom: var(--space-md); border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); overflow: hidden; }
.faq-summary {
  padding: 1rem; font-weight: 600; cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
}
.faq-summary::-webkit-details-marker { display: none; }
.faq-summary::after { content: "+"; font-size: 1.2rem; color: var(--color-primary); transition: transform .2s; }
.faq-item[open] .faq-summary::after { transform: rotate(45deg); }
.faq-answer { padding: 0 1rem 1rem; color: var(--color-text-secondary); line-height: 1.7; }

/* 页脚 */
.site-footer { background: var(--color-primary-dark); color: #E2E8F0; padding: var(--space-xl) 0 var(--space-lg); margin-top: var(--space-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-lg); }
.footer-col h4 { color: #FFF; margin-bottom: var(--space-md); font-size: 1rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: var(--space-sm); }
.footer-links a { color: #CBD5E1; text-decoration: none; transition: color .2s; }
.footer-links a:hover { color: var(--color-accent); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); margin-top: var(--space-lg); padding-top: var(--space-md); text-align: center; font-size: 0.85rem; color: #94A3B8; }

/* SVG 动效基础 */
.svg-container { width: 100%; max-width: 400px; aspect-ratio: 1 / 1; }
.svg-draw { path, circle, rect, line { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }}
.animate-draw-1 { animation: drawLine 6s ease-in-out infinite alternate; }
.animate-draw-2 { animation: drawLine 8s ease-in-out infinite alternate; }
.animate-pulse-ring { animation: pulseRing 5s cubic-bezier(0.4, 0, 0.6, 1) infinite; transform-box: fill-box; transform-origin: center; }
.animate-slide-up { animation: slideUp 7s ease-in-out infinite alternate; }

@keyframes drawLine {
  0% { stroke-dashoffset: 1; opacity: 0.6; }
  50% { stroke-dashoffset: 0; opacity: 1; }
  100% { stroke-dashoffset: 1; opacity: 0.6; }
}
@keyframes pulseRing {
  0% { transform: scale(0.95); opacity: 0.5; }
  50% { transform: scale(1.05); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.5; }
}
@keyframes slideUp {
  0% { transform: translateY(8px); opacity: 0.8; }
  100% { transform: translateY(-8px); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .svg-container, .svg-draw, .animate-draw-1, .animate-draw-2, .animate-pulse-ring, .animate-slide-up { animation: none !important; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: var(--space-sm) 0; }
  .nav-list { flex-wrap: wrap; justify-content: center; padding-bottom: var(--space-sm); }
  .grid-auto { grid-template-columns: 1fr; }
  .section { padding: var(--space-lg) 0; }
  .hero-layout { flex-direction: column; text-align: center; }
  .svg-container { margin: var(--space-md) auto 0; max-width: 280px; }
}
