/* 设计变量与基础设定 */
:root {
  --color-bg: #f7f9fc;
  --color-surface: #ffffff;
  --color-text: #1c1f26;
  --color-text-secondary: #5a6170;
  --color-accent: #e06040;
  --color-accent-light: #ff8c66;
  --gradient-hero: linear-gradient(165deg, #fdf8f5 0%, #fcece6 45%, #f9e8df 100%);
  --gradient-btn: linear-gradient(135deg, var(--color-accent) 0%, var(--color-accent-light) 100%);
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans SC", "PingFang SC", sans-serif;
  --font-mono: "SF Mono", "Cascadia Code", "Menlo", "Consolas", monospace;
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --shadow-card: 0 4px 20px rgba(28, 31, 38, 0.05);
  --shadow-hover: 0 8px 28px rgba(28, 31, 38, 0.1);
  --container-width: 1120px;
  --header-height: 72px;
  --border-subtle: #e8eaef;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font-sans); color: var(--color-text); background: var(--color-bg); line-height: 1.65; overflow-x: hidden; }
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; transition: color 0.2s, background 0.2s; }
ul, ol { list-style: none; }
h1, h2, h3, h4 { line-height: 1.25; text-wrap: balance; margin-bottom: 0.75rem; }
h1 { font-size: clamp(2rem, 5.5vw, 3.5rem); font-weight: 700; letter-spacing: -0.025em; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.25rem); font-weight: 600; margin-top: 3.5rem; }
h3 { font-size: clamp(1.1rem, 2vw, 1.35rem); font-weight: 600; }
p { margin-bottom: 1rem; max-width: 68ch; }
.container { max-width: var(--container-width); margin: 0 auto; padding: 0 24px; }
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-md { gap: 16px; }
.gap-lg { gap: 24px; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.text-muted { color: var(--color-text-secondary); }
.mono { font-family: var(--font-mono); font-size: 0.9em; }

/* 组件：按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 24px; border-radius: var(--radius-sm); font-weight: 500; cursor: pointer; border: none; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, color 0.2s; font-size: 1rem; user-select: none; }
.btn:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; }
.btn-primary { background: var(--gradient-btn); color: #fff; box-shadow: 0 4px 16px rgba(224, 96, 64, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(224, 96, 64, 0.45); }
.btn-outline { background: transparent; border: 1.5px solid var(--color-text-secondary); color: var(--color-text); }
.btn-outline:hover { border-color: var(--color-accent); color: var(--color-accent); background: rgba(224, 96, 64, 0.05); }
.btn-sm { padding: 8px 16px; font-size: 0.875rem; }

/* 组件：卡片 */
.card { background: var(--color-surface); border-radius: var(--radius-md); padding: 24px; box-shadow: var(--shadow-card); transition: transform 0.25s, box-shadow 0.25s; border: 1px solid var(--border-subtle); }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-hover); }
.feature-icon { width: 40px; height: 40px; margin-bottom: 14px; stroke: var(--color-accent); stroke-width: 1.5; fill: none; }

/* 组件：表格 */
.table-wrapper { overflow-x: auto; margin: 1.5rem 0; border: 1px solid var(--border-subtle); border-radius: var(--radius-md); }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; background: var(--color-surface); }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--border-subtle); text-align: left; }
th { background: #f9fafb; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }

/* 组件：FAQ */
details { margin-bottom: 12px; border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); overflow: hidden; background: var(--color-surface); }
summary { padding: 16px; cursor: pointer; font-weight: 500; background: #fafbfc; list-style: none; display: flex; align-items: center; gap: 10px; transition: background 0.2s; }
summary::-webkit-details-marker { display: none; }
summary::before { content: "+"; font-weight: 700; margin-right: 6px; color: var(--color-accent); transition: transform 0.2s; }
details[open] summary::before { content: "−"; }
details[open] summary { border-bottom: 1px solid var(--border-subtle); }
details > div { padding: 16px; color: var(--color-text-secondary); line-height: 1.6; }

/* 页头 / 页脚 */
header { position: sticky; top: 0; z-index: 100; background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(0,0,0,0.06); height: var(--header-height); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 100%; }
.brand { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 1.1rem; color: var(--color-text); }
.brand img { height: 32px; width: auto; }
nav ul { display: flex; gap: 24px; }
nav a { padding: 8px 0; position: relative; font-weight: 500; font-size: 0.95rem; }
nav a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--color-accent); transition: width 0.2s; }
nav a:hover::after, nav a[aria-current="page"]::after { width: 100%; }
nav a[aria-current="page"] { color: var(--color-accent); }

footer { background: #181a21; color: #b0b6c4; padding: 52px 0 24px; margin-top: 72px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 32px; margin-bottom: 32px; }
.footer h4 { color: #fff; margin-bottom: 16px; font-size: 1rem; }
.footer a { display: block; padding: 5px 0; opacity: 0.85; font-size: 0.9rem; }
.footer a:hover { opacity: 1; color: #fff; }
.copyright { text-align: center; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 24px; font-size: 0.85rem; opacity: 0.7; }

/* 区块通用样式 */
.section-padding { padding: 64px 0; }
.section-header { margin-bottom: 32px; }
.section-header p { margin-top: 8px; }
.hero-section { background: var(--gradient-hero); padding: 80px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; }
.hero-content .mono { background: rgba(224, 96, 64, 0.1); padding: 4px 10px; border-radius: 6px; color: var(--color-accent); font-size: 0.85rem; display: inline-block; margin-bottom: 12px; }
.hero-actions { display: flex; gap: 16px; margin-top: 24px; flex-wrap: wrap; }
.mockup-frame { background: #1e2128; border-radius: 12px; padding: 16px; box-shadow: 0 20px 40px rgba(0,0,0,0.15); position: relative; }
.mockup-header { height: 32px; background: #2b2f38; border-radius: 6px; margin-bottom: 12px; display: flex; align-items: center; padding: 0 12px; gap: 6px; }
.mockup-dot { width: 8px; height: 8px; border-radius: 50%; }
.mockup-body { aspect-ratio: 16/10; background: #f4f6f9; border-radius: 6px; overflow: hidden; position: relative; }
.mockup-sidebar { width: 28%; height: 100%; background: #e9ecf2; border-right: 1px solid #dcdfe6; float: left; }
.mockup-chat { width: 70%; height: 100%; background: #fff; float: right; padding: 24px; }
.mockup-bubble { background: #f0f2f5; padding: 10px 14px; border-radius: 12px; margin-bottom: 10px; max-width: 80%; }
.mockup-bubble.right { background: #d9fdd3; margin-left: auto; }

/* SVG 动效系统 */
.svg-container { width: 100%; max-width: 420px; margin: 0 auto; position: relative; }
@keyframes flow-contour {
  0% { stroke-dashoffset: 1; opacity: 0.3; }
  50% { opacity: 0.7; }
  100% { stroke-dashoffset: 0; opacity: 0.3; }
}
@keyframes pulse-soft {
  0%, 100% { transform: scale(1); opacity: 0.5; }
  50% { transform: scale(1.04); opacity: 0.9; }
}
@keyframes drift-h {
  0% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  100% { transform: translateX(-2px); }
}
.contour-path { pathLength: 1; stroke-dasharray: 1; animation: flow-contour 7s ease-in-out infinite; }
.contour-path:nth-child(2n) { animation-duration: 9s; animation-direction: reverse; }
.contour-path:nth-child(3n) { animation-duration: 11s; }
.pulse-ring { animation: pulse-soft 6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.drift-line { animation: drift-h 8s 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; }
  .contour-path, .pulse-ring, .drift-line { animation: none; opacity: 0.8; }
}

/* 响应式适配 */
@media (max-width: 768px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .hero-actions { justify-content: center; }
  nav ul { display: none; }
  .mockup-frame { transform: scale(0.9); }
  h1 { font-size: 2.2rem; }
  .section-padding { padding: 40px 0; }
}
