/* Jev Voice — docs site */
:root {
  --bg: #07091a;
  --surface: #0f1328;
  --glass: rgba(255, 255, 255, .04);
  --line: rgba(255, 255, 255, .09);
  --indigo: #8b7cff;
  --indigo-deep: #4b3ad9;
  --mint: #4fd1a5;
  --amber: #f2b84b;
  --rose: #f47c7c;
  --text: #ecebf9;
  --muted: #9a9dbd;
  --grad: linear-gradient(135deg, #a89cff, #5b49f0);
  --font-display: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
  --nav-h: 64px;
  --maxw: 1160px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: calc(var(--nav-h) + 16px); scroll-behavior: smooth; }
body { overflow-x: hidden; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 0%, transparent 85%);
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -3;
  background:
    radial-gradient(700px 420px at 10% -5%, rgba(139, 124, 255, .16), transparent 65%),
    radial-gradient(800px 500px at 90% 5%, rgba(79, 209, 165, .07), transparent 65%),
    radial-gradient(900px 600px at 50% 110%, rgba(139, 124, 255, .07), transparent 60%),
    var(--bg);
  pointer-events: none;
}

h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1.15; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin-bottom: 14px; letter-spacing: -.01em; }
h3 { font-size: 1.05rem; font-weight: 600; }
a { color: var(--indigo); text-decoration: none; }
a:hover { text-decoration: underline; }
code, kbd {
  font-family: var(--font-mono);
  font-size: .86em;
  background: rgba(139, 124, 255, .1);
  border: 1px solid rgba(139, 124, 255, .18);
  border-radius: 5px;
  padding: .08em .4em;
  white-space: nowrap;
}
kbd { background: rgba(255,255,255,.06); border-color: var(--line); }
pre {
  font-family: var(--font-mono);
  font-size: .82rem;
  line-height: 1.55;
  background: #0a0d1f;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px 18px;
  overflow-x: auto;
  color: #d7d9ee;
}
pre code { background: none; border: 0; padding: 0; white-space: pre; font-size: inherit; }
img, svg { display: block; max-width: 100%; }
::selection { background: rgba(139, 124, 255, .35); }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 3px; border-radius: 4px; }

.skip-link { position: absolute; left: -999px; top: 8px; z-index: 200; background: var(--surface); border: 1px solid var(--line); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.section { padding: 88px 0; }
.eyebrow {
  font-family: var(--font-mono);
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--indigo);
  margin-bottom: 14px;
}
.section-sub { color: var(--muted); max-width: 720px; font-size: 1.05rem; margin-bottom: 34px; }
.muted { color: var(--muted); }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; gap: 18px;
  padding: 0 24px;
  background: rgba(7, 9, 26, .72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-brand { display: flex; align-items: center; gap: 11px; }
.nav-brand:hover { text-decoration: none; }
.mark { width: 32px; height: 32px; flex: none; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 1.02rem; letter-spacing: .06em; color: var(--text); white-space: nowrap; }
.wordmark em { font-style: normal; margin-left: .4em; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.nav-links { display: flex; gap: 2px; margin-left: auto; }
.nav-links a { color: var(--muted); font-size: .88rem; padding: 7px 11px; border-radius: 8px; }
.nav-links a:hover { color: var(--text); background: var(--glass); text-decoration: none; }
.nav-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; color: var(--muted); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn:hover { color: var(--text); border-color: rgba(139,124,255,.5); text-decoration: none; }
.hamburger { display: none; width: 36px; height: 36px; border: 1px solid var(--line); background: none; border-radius: 9px; cursor: pointer; flex-direction: column; justify-content: center; gap: 5px; align-items: center; }
.hamburger span { display: block; width: 16px; height: 2px; background: var(--text); border-radius: 2px; }
.mobile-menu { position: sticky; top: var(--nav-h); z-index: 49; background: rgba(7, 9, 26, .96); border-bottom: 1px solid var(--line); padding: 10px 24px 16px; }
.mobile-menu nav { display: grid; gap: 2px; }
.mobile-menu a { color: var(--text); padding: 10px 8px; border-radius: 8px; }
.mobile-menu a:hover { background: var(--glass); text-decoration: none; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 12px 20px; border-radius: 11px;
  font-weight: 600; font-size: .95rem;
  border: 1px solid transparent; cursor: pointer;
  transition: box-shadow .2s, border-color .2s, transform .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn svg { width: 17px; height: 17px; }
.btn-primary { background: var(--grad); color: #0b0a1f; }
.btn-primary:hover { box-shadow: 0 10px 40px rgba(139, 124, 255, .35); }
.btn-ghost { background: var(--glass); border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: rgba(139, 124, 255, .5); }

/* ---------- hero ---------- */
.hero { position: relative; padding: 96px 0 72px; overflow: hidden; }
.hero-inner { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,.9fr); gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(2.3rem, 5vw, 3.7rem); letter-spacing: -.02em; margin: 18px 0 20px; }
.hero h1 em { font-style: normal; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { color: var(--muted); font-size: 1.12rem; max-width: 560px; margin-bottom: 28px; }
.hero-ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 26px; }
.hero-meta { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: .84rem; font-family: var(--font-mono); }
.hero-meta span::before { content: "●"; color: var(--mint); margin-right: 8px; font-size: .6rem; vertical-align: middle; }

/* voice card: hold → speak → release */
.voice-card {
  background: var(--surface); border: 1px solid var(--line); border-radius: 18px;
  padding: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.45);
  position: relative;
}
.voice-card::before {
  content: ""; position: absolute; inset: -1px; border-radius: 18px; z-index: -1;
  background: linear-gradient(135deg, rgba(139,124,255,.5), transparent 40%, transparent 60%, rgba(79,209,165,.3));
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000);
  -webkit-mask-composite: xor; mask-composite: exclude; padding: 1px;
}
.vc-top { display: flex; align-items: center; gap: 10px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); margin-bottom: 16px; }
.vc-top .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 4px rgba(244,124,124,.18); }
.vc-top .dot.idle { background: var(--muted); box-shadow: none; }
.wave { display: flex; align-items: center; gap: 4px; height: 56px; margin-bottom: 14px; }
.wave i { display: block; width: 4px; border-radius: 3px; background: var(--indigo); height: 8px; opacity: .85; animation: wave 1.1s ease-in-out infinite; }
.wave i:nth-child(2n) { animation-delay: .12s; } .wave i:nth-child(3n) { animation-delay: .24s; } .wave i:nth-child(5n) { animation-delay: .36s; }
@keyframes wave { 0%, 100% { height: 8px; } 50% { height: 42px; } }
.vc-transcript { font-family: var(--font-display); font-size: 1.25rem; min-height: 3.2em; }
.vc-transcript .caret { display: inline-block; width: 2px; height: 1.1em; background: var(--indigo); vertical-align: -3px; margin-left: 2px; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.vc-steps { margin-top: 16px; display: grid; gap: 7px; font-family: var(--font-mono); font-size: .78rem; color: var(--muted); }
.vc-steps li { list-style: none; display: flex; gap: 10px; align-items: baseline; opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.vc-steps li.on { opacity: 1; transform: none; }
.vc-steps b { color: var(--text); font-weight: 500; }
.vc-steps .ok { color: var(--mint); } .vc-steps .ms { margin-left: auto; color: var(--muted); }
.vc-hint { margin-top: 16px; font-size: .8rem; color: var(--muted); display: flex; gap: 8px; align-items: center; }
@media (prefers-reduced-motion: reduce) { .wave i, .vc-transcript .caret { animation: none; } .wave i { height: 20px; } }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; min-width: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: .92rem; }
.card .num { font-family: var(--font-mono); font-size: .74rem; color: var(--indigo); letter-spacing: .1em; margin-bottom: 10px; }

/* ---------- flow diagram ---------- */
.flow-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; align-items: center; }
.flow-controls .lbl { font-family: var(--font-mono); font-size: .74rem; color: var(--muted); margin-right: 6px; }
.chip {
  border: 1px solid var(--line); background: var(--glass); color: var(--text);
  border-radius: 999px; padding: 7px 14px; font-size: .86rem; cursor: pointer;
  font-family: var(--font-body);
}
.chip:hover { border-color: rgba(139,124,255,.5); }
.chip.is-on { background: rgba(139,124,255,.18); border-color: rgba(139,124,255,.6); }
.flow-desc { color: var(--muted); font-size: .92rem; margin-bottom: 18px; min-height: 2.6em; }
.flow-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.flow-scroll svg { min-width: 980px; width: 100%; height: auto; }

.fl-band { fill: rgba(255,255,255,.025); stroke: rgba(255,255,255,.06); }
.fl-lane { font-family: var(--font-mono); font-size: 11px; fill: var(--muted); letter-spacing: .08em; text-transform: uppercase; }
.fl-node rect { fill: #121736; stroke: rgba(255,255,255,.14); stroke-width: 1; rx: 10; transition: stroke .3s, fill .3s; }
.fl-node text { font-family: var(--font-body); font-size: 12.5px; fill: var(--text); text-anchor: middle; }
.fl-node .sub { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
.fl-node.jev rect { stroke: rgba(139,124,255,.55); }
.fl-node.verify rect { stroke: rgba(79,209,165,.55); }
.fl-node.fallback rect { stroke: rgba(242,184,75,.45); stroke-dasharray: 4 3; }
.fl-node.lit rect { fill: #1b2150; stroke: var(--indigo); stroke-width: 1.6; filter: drop-shadow(0 0 10px rgba(139,124,255,.45)); }
.fl-node.verify.lit rect { stroke: var(--mint); filter: drop-shadow(0 0 10px rgba(79,209,165,.45)); }
.fl-node.fallback.lit rect { stroke: var(--amber); filter: drop-shadow(0 0 10px rgba(242,184,75,.45)); }
.fl-node.dim { opacity: .28; }
.fl-link { fill: none; stroke: rgba(255,255,255,.22); stroke-width: 1.5; transition: stroke .3s, opacity .3s; }
.fl-link.lit { stroke: var(--indigo); stroke-width: 2; }
.fl-link.dash { stroke-dasharray: 5 4; }
.fl-link.dim { opacity: .18; }
.fl-label { font-family: var(--font-mono); font-size: 10px; fill: var(--muted); }
.fl-packet { fill: var(--indigo); filter: drop-shadow(0 0 6px rgba(139,124,255,.9)); offset-rotate: 0deg; }
.fl-node, .fl-link { transition: opacity .3s; }

.flow-legend { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 14px; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); }
.flow-legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 8px; vertical-align: -2px; border: 1.5px solid; }
.flow-legend .l-jev::before { border-color: var(--indigo); }
.flow-legend .l-ver::before { border-color: var(--mint); }
.flow-legend .l-fb::before { border-color: var(--amber); border-style: dashed; }
.flow-legend .l-local::before { border-color: rgba(255,255,255,.3); }

/* trace */
.trace { margin-top: 22px; }
.trace pre { max-height: 300px; }
.trace .t-k { color: var(--indigo); } .trace .t-v { color: #d7d9ee; } .trace .t-ok { color: var(--mint); } .trace .t-warn { color: var(--amber); } .trace .t-dim { color: var(--muted); }

/* ---------- questions table ---------- */
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 500; }
td:first-child { font-family: var(--font-mono); color: var(--indigo); white-space: nowrap; }
td:nth-child(2) { white-space: nowrap; width: 1%; }
td:first-child { width: 1%; }
.tag { display: inline-block; font-family: var(--font-mono); font-size: .7rem; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); }
.tag.choice { border-color: rgba(139,124,255,.5); color: var(--indigo); }
.tag.noul { border-color: rgba(79,209,165,.5); color: var(--mint); }

/* ---------- ladder ---------- */
.ladder { display: grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap: 10px; margin-top: 18px; }
.rung { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px 14px; position: relative; }
.rung::after { content: "→"; position: absolute; right: -14px; top: 14px; color: var(--muted); }
.rung:last-child::after { content: none; }
.rung .k { font-family: var(--font-mono); font-size: .7rem; color: var(--amber); letter-spacing: .1em; margin-bottom: 8px; }
.rung b { display: block; font-size: .95rem; margin-bottom: 6px; font-weight: 600; }
.rung p { color: var(--muted); font-size: .84rem; }

/* ---------- stats ---------- */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-top: 26px; }
.stat { border-left: 2px solid var(--indigo); padding: 4px 0 4px 16px; }
.stat b { display: block; font-family: var(--font-display); font-size: 1.6rem; }
.stat span { color: var(--muted); font-size: .84rem; }

/* ---------- safety ---------- */
.policy { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.policy ul { list-style: none; display: grid; gap: 8px; margin-top: 10px; }
.policy li { font-size: .92rem; color: var(--muted); padding-left: 20px; position: relative; }
.policy li::before { content: "▸"; color: var(--indigo); position: absolute; left: 0; top: 0; }
.policy li.block::before { color: var(--rose); content: "✕"; }
.policy li.ask::before { color: var(--amber); content: "?"; }

/* ---------- install ---------- */
.install-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 16px; }
.perm { display: grid; gap: 8px; margin-top: 12px; }
.perm li { list-style: none; display: flex; justify-content: space-between; gap: 10px; font-size: .9rem; border-bottom: 1px solid var(--line); padding: 8px 0; }
.perm li span:last-child { color: var(--muted); text-align: right; }

/* ---------- footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: .86rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 14px 28px; align-items: center; justify-content: space-between; }
.footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(14px); transition: opacity .55s ease, transform .55s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js [data-reveal] { opacity: 1; transform: none; transition: none; } }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .hero-inner { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .ladder { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rung::after { content: none; }
  .stats { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .hero h1 { font-size: 2.1rem; overflow-wrap: anywhere; }
  .section { padding: 64px 0; }
  .hero { padding: 56px 0 48px; }
  .grid-3, .grid-2, .policy, .install-grid, .ladder { grid-template-columns: 1fr; }
  .vc-transcript { font-size: 1.05rem; }
  th, td { padding: 9px 8px; }
  table { font-size: .82rem; }
}
