/* ============ tokens ============ */
:root {
  --bg: #070910;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-2: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --txt: #eef1f8;
  --muted: #98a1b5;
  --dim: #6c768c;
  --brand: #6b8cff;
  --brand-2: #a06bff;
  --green: #3ddc97;
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
code, pre, .copy-code { font-family: var(--mono); }
::selection { background: rgba(107, 140, 255, 0.35); }

.bg-glow {
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(880px 520px at 78% -8%, rgba(107, 140, 255, 0.20), transparent 66%),
    radial-gradient(720px 520px at 4% 26%, rgba(160, 107, 255, 0.12), transparent 66%);
}
.bg-grid {
  position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0.45;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: linear-gradient(to bottom, #000, transparent 72%);
  mask-image: linear-gradient(to bottom, #000, transparent 72%);
}

.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; line-height: 1.2; cursor: pointer;
  text-decoration: none; white-space: nowrap; transition: 0.2s ease;
  font-family: inherit;
}
.btn-primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; box-shadow: 0 8px 28px rgba(107, 140, 255, 0.28);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 34px rgba(107, 140, 255, 0.42); }
.btn-outline { background: rgba(255, 255, 255, 0.03); border-color: var(--line-strong); color: var(--txt); }
.btn-outline:hover { border-color: var(--brand); background: rgba(107, 140, 255, 0.08); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--txt); background: rgba(255, 255, 255, 0.05); }
.btn-lg { padding: 14px 24px; font-size: 15px; border-radius: 12px; }
.btn-sm { padding: 9px 15px; font-size: 13px; }
.btn-xs { padding: 7px 11px; font-size: 12px; border-color: var(--line); }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none !important; }

/* ============ header ============ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(7, 9, 16, 0.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent; transition: 0.25s;
}
.site-header.scrolled { background: rgba(7, 9, 16, 0.92); border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 6px 18px rgba(107, 140, 255, 0.32); flex: none;
}
.brand-name { font-size: 15.5px; font-weight: 750; letter-spacing: -0.01em; }
.brand-name span { color: var(--brand); }
.nav-links { display: flex; align-items: center; gap: 30px; }
.nav-links a {
  font-size: 13.5px; color: var(--muted); text-decoration: none; transition: 0.2s;
  position: relative; padding: 6px 0;
}
.nav-links a:hover { color: var(--txt); }
.nav-links a::after {
  content: ''; position: absolute; left: 0; right: 100%; bottom: 0; height: 1px;
  background: var(--brand); transition: right 0.25s;
}
.nav-links a:hover::after { right: 0; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  width: 36px; height: 32px; border-radius: 8px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03); color: var(--muted);
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em; cursor: pointer;
}
.lang-toggle:hover { border-color: var(--brand); color: var(--txt); }
.nav-toggle { display: none; width: 36px; height: 32px; border: 0; background: transparent; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; height: 2px; background: var(--txt); border-radius: 2px; margin: 4px 0; transition: 0.2s; }

/* ============ hero ============ */
.hero { position: relative; z-index: 1; padding: 86px 0 40px; }
.hero-inner { display: grid; grid-template-columns: 1.02fr 0.98fr; gap: 56px; align-items: center; }
.pill {
  display: inline-flex; align-items: center; gap: 9px; padding: 7px 14px;
  border: 1px solid var(--line-strong); border-radius: 999px;
  background: rgba(255, 255, 255, 0.03); color: var(--muted);
  font-size: 12.5px; text-decoration: none; transition: 0.2s;
}
.pill:hover { border-color: var(--brand); color: var(--txt); }
.pill-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(61, 220, 151, 0.14); }
.hero h1 {
  font-size: clamp(36px, 4.6vw, 58px); line-height: 1.15; letter-spacing: -0.035em;
  font-weight: 800; margin: 22px 0 20px;
}
.gradient-text {
  background: linear-gradient(100deg, #7fa2ff, #c08bff 55%, #6fe0c0);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero-sub { font-size: 16.5px; line-height: 1.85; color: var(--muted); max-width: 530px; margin: 0 0 30px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-checks { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; }
.hero-checks li { font-size: 12.5px; color: var(--dim); }
.hero-checks li::before { content: '✓'; color: var(--green); font-weight: 800; margin-right: 7px; }

.hero-visual { position: relative; padding: 18px 0; }
.mock-window {
  border: 1px solid var(--line-strong); border-radius: 16px; overflow: hidden;
  background: linear-gradient(160deg, rgba(23, 29, 45, 0.94), rgba(11, 15, 24, 0.97));
  box-shadow: 0 34px 90px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.02);
  transform: perspective(1400px) rotateY(-6deg) rotateX(2deg); transition: 0.5s ease;
}
.hero-visual:hover .mock-window { transform: perspective(1400px) rotateY(0) rotateX(0); }
.mock-bar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: #3a4256; }
.dots i:first-child { background: #ff6b6b; }
.dots i:nth-child(2) { background: #f9c74f; }
.dots i:nth-child(3) { background: #5dd39e; }
.mock-url { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.mock-bar-tag { margin-left: auto; font-size: 10px; letter-spacing: 0.12em; color: var(--green); border: 1px solid rgba(61, 220, 151, 0.3); padding: 3px 8px; border-radius: 5px; }
.mock-body { padding: 18px; }
.mock-req { display: flex; align-items: center; gap: 10px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.mock-path { font-family: var(--mono); font-size: 12px; color: var(--txt); word-break: break-all; }
.mock-time { margin-left: auto; font-size: 11px; color: var(--green); white-space: nowrap; }
.mock-tabs { display: flex; gap: 20px; padding: 14px 0 12px; font-size: 12px; color: var(--dim); }
.mock-tabs .on { color: var(--txt); border-bottom: 2px solid var(--brand); padding-bottom: 5px; }
.mock-code { margin: 0; font-size: 12.5px; line-height: 1.85; color: #cdd5e6; }
.c-key { color: #7dcfff; } .c-str { color: #9ae6b4; } .c-num { color: #f6c177; }
.c-bool { color: #7aa2f7; } .c-punct { color: #8892a6; }
.mock-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 11px; color: var(--dim); font-family: var(--mono); }
.float-badge {
  position: absolute; z-index: 2; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 14px; border-radius: 10px; font-size: 12px; font-weight: 600;
  background: rgba(22, 28, 42, 0.94); border: 1px solid var(--line-strong);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45); animation: float 5s ease-in-out infinite;
}
.float-badge-1 { top: -2px; right: -14px; color: var(--green); }
.float-badge-2 { bottom: -10px; left: -18px; color: var(--txt); animation-delay: -2.5s; }
.fb-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }

.trust { display: flex; align-items: center; gap: 28px; margin-top: 70px; padding-top: 26px; border-top: 1px solid var(--line); }
.trust-label { font-size: 12px; color: var(--dim); white-space: nowrap; }
.trust-items { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 30px; }
.trust-items span { font-size: 15px; font-weight: 750; color: #5c657c; letter-spacing: 0.01em; }

/* ============ metrics ============ */
.metrics { position: relative; z-index: 1; border-block: 1px solid var(--line); background: rgba(255, 255, 255, 0.012); }
.metrics-inner { display: grid; grid-template-columns: repeat(4, 1fr); padding: 30px 24px; }
.metric { text-align: center; padding: 4px 12px; border-right: 1px solid var(--line); }
.metric:last-child { border-right: 0; }
.metric-n { font-size: 29px; font-weight: 800; letter-spacing: -0.03em; }
.metric-n span { font-size: 14px; color: var(--brand); margin-left: 3px; letter-spacing: 0; }
.metric-l { font-size: 12.5px; color: var(--muted); margin-top: 5px; }

/* ============ sections ============ */
.section { position: relative; z-index: 1; padding: 100px 0; }
.section-alt { background: rgba(255, 255, 255, 0.012); border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 52px; }
.eyebrow { display: inline-block; font-size: 11.5px; font-weight: 750; letter-spacing: 0.18em; color: var(--brand); margin-bottom: 14px; }
.section-head h2 { font-size: clamp(26px, 3.2vw, 38px); letter-spacing: -0.025em; line-height: 1.3; margin: 0 0 14px; }
.section-head p { color: var(--muted); font-size: 15.5px; line-height: 1.8; margin: 0; }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.feature { position: relative; overflow: hidden; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: 0.25s; }
.feature::before { content: ''; position: absolute; inset: 0; background: radial-gradient(380px 180px at 0 0, rgba(107, 140, 255, 0.13), transparent 70%); opacity: 0; transition: 0.25s; }
.feature:hover { transform: translateY(-4px); border-color: var(--line-strong); background: var(--surface-2); }
.feature:hover::before { opacity: 1; }
.feature > * { position: relative; }
.feature-icon { width: 42px; height: 42px; border-radius: 11px; display: grid; place-items: center; background: rgba(107, 140, 255, 0.12); border: 1px solid rgba(107, 140, 255, 0.22); margin-bottom: 18px; }
.feature-icon svg { width: 21px; height: 21px; fill: none; stroke: #8fabff; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature h3 { font-size: 16px; margin: 0 0 9px; }
.feature p { font-size: 13.5px; line-height: 1.78; color: var(--muted); margin: 0; }

/* ============ steps ============ */
.steps { display: grid; grid-template-columns: 1fr 40px 1fr 40px 1fr; align-items: start; }
.step { padding: 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.step-n { font-size: 12px; font-weight: 800; letter-spacing: 0.12em; color: var(--brand); margin-bottom: 18px; }
.step h3 { font-size: 17px; margin: 0 0 10px; }
.step p { font-size: 13.5px; line-height: 1.78; color: var(--muted); margin: 0 0 18px; }
.step-code { font-family: var(--mono); font-size: 11.5px; color: var(--green); background: rgba(61, 220, 151, 0.07); border: 1px solid rgba(61, 220, 151, 0.16); padding: 8px 10px; border-radius: 8px; word-break: break-all; }
.step-line { height: 1px; background: linear-gradient(90deg, var(--line), var(--brand), var(--line)); margin-top: 58px; }

/* ============ live demo ============ */
.demo-shell { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-strong); border-radius: 18px; overflow: hidden; background: rgba(12, 16, 26, 0.66); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.34); }
.demo-pane { padding: 26px; min-height: 440px; }
.demo-setup { border-right: 1px solid var(--line); }
.pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 20px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pane-title { font-size: 13px; font-weight: 700; }
.pane-tag { margin-left: auto; font-size: 10px; letter-spacing: 0.1em; color: var(--brand); border: 1px solid rgba(107, 140, 255, 0.3); padding: 3px 8px; border-radius: 5px; }
.pane-count { margin-left: auto; font-size: 11px; font-family: var(--mono); color: var(--muted); border: 1px solid var(--line); padding: 2px 8px; border-radius: 999px; }
.live-badge { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 10px; font-weight: 700; letter-spacing: 0.1em; color: var(--green); }
.live-badge i { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(61, 220, 151, 0.6); animation: pulse 2s infinite; }
.live-badge.idle { color: var(--dim); }
.live-badge.idle i { background: var(--dim); animation: none; box-shadow: none; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(61, 220, 151, 0); } 100% { box-shadow: 0 0 0 0 rgba(61, 220, 151, 0); } }
.demo-intro { margin: 0 0 22px; }
.demo-intro ol { margin: 0; padding-left: 20px; }
.demo-intro li { font-size: 13px; line-height: 1.9; color: var(--muted); }
.demo-url-wrap { margin-top: 20px; }
.field-label { display: block; font-size: 11.5px; color: var(--dim); margin: 16px 0 8px; text-transform: uppercase; letter-spacing: 0.07em; }
.copy-row { display: flex; align-items: stretch; gap: 8px; }
.copy-row-pre { align-items: flex-start; }
.copy-code { flex: 1; min-width: 0; margin: 0; padding: 10px 12px; font-size: 11.5px; line-height: 1.7; color: #b8e0c8; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line); border-radius: 8px; word-break: break-all; white-space: pre-wrap; }
.demo-hint { font-size: 11.5px; line-height: 1.7; color: var(--dim); margin: 16px 0 0; }
.demo-events { display: flex; flex-direction: column; gap: 8px; max-height: 360px; overflow-y: auto; }
.demo-empty { text-align: center; padding: 62px 16px; color: var(--dim); }
.demo-empty-icon { font-size: 34px; color: #3b445c; margin-bottom: 12px; }
.demo-empty p { font-size: 13.5px; color: var(--muted); margin: 0 0 6px; }
.demo-empty span { font-size: 12px; }
.de-row { border: 1px solid var(--line); border-radius: 10px; background: var(--surface); overflow: hidden; animation: rowIn 0.35s ease; }
@keyframes rowIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.de-head { display: flex; align-items: center; gap: 10px; padding: 10px 12px; cursor: pointer; }
.de-head:hover { background: rgba(255, 255, 255, 0.03); }
.de-path { font-family: var(--mono); font-size: 11.5px; color: var(--txt); word-break: break-all; flex: 1; }
.de-time { font-size: 10.5px; color: var(--dim); white-space: nowrap; }
.de-detail { display: none; padding: 0 12px 12px; border-top: 1px solid var(--line); }
.de-row.open .de-detail { display: block; }
.de-sub { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); margin: 12px 0 6px; }
.de-code { margin: 0; padding: 10px; font-size: 11px; line-height: 1.7; background: rgba(0, 0, 0, 0.32); border: 1px solid var(--line); border-radius: 8px; color: #cdd5e6; white-space: pre-wrap; word-break: break-all; max-height: 190px; overflow: auto; }
.demo-foot { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 16px; margin-top: 24px; font-size: 13px; color: var(--muted); }

.method { display: inline-block; font-family: var(--mono); font-size: 10.5px; font-weight: 700; padding: 4px 7px; border-radius: 5px; min-width: 52px; text-align: center; flex: none; }
.m-GET { background: rgba(108, 198, 255, 0.14); color: #6cc6ff; }
.m-POST { background: rgba(95, 227, 154, 0.14); color: #5fe39a; }
.m-PUT, .m-PATCH { background: rgba(243, 196, 74, 0.14); color: #f3c44a; }
.m-DELETE { background: rgba(255, 122, 133, 0.14); color: #ff7a85; }
.m-OPTIONS, .m-HEAD { background: rgba(170, 179, 197, 0.14); color: #aab3c5; }

/* ============ api ============ */
.api-layout { display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 22px; align-items: start; }
.code-card { border: 1px solid var(--line-strong); border-radius: 14px; overflow: hidden; background: rgba(9, 12, 20, 0.9); }
.code-tabs { display: flex; align-items: center; gap: 4px; padding: 8px 10px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.code-tab { padding: 7px 12px; border: 0; background: transparent; color: var(--dim); font-size: 12px; font-family: var(--mono); cursor: pointer; border-radius: 7px; }
.code-tab:hover { color: var(--txt); }
.code-tab.active { color: var(--txt); background: rgba(107, 140, 255, 0.14); }
.code-copy { margin-left: auto; padding: 6px 10px; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--muted); font-size: 11.5px; cursor: pointer; }
.code-copy:hover { border-color: var(--brand); color: var(--txt); }
.code-panels { padding: 4px 0; }
.code-panel { display: none; margin: 0; padding: 18px 20px; font-size: 12.5px; line-height: 1.8; color: #c7d0e2; white-space: pre; overflow-x: auto; }
.code-panel.active { display: block; }
.api-list h3 { font-size: 14px; margin: 4px 0 16px; }
.api-list ul { list-style: none; margin: 0 0 18px; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.api-list li { display: flex; align-items: center; gap: 9px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.api-list li:last-child { border-bottom: 0; }
.api-list code { font-size: 11px; color: #b9c6e0; word-break: break-all; }
.api-list em { margin-left: auto; font-style: normal; font-size: 11px; color: var(--dim); white-space: nowrap; }
.text-link { font-size: 12.5px; color: var(--brand); text-decoration: none; }
.text-link:hover { text-decoration: underline; }

/* ============ use cases ============ */
.usecase-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.usecase { position: relative; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); transition: 0.25s; }
.usecase:hover { border-color: var(--line-strong); transform: translateY(-3px); }
.uc-n { position: absolute; top: 20px; right: 24px; font-size: 26px; font-weight: 800; color: rgba(255, 255, 255, 0.06); }
.usecase h3 { font-size: 16px; margin: 0 0 9px; }
.usecase p { font-size: 13.5px; line-height: 1.78; color: var(--muted); margin: 0; max-width: 90%; }

/* ============ deploy band ============ */
.deploy-band { position: relative; z-index: 1; border-block: 1px solid var(--line); background: radial-gradient(800px 300px at 50% 120%, rgba(107, 140, 255, 0.18), transparent 70%), rgba(255, 255, 255, 0.012); }
.deploy-inner { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding-top: 66px; padding-bottom: 66px; }
.deploy-inner h2 { font-size: clamp(24px, 3vw, 34px); letter-spacing: -0.025em; margin: 0 0 12px; }
.deploy-inner p { font-size: 14.5px; line-height: 1.8; color: var(--muted); margin: 0; max-width: 600px; }
.deploy-actions { display: flex; flex-direction: column; gap: 10px; flex: none; }

/* ============ faq ============ */
.faq-wrap { max-width: 820px; }
.faq-list { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.faq-list details { border-bottom: 1px solid var(--line); background: var(--surface); }
.faq-list details:last-child { border-bottom: 0; }
.faq-list summary { padding: 18px 22px; font-size: 14.5px; font-weight: 600; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; font-size: 20px; color: var(--brand); font-weight: 400; line-height: 1; transition: 0.2s; }
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: 0; padding: 0 22px 20px; font-size: 13.5px; line-height: 1.85; color: var(--muted); }

/* ============ final cta ============ */
.final-cta { position: relative; z-index: 1; padding: 20px 0 110px; }
.final-inner { text-align: center; padding: 70px 24px; border: 1px solid var(--line-strong); border-radius: 22px; background: radial-gradient(600px 260px at 50% 0%, rgba(107, 140, 255, 0.16), transparent 70%), rgba(255, 255, 255, 0.02); }
.final-inner h2 { font-size: clamp(25px, 3.2vw, 38px); letter-spacing: -0.025em; margin: 0 0 14px; }
.final-inner p { color: var(--muted); font-size: 15px; margin: 0 0 28px; }
.final-inner .hero-cta { justify-content: center; }

/* ============ footer ============ */
.site-footer { position: relative; z-index: 1; border-top: 1px solid var(--line); background: rgba(4, 6, 11, 0.6); }
.footer-inner { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-top: 54px; padding-bottom: 40px; }
.footer-brand p { font-size: 13px; line-height: 1.8; color: var(--dim); max-width: 330px; margin: 16px 0 14px; }
.footer-status { font-size: 11.5px; color: var(--green); font-family: var(--mono); }
.footer-col h4 { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--txt); margin: 4px 0 16px; }
.footer-col a { display: block; font-size: 13px; color: var(--dim); text-decoration: none; margin-bottom: 11px; transition: 0.2s; }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 20px; padding-bottom: 26px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); }

/* ============ toast / reveal ============ */
.toast { position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%); z-index: 100; padding: 11px 18px; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(22, 28, 42, 0.96); box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45); font-size: 13px; }
.hidden { display: none !important; }
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.in { opacity: 1; transform: none; }

/* ============ responsive ============ */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; gap: 48px; }
  .hero-copy { max-width: 680px; }
  .hero-visual { max-width: 620px; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .api-layout { grid-template-columns: 1fr; }
  .deploy-inner { flex-direction: column; align-items: flex-start; }
  .deploy-actions { flex-direction: row; flex-wrap: wrap; }
  .steps { grid-template-columns: 1fr; gap: 14px; }
  .step-line { display: none; }
}
@media (max-width: 860px) {
  .nav-links {
    display: none; position: absolute; top: 68px; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    padding: 10px 24px 18px; background: rgba(7, 9, 16, 0.98);
    border-bottom: 1px solid var(--line); backdrop-filter: blur(16px);
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav-links a::after { display: none; }
  .nav-toggle { display: block; }
}
@media (max-width: 720px) {
  .section { padding: 72px 0; }
  .hero { padding: 56px 0 30px; }
  .trust { flex-direction: column; align-items: flex-start; gap: 16px; margin-top: 48px; }
  .metrics-inner { grid-template-columns: repeat(2, 1fr); gap: 22px 0; }
  .metric:nth-child(2) { border-right: 0; }
  .demo-shell { grid-template-columns: 1fr; }
  .demo-pane { min-height: auto; }
  .demo-setup { border-right: 0; border-bottom: 1px solid var(--line); }
  .usecase-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
  .mock-window { transform: none; }
  .float-badge-1 { right: 0; } .float-badge-2 { left: 0; }
  .api-list em { display: none; }
}
@media (max-width: 520px) {
  .container { padding: 0 18px; }
  .hide-sm { display: none; }
  .feature-grid { grid-template-columns: 1fr; }
  .hero-cta .btn { flex: 1; }
  .demo-foot { flex-direction: column; text-align: center; }
  .footer-inner { grid-template-columns: 1fr; }
  .footer-brand { grid-column: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .float-badge, .live-badge i, .de-row { animation: none; }
  .mock-window, .hero-visual:hover .mock-window { transform: none; }
}

/* ============ theme toggle (one icon slot) ============ */
.theme-toggle {
  width: 36px; height: 32px; padding: 0;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface); color: var(--muted);
  cursor: pointer; transition: 0.2s;
}
.theme-toggle:hover { border-color: var(--brand); color: var(--txt); }
.theme-toggle svg { display: block; }

/* ============ light theme ============ */
html[data-theme='light'] {
  --bg: #f7f8fc;
  --surface: rgba(16, 24, 40, 0.028);
  --surface-2: #ffffff;
  --line: rgba(16, 24, 40, 0.10);
  --line-strong: rgba(16, 24, 40, 0.18);
  --txt: #101828;
  --muted: #475467;
  --dim: #667085;
  --brand: #4f6fe0;
  --brand-2: #8b5cf6;
  --green: #0e9f6e;
}
html[data-theme='light'] body { background: #f7f8fc; }
html[data-theme='light'] .bg-glow {
  background:
    radial-gradient(880px 520px at 78% -8%, rgba(107, 140, 255, 0.13), transparent 66%),
    radial-gradient(720px 520px at 4% 26%, rgba(160, 107, 255, 0.09), transparent 66%);
}
html[data-theme='light'] .bg-grid {
  background-image:
    linear-gradient(rgba(16, 24, 40, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.045) 1px, transparent 1px);
  opacity: 0.7;
}
html[data-theme='light'] .site-header { background: rgba(255, 255, 255, 0.78); }
html[data-theme='light'] .site-header.scrolled { background: rgba(255, 255, 255, 0.93); }
html[data-theme='light'] .nav-links { background: rgba(255, 255, 255, 0.98); }
html[data-theme='light'] .lang-toggle { background: #fff; }
html[data-theme='light'] .btn-primary { box-shadow: 0 8px 24px rgba(79, 111, 224, 0.22); }
html[data-theme='light'] .btn-outline { background: #fff; }
html[data-theme='light'] .gradient-text {
  background: linear-gradient(100deg, #3b5bdb, #8b5cf6 55%, #0e9f6e);
  -webkit-background-clip: text; background-clip: text;
}
html[data-theme='light'] .trust-items span { color: #98a2b3; }
html[data-theme='light'] .mock-window {
  background: linear-gradient(160deg, #ffffff, #f4f6fb);
  box-shadow: 0 26px 60px rgba(16, 24, 40, 0.14), 0 0 0 1px rgba(16, 24, 40, 0.04);
}
html[data-theme='light'] .mock-bar { background: rgba(16, 24, 40, 0.02); }
html[data-theme='light'] .mock-code { color: #344054; }
html[data-theme='light'] .c-key { color: #175cd3; }
html[data-theme='light'] .c-str { color: #067647; }
html[data-theme='light'] .c-num { color: #b54708; }
html[data-theme='light'] .c-bool { color: #3538cd; }
html[data-theme='light'] .c-punct { color: #667085; }
html[data-theme='light'] .dots i { background: #d0d5dd; }
html[data-theme='light'] .dots i:first-child { background: #ff6b6b; }
html[data-theme='light'] .dots i:nth-child(2) { background: #f9c74f; }
html[data-theme='light'] .dots i:nth-child(3) { background: #5dd39e; }
html[data-theme='light'] .float-badge { background: #fff; box-shadow: 0 12px 30px rgba(16, 24, 40, 0.14); }
html[data-theme='light'] .metrics,
html[data-theme='light'] .section-alt { background: rgba(16, 24, 40, 0.022); }
html[data-theme='light'] .feature,
html[data-theme='light'] .step,
html[data-theme='light'] .usecase,
html[data-theme='light'] .de-row { background: #fff; }
html[data-theme='light'] .feature::before { background: radial-gradient(380px 180px at 0 0, rgba(79, 111, 224, 0.10), transparent 70%); }
html[data-theme='light'] .feature-icon { background: rgba(79, 111, 224, 0.10); border-color: rgba(79, 111, 224, 0.22); }
html[data-theme='light'] .feature-icon svg { stroke: #4f6fe0; }
html[data-theme='light'] .step-code { color: #067647; background: rgba(14, 159, 110, 0.08); border-color: rgba(14, 159, 110, 0.22); }
html[data-theme='light'] .demo-shell { background: #fff; box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12); }
html[data-theme='light'] .copy-code,
html[data-theme='light'] .de-code { background: #f2f4f8; color: #344054; }
html[data-theme='light'] .copy-code { color: #067647; }
html[data-theme='light'] .demo-empty-icon { color: #d0d5dd; }
html[data-theme='light'] .m-GET { background: rgba(23, 92, 211, 0.10); color: #175cd3; }
html[data-theme='light'] .m-POST { background: rgba(6, 118, 71, 0.10); color: #067647; }
html[data-theme='light'] .m-PUT, html[data-theme='light'] .m-PATCH { background: rgba(181, 71, 8, 0.10); color: #b54708; }
html[data-theme='light'] .m-DELETE { background: rgba(180, 35, 49, 0.10); color: #b42318; }
html[data-theme='light'] .m-OPTIONS, html[data-theme='light'] .m-HEAD { background: rgba(71, 84, 103, 0.10); color: #475467; }
html[data-theme='light'] .code-card { background: #fff; }
html[data-theme='light'] .code-tabs { background: rgba(16, 24, 40, 0.02); }
html[data-theme='light'] .code-panel { color: #344054; }
html[data-theme='light'] .api-list code { color: #475467; }
html[data-theme='light'] .uc-n { color: rgba(16, 24, 40, 0.06); }
html[data-theme='light'] .deploy-band {
  background: radial-gradient(800px 300px at 50% 120%, rgba(79, 111, 224, 0.11), transparent 70%), #fff;
}
html[data-theme='light'] .final-inner {
  background: radial-gradient(600px 260px at 50% 0%, rgba(79, 111, 224, 0.10), transparent 70%), #fff;
}
html[data-theme='light'] .faq-list details { background: #fff; }
html[data-theme='light'] .site-footer { background: rgba(255, 255, 255, 0.72); }
html[data-theme='light'] .toast { background: #fff; color: var(--txt); box-shadow: 0 12px 34px rgba(16, 24, 40, 0.18); }
