/* ==================== 设计变量与基础重置 ==================== */
:root {
  --color-primary: #5E6D78;
  --color-secondary: #8A9A96;
  --color-accent: #B8A99A;
  --color-bg: #F9FAFB;
  --color-surface: #FFFFFF;
  --color-border: #E5E7EB;
  --color-text: #2D3134;
  --color-text-muted: #6B7280;
  --color-highlight: #F1F3F5;

  --font-heading: 'Noto Serif SC', Georgia, 'Songti SC', serif;
  --font-body: system-ui, -apple-system, 'PingFang SC', 'Segoe UI', Roboto, sans-serif;

  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  --radius-sm: 0.375rem;
  --radius-md: 0.75rem;
  --radius-lg: 1rem;

  --shadow-sm: 0 2px 8px rgba(45, 49, 52, 0.04);
  --shadow-md: 0 4px 24px rgba(45, 49, 52, 0.08);

  --max-width: 1120px;
  --header-height: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--color-primary); text-decoration: none; transition: color 0.2s; }
a:hover, a:focus-visible { color: var(--color-secondary); }
button, [role="button"], input, select, textarea { font: inherit; }

/* 流体排版 */
h1 { font-family: var(--font-heading); font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.25; letter-spacing: -0.02em; }
h2 { font-family: var(--font-heading); font-size: clamp(1.5rem, 2.5vw, 1.875rem); line-height: 1.3; margin-bottom: var(--space-md); }
h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: var(--space-sm); }
p { margin-bottom: var(--space-sm); }
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--space-md); }
.section { padding: var(--space-xl) 0; }
.section-alt { background: var(--color-surface); }

/* ==================== 导航与页头页脚 ==================== */
.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); height: var(--header-height);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.logo-group { display: flex; align-items: center; gap: var(--space-sm); }
.logo-img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-family: var(--font-heading); font-weight: 600; font-size: 1.125rem; color: var(--color-text); }
.nav-desktop { display: none; gap: var(--space-md); list-style: none; }
@media (min-width: 768px) { .nav-desktop { display: flex; } }
.nav-desktop a { padding: 0.5rem 0; border-bottom: 2px solid transparent; }
.nav-desktop a[aria-current="page"], .nav-desktop a:hover { border-bottom-color: var(--color-primary); color: var(--color-primary); }

.mobile-toggle { display: block; background: none; border: none; cursor: pointer; padding: 0.5rem; }
@media (min-width: 768px) { .mobile-toggle { display: none; } }
.mobile-menu {
  position: fixed; top: var(--header-height); left: 0; right: 0; bottom: 0;
  background: var(--color-surface); padding: var(--space-md);
  display: none; flex-direction: column; gap: var(--space-sm); list-style: none;
}
.mobile-menu.is-open { display: flex; }
.site-footer {
  background: var(--color-surface); border-top: 1px solid var(--color-border);
  padding: var(--space-lg) 0 var(--space-md); margin-top: var(--space-xl);
}
.footer-grid { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(3, 1fr); } }
.footer-col h4 { font-family: var(--font-heading); margin-bottom: var(--space-sm); }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.5rem; }
.copyright { text-align: center; color: var(--color-text-muted); font-size: 0.875rem; margin-top: var(--space-md); padding-top: var(--space-md); border-top: 1px solid var(--color-border); }

/* ==================== 通用组件 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.75rem 1.5rem; border-radius: var(--radius-md); font-weight: 500;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  cursor: pointer; border: 1px solid transparent;
}
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--color-primary); color: #fff; }
.btn-primary:hover { background: #4B5A66; box-shadow: var(--shadow-md); }
.btn-secondary { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.btn-secondary:hover { border-color: var(--color-primary); color: var(--color-primary); }

.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-lg); padding: var(--space-md);
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.grid-2 { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
.grid-3 { display: grid; gap: var(--space-md); grid-template-columns: 1fr; }
@media (min-width: 640px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, 1fr); } }

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.data-table th, .data-table td { padding: 0.75rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.data-table th { background: var(--color-highlight); font-weight: 600; }
.data-table tr:last-child td { border-bottom: none; }

/* FAQ 样式 */
.faq-list { display: flex; flex-direction: column; gap: var(--space-sm); }
.faq-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: var(--color-surface); }
.faq-item summary {
  padding: 1rem; cursor: pointer; font-weight: 500; 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-weight: 400; font-size: 1.25rem; color: var(--color-text-muted); }
.faq-item[open] summary::after { content: '−'; }
.faq-item p { padding: 0 1rem 1rem; color: var(--color-text-muted); }
.faq-item:hover { border-color: var(--color-secondary); }

/* 自定义列表标记 */
ul.custom-list { list-style: none; padding-left: 0; }
ul.custom-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.75rem; }
ul.custom-list li::before {
  content: ''; position: absolute; left: 0; top: 0.6rem;
  width: 0.5rem; height: 0.5rem; border-radius: 50%;
  background: var(--color-accent);
}

/* ==================== SVG 动效规范 ==================== */
.svg-flow-line {
  fill: none; stroke: var(--color-secondary); stroke-width: 1.5;
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0;
  animation: dash-flow 6s linear infinite alternate;
}
@keyframes dash-flow {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.flow-node {
  fill: var(--color-primary); opacity: 0.8;
  animation: node-pulse 3s ease-in-out infinite alternate;
}
@keyframes node-pulse {
  0% { transform: scale(0.9); opacity: 0.6; }
  100% { transform: scale(1.1); opacity: 1; }
}
[data-anim-path] { animation: path-glow 8s ease-in-out infinite; }
@keyframes path-glow {
  0%, 100% { stroke-opacity: 0.3; }
  50% { stroke-opacity: 0.8; }
}

@media (prefers-reduced-motion: reduce) {
  .svg-flow-line, .flow-node, [data-anim-path] { animation: none !important; }
  html { scroll-behavior: auto; }
}
