/* ============================================================
   DataNexa Official Site — glass / blue identity
   ============================================================ */

:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --surface: rgba(255, 255, 255, 0.72);
  --surface-strong: rgba(255, 255, 255, 0.94);
  --ink: #172033;
  --muted: #667085;
  --line: rgba(105, 120, 145, 0.18);
  --blue: #2563eb;
  --blue-2: #0ea5e9;
  --green: #16a064;
  --amber: #f59e0b;
  --red: #e5484d;
  --violet: #7c3aed;
  --shadow: 0 18px 42px rgba(32, 48, 78, 0.12);
  --soft-shadow: 0 8px 20px rgba(41, 71, 121, 0.07);
  --glow-a: rgba(37, 99, 235, 0.14);
  --glow-b: rgba(14, 165, 233, 0.12);
  --glow-c: rgba(124, 58, 237, 0.10);
  --grid-line: rgba(105, 120, 145, 0.07);
}

:root.dark {
  color-scheme: dark;
  --bg: #10151f;
  --surface: rgba(23, 31, 44, 0.72);
  --surface-strong: rgba(31, 41, 55, 0.94);
  --ink: #eef2f7;
  --muted: #9aa6b8;
  --line: rgba(146, 160, 182, 0.18);
  --blue: #60a5fa;
  --blue-2: #8bb7ff;
  --green: #4ade80;
  --amber: #fbbf24;
  --red: #fb7185;
  --violet: #c4b5fd;
  --shadow: 0 24px 70px rgba(0, 0, 0, 0.30);
  --soft-shadow: 0 14px 38px rgba(0, 0, 0, 0.20);
  --glow-a: rgba(96, 165, 250, 0.16);
  --glow-b: rgba(56, 189, 248, 0.12);
  --glow-c: rgba(167, 139, 250, 0.12);
  --grid-line: rgba(146, 160, 182, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  font-family: "Segoe UI Variable", "Aptos", "Microsoft YaHei UI", "PingFang SC", "Noto Sans CJK SC", sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background 0.35s ease, color 0.35s ease;
}

code, pre {
  font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

.container { width: min(1120px, calc(100% - 48px)); margin-inline: auto; }
.section-pad { padding: 56px 0; position: relative; }
.section-pad[id] { scroll-margin-top: 80px; }

/* ---------- Background atmosphere ---------- */
.bg-orbit { position: fixed; inset: 0; z-index: -1; overflow: hidden; }

.bg-grid {
  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: 44px 44px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 75%);
}

.bg-glow { position: absolute; border-radius: 50%; filter: blur(90px); }
.glow-a { width: 560px; height: 560px; top: -180px; left: 8%; background: var(--glow-a); }
.glow-b { width: 480px; height: 480px; top: 12%; right: -120px; background: var(--glow-b); }
.glow-c { width: 420px; height: 420px; top: 55%; left: -140px; background: var(--glow-c); }

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  transition: background 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

.nav.scrolled {
  background: var(--surface);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--line);
  box-shadow: var(--soft-shadow);
}

.nav-inner {
  width: min(1120px, calc(100% - 48px));
  margin-inline: auto;
  height: 64px;
  display: flex; align-items: center; gap: 28px;
}

.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 17px; }
.nav-brand img { height: 32px; width: auto; filter: drop-shadow(0 6px 12px rgba(37, 99, 235, 0.18)); }
.nav-brand span { color: var(--blue); letter-spacing: 0.01em; }
:root.dark .nav-brand span { color: #93c5fd; }

.nav-links { display: flex; gap: 4px; margin-left: auto; }
.nav-links a {
  padding: 7px 14px; border-radius: 8px;
  font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--ink); background: rgba(102, 112, 133, 0.10); }

.nav-actions { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted);
  font-size: 13px; font-weight: 600; cursor: pointer;
  transition: color 0.2s, border-color 0.2s, transform 0.2s;
}
.icon-btn:hover { color: var(--ink); border-color: var(--blue); transform: translateY(-1px); }
.icon-btn svg { width: 17px; height: 17px; }
:root:not(.dark) .icon-moon { display: none; }
:root.dark .icon-sun { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px; border-radius: 8px;
  font-size: 14.5px; font-weight: 600; border: 1px solid transparent;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
}
.btn svg { width: 16px; height: 16px; }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  border: none;
  padding: 12px 23px;
  box-shadow: 0 10px 26px rgba(37, 99, 235, 0.32);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(37, 99, 235, 0.40); }

.btn-ghost {
  color: var(--ink); background: var(--surface);
  border-color: var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.btn-ghost:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--soft-shadow); }

.nav-github { padding: 8px 16px; font-size: 13.5px; }
.nav-github svg { width: 15px; height: 15px; }

/* ---------- Hero ---------- */
.hero {
  min-height: 78vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 110px 24px 56px;
  position: relative;
  overflow: hidden;
}

.hero-content { max-width: 860px; position: relative; z-index: 1; }

.hero-rings { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.ring {
  position: absolute; border-radius: 50%;
  border: 1px dashed var(--line);
  animation: ring-spin 40s linear infinite;
}
.ring-1 { width: 520px; height: 520px; }
.ring-2 { width: 720px; height: 720px; animation-duration: 60s; animation-direction: reverse; border-style: solid; opacity: 0.6; }
.ring-3 { width: 940px; height: 940px; animation-duration: 90s; opacity: 0.4; }
.ring::after {
  content: ""; position: absolute; top: -4px; left: 50%;
  width: 8px; height: 8px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 14px rgba(14, 165, 233, 0.8);
}
@keyframes ring-spin { to { transform: rotate(360deg); } }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 7px 16px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 13.5px; color: var(--muted);
  box-shadow: var(--soft-shadow);
}

.pulse-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 rgba(22, 160, 100, 0.5);
  animation: pulse 2.2s ease-out infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 160, 100, 0.45); }
  70% { box-shadow: 0 0 0 9px rgba(22, 160, 100, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 160, 100, 0); }
}

.hero-title {
  margin-top: 20px;
  font-size: clamp(40px, 6.4vw, 68px);
  line-height: 1.25; font-weight: 760;
  letter-spacing: -0.02em;
}

.grad-text {
  background: linear-gradient(120deg, #2563eb 10%, #0ea5e9 45%, #7c3aed 90%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
:root.dark .grad-text {
  background: linear-gradient(120deg, #93c5fd 10%, #38bdf8 45%, #c4b5fd 90%);
  -webkit-background-clip: text; background-clip: text;
}

.hero-sub {
  margin: 18px auto 0; max-width: 640px;
  font-size: 16.5px; color: var(--muted);
}

.hero-cta { margin-top: 28px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.hero-db { margin-top: 36px; }
.hero-db-label {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--muted);
}
.db-chips { margin-top: 14px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.db-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  font-size: 14px; font-weight: 600;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.db-chip:hover { transform: translateY(-2px); border-color: var(--blue); box-shadow: var(--soft-shadow); }
.db-dot { width: 9px; height: 9px; border-radius: 50%; }
.db-dot.sqlite { background: #0ea5e9; }
.db-dot.mysql { background: #f59e0b; }
.db-dot.pg { background: #2563eb; }

/* ---------- Flow ---------- */
.flow { padding-top: 8px; }
.flow-track {
  display: flex; align-items: center; justify-content: center; gap: 0;
  padding: 28px 32px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--soft-shadow);
}

.flow-node { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 130px; }
.flow-node span { font-size: 14px; font-weight: 600; }
.flow-node img { width: 62px; height: 62px; filter: drop-shadow(0 10px 22px rgba(37, 99, 235, 0.28)); }

.flow-icon {
  width: 58px; height: 58px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--surface-strong); border: 1px solid var(--line);
  color: var(--blue);
}
.flow-icon svg { width: 28px; height: 28px; }

.flow-line { flex: 1; max-width: 180px; height: 2px; margin: 0 12px 30px; position: relative; background: var(--line); overflow: hidden; }
.flow-line i {
  position: absolute; top: 0; left: -40%;
  width: 40%; height: 100%;
  background: linear-gradient(90deg, transparent, var(--blue-2), transparent);
  animation: flow-in 3.6s ease-in infinite;
}

/* 统一 3.6s 主时间轴：
   0%–28%   光从 Agent 流入中枢（加速汇入）
   28%–48%  中枢处理：光晕脉冲 + 双层水波纹扩散
   40%–68%  光从中枢流出到数据库（减速送出）
   68%–100% 节拍停顿，进入下一循环 */
@keyframes flow-in {
  0% { left: -40%; }
  28% { left: 100%; }
  100% { left: 100%; }
}

.flow-line-out i {
  animation-name: flow-out;
  animation-timing-function: ease-out;
}
@keyframes flow-out {
  0%, 40% { left: -40%; }
  68% { left: 100%; }
  100% { left: 100%; }
}

/* 中枢处理光效 */
.hub-core { position: relative; width: 62px; height: 62px; display: grid; place-items: center; }
.hub-core img { position: relative; z-index: 2; animation: hub-pulse 3.6s ease-in-out infinite; }
.flow-hub > span { position: relative; z-index: 2; }

.hub-halo {
  position: absolute; inset: -18px; border-radius: 50%; z-index: 0;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--blue) 45%, transparent) 0%,
    color-mix(in srgb, var(--blue) 12%, transparent) 45%,
    transparent 70%);
  opacity: 0; pointer-events: none;
  animation: hub-halo 3.6s ease-out infinite;
}
.hub-ripple {
  position: absolute; inset: -4px; border-radius: 50%; z-index: 1;
  border: 2px solid color-mix(in srgb, var(--blue) 70%, transparent);
  opacity: 0; transform: scale(0.72); pointer-events: none;
  animation: hub-ripple 3.6s ease-out infinite;
}
.hub-ripple.r2 { animation-delay: 0.22s; }

@keyframes hub-halo {
  0%, 26% { opacity: 0; transform: scale(0.8); }
  33% { opacity: 1; transform: scale(1); }
  46% { opacity: 0.55; }
  60%, 100% { opacity: 0; transform: scale(1.15); }
}
@keyframes hub-ripple {
  0%, 28% { transform: scale(0.72); opacity: 0; }
  33% { opacity: 0.85; }
  56% { transform: scale(2.1); opacity: 0; }
  100% { transform: scale(2.1); opacity: 0; }
}
@keyframes hub-pulse {
  0%, 26% { transform: scale(1); }
  34% { transform: scale(1.08); }
  46%, 100% { transform: scale(1); }
}

.flow-caption { margin-top: 14px; text-align: center; font-size: 14.5px; color: var(--muted); }

/* ---------- Section head ---------- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head h2 { font-size: clamp(28px, 3.6vw, 40px); font-weight: 740; letter-spacing: -0.015em; margin-top: 12px; }
.section-head p { margin-top: 10px; color: var(--muted); font-size: 15.5px; }

.section-tag {
  display: inline-block; padding: 5px 14px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; letter-spacing: 0.08em;
  color: var(--blue);
  background: rgba(37, 99, 235, 0.08);
  border: 1px solid rgba(37, 99, 235, 0.20);
}
:root.dark .section-tag { background: rgba(96, 165, 250, 0.10); border-color: rgba(96, 165, 250, 0.24); }

/* ---------- Features ---------- */
.feature-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px;
}

.feature-card {
  padding: 22px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: rgba(37, 99, 235, 0.35); }
.feature-card h3 { font-size: 17.5px; font-weight: 700; margin-top: 14px; }
.feature-card p { margin-top: 7px; font-size: 14px; color: var(--muted); }

.feature-icon {
  width: 46px; height: 46px; border-radius: 11px;
  display: grid; place-items: center;
}
.feature-icon svg { width: 23px; height: 23px; }
.f-blue { color: #2563eb; background: rgba(37, 99, 235, 0.10); }
.f-violet { color: #7c3aed; background: rgba(124, 58, 237, 0.10); }
.f-cyan { color: #0891b2; background: rgba(14, 165, 233, 0.12); }
.f-green { color: #16a064; background: rgba(22, 160, 100, 0.10); }
.f-amber { color: #d97706; background: rgba(245, 158, 11, 0.12); }
.f-red { color: #e5484d; background: rgba(229, 72, 77, 0.10); }
:root.dark .f-blue { color: #93c5fd; }
:root.dark .f-violet { color: #c4b5fd; }
:root.dark .f-cyan { color: #67e8f9; }
:root.dark .f-green { color: #4ade80; }
:root.dark .f-amber { color: #fbbf24; }
:root.dark .f-red { color: #fb7185; }

/* ---------- Preview ---------- */
.preview-frame {
  /* macOS 截图自带透明背景与窗口阴影，容器保持透明 */
  border-radius: 16px;
}
.preview-frame img { width: 100%; }
/* 预览图跟随站点主题切换（主题由 html.dark 控制，含外观选项联动） */
.preview-img-dark { display: none; }
:root.dark .preview-img-dark { display: block; }
:root.dark .preview-img-light { display: none; }

/* ---------- UI craft showcase ---------- */
.ui-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }

.ui-card {
  padding: 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.ui-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(37, 99, 235, 0.30); }
.ui-card h3 { font-size: 16.5px; font-weight: 700; margin-top: 16px; }
.ui-card > p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

/* 小样舞台：呼应应用内的蓝图网格氛围背景 */
.ui-demo {
  position: relative; overflow: hidden;
  height: 220px; padding: 20px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 12px;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 22px 22px;
  background-position: center;
}

/* 状态命令卡（1:1 复刻应用 Overview 的 .status-command 双态 + MCP 活动涟漪流光）
   基态 = 停止（蓝色调），.running = 运行中（绿色调） */
.mini-command {
  position: relative; overflow: hidden;
  width: 100%; max-width: 480px; min-height: 96px;
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 16px;
  padding: 14px 15px; border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--blue) 19%, var(--line));
  background: linear-gradient(105deg,
    color-mix(in srgb, var(--blue) 11%, var(--surface-strong)),
    color-mix(in srgb, var(--blue-2) 5%, var(--surface)) 52%,
    var(--surface));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), var(--soft-shadow);
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
:root.dark .mini-command { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), var(--soft-shadow); }
.mini-command.running {
  border-color: color-mix(in srgb, var(--green) 28%, var(--line));
  background: linear-gradient(105deg,
    color-mix(in srgb, var(--green) 13%, var(--surface-strong)),
    color-mix(in srgb, var(--blue-2) 7%, var(--surface)) 58%,
    var(--surface));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 0 0 1px color-mix(in srgb, var(--green) 12%, transparent),
    0 7px 18px color-mix(in srgb, var(--green) 9%, transparent);
}
:root.dark .mini-command.running {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 0 0 1px color-mix(in srgb, var(--green) 12%, transparent),
    0 7px 18px color-mix(in srgb, var(--green) 9%, transparent);
}
.mini-command::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; z-index: 3; opacity: 0.65;
  background: linear-gradient(90deg, var(--blue), var(--blue-2), transparent 75%);
}
.mini-command.running::after {
  background: linear-gradient(90deg, var(--green), var(--blue-2), transparent 75%);
}
.mini-command > :not(.mini-activity) { position: relative; z-index: 2; }

.mini-command-core { display: flex; align-items: center; gap: 11px; }
.mini-command-core > div { display: grid; gap: 3px; }
.mini-command-core div > span { color: var(--muted); font-size: 10px; font-weight: 600; }
.mini-command-core strong { font-size: 17px; font-weight: 700; line-height: 1.2; }
.mini-command-core strong i { font-style: normal; }
.mini-command:not(.running) .status-running,
.mini-command.running .status-stopped { display: none; }

.mini-beacon {
  position: relative; flex: none;
  width: 42px; height: 42px; border-radius: 8px;
  display: grid; place-items: center;
  color: var(--blue);
  border: 1px solid color-mix(in srgb, var(--blue) 25%, var(--line));
  background: color-mix(in srgb, var(--blue) 10%, var(--surface-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 24px color-mix(in srgb, var(--blue) 16%, transparent);
  transition: color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
:root.dark .mini-beacon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px color-mix(in srgb, var(--blue) 16%, transparent); }
.mini-beacon svg { width: 19px; height: 19px; }
.mini-command.running .mini-beacon {
  color: var(--green);
  border-color: color-mix(in srgb, var(--green) 30%, var(--line));
  background: color-mix(in srgb, var(--green) 10%, var(--surface-strong));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45), 0 0 24px color-mix(in srgb, var(--green) 18%, transparent);
}
:root.dark .mini-command.running .mini-beacon { box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 24px color-mix(in srgb, var(--green) 18%, transparent); }
.mini-command.running .mini-beacon::after {
  content: ""; position: absolute; top: -3px; right: -3px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--green);
  border: 2px solid var(--surface-strong);
  box-shadow: 0 0 10px var(--green);
}

.mini-command-metrics { display: grid; grid-template-columns: repeat(3, minmax(62px, 1fr)); gap: 8px; }
.mini-command-metrics > div { min-width: 0; display: grid; gap: 4px; padding-left: 11px; border-left: 1px solid var(--line); }
.mini-command-metrics span {
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--muted); font-size: 11px; font-weight: 600;
}
.mini-command-metrics strong { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; font-size: 15px; font-weight: 700; }
.mini-command-metrics small { color: var(--muted); font-size: 11px; font-weight: 400; }

/* 基态 = 「启动」（primary 蓝），.running = 「停止」（红色调） */
.mini-command-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-width: 88px; height: 32px; padding: 0 13px; border-radius: 8px;
  font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
  color: #fff; border: 1px solid transparent;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.30);
  transition: transform 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.mini-command-btn:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(37, 99, 235, 0.36); }
.mini-command-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.mini-command.running .mini-command-btn {
  color: var(--red);
  border-color: color-mix(in srgb, var(--red) 30%, var(--line));
  background: color-mix(in srgb, var(--red) 10%, var(--surface-strong));
  box-shadow: none;
}
.mini-command-btn svg { width: 13px; height: 13px; }
.mini-command-btn i { font-style: normal; }
.mini-command:not(.running) .mini-command-btn .icon-stop,
.mini-command:not(.running) .mini-command-btn .label-stop,
.mini-command.running .mini-command-btn .icon-play,
.mini-command.running .mini-command-btn .label-start { display: none; }

/* MCP 活动效果：双层圆角矩形涟漪（从状态灯位置扩散）+ 一道渐隐流光扫过卡片，仅运行态播放 */
.mini-activity { position: absolute; inset: 0; z-index: 1; overflow: hidden; pointer-events: none; }

.mini-ripple {
  position: absolute; top: 50%; left: 36px;
  width: 42px; height: 42px; border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--green) 55%, transparent);
  opacity: 0; transform: translate(-50%, -50%) scale(0.82);
}
.mini-command.running .mini-ripple { animation: mini-ripple-a 5.6s cubic-bezier(0.2, 0.72, 0.25, 1) infinite; }
.mini-command.running .mini-ripple.r2 { animation-name: mini-ripple-b; }

.mini-sweep {
  position: absolute; top: -24%; bottom: -24%; left: 36px;
  width: clamp(180px, 44%, 400px);
  opacity: 0; transform: translateX(-90%);
  filter: blur(1.4px);
  background: linear-gradient(90deg,
    transparent,
    color-mix(in srgb, var(--green) 10%, transparent) 12%,
    color-mix(in srgb, var(--green) 22%, transparent) 42%,
    color-mix(in srgb, var(--blue-2) 34%, transparent) 70%,
    color-mix(in srgb, white 40%, var(--blue-2)) 90%,
    color-mix(in srgb, var(--blue-2) 30%, transparent) 95%,
    transparent);
}
.mini-command.running .mini-sweep { animation: mini-sweep 5.6s cubic-bezier(0.32, 0.08, 0.62, 1) infinite; }

/* 应用内动效时长：涟漪 1050ms、流光 1650ms；循环周期 5.6s，
   关键帧百分比按实际时长等比映射，保证节奏与应用一致 */
@keyframes mini-ripple-a {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  3.8% { opacity: 0.18; }
  18.8%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.75); }
}
@keyframes mini-ripple-b {
  0%, 2.9% { opacity: 0; transform: translate(-50%, -50%) scale(0.82); }
  6.7% { opacity: 0.11; }
  21.7%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.75); }
}
@keyframes mini-sweep {
  0% { left: -5%; opacity: 0.52; }
  6.5% { opacity: 0.38; }
  14.1% { opacity: 0.21; }
  20% { opacity: 0.09; }
  24.2% { opacity: 0.03; }
  29.5%, 100% { left: 108%; opacity: 0; }
}

/* 外观分段控件（对应应用设置页，可操作整站主题） */
.mini-seg {
  display: inline-flex; gap: 2px; padding: 3px;
  border-radius: 10px;
  background: rgba(102, 112, 133, 0.12);
  border: 1px solid var(--line);
}
.mini-seg button {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border: none; border-radius: 8px;
  background: transparent; color: var(--muted);
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  cursor: pointer; transition: color 0.2s, background 0.2s, box-shadow 0.2s;
}
.mini-seg button svg { width: 14px; height: 14px; }
.mini-seg button:hover { color: var(--ink); }
.mini-seg button.active { background: var(--surface-strong); color: var(--blue); box-shadow: var(--soft-shadow); }
/* 工具开关与状态标签（对应应用工具开关与审计状态） */
.mini-tools { width: 100%; max-width: 340px; display: grid; gap: 8px; }
.mini-switch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 9px;
  background: var(--surface-strong); border: 1px solid var(--line);
  cursor: pointer; transition: border-color 0.2s;
}
.mini-switch-row:hover { border-color: rgba(37, 99, 235, 0.35); }
.mini-signal { flex: none; width: 7px; height: 7px; border-radius: 50%; background: #94a3b8; transition: background 0.2s, box-shadow 0.2s; }
.mini-switch-row:has(.mini-switch:checked) .mini-signal { background: var(--green); box-shadow: 0 0 8px rgba(34, 197, 94, 0.7); }
.mini-switch-label {
  flex: 1;
  font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 11.5px; word-break: break-all;
}
.mini-switch {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 34px; height: 20px; margin: 0;
  border-radius: 999px; border: none;
  background: rgba(102, 112, 133, 0.35);
  position: relative; cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.mini-switch::after {
  content: ""; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.28);
  transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.mini-switch:checked { background: var(--green); box-shadow: 0 0 10px rgba(22, 160, 100, 0.45); }
.mini-switch:checked::after { transform: translateX(14px); }
.mini-switch:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.mini-pills { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.mini-pill {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 650; letter-spacing: 0.02em;
}
.pill-green { color: #15803d; background: color-mix(in srgb, #22c55e 13%, transparent); border: 1px solid color-mix(in srgb, #22c55e 34%, transparent); }
.pill-red { color: #dc2626; background: color-mix(in srgb, #ef4444 11%, transparent); border: 1px solid color-mix(in srgb, #ef4444 32%, transparent); }
.pill-slate { color: #64748b; background: color-mix(in srgb, #64748b 12%, transparent); border: 1px solid color-mix(in srgb, #64748b 32%, transparent); }
:root.dark .pill-green { color: #4ade80; }
:root.dark .pill-red { color: #fb7185; }
:root.dark .pill-slate { color: #94a3b8; }

/* 系统窗口材质（macOS Vibrancy / Windows Mica 意象） */
.glass-stage {
  position: relative; overflow: hidden;
  width: 100%; max-width: 350px; height: 158px;
  border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.14), rgba(124, 58, 237, 0.14));
}
.glass-blob { position: absolute; border-radius: 50%; }
.glass-blob.b1 { width: 124px; height: 124px; top: -34px; left: -22px; background: radial-gradient(circle at 32% 32%, #60a5fa, #2563eb); animation: blob-float 7s ease-in-out infinite; }
.glass-blob.b2 { width: 92px; height: 92px; bottom: -26px; right: 12%; background: radial-gradient(circle at 32% 32%, #38bdf8, #0ea5e9); animation: blob-float 9s ease-in-out infinite reverse; }
.glass-blob.b3 { width: 72px; height: 72px; top: 16%; right: -18px; background: radial-gradient(circle at 32% 32%, #c4b5fd, #7c3aed); animation: blob-float 8s ease-in-out infinite; }
@keyframes blob-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
.glass-pane {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; gap: 2px; text-align: center;
  padding: 14px 24px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.38);
  backdrop-filter: blur(14px) saturate(150%);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65), 0 10px 26px rgba(32, 48, 78, 0.20);
}
:root.dark .glass-pane {
  background: rgba(23, 31, 44, 0.45);
  border-color: rgba(146, 160, 182, 0.35);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 26px rgba(0, 0, 0, 0.35);
}
.glass-pane-kicker {
  font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 8px; letter-spacing: 0.22em; color: var(--muted);
}
.glass-pane strong { font-size: 14.5px; }
.glass-pane-sub { font-size: 10.5px; color: var(--muted); }

@media (max-width: 640px) {
  .ui-grid { grid-template-columns: 1fr; }
  .ui-demo { height: auto; min-height: 220px; }
}

@media (max-width: 480px) {
  .ui-card { padding: 16px; }
  .ui-demo { padding: 14px; }
  .mini-seg { width: 100%; }
  .mini-seg button { flex: 1; justify-content: center; padding-inline: 7px; gap: 4px; font-size: 11.5px; }
  .mini-command { grid-template-columns: auto 1fr; }
  .mini-command { gap: 10px; padding: 12px; }
  .mini-command-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .mini-command-metrics > div { padding-left: 7px; }
  .mini-command-metrics span { font-size: 10px; }
  .mini-command-metrics strong { font-size: 14px; }
  .mini-command-btn { grid-column: 1 / -1; width: 100%; }
  .glass-stage { max-width: 100%; }
  .glass-pane { max-width: 100%; padding-inline: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .mini-ripple, .mini-sweep, .glass-blob { animation: none; }
}

/* ---------- Quickstart ---------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }

.step {
  padding: 20px 20px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s, box-shadow 0.25s;
}
.step:hover { transform: translateY(-4px); box-shadow: var(--soft-shadow); }
.step h3 { font-size: 16px; font-weight: 700; margin-top: 12px; }
.step p { margin-top: 6px; font-size: 13.5px; color: var(--muted); }

.step-num {
  display: inline-grid; place-items: center;
  width: 34px; height: 34px; border-radius: 9px;
  font-size: 15px; font-weight: 750; color: #fff;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 6px 16px rgba(37, 99, 235, 0.30);
}

/* ---------- Security ---------- */
.security-panel {
  display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 40px; align-items: center;
  padding: 40px 44px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 20px;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow);
}
.security-text h2 { font-size: clamp(26px, 3vw, 34px); font-weight: 740; margin-top: 12px; letter-spacing: -0.015em; }
.security-text > p { margin-top: 10px; color: var(--muted); font-size: 15px; }

.security-list { margin-top: 18px; display: grid; gap: 10px; }
.security-list li {
  position: relative; padding-left: 30px;
  font-size: 14.5px;
}
.security-list li::before {
  content: ""; position: absolute; left: 0; top: 3px;
  width: 17px; height: 17px; border-radius: 50%;
  background: rgba(22, 160, 100, 0.12);
  border: 1px solid rgba(22, 160, 100, 0.40);
}
.security-list li::after {
  content: ""; position: absolute; left: 5px; top: 8px;
  width: 7px; height: 4px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

.security-visual { display: grid; place-items: center; }
.shield-wrap { position: relative; display: grid; place-items: center; }
.shield-icon { width: 92px; height: 92px; color: var(--blue); position: relative; z-index: 1; }
.shield-ring {
  position: absolute; width: 190px; height: 190px; border-radius: 50%;
  border: 1px solid rgba(37, 99, 235, 0.25);
  animation: shield-pulse 3.2s ease-out infinite;
}
.shield-ring.r2 { animation-delay: 1.6s; }
@keyframes shield-pulse {
  0% { transform: scale(0.62); opacity: 0.9; }
  100% { transform: scale(1.25); opacity: 0; }
}

/* ---------- CTA ---------- */
.cta { padding-top: 0; }

.cta-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "title actions"
    "sub actions";
  align-items: center;
  column-gap: 64px;
  text-align: left; padding: 44px 52px;
  border-radius: 20px; position: relative; overflow: hidden;
  background:
    radial-gradient(circle at 88% 18%, rgba(22, 160, 100, 0.12), transparent 28%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(14, 165, 233, 0.07) 58%, rgba(255, 255, 255, 0.18));
  border: 1px solid rgba(37, 99, 235, 0.22);
  box-shadow: inset 4px 0 0 rgba(37, 99, 235, 0.72), var(--soft-shadow);
}
.cta-panel::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(37, 99, 235, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.055) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: linear-gradient(90deg, transparent 36%, #000 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 36%, #000 100%);
}
.cta-panel::after {
  content: ""; position: absolute; width: 220px; height: 220px;
  top: -132px; right: -56px; border-radius: 50%; pointer-events: none;
  border: 1px solid rgba(37, 99, 235, 0.18);
  box-shadow:
    0 0 0 38px rgba(14, 165, 233, 0.045),
    0 0 0 76px rgba(37, 99, 235, 0.035);
}
.cta-panel h2 {
  grid-area: title; position: relative; z-index: 1;
  font-size: clamp(26px, 3.2vw, 36px); line-height: 1.3;
  font-weight: 750; letter-spacing: -0.015em;
}
.cta-panel p {
  grid-area: sub; position: relative; z-index: 1;
  margin-top: 10px; max-width: 520px; color: var(--muted); font-size: 15px;
}
.cta-actions {
  grid-area: actions; position: relative; z-index: 1;
  display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap;
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; background: var(--surface); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.footer-left { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 11px; }
.footer-brand img {
  height: 34px; width: auto;
  filter: drop-shadow(0 6px 14px rgba(37, 99, 235, 0.18));
}
.footer-brand > div { display: flex; flex-direction: column; gap: 2px; }
.footer-brand strong {
  display: block; font-size: 15.5px; font-weight: 720;
  letter-spacing: 0.03em; line-height: 1.2;
  background: linear-gradient(120deg, #2563eb 20%, #0ea5e9 70%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
:root.dark .footer-brand strong {
  background: linear-gradient(120deg, #93c5fd 20%, #38bdf8 70%);
  -webkit-background-clip: text; background-clip: text;
}
.footer-brand span { font-size: 10.5px; color: var(--muted); letter-spacing: 0.14em; text-transform: uppercase; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { font-size: 13.5px; color: var(--muted); transition: color 0.2s; }
.footer-links a:hover { color: var(--blue); }
.footer-copy { display: flex; flex-direction: column; gap: 3px; text-align: right; }
.footer-copy span { font-size: 12px; color: var(--muted); }

@media (max-width: 720px) {
  .footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .footer-copy { text-align: left; }
}

/* ---------- MCP Tools ---------- */
.tool-groups { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.tool-group {
  padding: 22px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tool-group:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: rgba(37, 99, 235, 0.30); }

.tool-group-head {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 12px; margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.tool-group-icon {
  width: 38px; height: 38px; border-radius: 10px;
  display: grid; place-items: center;
}
.tool-group-icon svg { width: 20px; height: 20px; }
.tool-group-head h3 { font-size: 16px; font-weight: 720; }
.tool-group-head span { font-size: 12px; color: var(--muted); margin-left: auto; letter-spacing: 0.04em; }

.tool-list { display: grid; gap: 12px; }
.tool-item { display: grid; gap: 4px; }
.tool-name {
  font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px; font-weight: 600; color: var(--blue);
  letter-spacing: -0.01em; word-break: break-all;
}
:root.dark .tool-name { color: #93c5fd; }
.tool-desc { font-size: 13.5px; color: var(--muted); line-height: 1.55; }

/* ---------- Defense in depth ---------- */
/* 开放式意象场景：无底板、无边框，玻璃盾牌为主体，语句为弱化元素 */
.defense-stage {
  --scene: 250px;
  --shield-w: 170px;
  --shield-h: 186px;
  --shield-hh: 93px;
  position: relative;
  max-width: 920px; margin: 0 auto; height: 380px;
}

.attack-stream { position: absolute; inset: 0; z-index: 1; }

.sql-chip {
  position: absolute; top: var(--lane); left: -160px;
  margin-top: -8px;
  font-family: "Cascadia Code", "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12.5px; font-weight: 600; letter-spacing: 0.05em; white-space: nowrap;
  opacity: 0;
  animation-duration: 10s; animation-delay: var(--delay);
  animation-iteration-count: infinite; animation-timing-function: linear;
}
.chip-bad { color: var(--red); animation-name: chip-block; }
.chip-good { color: var(--green); animation-name: chip-pass; }

@keyframes chip-block {
  0% { left: -160px; opacity: 0; transform: none; filter: blur(0); }
  5% { opacity: 0.8; }
  50% { left: calc(94% - var(--scene) - 60px); opacity: 0.8; transform: none; filter: blur(0); }
  53% { left: calc(94% - var(--scene) - 70px); opacity: 0.55; transform: scale(0.95); }
  58%, 100% { left: calc(94% - var(--scene) - 76px); opacity: 0; transform: translateY(-8px) scale(0.8); filter: blur(2px); }
}
@keyframes chip-pass {
  0% { left: -160px; opacity: 0; }
  5% { opacity: 0.9; }
  55% { left: calc(94% - 158px); opacity: 0.9; }
  64%, 100% { left: calc(94% - 150px); opacity: 0; }
}

/* 拦截火花：与对应语句同一节拍，在盾面边缘闪现红色 ✕ */
.spark {
  position: absolute; top: var(--lane); left: calc(94% - var(--scene) + 26px);
  width: 14px; height: 14px; margin-top: -7px;
  opacity: 0;
  animation: spark-flash 10s var(--delay) infinite;
}
.spark::before, .spark::after {
  content: ""; position: absolute; top: 6px; left: 1px;
  width: 12px; height: 2px; border-radius: 2px;
  background: var(--red);
  box-shadow: 0 0 8px color-mix(in srgb, var(--red) 65%, transparent);
}
.spark::before { transform: rotate(45deg); }
.spark::after { transform: rotate(-45deg); }
@keyframes spark-flash {
  0%, 50% { opacity: 0; transform: scale(0.4) rotate(0deg); }
  53% { opacity: 0.9; transform: scale(1) rotate(90deg); }
  58%, 100% { opacity: 0; transform: scale(1.5) rotate(90deg); }
}

/* 盾 + 库场景 */
.shield-scene {
  position: absolute; right: 6%; top: 50%; z-index: 2;
  width: var(--scene); height: 300px;
  transform: translateY(-50%);
}

.scene-ring {
  position: absolute; left: 50%; top: 50%;
  width: 460px; height: 460px; margin: -230px;
  border-radius: 50%; border: 1px dashed var(--line);
  animation: ring-spin 70s linear infinite;
}
.scene-ring::after {
  content: ""; position: absolute; top: -3px; left: 50%;
  width: 6px; height: 6px; border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #0ea5e9);
  box-shadow: 0 0 10px rgba(14, 165, 233, 0.7);
}
.scene-ring.r2 {
  width: 350px; height: 350px; margin: -175px;
  border-style: solid; opacity: 0.5;
  animation-duration: 50s; animation-direction: reverse;
}
.scene-ring.r2::after { display: none; }

.shield-aura {
  position: absolute; left: 50%; top: 50%;
  width: 520px; height: 520px; margin: -260px;
  border-radius: 50%;
  background: radial-gradient(circle,
    color-mix(in srgb, var(--blue) 20%, transparent) 0%,
    color-mix(in srgb, var(--blue-2) 8%, transparent) 42%,
    transparent 68%);
  animation: aura-breathe 5s ease-in-out infinite;
}
@keyframes aura-breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.9; transform: scale(1.06); }
}

/* 盾内数据库 */
.shield-db {
  position: absolute; left: 50%; top: 50%; z-index: 1;
  width: 64px; height: 64px; color: var(--blue);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 6px 16px color-mix(in srgb, var(--blue) 28%, transparent));
}

/* SELECT 抵达时，沿盾牌轮廓向外扩散的绿色涟漪 */
.shield-ripple {
  position: absolute; left: 50%; top: 50%; z-index: 3;
  width: var(--shield-w); height: var(--shield-h);
  color: color-mix(in srgb, var(--blue) 45%, transparent);
  opacity: 0;
  animation: db-accept 10s 5s infinite;
}
.shield-ripple.r2 { animation-delay: 5.25s; }
@keyframes db-accept {
  0%, 56% { opacity: 0; transform: translate(-50%, -50%) scale(1); }
  62% { opacity: 0.45; }
  85%, 100% { opacity: 0; transform: translate(-50%, -50%) scale(1.6); }
}

/* 水晶玻璃盾：SVG 蒙版塑形 + 背景模糊，顶部高光与底部内影分层，边缘描边勾勒轮廓 */
.shield-glass {
  position: absolute; left: 50%; top: 50%; z-index: 2;
  width: var(--shield-w); height: var(--shield-h);
  transform: translate(-50%, -50%);
  background: linear-gradient(165deg,
    rgba(255, 255, 255, 0.72) 0%,
    rgba(255, 255, 255, 0.26) 32%,
    color-mix(in srgb, var(--blue) 12%, rgba(255, 255, 255, 0.05)) 62%,
    color-mix(in srgb, var(--blue) 26%, transparent) 100%);
  backdrop-filter: blur(12px) saturate(160%);
  -webkit-backdrop-filter: blur(12px) saturate(160%);
  -webkit-mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 240'%3E%3Cpath d='M110 8 L198 46 V112 C198 168 162 208 110 232 C58 208 22 168 22 112 V46 Z'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 220 240'%3E%3Cpath d='M110 8 L198 46 V112 C198 168 162 208 110 232 C58 208 22 168 22 112 V46 Z'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%; mask-size: 100% 100%;
}
:root.dark .shield-glass {
  background: linear-gradient(165deg,
    rgba(148, 163, 184, 0.34) 0%,
    rgba(148, 163, 184, 0.12) 32%,
    color-mix(in srgb, var(--blue) 14%, transparent) 62%,
    color-mix(in srgb, var(--blue) 26%, transparent) 100%);
}
/* 顶部高光 */
.shield-glass::before {
  content: ""; position: absolute; left: 10%; right: 10%; top: 3%; height: 34%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.75), transparent 70%);
}
:root.dark .shield-glass::before {
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.22), transparent 70%);
}
/* 底部蓝色内影 */
.shield-glass::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 42%;
  background: linear-gradient(0deg, color-mix(in srgb, var(--blue) 24%, transparent), transparent);
}

/* 盾下落地影 */
.scene-shadow {
  position: absolute; left: 50%; top: calc(50% + var(--shield-hh) - 6px);
  width: 220px; height: 24px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, color-mix(in srgb, var(--blue) 24%, transparent), transparent 70%);
  filter: blur(6px);
}

/* 盾面斜向流光，周期性扫过 */
.shield-sweep {
  position: absolute; top: -20%; bottom: -20%; left: -45%; width: 42%; z-index: 2;
  transform: skewX(-12deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.50), transparent);
  opacity: 0;
  animation: shield-sweep 7s ease-in-out infinite;
}
:root.dark .shield-sweep {
  background: linear-gradient(90deg, transparent, rgba(190, 210, 255, 0.22), transparent);
}
@keyframes shield-sweep {
  0%, 55% { left: -45%; opacity: 0; }
  66% { opacity: 0.9; }
  86%, 100% { left: 115%; opacity: 0; }
}

.shield-edge { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; }

.stage-legend {
  margin-top: 18px;
  display: flex; justify-content: center; gap: 20px;
  font-size: 12px; color: var(--muted);
}
.legend-item { display: inline-flex; align-items: center; gap: 7px; }
.legend-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-red { background: var(--red); box-shadow: 0 0 6px color-mix(in srgb, var(--red) 60%, transparent); }
.dot-green { background: var(--green); box-shadow: 0 0 6px color-mix(in srgb, var(--green) 60%, transparent); }

.defense-caption { margin-top: 8px; text-align: center; font-size: 14.5px; color: var(--muted); }

.defense-grid {
  margin-top: 28px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
}

.defense-card {
  padding: 20px 22px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.defense-card:hover { transform: translateY(-4px); border-color: rgba(37, 99, 235, 0.32); box-shadow: var(--shadow); }

.defense-card-head { display: flex; align-items: center; }
.defense-card-icon {
  width: 42px; height: 42px; border-radius: 11px;
  display: grid; place-items: center;
}
.defense-card-icon svg { width: 21px; height: 21px; }
.defense-card h3 { font-size: 16px; font-weight: 720; margin-top: 12px; }
.defense-card p { margin-top: 6px; font-size: 13.5px; color: var(--muted); line-height: 1.6; }
.defense-card p code {
  font-size: 12px; padding: 1px 6px; border-radius: 5px;
  background: rgba(102, 112, 133, 0.14); color: var(--ink);
}

/* ---------- Reveal animations ---------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s cubic-bezier(0.22, 0.61, 0.36, 1), transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1); }
.reveal.visible { opacity: 1; transform: none; }
.d1 { transition-delay: 0.08s; }
.d2 { transition-delay: 0.16s; }
.d3 { transition-delay: 0.24s; }
.d4 { transition-delay: 0.32s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .ring, .flow-line i, .shield-ring, .pulse-dot, .hub-halo, .hub-ripple, .hub-core img { animation: none; }
  .sql-chip, .spark, .shield-aura, .shield-ripple, .scene-ring, .shield-sweep { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .security-panel { grid-template-columns: 1fr; padding: 40px 32px; }
  .security-visual { display: none; }
  .tool-groups { grid-template-columns: 1fr; }
  .defense-grid { grid-template-columns: repeat(2, 1fr); }
  .cta-panel { column-gap: 32px; padding-inline: 40px; }
}

@media (max-width: 640px) {
  .cta-panel { grid-template-columns: 1fr; grid-template-areas: "title" "sub" "actions"; text-align: center; padding: 36px 24px; }
  .cta-panel p { margin-inline: auto; }
  .cta-actions { margin-top: 22px; justify-content: center; }
  .nav-links { display: none; }
  .nav-github span { display: none; }
  .section-pad { padding: 40px 0; }
  .feature-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .flow-track { flex-direction: column; gap: 18px; padding: 24px 20px; }
  /* 竖向布局复用同一组动画：仅将轨道旋转 90°。
     若改用另一组竖向动画，跨断点切换会重启线条动画，
     而中枢光效不重启，两者计时会错位。 */
  .flow-line { width: 44px; max-width: none; margin: 21px 0; flex: none; transform: rotate(90deg); }
  .ring-2, .ring-3 { display: none; }
  .hero { min-height: auto; padding: 96px 20px 40px; }
  .bg-glow { filter: blur(60px); }
  .glow-a { width: 300px; height: 300px; top: -100px; left: -40px; }
  .glow-b { width: 260px; height: 260px; top: 8%; right: -60px; }
  .glow-c { width: 240px; height: 240px; top: 50%; left: -60px; }
  .security-panel { padding: 28px 22px; }
  .tool-group { padding: 20px 18px; }
  .defense-grid { grid-template-columns: 1fr; }
  .defense-stage { --scene: 190px; --shield-w: 128px; --shield-h: 140px; --shield-hh: 70px; height: 300px; }
  .shield-scene { right: 4%; }
  .sql-chip { font-size: 10.5px; margin-top: -7px; }
  .shield-db { width: 40px; height: 40px; }
  .scene-ring { display: none; }
}
