/* ==================================================================
 * 飞牛云客服企业级 · 官方网站样式
 * ------------------------------------------------------------------
 * 设计令牌与总后台（后台前端/src/styles/global.css）保持一致：
 * 主色、圆角、阴影、字体栈、明暗主题全部对齐，两处观感统一。
 * 依赖：无。纯手写 CSS，不引入任何外部框架 / CDN。
 * ================================================================== */

/* ---------------- 设计令牌（明色） ---------------- */
:root {
  color-scheme: light;

  --primary-color: #165dff;
  --accent: #165dff;
  --accent-hover: #3b7bff;
  --accent-dark: #0e42d2;
  --accent-light: rgba(22, 93, 255, 0.07);
  --accent-lighter: rgba(22, 93, 255, 0.04);

  --success: #00b42a;
  --warning: #ff7d00;
  --danger: #f53f3f;

  --chart-2: #10b981;
  --chart-3: #8b5cf6;

  --text-1: #1a1d23;
  --text-2: #3a4250;
  --text-3: #64748b;
  --text-4: #94a3b8;

  --bg-page: #f6f8fb;
  --bg-card: #ffffff;
  --bg-elevated: #ffffff;
  --bg-hover: #f1f4f9;
  --bg-section: #f8f9fc;
  --bg-code: #0f1420;

  --border-color: #e2e6ef;
  --border-light: #f0f2f7;

  --shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.05), 0 1px 2px rgba(15, 23, 42, 0.03);
  --shadow-md: 0 6px 16px rgba(15, 23, 42, 0.06), 0 2px 4px rgba(15, 23, 42, 0.04);
  --shadow-lg: 0 12px 28px rgba(15, 23, 42, 0.08), 0 4px 8px rgba(15, 23, 42, 0.04);
  --shadow-xl: 0 20px 48px rgba(15, 23, 42, 0.10), 0 8px 16px rgba(15, 23, 42, 0.06);
  --shadow-card-hover: 0 8px 24px rgba(22, 93, 255, 0.10), 0 2px 6px rgba(15, 23, 42, 0.05);

  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 20px;
  --radius-2xl: 26px;
  --radius-full: 9999px;

  --font-sans:
    -apple-system, BlinkMacSystemFont,
    'PingFang SC', 'Hiragino Sans GB',
    'Microsoft YaHei UI', 'Microsoft YaHei',
    'Segoe UI', 'Noto Sans SC', 'Noto Sans',
    'Helvetica Neue', Helvetica, Arial, sans-serif;
  --font-mono:
    'SF Mono', 'Monaco', 'Cascadia Code', 'Menlo', 'Consolas',
    'Noto Sans Mono', 'Liberation Mono', ui-monospace, monospace;

  --nav-h: 64px;
  --max-w: 1200px;

  /* 网格底纹 / 光晕 */
  --grid-line: rgba(15, 23, 42, 0.035);
  --hero-glow-1: rgba(22, 93, 255, 0.16);
  --hero-glow-2: rgba(124, 58, 237, 0.13);
  --mock-border: #e6eaf2;
  --mock-bg: #ffffff;
  --mock-bg-soft: #f7f9fc;
}

/* ---------------- 设计令牌（暗色） ---------------- */
[data-theme='dark'] {
  color-scheme: dark;

  --text-1: #e6e9ef;
  --text-2: #c2c8d6;
  --text-3: #8b93a7;
  --text-4: #5f6678;

  --bg-page: #0e1117;
  --bg-card: #161a22;
  --bg-elevated: #1b1f29;
  --bg-hover: #1f2531;
  --bg-section: #12151c;
  --bg-code: #0b0f18;

  --border-color: #2a2f3a;
  --border-light: #1d212b;

  --accent-light: rgba(22, 93, 255, 0.16);
  --accent-lighter: rgba(22, 93, 255, 0.08);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.45);
  --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 12px 28px rgba(0, 0, 0, 0.55);
  --shadow-xl: 0 20px 48px rgba(0, 0, 0, 0.6);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5);

  --chart-2: #34d399;
  --chart-3: #a78bfa;

  --grid-line: rgba(255, 255, 255, 0.035);
  --hero-glow-1: rgba(22, 93, 255, 0.28);
  --hero-glow-2: rgba(124, 58, 237, 0.22);
  --mock-border: #262c38;
  --mock-bg: #171b24;
  --mock-bg-soft: #1d222c;
}

/* ---------------- 基础 ---------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--text-1);
  background: var(--bg-page);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.25; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
img { max-width: 100%; display: block; }
button { font: inherit; color: inherit; }
code { font-family: var(--font-mono); font-size: 0.9em; }
pre { margin: 0; }

:focus-visible {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

.svg-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* 线性图标统一描边 */
.ico {
  width: 1.15em;
  height: 1.15em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 820px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn .ico { transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1); }
.btn-lg { height: 48px; padding: 0 24px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--primary-color) 55%, var(--accent-dark) 100%);
  box-shadow: 0 4px 14px rgba(22, 93, 255, 0.28);
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(22, 93, 255, 0.34);
}
.btn-primary:hover .ico { transform: translateX(3px); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  color: var(--text-1);
  background: var(--bg-card);
  border-color: var(--border-color);
  box-shadow: var(--shadow-xs);
}
.btn-ghost:hover {
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--primary-color) 40%, var(--border-color));
  box-shadow: var(--shadow-sm);
}

.btn-light { color: var(--accent-dark); background: #fff; }
.btn-light:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18); }

.btn-outline-light { color: #fff; background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.5); }
.btn-outline-light:hover { background: rgba(255, 255, 255, 0.2); }

.icon-btn {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s ease;
}
.icon-btn:hover { color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color)); }
.icon-btn .ico { width: 18px; height: 18px; }
.icon-btn .ico-moon { display: none; }
[data-theme='dark'] .icon-btn .ico-sun { display: none; }
[data-theme='dark'] .icon-btn .ico-moon { display: block; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  height: var(--nav-h);
  background: transparent;
  transition: background 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
  border-bottom: 1px solid transparent;
}
.nav.is-stuck {
  background: color-mix(in srgb, var(--bg-page) 82%, transparent);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom-color: var(--border-light);
  box-shadow: var(--shadow-sm);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand { display: inline-flex; align-items: center; gap: 10px; flex: none; }
.brand-logo {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  object-fit: cover;
  box-shadow: 0 2px 6px rgba(22, 93, 255, 0.22);
}
.brand-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.brand-badge {
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 6px;
  color: var(--primary-color);
  background: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--primary-color) 22%, transparent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
.nav-link {
  position: relative;
  padding: 8px 14px;
  border-radius: var(--radius-md);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-2);
  transition: color 0.18s ease, background 0.18s ease;
}
.nav-link:hover { color: var(--text-1); background: var(--bg-hover); }
.nav-link.is-current { color: var(--primary-color); background: var(--accent-light); }
.nav-links-foot { display: none; }

.nav-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.nav-cta { height: 38px; }
.nav-burger { display: none; }
.nav-burger .ico-close { display: none; }

/* ---------------- Hero ---------------- */
.hero { position: relative; padding: 72px 0 88px; overflow: hidden; }
.hero-bg {
  position: absolute;
  inset: -20% -10% auto;
  height: 780px;
  pointer-events: none;
  background:
    radial-gradient(680px 380px at 18% 22%, var(--hero-glow-1), transparent 70%),
    radial-gradient(560px 340px at 82% 12%, var(--hero-glow-2), transparent 72%);
}
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(72% 62% at 50% 30%, #000 0%, transparent 100%);
  -webkit-mask-image: radial-gradient(72% 62% at 50% 30%, #000 0%, transparent 100%);
}
.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr);
  gap: 56px;
  align-items: center;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}
.pill-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(0, 180, 42, 0.16);
}

.hero-title {
  margin: 22px 0 0;
  font-size: clamp(34px, 4.1vw, 52px);
  line-height: 1.16;
  letter-spacing: -0.03em;
}
.grad-text {
  background: linear-gradient(120deg, var(--accent-hover) 0%, var(--primary-color) 40%, #7c3aed 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero-desc {
  margin-top: 20px;
  max-width: 540px;
  font-size: 17px;
  color: var(--text-3);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.hero-points {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 26px;
  font-size: 14px;
  color: var(--text-3);
}
.hero-points li { display: inline-flex; align-items: center; gap: 6px; }
.hero-points .ico { width: 16px; height: 16px; color: var(--success); stroke-width: 2.2; }

/* Hero 右侧：产品界面示意 */
.hero-visual { position: relative; }
.mock {
  border-radius: var(--radius-xl);
  border: 1px solid var(--mock-border);
  background: var(--mock-bg);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.mock-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 38px;
  padding: 0 14px;
  background: var(--mock-bg-soft);
  border-bottom: 1px solid var(--mock-border);
}
.mock-dots, .code-dots { display: inline-flex; gap: 6px; }
.mock-dots i, .code-dots i {
  width: 9px; height: 9px; border-radius: 50%;
  background: #ff5f57;
}
.mock-dots i:nth-child(2), .code-dots i:nth-child(2) { background: #febc2e; }
.mock-dots i:nth-child(3), .code-dots i:nth-child(3) { background: #28c840; }
.mock-url {
  font-size: 11.5px;
  color: var(--text-4);
  font-family: var(--font-mono);
}

.mock-body { display: grid; grid-template-columns: 258px minmax(0, 1fr); min-height: 356px; }
.mock-side { border-right: 1px solid var(--mock-border); background: var(--mock-bg-soft); }
.mock-side-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--mock-border);
}
.mock-avatar {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: 9px;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--accent-dark));
}
.mock-side-meta b { display: block; font-size: 13px; }
.mock-side-meta em { font-style: normal; font-size: 11.5px; color: var(--text-4); }

.mock-list { padding: 8px; display: grid; gap: 4px; }
.mock-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-md);
  position: relative;
}
.mock-item.is-active { background: var(--mock-bg); box-shadow: var(--shadow-xs); }
.mock-ava {
  width: 30px; height: 30px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 12px; font-weight: 600;
  color: var(--primary-color);
  background: linear-gradient(135deg, #e8f3ff 0%, #d4e8ff 100%);
}
[data-theme='dark'] .mock-ava { background: linear-gradient(135deg, #1c2740, #243251); color: #85a8ff; }
.mock-ava-2 { color: var(--chart-2); background: color-mix(in srgb, var(--chart-2) 14%, #fff); }
[data-theme='dark'] .mock-ava-2 { background: color-mix(in srgb, var(--chart-2) 22%, #12151c); color: var(--chart-2); }
.mock-ava-3 { color: var(--chart-3); background: color-mix(in srgb, var(--chart-3) 14%, #fff); }
[data-theme='dark'] .mock-ava-3 { background: color-mix(in srgb, var(--chart-3) 22%, #12151c); color: var(--chart-3); }

.mock-item-main { min-width: 0; flex: 1; }
.mock-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.mock-item-top b {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-item-top time { font-size: 10.5px; color: var(--text-4); flex: none; }
.mock-item-main p {
  font-size: 12px; color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.mock-unread {
  position: absolute;
  right: 8px; bottom: 10px;
  min-width: 17px; height: 17px;
  padding: 0 5px;
  display: grid; place-items: center;
  border-radius: var(--radius-full);
  font-size: 10.5px; font-weight: 600; color: #fff;
  background: var(--danger);
}

.mock-chat { display: flex; flex-direction: column; min-width: 0; }
.mock-chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--mock-border);
}
.mock-chat-head b { display: block; font-size: 13px; }
.mock-chat-head em {
  font-style: normal; font-size: 11.5px; color: var(--text-4);
  display: inline-flex; align-items: center; gap: 5px;
}
.online-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 0 2.5px rgba(0, 180, 42, 0.16);
}
.mock-tag {
  font-size: 11px; font-weight: 600;
  padding: 3px 8px;
  border-radius: var(--radius-full);
  color: var(--chart-2);
  background: color-mix(in srgb, var(--chart-2) 12%, transparent);
}

.mock-msgs { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 78%; padding: 9px 13px; font-size: 12.5px; line-height: 1.55; border-radius: 14px; }
.msg-them { align-self: flex-start; color: var(--text-1); background: var(--mock-bg-soft); border: 1px solid var(--mock-border); border-bottom-left-radius: 4px; }
.msg-me { align-self: flex-end; color: #fff; background: linear-gradient(135deg, var(--accent-hover), var(--primary-color)); border-bottom-right-radius: 4px; }
.msg-typing { display: inline-flex; align-items: center; gap: 4px; padding: 12px 14px; }
.msg-typing i {
  width: 5px; height: 5px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  animation: typing 1.2s infinite ease-in-out;
}
.msg-typing i:nth-child(2) { animation-delay: 0.15s; }
.msg-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing {
  0%, 60%, 100% { opacity: 0.4; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-3px); }
}

.mock-input {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 0 16px 16px;
  padding: 9px 9px 9px 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--mock-border);
  background: var(--mock-bg-soft);
  font-size: 12.5px;
  color: var(--text-4);
}
.mock-send {
  width: 26px; height: 26px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-color));
}
.mock-send .ico { width: 14px; height: 14px; stroke-width: 2; }

/* 浮动小卡片 */
.float-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
  animation: floaty 5s ease-in-out infinite;
}
.float-card b { display: block; font-size: 11.5px; font-weight: 500; color: var(--text-3); }
.float-card strong { font-size: 17px; letter-spacing: -0.02em; }
.float-ico {
  width: 32px; height: 32px; flex: none;
  display: grid; place-items: center;
  border-radius: 10px;
  color: var(--primary-color);
  background: var(--accent-light);
}
.float-ico-green { color: var(--chart-2); background: color-mix(in srgb, var(--chart-2) 12%, transparent); }
.float-card-a { left: -28px; bottom: 62px; }
/* 右上角那张浮在窗口轮廓之外，避免压住浏览器标题栏 */
.float-card-b { right: -22px; top: -16px; animation-delay: 1.2s; }
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* ---------------- 数据条 ---------------- */
.strip { padding: 8px 0 0; }
.strip-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  padding: 26px 28px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}
.strip-item {
  text-align: center;
  padding: 6px 12px;
  border-right: 1px solid var(--border-light);
}
.strip-item:last-child { border-right: none; }
.strip-item strong {
  display: block;
  font-size: clamp(26px, 3vw, 34px);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-1);
  font-variant-numeric: tabular-nums;
}
.strip-unit { font-size: 0.5em; font-weight: 600; margin-left: 2px; color: var(--text-3); }
.strip-item span { font-size: 13.5px; color: var(--text-3); }

/* ---------------- 通用区块 ---------------- */
.section { padding: 96px 0; }
.section-alt {
  background: var(--bg-section);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}
.section-head { max-width: 720px; margin: 0 auto 52px; text-align: center; }
.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color);
  margin-bottom: 14px;
}
.section-head h2 { font-size: clamp(26px, 2.8vw, 36px); }
.section-head p { margin-top: 14px; font-size: 16.5px; color: var(--text-3); }

/* ---------------- 功能特性 ---------------- */
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.card {
  padding: 26px 24px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.25s ease, border-color 0.25s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary-color) 28%, var(--border-color));
  box-shadow: var(--shadow-card-hover);
}
.card-ico {
  width: 46px; height: 46px;
  display: grid; place-items: center;
  border-radius: var(--radius-lg);
  color: var(--primary-color);
  background: var(--accent-light);
  border: 1px solid color-mix(in srgb, var(--primary-color) 16%, transparent);
  margin-bottom: 18px;
}
.card-ico .ico { width: 23px; height: 23px; }
.card h3 { font-size: 17px; }
.card p { margin-top: 9px; font-size: 14.5px; color: var(--text-3); }

/* ---------------- 接入流程 ---------------- */
.flow {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: 40px;
  align-items: start;
}
.flow-steps { display: grid; gap: 0; }
.flow-step {
  position: relative;
  display: flex;
  gap: 18px;
  padding-bottom: 30px;
}
.flow-step:last-child { padding-bottom: 0; }
.flow-step::before {
  content: '';
  position: absolute;
  left: 17px; top: 38px; bottom: 4px;
  width: 2px;
  background: linear-gradient(var(--border-color), transparent);
}
.flow-step:last-child::before { display: none; }
.flow-num {
  width: 36px; height: 36px; flex: none;
  display: grid; place-items: center;
  border-radius: 50%;
  font-size: 15px; font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-color));
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.26);
}
.flow-step h3 { font-size: 17px; }
.flow-step p { margin-top: 7px; font-size: 14.5px; color: var(--text-3); }
.flow-step code {
  padding: 1px 6px;
  border-radius: 6px;
  background: var(--accent-light);
  color: var(--primary-color);
}

/* 代码卡片 */
.code-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-lg);
}
.code-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-section);
}
.code-title { font-size: 13px; font-weight: 600; color: var(--text-2); }
.code-copy {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.18s ease;
}
.code-copy:hover { color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color)); }
.code-copy.is-done { color: var(--success); border-color: color-mix(in srgb, var(--success) 40%, var(--border-color)); }
.code-copy .ico { width: 15px; height: 15px; }

.code-body {
  padding: 20px 18px;
  background: var(--bg-code);
  color: #d5dbe8;
  font-family: var(--font-mono);
  font-size: 12.8px;
  line-height: 1.85;
  overflow-x: auto;
  tab-size: 2;
}
.code-body code { white-space: pre; }
.code-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  padding: 14px 18px;
  border-top: 1px solid var(--border-color);
  font-size: 13px;
  color: var(--text-3);
}
.code-notes li { display: inline-flex; align-items: center; gap: 6px; }
.code-notes .ico { width: 15px; height: 15px; color: var(--success); stroke-width: 2.2; }
.code-notes code { color: var(--primary-color); }

/* 接入方式 */
.ways {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}
.way {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: transform 0.22s ease, box-shadow 0.22s ease;
}
.way:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.way-ico {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border-radius: var(--radius-md);
  color: var(--primary-color);
  background: var(--accent-light);
  margin-bottom: 6px;
}
.way-ico .ico { width: 20px; height: 20px; }
.way b { font-size: 15px; }
.way span:last-child { font-size: 13px; color: var(--text-3); }

/* ---------------- 客户案例 ---------------- */
.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.case {
  margin: 0;
  display: flex;
  flex-direction: column;
  padding: 26px 24px 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.case:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--primary-color) 24%, var(--border-color));
  box-shadow: var(--shadow-card-hover);
}
.case-quote {
  width: 26px; height: 26px;
  color: color-mix(in srgb, var(--primary-color) 26%, transparent);
  fill: currentColor;
  stroke: none;
  margin-bottom: 14px;
}
.case blockquote {
  margin: 0;
  font-size: 15px;
  line-height: 1.72;
  color: var(--text-2);
}
.case figcaption {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid var(--border-light);
}
.case-ava {
  width: 38px; height: 38px; flex: none;
  display: grid; place-items: center;
  border-radius: 11px;
  font-size: 12.5px; font-weight: 700;
  color: var(--primary-color);
  background: linear-gradient(135deg, #e8f3ff 0%, #d4e8ff 100%);
}
[data-theme='dark'] .case-ava { background: linear-gradient(135deg, #1c2740, #243251); color: #85a8ff; }
.case-ava-2 { color: var(--chart-2); background: color-mix(in srgb, var(--chart-2) 14%, #fff); }
[data-theme='dark'] .case-ava-2 { background: color-mix(in srgb, var(--chart-2) 20%, #12151c); color: var(--chart-2); }
.case-ava-3 { color: var(--chart-3); background: color-mix(in srgb, var(--chart-3) 14%, #fff); }
[data-theme='dark'] .case-ava-3 { background: color-mix(in srgb, var(--chart-3) 20%, #12151c); color: var(--chart-3); }
.case figcaption b { display: block; font-size: 14.5px; }
.case figcaption em { font-style: normal; font-size: 12.5px; color: var(--text-4); }
.case-metric {
  margin-top: auto;
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-top: 16px;
}
.case-metric strong { font-size: 16px; color: var(--primary-color); letter-spacing: -0.01em; }
.case-metric span { font-size: 12.5px; color: var(--text-4); }

/* ---------------- 价格方案 ---------------- */
.billing {
  display: flex;
  /* 用 margin 居中而不是 left:50% + translateX(-50%)：
     该元素同时带 .reveal，进场动画的 transform 会把它覆盖掉导致整块右移溢出 */
  width: fit-content;
  margin: 0 auto 40px;
  gap: 4px;
  padding: 4px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xs);
}
.billing-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: all 0.2s ease;
}
.billing-btn:hover { color: var(--text-1); }
.billing-btn.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-color));
  box-shadow: 0 3px 10px rgba(22, 93, 255, 0.26);
}
.billing-save {
  font-size: 11px; font-weight: 600;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  color: var(--success);
  background: color-mix(in srgb, var(--success) 13%, transparent);
}
.billing-btn.is-active .billing-save { color: #fff; background: rgba(255, 255, 255, 0.24); }

.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  /* 三档等高：条款数量不同时按钮与底边仍然齐平 */
  align-items: stretch;
}
.plan {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 30px 26px 26px;
  border-radius: var(--radius-xl);
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.plan-featured {
  border-color: color-mix(in srgb, var(--primary-color) 45%, var(--border-color));
  box-shadow: 0 14px 40px rgba(22, 93, 255, 0.16);
}
.plan-flag {
  position: absolute;
  top: -12px; left: 26px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--accent-hover), var(--primary-color));
  box-shadow: 0 4px 12px rgba(22, 93, 255, 0.3);
}
.plan h3 { font-size: 19px; }
.plan-desc { margin-top: 6px; font-size: 13.5px; color: var(--text-3); }
.plan-price {
  display: flex;
  align-items: baseline;
  gap: 2px;
  margin: 20px 0 0;
}
.plan-cur { font-size: 19px; font-weight: 600; color: var(--text-2); }
.plan-amount {
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.plan-unit { font-size: 14px; color: var(--text-3); margin-left: 4px; }
.plan-note { margin-top: 8px; font-size: 12.5px; color: var(--text-4); min-height: 20px; }
.plan .btn { margin-top: 20px; }
.plan-list {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: grid;
  gap: 11px;
}
.plan-list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 14px;
  color: var(--text-2);
}
.plan-list .ico {
  width: 16px; height: 16px;
  margin-top: 3px;
  color: var(--success);
  stroke-width: 2.2;
}
.pricing-foot {
  margin-top: 34px;
  text-align: center;
  font-size: 14.5px;
  color: var(--text-3);
}
.pricing-foot a { color: var(--primary-color); font-weight: 600; }
.pricing-foot a:hover { text-decoration: underline; }

/* ---------------- 底部 CTA ---------------- */
.cta-wrap { padding: 20px 0 96px; }
.cta {
  position: relative;
  overflow: hidden;
  padding: 62px 40px;
  border-radius: var(--radius-2xl);
  text-align: center;
  color: #fff;
  background: linear-gradient(135deg, #1a4fd8 0%, var(--primary-color) 46%, #6d3aef 100%);
  box-shadow: 0 24px 60px rgba(22, 93, 255, 0.28);
}
.cta-glow {
  position: absolute;
  inset: -40% -10% auto;
  height: 400px;
  pointer-events: none;
  background: radial-gradient(520px 260px at 30% 40%, rgba(255, 255, 255, 0.22), transparent 70%),
              radial-gradient(480px 240px at 76% 30%, rgba(255, 255, 255, 0.14), transparent 72%);
}
/* 内容层浮在光晕之上。注意：这里不能用 `.cta > *` 通配 ——
   它的特异性 (0,2,0) 会压掉 `.cta-glow` 的 position:absolute，
   让光晕回到文档流并撑出 400px 空白（标题上方出现巨大留白）。 */
.cta h2,
.cta p,
.cta-actions,
.cta-points { position: relative; z-index: 1; }
.cta h2 { font-size: clamp(26px, 3vw, 38px); }
.cta p {
  margin: 16px auto 0;
  max-width: 620px;
  font-size: 16.5px;
  color: rgba(255, 255, 255, 0.86);
}
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}
.cta-points {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  margin-top: 26px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.78);
}

/* ---------------- 页脚 ---------------- */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 56px 0 26px;
}
.footer-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr));
  gap: 36px;
}
.footer-brand p {
  margin-top: 16px;
  max-width: 320px;
  font-size: 14px;
  color: var(--text-3);
}
.footer-col { display: flex; flex-direction: column; gap: 11px; }
.footer-col h4 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}
.footer-col a, .footer-col span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-3);
  transition: color 0.18s ease;
}
.footer-col a:hover { color: var(--primary-color); }
.footer-col .ico { width: 16px; height: 16px; color: var(--text-4); }
.footer-col a:hover .ico { color: var(--primary-color); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 46px;
  padding-top: 22px;
  border-top: 1px solid var(--border-light);
  font-size: 13px;
  color: var(--text-4);
}
.footer-meta { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.footer-meta a:hover { color: var(--primary-color); }

/* ---------------- 回到顶部 ---------------- */
.to-top {
  position: fixed;
  right: 26px;
  bottom: 26px;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  color: var(--text-2);
  box-shadow: var(--shadow-md);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.25s ease;
  z-index: 50;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { color: var(--primary-color); border-color: color-mix(in srgb, var(--primary-color) 35%, var(--border-color)); }
.to-top .ico { transform: rotate(-90deg); }

/* ---------------- 滚动进场动画 ---------------- */
html.js .reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}
html.js .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .float-card, .msg-typing i { animation: none; }
}

/* ==================================================================
 * 响应式
 * ================================================================== */
@media (max-width: 1080px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-desc { max-width: 620px; }
  .hero-visual { max-width: 640px; }
  .float-card-a { left: -12px; }
  .float-card-b { right: -8px; }
  .flow { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
}

@media (max-width: 900px) {
  .section { padding: 76px 0; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases .case:last-child { grid-column: span 2; }
  .ways { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .plans { grid-template-columns: 1fr; max-width: 520px; margin: 0 auto; }
  .plan-featured { order: -1; }
}

@media (max-width: 760px) {
  :root { --nav-h: 58px; }
  .container { padding: 0 18px; }

  /* 移动端导航条：品牌居左，操作按钮贴右（菜单面板 fixed 后由 actions 自己撑 auto） */
  .nav-actions { margin-left: auto; gap: 8px; }
  .nav-actions .icon-btn {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: color-mix(in srgb, var(--bg-card) 88%, transparent);
    box-shadow: var(--shadow-xs);
  }
  .nav-actions .icon-btn:active { transform: scale(0.92); }

  /* 移动端菜单：悬浮圆角面板（不再通栏贴边） */
  .nav-links {
    position: fixed;
    top: calc(var(--nav-h) + 10px);
    left: 12px;
    right: 12px;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 10px 12px 16px;
    margin: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    transform: translateY(-10px);
    transform-origin: top right;
    opacity: 0;
    visibility: hidden;
    transition: all 0.24s ease;
  }
  .nav-links.is-open { transform: none; opacity: 1; visibility: visible; }
  .nav-link { padding: 12px 12px; font-size: 16px; border-radius: 10px; }
  .nav-links-foot { display: block; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--border-light); }
  .nav-cta { display: none; }
  .nav-burger { display: inline-flex; }
  .nav-burger .ico { width: 20px; height: 20px; }
  .nav-burger[aria-expanded='true'] .ico-menu { display: none; }
  .nav-burger[aria-expanded='true'] .ico-close { display: block; }

  .hero { padding: 44px 0 64px; }
  .hero-title { font-size: clamp(30px, 8vw, 40px); }
  .hero-desc { font-size: 15.5px; }
  .hero-actions .btn { flex: 1 1 auto; }

  .strip-grid { grid-template-columns: repeat(2, 1fr); gap: 18px 0; padding: 22px 14px; }
  .strip-item { border-right: none; }
  .strip-item:nth-child(odd) { border-right: 1px solid var(--border-light); }

  .mock-body { grid-template-columns: 1fr; min-height: 0; }
  .mock-side { border-right: none; border-bottom: 1px solid var(--mock-border); }
  .mock-list { grid-template-columns: 1fr; }
  .mock-item:not(.is-active) { display: none; }
  .mock-msgs { padding: 14px; }
  .float-card { display: none; }

  .cards, .cases, .ways { grid-template-columns: 1fr; }
  .cases .case:last-child { grid-column: auto; }
  .cases { gap: 16px; }

  .code-body { font-size: 12px; padding: 16px 14px; }

  .billing { width: 100%; max-width: 380px; }
  .billing-btn { flex: 1; justify-content: center; padding: 0 10px; }

  .cta { padding: 44px 22px; border-radius: var(--radius-xl); }
  .cta-actions .btn { flex: 1 1 auto; }

  .footer-inner { grid-template-columns: 1fr; gap: 30px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .footer-meta { gap: 14px; }
  .to-top { right: 16px; bottom: 16px; }
}

@media (max-width: 420px) {
  .brand-name { font-size: 15.5px; }
  .brand-badge { display: none; }
  .strip-item strong { font-size: 24px; }
  .code-head { flex-wrap: wrap; }
  .code-title { font-size: 12px; }
}
