/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --color-bg: #f9f8f4;
  --color-surface: #ffffff;
  --color-border: #e2dfd6;
  --color-ink: #111111;
  --color-ink-subtle: #4a4a4a;
  --color-accent: #2e7d32;
  --color-accent-hover: #1b5e20;
  --color-focus: rgba(46, 125, 50, 0.35);
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 3.5rem;
  --spacing-xl: 5rem;
  --max-width: 1200px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --shadow-card: 0 2px 12px rgba(0, 0, 0, 0.06);
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Noto Sans SC", "PingFang SC", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  background-color: var(--color-bg);
  color: var(--color-ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button, [role="button"], input, select, textarea { font: inherit; }

/* =========================================
   排版系统
   ========================================= */
.container { width: 100%; max-width: var(--max-width); margin: 0 auto; padding: 0 var(--spacing-md); }
.section { padding: var(--spacing-lg) 0; position: relative; }
.section + .section { border-top: 1px solid var(--color-border); }
h1, h2, h3, h4 { font-family: var(--font-heading); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin-bottom: var(--spacing-sm); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); margin-bottom: var(--spacing-md); }
h3 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); margin-bottom: var(--spacing-xs); }
p { margin-bottom: var(--spacing-sm); color: var(--color-ink-subtle); max-width: 65ch; }
.text-center { text-align: center; }
.mt-md { margin-top: var(--spacing-md); }
.mb-sm { margin-bottom: var(--spacing-sm); }

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(249, 248, 244, 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: 0.75rem; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 600; font-size: 1.1rem; letter-spacing: 0.01em; }
.main-nav ul { display: flex; gap: var(--spacing-md); }
.main-nav a { font-size: 0.95rem; font-weight: 500; padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); transition: background 0.2s; }
.main-nav a:hover, .main-nav a[aria-current="page"] { background: rgba(0,0,0,0.05); }
.main-nav a[aria-current="page"] { font-weight: 600; color: var(--color-accent); }

.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: var(--spacing-lg) 0 var(--spacing-md); margin-top: var(--spacing-xl); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--spacing-md); margin-bottom: var(--spacing-lg); }
.footer-col h4 { font-size: 0.95rem; font-weight: 600; margin-bottom: var(--spacing-sm); color: var(--color-ink); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col a { font-size: 0.9rem; color: var(--color-ink-subtle); transition: color 0.2s; }
.footer-col a:hover { color: var(--color-accent); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: #777; padding-top: var(--spacing-sm); 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-sm); font-weight: 600; cursor: pointer;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s; border: none;
}
.btn-primary { background: var(--color-ink); color: #fff; }
.btn-primary:hover { background: #222; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-secondary { background: transparent; border: 1px solid var(--color-border); color: var(--color-ink); }
.btn-secondary:hover { border-color: var(--color-ink); background: rgba(0,0,0,0.02); }
.btn:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

.card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-md); padding: var(--spacing-md); box-shadow: var(--shadow-card); transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 6px 16px rgba(0,0,0,0.08); }

.icon-svg { width: 24px; height: 24px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* 表格样式 */
.table-wrapper { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--color-border); }
th { background: var(--color-bg-alt); font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr:nth-child(even) { background: rgba(0,0,0,0.01); }

/* FAQ 样式 */
.faq-list details { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-sm); margin-bottom: 0.75rem; overflow: hidden; }
.faq-list summary { padding: 1rem; cursor: pointer; font-weight: 600; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list details p { padding: 0 1rem 1rem; font-size: 0.95rem; margin: 0; }
.faq-list details:focus-within { outline: 3px solid var(--color-focus); outline-offset: 2px; }

/* 网格布局工具 */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--spacing-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--spacing-md); }
.flex-row { display: flex; flex-wrap: wrap; gap: var(--spacing-md); align-items: center; }

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-anim { width: 100%; height: auto; overflow: visible; }
.node-grid .node { transition: stroke 0.4s ease, opacity 0.4s ease; }
.node-grid .node.dim { stroke: #d6d3c9; opacity: 0.4; }
.node-grid .node.bright { stroke: var(--color-ink); opacity: 1; }

@keyframes pulse-node {
  0%, 100% { stroke: #d6d3c9; opacity: 0.3; }
  15% { stroke: var(--color-accent); opacity: 1; }
  45%, 75% { stroke: #d6d3c9; opacity: 0.3; }
}
.node-grid .n1 { animation: pulse-node 6s infinite 0s; }
.node-grid .n2 { animation: pulse-node 6s infinite 0.4s; }
.node-grid .n3 { animation: pulse-node 6s infinite 0.8s; }
.node-grid .n4 { animation: pulse-node 6s infinite 1.2s; }
.node-grid .n5 { animation: pulse-node 6s infinite 1.6s; }
.node-grid .n6 { animation: pulse-node 6s infinite 2.0s; }

@keyframes draw-flow {
  to { stroke-dashoffset: -20; }
}
.flow-line { stroke-dasharray: 4 4; animation: draw-flow 1.5s linear infinite; }

@keyframes float-gentle {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
.float-anim { animation: float-gentle 4s 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;
  }
  .node-grid .node { stroke: var(--color-ink); opacity: 0.7; animation: none; }
  .flow-line { animation: none; stroke-dasharray: none; }
}

/* =========================================
   响应式适配
   ========================================= */
@media (max-width: 768px) {
  .header-inner { flex-direction: column; height: auto; padding: 0.75rem 0; gap: 0.5rem; }
  .main-nav ul { flex-wrap: wrap; justify-content: center; gap: 0.5rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .section { padding: var(--spacing-md) 0; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}
