/* === 设计变量 === */
:root {
  --color-bg: #f4f7f5;
  --color-surface: #ffffff;
  --color-surface-alt: #f0f5f2;
  --color-text: #0b140f;
  --color-text-muted: #4a5d52;
  --color-border: #dce6df;
  --color-primary: #0f8c42;
  --color-primary-deep: #065a2c;
  --color-lime: #a3e635;
  --color-accent: #0ea5a8;
  --color-danger: #dc2626;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 1px 2px rgba(11,20,15,0.06);
  --shadow-md: 0 4px 12px rgba(11,20,15,0.08);
  --shadow-hover: 0 8px 24px rgba(11,20,15,0.12);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Courier New", monospace;
  --container-max: 1200px;
  --header-height: 68px;
  --transition-base: 180ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* === 基础重置与排版 === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; text-size-adjust: 100%; }
body {
  font-family: var(--font-sans);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color var(--transition-base); }
ul, ol { list-style: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

/* 容器 */
.container { width: min(92%, var(--container-max)); margin-inline: auto; }
.grid-auto { display: grid; gap: 24px; }
@media(min-width: 768px) { .grid-auto { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); } }
@media(min-width: 1024px) { .grid-auto { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); } }

/* 排版层级 */
h1, h2, h3, h4 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw + 0.5rem, 3.25rem); }
h2 { font-size: clamp(1.5rem, 3vw + 0.25rem, 2.25rem); margin-bottom: 1rem; }
h3 { font-size: clamp(1.125rem, 2vw + 0.125rem, 1.5rem); }
p { margin-bottom: 1rem; color: var(--color-text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; } .mt-2 { margin-top: 2rem; } .mt-4 { margin-top: 4rem; }
.mb-2 { margin-bottom: 2rem; }

/* 页头 */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-height); display: flex; align-items: center;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 1.1rem; }
.brand img { width: 130px; height: auto; object-fit: contain; }
.nav-links { display: flex; gap: 24px; font-size: 0.95rem; }
.nav-links a { padding: 6px 0; position: relative; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--color-primary); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: -2px; width: 100%; height: 2px;
  background: var(--color-primary); border-radius: 2px;
}
.mobile-toggle { display: none; }
@media(max-width: 768px) {
  .nav-links { display: none; }
  .mobile-toggle { display: block; }
}

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 500;
  transition: transform var(--transition-base), box-shadow var(--transition-base), background var(--transition-base);
}
.btn:focus-visible { outline: 2px solid var(--color-primary); outline-offset: 2px; }
.btn-primary {
  background: linear-gradient(135deg, var(--color-primary-deep), var(--color-primary));
  color: #fff; box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: var(--color-surface); color: var(--color-text); border: 1px solid var(--color-border);
}
.btn-secondary:hover { background: var(--color-surface-alt); border-color: var(--color-primary); }

/* 卡片 */
.card {
  background: var(--color-surface); border: 1px solid var(--color-border);
  border-radius: var(--radius-md); padding: 24px;
  transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}
.card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); border-color: var(--color-primary); }
.card-icon { width: 44px; height: 44px; border-radius: 10px; background: var(--color-surface-alt); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; color: var(--color-primary); }

/* 表格 */
.table-wrap { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.platform-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.platform-table th, .platform-table td { padding: 14px 16px; border-bottom: 1px solid var(--color-border); text-align: left; }
.platform-table th { background: var(--color-surface-alt); font-weight: 600; }
.platform-table tr:last-child td { border-bottom: none; }

/* FAQ */
.faq-item { border-bottom: 1px solid var(--color-border); }
.faq-item summary {
  padding: 18px 0; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-weight: 400; font-size: 1.25rem; color: var(--color-text-muted); transition: transform var(--transition-base); }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { padding: 0 0 18px 0; margin-bottom: 0; }

/* 页脚 */
.site-footer { background: var(--color-surface); border-top: 1px solid var(--color-border); padding: 48px 0 32px; margin-top: 64px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer-col h4 { margin-bottom: 16px; font-size: 1rem; }
.footer-col ul li { margin-bottom: 10px; color: var(--color-text-muted); }
.footer-col ul li a:hover { color: var(--color-primary); }
.copyright { text-align: center; color: var(--color-text-muted); font-size: 0.875rem; padding-top: 24px; border-top: 1px solid var(--color-border); }

/* SVG 动效基线 */
.svg-anim { width: 100%; height: auto; overflow: visible; }
.flow-dot { fill: var(--color-primary); }
.flow-line { stroke: var(--color-primary); stroke-width: 2; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; }
.pulse-ring { stroke: var(--color-lime); stroke-width: 1.5; fill: none; pathLength: 1; stroke-dasharray: 1; stroke-dashoffset: 0; opacity: 0; }

/* 关键帧 */
@keyframes drawPath {
  from { stroke-dashoffset: 1; }
  to { stroke-dashoffset: 0; }
}
@keyframes flowAlongCurve {
  0% { transform: translate(0, 0); }
  25% { transform: translate(120px, -40px); }
  50% { transform: translate(240px, 0); }
  75% { transform: translate(120px, 40px); }
  100% { transform: translate(0, 0); }
}
@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.15); opacity: 0.2; }
}

/* 应用类 */
.draw-animated { animation: drawPath 3.5s ease-in-out infinite alternate; }
.float-animated { animation: flowAlongCurve 8s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.breathe-animated { animation: breathe 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; scroll-behavior: auto !important; }
  .draw-animated, .float-animated, .breathe-animated { animation: none; }
}

/* 区块通用 */
.section { padding: 80px 0; }
.section-title { max-width: 600px; margin-left: auto; margin-right: auto; margin-bottom: 48px; text-align: center; }
.bg-alt { background: var(--color-surface-alt); }

/* 兜底：裁掉横向溢出 */
body > * {
  overflow-x: clip;
}
