/* ==================== 设计变量与基础重置 ==================== */
:root {
  --bg-page: #f8f9fa;
  --bg-surface: #ffffff;
  --bg-elevated: #f3f4f6;
  --text-primary: #111827;
  --text-secondary: #4b5563;
  --text-muted: #6b7280;
  --accent-brand: #0d6b48;
  --accent-hover: #0a5438;
  --border-light: #e5e7eb;
  --border-medium: #d1d5db;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.06);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-serif: Georgia, "Times New Roman", "Noto Serif SC", "Source Han Serif CN", serif;
  --container-max: 1200px;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; height: auto; }
ul, ol { padding-left: 0; list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin-top: 0; }
h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); text-wrap: balance; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.2rem); text-wrap: balance; }
h3 { font-size: clamp(1.15rem, 2vw, 1.35rem); text-wrap: balance; }
p { margin: 0.8rem 0; color: var(--text-secondary); }
a { color: var(--accent-brand); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ==================== 布局容器与网格 ==================== */
.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 1.25rem; }
section { padding: clamp(3rem, 6vw, 5rem) 0; border-bottom: 1px solid var(--border-light); }
section:last-of-type { border-bottom: none; }
.grid-auto { display: grid; gap: clamp(1rem, 2vw, 1.5rem); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.split-layout { display: grid; grid-template-columns: 1fr; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .split-layout { grid-template-columns: 1.2fr 0.8fr; } }
.text-center { text-align: center; }
.mt-2 { margin-top: 0.5rem; } .mt-4 { margin-top: 1rem; } .mb-2 { margin-bottom: 0.5rem; }

/* ==================== 导航与页头页脚 ==================== */
.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(--border-light);
}
.nav-wrapper { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 0.75rem; font-weight: 700; font-size: 1.1rem; color: var(--text-primary); text-decoration: none !important; }
.brand img { width: 32px; height: 32px; object-fit: contain; }
.nav-menu { display: flex; gap: 1.25rem; margin: 0; padding: 0; }
.nav-menu a { font-size: 0.95rem; font-weight: 500; color: var(--text-secondary); padding: 0.4rem 0.6rem; border-radius: var(--radius-sm); }
.nav-menu a:hover, .nav-menu a[aria-current="page"] { color: var(--accent-brand); background: var(--bg-elevated); text-decoration: none; }

.site-footer { background: var(--bg-surface); padding: 3rem 0 2rem; margin-top: 2rem; border-top: 1px solid var(--border-light); }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2rem; }
.footer-col h4 { font-size: 1rem; margin-bottom: 0.75rem; color: var(--text-primary); }
.footer-col ul li { margin-bottom: 0.5rem; }
.footer-col ul li a { color: var(--text-secondary); font-size: 0.9rem; }
.copyright { text-align: center; margin-top: 2rem; padding-top: 1.5rem; border-top: 1px solid var(--border-light); color: var(--text-muted); font-size: 0.85rem; }

/* ==================== 按钮组件 ==================== */
.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: 600;
  font-size: 1rem; cursor: pointer; transition: all 0.25s ease; border: 1px solid transparent;
}
.btn-primary { background: var(--accent-brand); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); text-decoration: none; }
.btn-secondary { background: var(--bg-surface); border-color: var(--border-medium); color: var(--text-primary); }
.btn-secondary:hover { border-color: var(--accent-brand); color: var(--accent-brand); text-decoration: none; }
.btn-group { display: flex; flex-wrap: wrap; gap: 1rem; }

/* ==================== 卡片与界面示意 ==================== */
.card {
  background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md);
  padding: 1.5rem; transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.card-meta { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.75rem; }
.mock-window {
  background: var(--bg-surface); border: 1px solid var(--border-medium); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); overflow: hidden; font-size: 0.9rem;
}
.mock-titlebar { background: var(--bg-elevated); padding: 0.5rem 0.75rem; display: flex; gap: 0.4rem; align-items: center; border-bottom: 1px solid var(--border-light); }
.mock-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--border-medium); }
.mock-body { display: grid; grid-template-columns: 80px 1fr; min-height: 200px; }
.mock-sidebar { border-right: 1px solid var(--border-light); padding: 0.5rem; }
.mock-chat { padding: 0.75rem; display: flex; flex-direction: column; gap: 0.5rem; }
.bubble { padding: 0.5rem 0.75rem; border-radius: var(--radius-md); max-width: 75%; font-size: 0.85rem; line-height: 1.4; }
.bubble-out { align-self: flex-end; background: var(--accent-brand); color: #fff; }
.bubble-in { align-self: flex-start; background: var(--bg-elevated); color: var(--text-primary); }

/* ==================== 表格组件 ==================== */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border-light); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; background: var(--bg-surface); }
th, td { padding: 0.75rem 1rem; border-bottom: 1px solid var(--border-light); text-align: left; vertical-align: top; }
th { background: var(--bg-elevated); font-weight: 600; color: var(--text-primary); white-space: nowrap; }
td { color: var(--text-secondary); }

/* ==================== FAQ 组件 ==================== */
.faq-list { display: flex; flex-direction: column; gap: 0.75rem; }
details { background: var(--bg-surface); border: 1px solid var(--border-light); border-radius: var(--radius-md); overflow: hidden; }
summary {
  padding: 1rem 1.25rem; cursor: pointer; font-weight: 600; color: var(--text-primary);
  list-style: none; display: flex; justify-content: space-between; align-items: center;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.2rem; font-weight: 400; transition: transform 0.2s; color: var(--text-muted); }
details[open] summary::after { transform: rotate(45deg); }
details .faq-answer { padding: 0 1.25rem 1rem; color: var(--text-secondary); line-height: 1.6; }

/* ==================== SVG 动效系统 ==================== */
.svg-anim-container { position: relative; width: 100%; overflow: hidden; }
.contour-path {
  fill: none; stroke: var(--accent-brand); stroke-width: 2; stroke-linecap: round;
  pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0.6;
}
@keyframes contourFlow {
  0%, 100% { stroke-dashoffset: 0; }
  50% { stroke-dashoffset: 1; }
}
.anim-flow { animation: contourFlow 8s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.anim-flow:nth-child(2) { animation-delay: -2s; }
.anim-flow:nth-child(3) { animation-delay: -4s; }
.anim-flow:nth-child(4) { animation-delay: -6s; }

@media (prefers-reduced-motion: reduce) {
  .anim-flow { animation: none; }
  html { scroll-behavior: auto; }
}

/* 焦点样式与无障碍 */
:focus-visible { outline: 2px solid var(--accent-brand); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
