/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f7f8fa;
  --color-surface: #ffffff;
  --color-text-primary: #1d1d1f;
  --color-text-secondary: #4b4b4b;
  --color-text-muted: #6e6e73;
  --color-accent: #25D366;
  --color-accent-hover: #1da851;
  --color-accent-subtle: #e8f9ef;
  --color-border: #d2d2d7;
  --color-border-light: #e5e5ea;
  --font-heading: 'Georgia', 'Noto Serif SC', 'Source Han Serif CN', serif;
  --font-body: system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-card: 0 1px 4px rgba(0,0,0,0.04), 0 2px 8px rgba(0,0,0,0.03);
  --shadow-hover: 0 4px 12px rgba(0,0,0,0.08);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --max-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text-primary);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-fast); }
ul, ol { list-style: none; padding: 0; margin: 0; }

/* =========================================
   排版系统
   ========================================= */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-sm); }
section { padding: var(--space-lg) 0; }
.section-header { text-align: center; margin-bottom: var(--space-lg); max-width: 720px; margin-left: auto; margin-right: auto; }
.section-header h2 { margin-bottom: var(--space-sm); }
.section-header p { font-size: 1.05rem; color: var(--color-text-secondary); }

h1, h2, h3 { font-family: var(--font-heading); text-wrap: balance; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); font-weight: 700; line-height: 1.15; margin-bottom: var(--space-sm); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); font-weight: 600; margin-bottom: var(--space-md); }
h3 { font-size: 1.15rem; font-weight: 600; margin-bottom: var(--space-xs); color: var(--color-text-primary); }
p { margin-bottom: 1rem; color: var(--color-text-secondary); }
.text-center { text-align: center; }
.mt-sm { margin-top: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }

/* =========================================
   通用组件
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-sm); font-weight: 500;
  font-size: 1rem; cursor: pointer; border: 1px solid transparent;
  transition: background var(--transition-fast), box-shadow var(--transition-fast), transform var(--transition-fast);
}
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--color-accent); color: #fff; }
.btn-primary:hover { background: var(--color-accent-hover); box-shadow: 0 2px 8px rgba(37, 211, 102, 0.3); transform: translateY(-1px); }
.btn-outline { background: transparent; border-color: var(--color-border); color: var(--color-text-primary); }
.btn-outline:hover { border-color: var(--color-text-secondary); background: var(--color-surface); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border-light);
  border-radius: var(--radius-md); padding: var(--space-md);
  transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--color-border); }
.card-icon { width: 32px; height: 32px; margin-bottom: var(--space-sm); color: var(--color-accent); }
.card-icon svg { width: 100%; height: 100%; stroke-width: 1.8; stroke: currentColor; fill: none; }

.grid-auto { display: grid; gap: var(--space-md); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border-light); border-radius: var(--radius-md); background: var(--color-surface); }
table { width: 100%; border-collapse: collapse; text-align: left; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--color-border-light); }
th { background: var(--color-bg); font-weight: 600; color: var(--color-text-primary); white-space: nowrap; }
td { color: var(--color-text-secondary); }
tr:last-child td { border-bottom: none; }

/* FAQ / Details */
.faq-list details { margin-bottom: var(--space-sm); border: 1px solid var(--color-border-light); border-radius: var(--radius-sm); background: var(--color-surface); overflow: hidden; }
.faq-list summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 500; color: var(--color-text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
  transition: background var(--transition-fast);
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary:hover { background: var(--color-bg); }
.faq-list summary::after { content: "+"; font-weight: 300; font-size: 1.25rem; color: var(--color-text-muted); transition: transform var(--transition-base); }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list div { padding: 0 1.25rem 1rem 1.25rem; color: var(--color-text-secondary); line-height: 1.7; }

/* 链接列表 */
.link-list li { margin-bottom: var(--space-xs); padding-left: 1rem; position: relative; }
.link-list li::before { content: ""; position: absolute; left: 0; top: 0.55rem; width: 6px; height: 6px; border-radius: 50%; background: var(--color-border); }
.link-list a:hover { color: var(--color-accent); text-decoration: underline; }

/* 页头页脚 */
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-light); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-family: var(--font-heading); font-weight: 600; font-size: 1.1rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
nav ul { display: flex; gap: var(--space-md); }
nav a { font-size: 0.95rem; color: var(--color-text-secondary); font-weight: 500; position: relative; }
nav a:hover, nav a[aria-current="page"] { color: var(--color-accent); }
nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--color-accent); border-radius: 1px; }
footer { background: var(--color-surface); border-top: 1px solid var(--color-border-light); padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-lg); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: var(--space-md); margin-bottom: var(--space-md); }
.footer-col h4 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-text-muted); margin-bottom: var(--space-sm); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { text-align: center; font-size: 0.85rem; color: var(--color-text-muted); border-top: 1px solid var(--color-border-light); padding-top: var(--space-md); }

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-anim-group { position: relative; width: 100%; height: auto; overflow: visible; }
.contour-path {
  fill: none; stroke: var(--color-border); stroke-width: 1.5;
  stroke-dasharray: 1; stroke-dashoffset: 0; pathLength: 1;
  transition: stroke var(--transition-base);
}
@keyframes contour-flow {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}
.flow-slow { animation: contour-flow 8s linear infinite; }
.flow-med { animation: contour-flow 6s linear infinite; animation-delay: -2s; }
.flow-fast { animation: contour-flow 5s linear infinite; animation-delay: -4s; }
.color-accent-subtle { stroke: var(--color-accent); opacity: 0.6; }
.color-primary { stroke: var(--color-text-primary); opacity: 0.15; }

/* 减少动态效果偏好 */
@media (prefers-reduced-motion: reduce) {
  .flow-slow, .flow-med, .flow-fast { animation: none !important; }
  html { scroll-behavior: auto; }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .header-inner nav ul { display: none; } /* 简化移动端，实际可用JS切换菜单，此处为纯静态保持结构 */
  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  h1 { font-size: 2rem; }
  section { padding: var(--space-md) 0; }
}
