/* ==================== 设计变量与基础重置 ==================== */
:root {
  --bg-primary: #f8f7f4;
  --bg-surface: #ffffff;
  --ink: #0d0d0d;
  --ink-secondary: #4a4a4a;
  --border: #e6e4de;
  --accent: #141414;
  --accent-hover: #2a2a2a;
  --focus-ring: rgba(20, 20, 20, 0.25);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-soft: 0 4px 12px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 6px 20px rgba(0, 0, 0, 0.06);
  --font-body: "PingFang SC", "Noto Sans SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --container-max: 1120px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 3.5rem;
  --space-xl: 5rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, details, summary { font: inherit; color: inherit; }

/* ==================== 布局与排版 ==================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--space-sm); }
.section { padding: var(--space-xl) 0; position: relative; }
.section-title {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: var(--space-md);
  color: var(--ink);
}
.section-desc {
  max-width: 720px;
  font-size: 1.05rem;
  color: var(--ink-secondary);
  margin-bottom: var(--space-lg);
}
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--space-md); }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: var(--space-md); }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--space-md); }

/* ==================== 导航页头 ==================== */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(248, 247, 244, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; letter-spacing: -0.01em; }
.brand img { height: 32px; width: auto; object-fit: contain; }
.main-nav { display: flex; gap: var(--space-sm); }
.main-nav a {
  padding: 6px 12px; border-radius: var(--radius-sm); font-size: 0.95rem; font-weight: 500;
  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"] { color: var(--accent); }

/* ==================== 按钮 ==================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 10px 20px; border-radius: var(--radius-sm);
  font-weight: 500; font-size: 0.95rem; cursor: pointer;
  transition: transform 0.2s, background 0.2s, box-shadow 0.2s;
  border: none; text-decoration: none;
}
.btn:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-card); }
.btn-secondary { background: transparent; border: 1px solid var(--border); }
.btn-secondary:hover { border-color: var(--ink); background: rgba(0,0,0,0.03); }

/* ==================== 通用组件 ==================== */
.card {
  background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--space-md); transition: box-shadow 0.2s, transform 0.2s;
}
.card:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.tag { display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--ink-secondary); margin-bottom: 8px; }
.divider { height: 1px; background: var(--border); margin: var(--space-lg) 0; }

/* ==================== 表格 ==================== */
.table-wrapper { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-surface); }
table { width: 100%; border-collapse: collapse; min-width: 500px; }
th, td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--border); }
th { background: rgba(0,0,0,0.02); font-weight: 600; font-size: 0.9rem; }
td { font-size: 0.95rem; color: var(--ink-secondary); }
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(0,0,0,0.015); }

/* ==================== FAQ / Details ==================== */
.faq-list { display: grid; gap: var(--space-sm); }
details { background: var(--bg-surface); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; }
summary {
  padding: 16px 20px; cursor: pointer; font-weight: 500; list-style: none;
  display: flex; align-items: center; justify-content: space-between;
  transition: background 0.2s;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; }
details[open] summary::after { transform: rotate(45deg); }
details[open] summary { background: rgba(0,0,0,0.02); }
.faq-answer { padding: 0 20px 16px; color: var(--ink-secondary); line-height: 1.6; }

/* ==================== 页脚 ==================== */
.site-footer { border-top: 1px solid var(--border); padding: var(--space-lg) 0; background: #f2f1ee; }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); text-align: center; }
.footer-links { display: flex; gap: var(--space-md); flex-wrap: wrap; justify-content: center; }
.footer-links a { font-size: 0.9rem; color: var(--ink-secondary); }
.footer-links a:hover { color: var(--ink); }
.copyright { font-size: 0.85rem; color: #666; }

/* ==================== SVG 动效基类 ==================== */
.svg-animated path, .svg-animated circle, .svg-animated rect { vector-effect: non-scaling-stroke; }
.path-draw { stroke-dasharray: 1; stroke-dashoffset: 0; }
@keyframes pathDraw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
.node-pulse { animation: nodeGlow 4s ease-in-out infinite alternate; transform-origin: center; transform-box: fill-box; }
@keyframes nodeGlow {
  0%, 100% { opacity: 0.3; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.05); }
}
.flow-line { stroke-dasharray: 8 4; animation: flowDash 1.5s linear infinite; }
@keyframes flowDash { to { stroke-dashoffset: -24; } }

/* 延迟控制 */
.delay-1 { animation-delay: 0s; } .delay-2 { animation-delay: 0.4s; } .delay-3 { animation-delay: 0.8s; }
.delay-4 { animation-delay: 1.2s; } .delay-5 { animation-delay: 1.6s; } .delay-6 { animation-delay: 2.0s; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .path-draw { stroke-dashoffset: 0; }
  .flow-line { stroke-dasharray: none; }
}
