/* velqu-view landing — theme-aware custom paint. Light is the default;
   html.dark switches the variables. Code cards stay dark in BOTH
   themes (docs-site convention). */

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --heading: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --glow1: rgba(139, 92, 246, 0.10);
  --glow2: rgba(56, 189, 248, 0.07);
  --grid-line: rgba(15, 23, 42, 0.045);
  --grid-mask: rgba(15, 23, 42, 0.9);
  --shadow: 0 20px 50px -24px rgba(15, 23, 42, 0.25);
}
html.dark {
  --bg: #020617;
  --panel: rgba(255, 255, 255, 0.025);
  --panel-soft: #0b1020;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);
  --heading: #f8fafc;
  --text: #94a3b8;
  --muted: #8b94ab;
  --glow1: rgba(139, 92, 246, 0.18);
  --glow2: rgba(56, 189, 248, 0.10);
  --grid-line: rgba(255, 255, 255, 0.035);
  --grid-mask: rgba(0, 0, 0, 0.9);
  --shadow: 0 20px 50px -20px rgba(0, 0, 0, 0.6);
}

.hero-glow {
  background:
    radial-gradient(900px 480px at 50% -10%, var(--glow1), transparent 60%),
    radial-gradient(700px 380px at 80% 10%, var(--glow2), transparent 60%),
    var(--bg);
}
.hero-glow::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(720px 420px at 50% 0%, var(--grid-mask), transparent 75%);
  pointer-events: none;
}

/* code blocks — always dark */
.code-card {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: #0b1020;
  box-shadow: var(--shadow);
}
.code-head {
  padding: 8px 14px;
  font: 600 11px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #7c86a8;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.code-card pre { margin: 0; padding: 16px; overflow-x: auto; }
.code-card code {
  font: 400 12.5px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #c9d2ee;
  white-space: pre;
}
.c-kw  { color: #c4b5fd; }
.c-type{ color: #7dd3fc; }
.c-fn  { color: #fbbf24; }
.c-str { color: #86efac; }
.c-num { color: #f9a8d4; }
.c-tag { color: #f472b6; }
.c-attr{ color: #fbbf24; }
.c-cm  { color: #64748b; }
.code-inline {
  font: 500 0.85em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: rgba(139, 92, 246, 0.10);
  border: 1px solid rgba(139, 92, 246, 0.22);
  border-radius: 6px;
  padding: 1px 6px;
  color: #7c3aed;
}
html.dark .code-inline { color: #c4b5fd; }

/* cards */
.feature-card, .doc-step {
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--panel);
  padding: 24px;
  transition: border-color .15s, background .15s, transform .15s;
}
.feature-card:hover, .doc-step:hover { border-color: var(--border-strong); }
.feature-dot { width: 10px; height: 10px; border-radius: 4px; margin-bottom: 14px; box-shadow: 0 0 16px currentColor; }
.feature-card h3 { font-size: 15px; color: var(--heading); font-weight: 600; }
.feature-card p  { color: var(--text); }
.doc-step h3 { color: var(--heading); font-weight: 600; }
.step-num {
  width: 28px; height: 28px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px; color: #0b1020;
  background: linear-gradient(135deg, #a78bfa, #38bdf8);
  margin-bottom: 14px;
}

/* docs layout */
.doc-toc {
  display: flex; flex-wrap: wrap; gap: 8px;
}
.doc-toc a {
  font: 600 12px/1 ui-sans-serif, system-ui;
  padding: 8px 12px; border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted); text-decoration: none;
  transition: all .15s;
}
.doc-toc a:hover { color: var(--heading); border-color: var(--border-strong); background: var(--panel); }
.doc-sec { margin-top: 28px; scroll-margin-top: 90px; }
.doc-sec > h3 {
  font-size: 20px; font-weight: 700; color: var(--heading);
  display: flex; align-items: center; gap: 10px;
}
.doc-sec .anchor { color: #a78bfa; font-size: 15px; text-decoration: none; opacity: 0; transition: opacity .15s; }
.doc-sec > h3:hover .anchor { opacity: 1; }
.doc-sec p { color: var(--text); margin-top: 10px; }
.api-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin-top: 16px; }
.doc-note {
  margin-top: 16px; border-radius: 12px; padding: 14px 16px;
  border: 1px solid rgba(251, 191, 36, 0.35);
  background: rgba(251, 191, 36, 0.07);
  color: var(--text); font-size: 14px;
}
.doc-note b { color: var(--heading); }
.cli-table { width: 100%; border-collapse: collapse; margin-top: 16px; font-size: 14px; }
.cli-table th {
  text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 8px 12px; border-bottom: 1px solid var(--border);
}
.cli-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: top; }
.cli-table td:first-child { white-space: nowrap; color: var(--heading); font-weight: 600; }

/* render gallery */
.render-card {
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--panel-soft);
  transition: border-color .15s, transform .15s;
  display: block;
}
.render-card:hover { border-color: rgba(139,92,246,0.55); transform: translateY(-2px); }
.render-card img { width: 100%; height: 300px; object-fit: cover; object-position: top center; display: block; }
.pill {
  font: 600 11px/1 ui-sans-serif, system-ui;
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}
.pill-green { color: #059669; background: rgba(16,185,129,0.12); border: 1px solid rgba(5,150,105,0.35); }
html.dark .pill-green { color: #6ee7b7; }
.link { text-decoration: underline; text-underline-offset: 3px; }
.link:link, .link:visited { color: #7c3aed; }
html.dark .link:link, html.dark .link:visited { color: #93c5fd; }

/* theme toggle */
.theme-btn {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--panel);
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.theme-btn:hover { color: var(--heading); border-color: var(--border-strong); }
.theme-btn .ico-moon { display: none; }
html.dark .theme-btn .ico-moon { display: block; }
html.dark .theme-btn .ico-sun { display: none; }

/* ── polish pass: typography, install row, reveal, details ── */

html { font-family: 'Inter', ui-sans-serif, system-ui, sans-serif; }
h1, h2, h3, .font-semibold, .font-bold, .font-extrabold { letter-spacing: -0.015em; }
h1 { letter-spacing: -0.03em; }
.code-card code, .code-inline, .install-row code {
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

::selection { background: rgba(139, 92, 246, 0.30); }

html.dark ::-webkit-scrollbar { width: 10px; }
html.dark ::-webkit-scrollbar-thumb { background: #1e293b; border-radius: 6px; }
html.dark ::-webkit-scrollbar-track { background: #020617; }

/* install command row */
.install-row {
  display: flex; align-items: center; gap: 10px;
  max-width: min(92vw, 760px);
  padding: 10px 14px;
  border-radius: 12px;
  background: #0b1020;
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: var(--shadow);
  overflow-x: auto;
}
.install-row code {
  font-size: 12.5px; color: #c9d2ee; white-space: nowrap;
}
.copy-btn {
  display: flex; align-items: center; gap: 6px;
  font: 600 11px/1 'Inter', system-ui;
  color: #94a3b8; background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 8px; padding: 7px 10px;
  cursor: pointer; transition: all .15s; flex-shrink: 0;
  margin-left: auto;
}
.copy-btn:hover { color: #fff; background: rgba(139,92,246,0.25); border-color: rgba(139,92,246,0.5); }

/* engine credits row */
.cred {
  color: var(--muted); transition: color .15s;
  padding: 4px 0;
}
.cred:hover { color: var(--heading); }

/* scroll reveal */
/* reveal only hides content when JS is confirmed running (html.js);
   no-JS users, crawlers and failed observers see everything */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s ease, transform .55s ease; }
html.js .reveal.revealed { opacity: 1; transform: none; }
/* safety net: anything still hidden after 2s of real time shows itself */
@keyframes vv-reveal-fail { to { opacity: 1; transform: none; } }
html.js .reveal:not(.revealed) { animation: vv-reveal-fail 0s 2.5s forwards; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── A/B comparison slider (hero signature) ── */
.ab-slider {
  --pos: 50%;
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  cursor: ew-resize;
  user-select: none;
  touch-action: none;
  aspect-ratio: 1280 / 800;
}
.ab-slider img { width: 100%; height: 100%; display: block; object-fit: cover; pointer-events: none; }
.ab-overlay {
  position: absolute; inset: 0;
  clip-path: inset(0 0 0 var(--pos));
}
.ab-divider {
  position: absolute; top: 0; bottom: 0; left: var(--pos);
  width: 2px; margin-left: -1px;
  background: #8b5cf6;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.25), 0 0 18px rgba(139,92,246,0.55);
  pointer-events: none;
}
.ab-handle {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 38px; height: 38px; border-radius: 999px;
  background: #8b5cf6; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px rgba(139,92,246,0.5);
  pointer-events: none;
}
.ab-tag {
  position: absolute; bottom: 12px;
  font: 600 11px/1 'Inter', system-ui;
  padding: 7px 11px; border-radius: 999px;
  color: #fff; background: rgba(2, 6, 23, 0.72);
  border: 1px solid rgba(255,255,255,0.18);
  pointer-events: none;
}
.ab-tag-l { left: 12px; }
.ab-tag-r { right: 12px; }
