/* ============ Design Tokens ============ */
:root {
  --bg: #0b0c10;
  --bg-elev: #111318;
  --bg-card: rgba(255, 255, 255, 0.03);
  --fg: #f4f5f7;
  --fg-dim: #9aa0ab;
  --fg-faint: #6b7280;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #8b9dff;
  --accent-2: #6ee7d8;
  --grad: linear-gradient(100deg, #a5b4ff 0%, #8b9dff 45%, #6ee7d8 100%);
  --hover-bg: rgba(255, 255, 255, 0.06);
  --radius: 16px;
  --nav-h: 64px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 16px); }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--fg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
code { font-family: var(--mono); font-size: 0.9em; background: rgba(255,255,255,0.07); padding: 0.15em 0.4em; border-radius: 6px; }
::selection { background: rgba(139, 157, 255, 0.35); }

/* ============ 背景装饰 ============ */
.bg-grid {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}
.bg-glow {
  position: fixed; z-index: -1; pointer-events: none;
  top: -30vh; left: 50%; transform: translateX(-50%);
  width: 110vw; height: 80vh;
  background:
    radial-gradient(ellipse 45% 60% at 38% 40%, rgba(139,157,255,0.14), transparent 65%),
    radial-gradient(ellipse 40% 55% at 66% 35%, rgba(110,231,216,0.09), transparent 65%);
  filter: blur(20px);
}

/* ============ 导航 ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 12, 16, 0.72);
  backdrop-filter: blur(18px) saturate(1.6);
  -webkit-backdrop-filter: blur(18px) saturate(1.6);
  border-bottom-color: var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; height: 100%;
  padding: 0 24px;
  display: flex; align-items: center; gap: 32px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.nav-links { display: flex; gap: 4px; flex: 1; }
.nav-links a {
  padding: 7px 13px; border-radius: 9px;
  color: var(--fg-dim); font-size: 14px; font-weight: 500;
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--fg); background: rgba(255,255,255,0.06); }
.nav-actions { display: flex; gap: 10px; align-items: center; }
.theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent;
  color: var(--fg-dim); cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s, transform 0.15s;
}
.theme-toggle:hover { color: var(--fg); background: var(--hover-bg); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle .icon-moon { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ============ 按钮 ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 14px; font-weight: 600; letter-spacing: -0.005em;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.25s ease, background 0.2s, border-color 0.2s, opacity 0.2s;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--fg); color: var(--bg);
  box-shadow: 0 0 0 0 rgba(139,157,255,0);
}
.btn-primary:hover { box-shadow: 0 4px 28px rgba(139,157,255,0.35); transform: translateY(-1px); }
.btn-outline { border-color: var(--line); color: var(--fg); background: rgba(255,255,255,0.03); }
.btn-outline:hover { border-color: rgba(255,255,255,0.28); background: rgba(255,255,255,0.07); transform: translateY(-1px); }
.btn-ghost { color: var(--fg-dim); padding: 8px 12px; }
.btn-ghost:hover { color: var(--fg); }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 14px; flex-direction: row; }
.btn-lg small { font-weight: 400; font-size: 12px; opacity: 0.55; margin-left: 2px; }
.btn.recommended { position: relative; }

/* ============ Hero ============ */
.hero { padding: calc(var(--nav-h) + 76px) 24px 40px; text-align: center; }
.hero-inner { max-width: 860px; margin: 0 auto; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
  font-size: 13px; color: var(--fg-dim);
  transition: border-color 0.2s, color 0.2s;
}
.hero-badge:hover { border-color: rgba(139,157,255,0.5); color: var(--fg); }
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 10px var(--accent-2);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: 0.4; } }

.hero h1 {
  margin: 26px 0 20px;
  font-size: clamp(34px, 5.2vw, 58px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.22;
}
/* 巧思一："AI Agent" 是一颗可以按下去的键帽 */
.key-word {
  display: inline-block;
  padding: 0.04em 0.26em 0.02em;
  margin: 0 0.08em;
  border: 1px solid var(--line);
  border-bottom: 5px solid var(--line);
  border-radius: 0.2em;
  background: var(--bg-elev);
  cursor: default;
  transition: transform 0.12s ease, border-bottom-width 0.12s ease, margin-bottom 0.12s ease;
}
.key-word:hover {
  transform: translateY(3px);
  border-bottom-width: 2px;
  margin-bottom: 3px;
}
/* 巧思二："桌面" 下的手绘划线，载入后自动画出 */
.mark-word { position: relative; display: inline-block; }
.mark-word svg {
  position: absolute; left: -2%; bottom: -0.16em;
  width: 104%; height: 0.24em; overflow: visible;
}
.mark-word path {
  fill: none; stroke: var(--accent); stroke-width: 6;
  stroke-linecap: round;
  stroke-dasharray: 180; stroke-dashoffset: 180;
  animation: draw-line 0.8s cubic-bezier(0.65, 0, 0.35, 1) forwards 1.15s;
  opacity: 0.9;
}
@keyframes draw-line { to { stroke-dashoffset: 0; } }
.grad {
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.hero-sub { font-size: clamp(16px, 2vw, 19px); color: var(--fg-dim); max-width: 640px; margin: 0 auto; }
.hero-sub strong { color: var(--fg); font-weight: 600; }
.hero-cta { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; margin-top: 36px; }
.hero-note { margin-top: 18px; font-size: 13px; color: var(--fg-faint); }
.hero-note a { color: var(--fg-dim); border-bottom: 1px solid var(--line); }
.hero-note a:hover { color: var(--fg); }

/* Hero 截图 */
.hero-shot { max-width: 1360px; margin: 64px auto 0; padding: 0 24px; perspective: 1600px; }
.shot-toggle {
  display: inline-flex; gap: 4px; margin-bottom: 18px;
  padding: 4px; border-radius: 999px;
  border: 1px solid var(--line); background: rgba(255,255,255,0.04);
}
.shot-toggle button {
  border: 0; background: transparent; color: var(--fg-dim);
  font-family: inherit; font-size: 13px; font-weight: 600;
  padding: 5px 16px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.shot-toggle button.active { background: rgba(255,255,255,0.12); color: var(--fg); }
.shot-frame {
  position: relative;
  border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  background: var(--bg-elev);
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 30px 80px -20px rgba(0,0,0,0.7),
    0 0 120px -30px rgba(139,157,255,0.25);
  transform: rotateX(6deg) scale(0.985);
  transform-origin: center top;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.9s;
  will-change: transform;
}
.shot-frame.flat { transform: rotateX(0deg) scale(1); box-shadow:
    0 0 0 1px rgba(0,0,0,0.4),
    0 40px 100px -20px rgba(0,0,0,0.8),
    0 0 160px -30px rgba(139,157,255,0.35); }
/* ============ 交互式 App 演示 ============ */
.demo-app {
  --db: #101116;   /* 应用背景 */
  --dp: #16171d;   /* 面板 */
  --dt: #e8eaf0;   /* 正文 */
  --dd: #9aa0ab;   /* 次要 */
  --df: #697080;   /* 弱化 */
  --dl: rgba(255, 255, 255, 0.08);
  background: var(--db); color: var(--dt);
  font-size: 12.5px; line-height: 1.55;
  text-align: left; user-select: none;
  transition: background 0.35s, color 0.35s;
}
.demo-app.light {
  --db: #ffffff; --dp: #f4f5f7; --dt: #1c1e24;
  --dd: #525a66; --df: #8a919c; --dl: rgba(12, 18, 34, 0.1);
}
.d-titlebar {
  display: flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-bottom: 1px solid var(--dl);
  background: var(--dp);
}
.d-titlebar i { width: 11px; height: 11px; border-radius: 50%; }
.d-titlebar i:nth-child(1) { background: #ff5f57; }
.d-titlebar i:nth-child(2) { background: #febc2e; }
.d-titlebar i:nth-child(3) { background: #28c840; }
.d-titlebar span { flex: 1; text-align: center; font-size: 11.5px; color: var(--dd); font-weight: 600; }
.d-body {
  display: grid; grid-template-columns: 224px minmax(0, 1fr) 320px;
  height: clamp(480px, 42vw, 620px);
}

/* 左侧栏 */
.d-side { border-right: 1px solid var(--dl); background: var(--dp); display: flex; flex-direction: column; min-width: 0; }
.d-side-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px 8px; }
.d-side-head b { font-size: 13.5px; }
.d-new { font-size: 11px; padding: 3px 9px; border-radius: 7px; border: 1px solid var(--dl); color: var(--dd); }
.d-path {
  margin: 4px 12px; padding: 6px 10px;
  border: 1px solid var(--dl); border-radius: 8px;
  font-family: var(--mono); font-size: 11px; color: var(--dd);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d-sessions { display: flex; flex-direction: column; padding: 6px; gap: 2px; }
.d-session {
  display: flex; flex-direction: column; gap: 1px;
  padding: 7px 9px; border-radius: 8px; border: 0;
  background: transparent; color: var(--dt);
  font-family: inherit; font-size: 12px; text-align: left; cursor: pointer;
  transition: background 0.15s;
}
.d-session span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-session small { font-size: 10.5px; color: var(--df); }
.d-session:hover { background: var(--dl); }
.d-session.active { background: rgba(139, 157, 255, 0.14); }
.demo-app.light .d-session.active { background: rgba(91, 103, 232, 0.12); }
.d-exp { flex: 1; overflow: hidden; padding: 8px 12px; border-top: 1px solid var(--dl); }
.d-exp-title { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; color: var(--df); margin-bottom: 6px; }
.d-exp-row {
  font-family: var(--mono); font-size: 11px; color: var(--dd);
  padding: 3px 6px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.d-exp-file { cursor: default; }
.d-exp-row.active { color: var(--dt); background: rgba(139, 157, 255, 0.14); }
.demo-app.light .d-exp-row.active { background: rgba(91, 103, 232, 0.12); }
.d-side-foot {
  display: flex; gap: 12px; padding: 10px 14px;
  border-top: 1px solid var(--dl); font-size: 11px; color: var(--dd);
}

/* 中间对话区 */
.d-chat { display: flex; flex-direction: column; min-width: 0; }
.d-toolbar {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 16px; border-bottom: 1px solid var(--dl);
  font-size: 11.5px; color: var(--dd); white-space: nowrap; overflow: hidden;
}
.d-stats { margin-left: auto; font-family: var(--mono); font-size: 10.5px; color: var(--df); }
.d-msgs { flex: 1; overflow-y: auto; padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; }
.d-block { opacity: 0; transform: translateY(6px); transition: opacity 0.35s, transform 0.35s; max-width: 100%; }
.d-block.show { opacity: 1; transform: none; }
.d-m-user {
  align-self: flex-end;
  background: rgba(139, 157, 255, 0.16);
  border: 1px solid rgba(139, 157, 255, 0.25);
  padding: 7px 13px; border-radius: 11px; font-size: 12.5px;
}
.demo-app.light .d-m-user { background: rgba(91, 103, 232, 0.1); border-color: rgba(91, 103, 232, 0.25); }
.d-m-meta { font-size: 11px; color: var(--df); }
.d-m-model { font-size: 10.5px; color: var(--df); font-family: var(--mono); }
.d-m-agent { color: var(--dd); font-size: 12.5px; }
.d-m-agent b { color: var(--dt); }
.d-m-agent ol { margin: 6px 0 0 18px; display: flex; flex-direction: column; gap: 3px; }
.d-m-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.d-chip {
  font-family: var(--mono); font-size: 10.5px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--dl); color: var(--dd); background: var(--dp);
}
.d-m-warn {
  font-size: 11.5px; color: var(--dd);
  border-left: 3px solid #e2b93d;
  background: rgba(226, 185, 61, 0.08);
  padding: 7px 12px; border-radius: 0 8px 8px 0;
}
.d-m-cost { font-family: var(--mono); font-size: 10.5px; color: var(--df); }
.d-typing { display: inline-flex; gap: 4px; padding: 8px 4px; }
.d-typing i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--dd);
  animation: d-bounce 1.2s ease-in-out infinite;
}
.d-typing i:nth-child(2) { animation-delay: 0.15s; }
.d-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes d-bounce { 30% { transform: translateY(-4px); opacity: 0.5; } }
.d-input {
  display: flex; gap: 8px; margin: 10px 14px 6px;
  border: 1px solid var(--dl); border-radius: 10px;
  background: var(--dp); padding: 4px 4px 4px 12px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.d-input:focus-within { border-color: rgba(139, 157, 255, 0.5); box-shadow: 0 0 0 3px rgba(139, 157, 255, 0.12); }
.d-input input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: 0;
  color: var(--dt); font-family: inherit; font-size: 12.5px;
  user-select: text; -webkit-user-select: text;
}
.d-input input::placeholder { color: var(--df); }
.d-input button {
  border: 0; border-radius: 8px; padding: 6px 14px;
  background: var(--dt); color: var(--db);
  font-family: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
}
.d-input button:hover { opacity: 0.85; }
.d-input button:active { transform: scale(0.95); }
.d-status {
  display: flex; justify-content: space-between;
  padding: 4px 16px 10px; font-size: 10.5px; color: var(--df);
}

/* 右侧文档面板 */
.d-right { border-left: 1px solid var(--dl); display: flex; flex-direction: column; min-width: 0; background: var(--db); }
.d-right.pulse { animation: d-pulse 1.2s ease; }
@keyframes d-pulse { 20% { box-shadow: inset 0 0 0 2px rgba(139, 157, 255, 0.55); } }
.d-right-tab {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 8px 12px; border-bottom: 1px solid var(--dl);
}
.d-file { font-family: var(--mono); font-size: 11px; color: var(--dd); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.d-viewtoggle { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: var(--dp); }
.d-viewtoggle button {
  border: 0; background: transparent; color: var(--dd);
  font-family: inherit; font-size: 10.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 5px; cursor: pointer;
}
.d-viewtoggle button.active { background: var(--dl); color: var(--dt); }
.d-doc { flex: 1; overflow-y: auto; padding: 16px 18px; }
.d-doc h4 { font-size: 15px; margin-bottom: 10px; }
.d-doc h5 { font-size: 12.5px; margin: 14px 0 6px; }
.d-doc p, .d-doc li { font-size: 11.5px; color: var(--dd); }
.d-doc b { color: var(--dt); }
.d-doc blockquote {
  border-left: 3px solid var(--dl); padding: 6px 10px;
  font-size: 11px; color: var(--dd); background: var(--dp); border-radius: 0 6px 6px 0;
}
.d-doc table { width: 100%; border-collapse: collapse; margin: 6px 0; font-size: 11px; }
.d-doc th, .d-doc td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--dl); color: var(--dd); }
.d-doc th { color: var(--dt); font-size: 10.5px; }
.d-doc code { font-size: 10.5px; background: var(--dp); border: 1px solid var(--dl); }
.d-doc ol { margin-left: 16px; display: flex; flex-direction: column; gap: 3px; }
.d-doc-src {
  flex: 1; overflow: auto; margin: 0; padding: 16px 18px;
  font-family: var(--mono); font-size: 11px; line-height: 1.7; color: var(--dd);
  white-space: pre-wrap;
}

@media (max-width: 1100px) { .d-body { grid-template-columns: 224px 1fr; } .d-right { display: none; } }
@media (max-width: 720px) { .d-body { grid-template-columns: 1fr; height: 480px; } .d-side { display: none; } }

/* ============ Section 通用 ============ */
.section { padding: 110px 24px 0; max-width: 1120px; margin: 0 auto; }
.section-head { text-align: center; max-width: 680px; margin: 0 auto 56px; }
.eyebrow {
  font-size: 13px; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 14px;
}
.section-head h2, .privacy-text h2, .cta-card h2 {
  font-size: clamp(28px, 4.2vw, 44px);
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.2;
}
.section-sub { margin-top: 16px; color: var(--fg-dim); font-size: 16px; }

/* ============ Bento 卡片 ============ */
.bento {
  display: grid; gap: 16px;
  grid-template-columns: repeat(6, 1fr);
}
.card {
  position: relative;
  grid-column: span 2;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  padding: 26px;
  display: flex; flex-direction: column; gap: 18px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}
.card-wide { grid-column: span 4; }
/* 鼠标跟随辉光（Linear 风格） */
.card::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: inherit; opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(139,157,255,0.12), transparent 55%);
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before { opacity: 1; }
.card:hover { border-color: rgba(255,255,255,0.18); }
.card-body { position: relative; z-index: 1; }
.card h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { font-size: 14px; color: var(--fg-dim); }
.card-visual {
  position: relative; z-index: 1; margin-top: auto;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(0,0,0,0.25);
  padding: 16px; min-height: 96px;
  display: flex; flex-direction: column; justify-content: center; gap: 8px;
}

/* 卡片内小视觉 */
.chat-visual { font-size: 13px; }
.chat-line { padding: 7px 12px; border-radius: 10px; width: fit-content; max-width: 90%; }
.chat-line.user { background: rgba(139,157,255,0.16); align-self: flex-end; color: var(--fg); }
.chat-line.agent { background: rgba(255,255,255,0.06); color: var(--fg-dim); }
.chat-line.tool { display: flex; gap: 6px; flex-wrap: wrap; padding: 0; background: none; }
.tool-chip {
  font-family: var(--mono); font-size: 11px;
  padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg-faint);
  background: rgba(255,255,255,0.03);
}
.chat-meta { font-family: var(--mono); font-size: 11px; color: var(--fg-faint); margin-top: 2px; }

.fork-visual svg { width: 100%; max-width: 220px; margin: 0 auto; }
.pills-visual { flex-direction: row; flex-wrap: wrap; align-content: center; }
.pill {
  font-size: 12px; font-weight: 600; padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--fg-dim); background: rgba(255,255,255,0.03);
}
.pill.active { border-color: rgba(139,157,255,0.6); color: var(--fg); background: rgba(139,157,255,0.12); }
.tree-visual { font-family: var(--mono); font-size: 12px; gap: 5px; }
.tree-row { color: var(--fg-faint); padding: 2px 8px; border-radius: 6px; }
.tree-row.active { color: var(--fg); background: rgba(139,157,255,0.12); }
.files-visual { flex-direction: row; flex-wrap: wrap; align-content: center; }
.filetag {
  font-family: var(--mono); font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: 8px;
  border: 1px solid var(--line); color: var(--fg-dim); background: rgba(255,255,255,0.04);
  transition: transform 0.2s, border-color 0.2s, color 0.2s;
}
.card:hover .filetag { color: var(--fg); }
.card:hover .filetag:nth-child(odd) { transform: translateY(-3px) rotate(-2deg); border-color: rgba(139,157,255,0.45); }
.card:hover .filetag:nth-child(even) { transform: translateY(2px) rotate(2deg); }
.moon-visual { align-items: center; }
.toggle-demo {
  width: 58px; height: 32px; border-radius: 999px;
  background: rgba(139,157,255,0.25); border: 1px solid rgba(139,157,255,0.4);
  position: relative;
}
.toggle-demo i {
  position: absolute; top: 3px; left: 3px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--fg);
  animation: toggle-slide 3.2s ease-in-out infinite;
}
@keyframes toggle-slide { 0%, 40% { left: 3px; } 60%, 100% { left: 29px; } }
.update-visual { align-items: center; }
.update-btn {
  font-size: 13px; font-weight: 600;
  padding: 9px 18px; border-radius: 12px;
  background: var(--grad); color: #0b0c10;
  box-shadow: 0 4px 24px rgba(139,157,255,0.35);
  animation: update-bob 2.6s ease-in-out infinite;
}
@keyframes update-bob { 50% { transform: translateY(-4px); box-shadow: 0 10px 30px rgba(139,157,255,0.45); } }

/* ============ 终端演示 ============ */
/* 终端与代码块在浅色模式下也保持深色（局部锁定深色变量） */
.terminal, .privacy-visual pre {
  --fg: #f4f5f7; --fg-dim: #9aa0ab; --fg-faint: #6b7280;
  --line: rgba(255, 255, 255, 0.09);
  --accent: #8b9dff; --accent-2: #6ee7d8;
  color: var(--fg-dim);
}
.terminal {
  max-width: 760px; margin: 0 auto;
  border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line);
  background: #0d0e13;
  box-shadow: 0 24px 70px -20px rgba(0,0,0,0.7), 0 0 90px -40px rgba(110,231,216,0.25);
  font-family: var(--mono); font-size: 13.5px;
}
.terminal-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 11px 14px; border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.03);
}
.terminal-bar i { width: 11px; height: 11px; border-radius: 50%; background: rgba(255,255,255,0.14); }
.terminal-bar i:nth-child(1) { background: #ff5f57; }
.terminal-bar i:nth-child(2) { background: #febc2e; }
.terminal-bar i:nth-child(3) { background: #28c840; }
.terminal-bar span { margin-left: 8px; font-size: 12px; color: var(--fg-faint); font-family: var(--font); }
.terminal-body { padding: 20px 20px 6px; min-height: 210px; display: flex; flex-direction: column; gap: 10px; }
.t-line { opacity: 0; transform: translateY(6px); transition: opacity 0.4s, transform 0.4s; color: var(--fg-dim); }
.t-line.show { opacity: 1; transform: none; }
.t-line .u { color: var(--fg); font-weight: 600; }
.t-line .tool { color: var(--accent-2); }
.t-line .ok { color: #4ade80; }
.t-line .cost { color: var(--fg-faint); }
.terminal-input {
  display: flex; align-items: center; gap: 10px;
  margin: 14px; padding: 12px 16px;
  border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}
.prompt-icon { color: var(--accent); font-weight: 700; }
.caret {
  width: 8px; height: 17px; background: var(--fg);
  display: inline-block; animation: blink 1.1s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* ============ 隐私 ============ */
.privacy-card {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  border-radius: 24px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(139,157,255,0.06), rgba(110,231,216,0.03) 60%, transparent);
  padding: 56px;
}
.privacy-text h2 { margin-bottom: 18px; }
.privacy-text > p { color: var(--fg-dim); font-size: 15px; }
.check-list { list-style: none; margin-top: 24px; display: flex; flex-direction: column; gap: 12px; }
.check-list li { display: flex; align-items: center; gap: 12px; font-size: 15px; color: var(--fg); }
.check-list li::before {
  content: "✓"; flex: none;
  width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #0b0c10;
  background: var(--grad);
}
.privacy-visual pre {
  font-family: var(--mono); font-size: 13.5px; line-height: 1.9;
  border-radius: 16px; border: 1px solid var(--line);
  background: #0d0e13; padding: 26px 30px;
  overflow-x: auto;
  box-shadow: 0 20px 60px -24px rgba(0,0,0,0.7);
}
.privacy-visual .c { color: var(--fg-faint); }

/* ============ 开源组成 ============ */
.comp-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.comp-card { grid-column: auto; gap: 10px; }
.comp-name { font-family: var(--mono); font-size: 16px; font-weight: 700; color: var(--fg); }
.comp-card p { flex: 1; }
.comp-link { font-size: 13px; color: var(--accent); font-weight: 600; }

/* ============ CTA ============ */
#download { padding-bottom: 40px; }
.cta-card {
  text-align: center;
  border-radius: 28px; border: 1px solid var(--line);
  padding: 72px 32px;
  background:
    radial-gradient(ellipse 60% 90% at 50% -10%, rgba(139,157,255,0.16), transparent 60%),
    var(--bg-card);
  overflow: hidden; position: relative;
}
.cta-icon { margin: 0 auto 24px; border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.5); }
.cta-card > p { color: var(--fg-dim); margin-top: 16px; font-size: 15px; }

/* ============ Footer ============ */
.footer { border-top: 1px solid var(--line); margin-top: 110px; }
.footer-inner {
  max-width: 1120px; margin: 0 auto; padding: 32px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 15px; }
.footer-brand img { border-radius: 6px; }
.footer-brand .muted { color: var(--fg-faint); font-weight: 400; font-size: 13px; margin-left: 6px; }
.footer-links { display: flex; gap: 22px; }
.footer-links a { font-size: 14px; color: var(--fg-dim); transition: color 0.2s; }
.footer-links a:hover { color: var(--fg); }

/* ============ 动画 ============ */
.blur-in {
  opacity: 0;
  filter: blur(10px);
  transform: translateY(18px);
  animation: blurIn 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--d, 0) * 0.12s);
}
@keyframes blurIn {
  to { opacity: 1; filter: blur(0); transform: none; }
}
.reveal {
  opacity: 0; transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--rd, 0s);
}
.reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .blur-in { animation: none; opacity: 1; filter: none; transform: none; }
  .mark-word path { animation: none; stroke-dashoffset: 0; }
  .reveal { transition: none; opacity: 1; transform: none; }
  .shot-frame { transform: none; transition: none; }
  .toggle-demo i, .update-btn, .hero-badge .dot, .caret { animation: none; }
}

/* ============ 白天模式 ============ */
[data-theme="light"] {
  --bg: #f6f7f9;
  --bg-elev: #ffffff;
  --bg-card: #ffffff;
  --fg: #16181d;
  --fg-dim: #525a66;
  --fg-faint: #8a919c;
  --line: rgba(12, 18, 34, 0.1);
  --accent: #5b67e8;
  --accent-2: #0da695;
  --grad: linear-gradient(100deg, #6672f0 0%, #5b67e8 45%, #0da695 100%);
  --hover-bg: rgba(12, 18, 34, 0.06);
}
[data-theme="light"] body { background: var(--bg); }
[data-theme="light"] ::selection { background: rgba(91, 103, 232, 0.22); }
[data-theme="light"] code { background: rgba(12, 18, 34, 0.07); }

[data-theme="light"] .bg-grid {
  background-image:
    linear-gradient(rgba(12, 18, 34, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(12, 18, 34, 0.045) 1px, transparent 1px);
}
[data-theme="light"] .bg-glow {
  background:
    radial-gradient(ellipse 45% 60% at 38% 40%, rgba(91, 103, 232, 0.12), transparent 65%),
    radial-gradient(ellipse 40% 55% at 66% 35%, rgba(13, 166, 149, 0.08), transparent 65%);
}

[data-theme="light"] .nav.scrolled { background: rgba(246, 247, 249, 0.78); }
[data-theme="light"] .nav-links a:hover,
[data-theme="light"] .nav-links a.active { color: var(--fg); background: var(--hover-bg); }

[data-theme="light"] .btn-primary:hover { box-shadow: 0 4px 24px rgba(91, 103, 232, 0.35); }
[data-theme="light"] .btn-outline { background: #ffffff; }
[data-theme="light"] .btn-outline:hover { border-color: rgba(12, 18, 34, 0.28); background: #ffffff; }

[data-theme="light"] .hero-badge { background: #ffffff; }
[data-theme="light"] .hero-badge:hover { border-color: rgba(91, 103, 232, 0.5); }
[data-theme="light"] .hero-badge .dot { box-shadow: 0 0 8px var(--accent-2); }

[data-theme="light"] .shot-toggle { background: rgba(12, 18, 34, 0.05); }
[data-theme="light"] .shot-toggle button.active {
  background: #ffffff; color: var(--fg);
  box-shadow: 0 1px 4px rgba(12, 18, 34, 0.12);
}
[data-theme="light"] .shot-frame {
  border-color: rgba(12, 18, 34, 0.12);
  background: #ffffff;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 30px 80px -24px rgba(30, 40, 90, 0.28),
    0 0 120px -30px rgba(91, 103, 232, 0.2);
}
[data-theme="light"] .shot-frame.flat {
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.6),
    0 40px 100px -24px rgba(30, 40, 90, 0.32),
    0 0 160px -30px rgba(91, 103, 232, 0.26);
}

[data-theme="light"] .card { box-shadow: 0 1px 3px rgba(12, 18, 34, 0.05); }
[data-theme="light"] .card::before {
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%),
    rgba(91, 103, 232, 0.08), transparent 55%);
}
[data-theme="light"] .card:hover { border-color: rgba(12, 18, 34, 0.2); }
[data-theme="light"] .card-visual { background: rgba(12, 18, 34, 0.035); }
[data-theme="light"] .tool-chip,
[data-theme="light"] .pill,
[data-theme="light"] .filetag { background: #ffffff; }
[data-theme="light"] .pill.active { border-color: rgba(91, 103, 232, 0.55); background: rgba(91, 103, 232, 0.1); }
[data-theme="light"] .card:hover .filetag:nth-child(odd) { border-color: rgba(91, 103, 232, 0.45); }
[data-theme="light"] .chat-line.user { background: rgba(91, 103, 232, 0.14); }
[data-theme="light"] .chat-line.agent { background: rgba(12, 18, 34, 0.06); }
[data-theme="light"] .tree-row.active { background: rgba(91, 103, 232, 0.12); }
[data-theme="light"] .toggle-demo { background: rgba(91, 103, 232, 0.2); border-color: rgba(91, 103, 232, 0.4); }
[data-theme="light"] .toggle-demo i { background: #ffffff; box-shadow: 0 1px 3px rgba(12, 18, 34, 0.25); }
[data-theme="light"] .update-btn { color: #ffffff; box-shadow: 0 4px 22px rgba(91, 103, 232, 0.4); }

[data-theme="light"] .privacy-card {
  background: linear-gradient(160deg, rgba(91, 103, 232, 0.07), rgba(13, 166, 149, 0.04) 60%, #ffffff);
}
[data-theme="light"] .check-list li::before { color: #ffffff; }

[data-theme="light"] .cta-card {
  background:
    radial-gradient(ellipse 60% 90% at 50% -10%, rgba(91, 103, 232, 0.12), transparent 60%),
    #ffffff;
}
[data-theme="light"] .cta-icon { box-shadow: 0 12px 36px rgba(30, 40, 90, 0.3); }

/* ============ 响应式 ============ */
@media (max-width: 900px) {
  .nav-links { display: none; }
  .bento { grid-template-columns: 1fr 1fr; }
  .card, .card-wide { grid-column: span 2; }
  .privacy-card { grid-template-columns: 1fr; padding: 36px 28px; gap: 32px; }
  .comp-grid { grid-template-columns: 1fr; }
  .desktop-only { display: none; }
  .section { padding-top: 80px; }
}
@media (max-width: 560px) {
  .bento { grid-template-columns: 1fr; }
  .card, .card-wide { grid-column: span 1; }
  .hero { padding-top: calc(var(--nav-h) + 48px); }
  .hero-cta .btn-lg { width: 100%; justify-content: center; }
  .nav-actions .btn-ghost { display: none; }
}
