/* =========================================
   全局设计变量与基础重置
   ========================================= */
:root {
  --bg-paper: #F9F8F5;
  --bg-card: #FFFFFF;
  --bg-hero: #F2F1EE;
  --text-ink: #0F0F0F;
  --text-secondary: #3A3A3A;
  --text-muted: #666666;
  --border-light: #E5E4DF;
  --accent: #0D7A42;
  --accent-hover: #0A5C32;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.05);
  --shadow-hover: 0 8px 32px rgba(0, 0, 0, 0.09);
  --font-h: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --font-b: "PingFang SC", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 2rem;
  --spacing-lg: 4rem;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-b);
  background: var(--bg-paper);
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }

/* =========================================
   排版系统
   ========================================= */
h1, h2, h3, h4 {
  font-family: var(--font-h);
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-ink);
  line-height: 1.15;
  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-xs); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); margin-bottom: var(--spacing-xs); }
p { margin-bottom: 1rem; }
strong { font-weight: 600; color: var(--text-ink); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--spacing-sm);
}

.section { padding: var(--spacing-lg) 0; }
.section-grid {
  display: grid;
  gap: var(--spacing-md);
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* =========================================
   页头与页脚
   ========================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(249, 248, 245, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: var(--spacing-xs); }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; color: var(--text-ink); }
.nav-desktop { display: flex; gap: var(--spacing-sm); }
.nav-link {
  padding: 0.5rem 0.8rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
  transition: background 0.2s, color 0.2s;
}
.nav-link:hover, .nav-link[aria-current="page"] {
  background: rgba(0,0,0,0.05);
  color: var(--text-ink);
}
.mobile-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; }
.mobile-toggle svg { width: 24px; height: 24px; stroke: var(--text-ink); }

.site-footer {
  background: var(--text-ink);
  color: #B0B0B0;
  padding: var(--spacing-lg) 0 var(--spacing-md);
  margin-top: var(--spacing-lg);
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--spacing-md);
}
.footer-col h4 { color: #FFFFFF; margin-bottom: var(--spacing-sm); font-size: 1rem; }
.footer-col a { display: block; padding: 0.3rem 0; font-size: 0.9rem; }
.footer-col a:hover { color: #FFFFFF; }
.footer-bottom {
  margin-top: var(--spacing-md);
  padding-top: var(--spacing-md);
  border-top: 1px solid rgba(255,255,255,0.1);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 768px) {
  .nav-desktop { display: none; }
  .mobile-toggle { display: block; }
  .nav-mobile-open {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg-paper); padding: var(--spacing-sm);
    border-bottom: 1px solid var(--border-light);
  }
  .nav-mobile-open .nav-link { width: 100%; text-align: center; }
}

/* =========================================
   组件：按钮与卡片
   ========================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.8rem 1.6rem; border-radius: var(--radius-md); font-weight: 600;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: none; cursor: pointer; font-size: 1rem;
}
.btn-primary { background: var(--text-ink); color: #FFFFFF; }
.btn-primary:hover { background: #2A2A2A; transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.btn-outline { background: transparent; border: 1.5px solid var(--text-ink); color: var(--text-ink); }
.btn-outline:hover { background: rgba(0,0,0,0.04); }

.card {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: var(--radius-md); padding: 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-hover); transform: translateY(-4px); }
.card-meta { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; display: block; }

/* =========================================
   组件：表格
   ========================================= */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 1rem; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: #F0EFEC; font-weight: 600; color: var(--text-ink); }
tr:last-child td { border-bottom: none; }

/* =========================================
   组件：FAQ (Details/Summary)
   ========================================= */
.faq-item { border-bottom: 1px solid var(--border-light); }
.faq-item summary {
  padding: 1.2rem 0; cursor: pointer; font-weight: 600; color: var(--text-ink);
  display: flex; justify-content: space-between; align-items: center;
  list-style: none; outline: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; }
.faq-item[open] summary::after { content: "-"; }
.faq-item p { padding-bottom: 1.2rem; margin: 0; line-height: 1.6; color: var(--text-secondary); }
.faq-item:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: var(--radius-sm); }

/* =========================================
   SVG 动效系统
   ========================================= */
.svg-animated { width: 100%; height: auto; display: block; }
.node-light {
  fill: transparent; stroke: var(--text-ink); stroke-width: 1.5;
  stroke-dasharray: 1; stroke-dashoffset: 0; pathLength: 1;
  animation: nodePulse 8s infinite ease-in-out;
}
.line-draw {
  fill: none; stroke: var(--accent); stroke-width: 2;
  stroke-dasharray: 1; stroke-dashoffset: 0; pathLength: 1;
  animation: lineTrace 12s infinite linear;
  transform-origin: center; transform-box: fill-box;
}
.delay-1 { animation-delay: 1.2s; }
.delay-2 { animation-delay: 2.4s; }
.delay-3 { animation-delay: 3.6s; }
.delay-4 { animation-delay: 4.8s; }

@keyframes nodePulse {
  0%, 100% { stroke-opacity: 0.15; stroke-width: 1; }
  40%, 60% { stroke-opacity: 1; stroke-width: 2.5; }
}
@keyframes lineTrace {
  0% { stroke-dashoffset: 1; }
  50% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =========================================
   辅助类
   ========================================= */
.text-center { text-align: center; }
.mt-sm { margin-top: var(--spacing-sm); }
.mt-md { margin-top: var(--spacing-md); }
.mb-md { margin-bottom: var(--spacing-md); }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--spacing-md); }
.inline-list li { position: relative; padding-left: 1.5rem; margin-bottom: 0.6rem; }
.inline-list li::before {
  content: ""; position: absolute; left: 0; top: 0.55rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
}
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
