/* ==================== 设计变量 ==================== */
:root {
  --bg-paper: #F8F6F0;
  --bg-surface: #FFFFFF;
  --ink-primary: #111111;
  --ink-secondary: #4A4A4A;
  --ink-muted: #888888;
  --brand-green: #25D366;
  --brand-dark: #128C7E;
  --border-light: #E2DFD8;
  --border-focus: #111111;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.04);
  --shadow-md: 0 6px 16px rgba(0,0,0,0.06);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --spacing-xs: 8px;
  --spacing-sm: 16px;
  --spacing-md: 32px;
  --spacing-lg: 64px;
  --spacing-xl: 100px;
  --font-sans: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ==================== 基础重置 ==================== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  color: var(--ink-primary);
  background-color: var(--bg-paper);
  line-height: 1.75;
  font-size: 16px;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }

/* ==================== 排版系统 ==================== */
h1, h2, h3, h4 { letter-spacing: -0.015em; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.5vw, 3.6rem); font-weight: 800; line-height: 1.15; margin-bottom: var(--spacing-md); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); font-weight: 700; line-height: 1.25; margin-bottom: var(--spacing-sm); }
h3 { font-size: 1.25rem; font-weight: 600; line-height: 1.4; margin-bottom: var(--spacing-xs); }
p { margin-bottom: 1rem; color: var(--ink-secondary); }
strong { font-weight: 700; color: var(--ink-primary); }

.container { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 40px); }
section { padding: clamp(48px, 8vw, 96px) 0; }
.section-header { margin-bottom: clamp(32px, 5vw, 56px); }
.section-header p { max-width: 680px; font-size: 1.05rem; }

/* ==================== 布局组件 ==================== */
.grid-auto { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.text-center { text-align: center; }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }

/* ==================== 导航与页脚 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248,246,240,0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.02em; }
.main-nav ul { display: flex; gap: 28px; }
.main-nav a { font-weight: 500; font-size: 0.95rem; transition: color 0.2s; }
.main-nav a:hover, .main-nav a:focus-visible { color: var(--brand-green); outline: none; }
.main-nav a[aria-current="page"] { font-weight: 700; color: var(--ink-primary); position: relative; }
.main-nav a[aria-current="page"]::after { content: ""; position: absolute; bottom: -4px; left: 0; width: 100%; height: 2px; background: var(--ink-primary); border-radius: 2px; }

.site-footer { background: #FFFFFF; border-top: 1px solid var(--border-light); padding: 48px 0 32px; margin-top: var(--spacing-lg); }
.footer-inner { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 40px; }
.footer-col h4 { font-size: 0.95rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-muted); margin-bottom: 16px; }
.footer-col ul li { margin-bottom: 10px; }
.footer-col a:hover { text-decoration: underline; }
.footer-bottom { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--border-light); text-align: center; color: var(--ink-muted); font-size: 0.9rem; }

/* ==================== 按钮与表单 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 26px; border-radius: var(--radius-md); font-weight: 600;
  cursor: pointer; transition: all 0.2s ease; border: 2px solid transparent;
  text-decoration: none; user-select: none;
}
.btn-primary { background: var(--ink-primary); color: #fff; }
.btn-primary:hover { background: #333; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline { background: transparent; border-color: var(--ink-primary); color: var(--ink-primary); }
.btn-outline:hover { background: var(--ink-primary); color: #fff; }
.btn:focus-visible { outline: 3px solid var(--brand-green); outline-offset: 2px; }

/* ==================== 卡片与列表 ==================== */
.card { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-lg); padding: 28px; transition: transform 0.2s, box-shadow 0.2s; }
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card-icon { width: 48px; height: 48px; background: #F4F1EA; border-radius: var(--radius-md); display: grid; place-items: center; margin-bottom: 16px; }
.card-icon svg { width: 24px; height: 24px; stroke: var(--ink-primary); stroke-width: 1.8; fill: none; }
.feature-list li { position: relative; padding-left: 24px; margin-bottom: 12px; }
.feature-list li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--brand-green); }
.news-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.news-card { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; height: 100%; }
.news-meta { display: flex; justify-content: space-between; align-items: center; font-size: 0.85rem; color: var(--ink-muted); margin-bottom: 10px; }
.news-card .btn { margin-top: auto; align-self: flex-start; padding: 8px 16px; font-size: 0.9rem; }
.related-links { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.related-item { padding: 14px; background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: 6px; transition: border-color 0.2s; }
.related-item:hover { border-color: var(--brand-green); }
.related-item a { font-weight: 600; color: var(--ink-primary); }
.related-item span { font-size: 0.9rem; color: var(--ink-secondary); }

/* ==================== 表格 ==================== */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border-light); border-radius: var(--radius-md); background: var(--bg-surface); }
table { width: 100%; border-collapse: collapse; min-width: 600px; }
th, td { padding: 14px 18px; text-align: left; border-bottom: 1px solid var(--border-light); }
th { background: #F2F0EB; font-weight: 600; white-space: nowrap; }
td { color: var(--ink-secondary); }
tr:last-child td { border-bottom: none; }

/* ==================== FAQ 组件 ==================== */
.faq-list details { border: 1px solid var(--border-light); border-radius: var(--radius-md); margin-bottom: 12px; background: var(--bg-surface); overflow: hidden; }
.faq-list summary { padding: 18px 24px; cursor: pointer; font-weight: 600; list-style: none; position: relative; transition: background 0.2s; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%); font-weight: 400; color: var(--ink-muted); transition: transform 0.2s; }
.faq-list details[open] summary::after { content: "−"; }
.faq-list details p { padding: 0 24px 18px; margin: 0; font-size: 0.98rem; color: var(--ink-secondary); }

/* ==================== 步骤指示器 ==================== */
.steps { counter-reset: step-counter; }
.steps li { counter-increment: step-counter; position: relative; padding-left: 40px; margin-bottom: 24px; }
.steps li::before { content: counter(step-counter); position: absolute; left: 0; top: 0; width: 28px; height: 28px; background: var(--ink-primary); color: #fff; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 0.9rem; }
.steps li strong { display: block; margin-bottom: 4px; color: var(--ink-primary); }

/* ==================== SVG 动效体系 ==================== */
@keyframes gridPulse {
  0%, 100% { opacity: 0.25; fill: var(--ink-primary); }
  50% { opacity: 1; fill: var(--brand-green); }
}
@keyframes drawLineAnim {
  0% { stroke-dashoffset: 1; }
  100% { stroke-dashoffset: 0; }
}
.node { animation: gridPulse 5s ease-in-out infinite; }
.node:nth-child(3n+1) { animation-delay: 0s; }
.node:nth-child(3n+2) { animation-delay: 1.2s; }
.node:nth-child(3n) { animation-delay: 2.4s; }
.draw-path { pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; stroke: var(--ink-primary); stroke-width: 2; fill: none; }
.animate-trace { animation: drawLineAnim 1.8s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.delay-1 { animation-delay: 0.3s; }
.delay-2 { animation-delay: 0.9s; }
.delay-3 { animation-delay: 1.5s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .node { animation: none; opacity: 0.5; }
  .animate-trace { animation: none; stroke-dashoffset: 0; }
}

/* ==================== 移动端适配 ==================== */
.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
@media (max-width: 768px) {
  .menu-toggle { display: block; }
  .main-nav { position: fixed; top: 72px; left: 0; width: 100%; background: var(--bg-surface); border-bottom: 1px solid var(--border-light); padding: 24px; transform: translateY(-100%); opacity: 0; pointer-events: none; transition: all 0.3s ease; }
  .main-nav.open { transform: translateY(0); opacity: 1; pointer-events: all; }
  .main-nav ul { flex-direction: column; gap: 16px; }
  .header-inner { height: 64px; }
}
