:root {
  --bg: #05070f;
  --bg-1: #0a0e1d;
  --panel: rgba(14, 19, 40, 0.66);
  --panel-solid: #0c1124;
  --line: rgba(148, 170, 255, 0.11);
  --line-2: rgba(148, 170, 255, 0.2);
  --text: #e9edf9;
  --muted: #8f98ba;
  --dim: #5c658a;
  --indigo: #2f3d8f;
  --teal: #1a9cae;
  --indigo-hi: #7c88ff;
  --teal-hi: #43dbe8;
  --spark: #ffcf7a;
  --ok: #46e09d;
  --err: #ff6b7d;
  --mac-accent: #0a84ff;
  --grad: linear-gradient(115deg, #8a94ff 0%, #5fb8ff 45%, #43dbe8 100%);
  --brand: linear-gradient(135deg, #2f3d8f, #1a9cae);

  --f-display: "IBM Plex Sans", ui-sans-serif, -apple-system, "Helvetica Neue", sans-serif;
  --f-sans: "IBM Plex Sans", ui-sans-serif, -apple-system, "Helvetica Neue", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--f-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
code, pre, kbd { font-family: var(--f-mono); }
p code, li code, h2 code {
  font-size: 0.86em;
  padding: 0.1em 0.38em;
  border-radius: 6px;
  background: rgba(124, 136, 255, 0.12);
  border: 1px solid rgba(124, 136, 255, 0.18);
  color: #c9cfff;
  white-space: nowrap;
}
::selection { background: rgba(67, 219, 232, 0.35); color: #fff; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ico { width: 18px; height: 18px; flex: none; }

/* ---------- backdrop ---------- */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
#mesh { position: absolute; inset: 0; width: 100%; height: 100%; }
.aurora {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.55;
  will-change: transform;
}
.aurora--a {
  width: 60vmax; height: 60vmax;
  left: -18vmax; top: -26vmax;
  background: radial-gradient(circle, rgba(47, 61, 143, 0.9), transparent 65%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.aurora--b {
  width: 50vmax; height: 50vmax;
  right: -20vmax; top: -10vmax;
  background: radial-gradient(circle, rgba(26, 156, 174, 0.55), transparent 65%);
  animation: drift-b 32s ease-in-out infinite alternate;
}
.aurora--c {
  width: 40vmax; height: 40vmax;
  left: 30vw; top: 55vh;
  background: radial-gradient(circle, rgba(92, 70, 200, 0.35), transparent 65%);
  animation: drift-a 38s ease-in-out infinite alternate-reverse;
}
@keyframes drift-a { to { transform: translate3d(8vw, 6vh, 0) scale(1.1); } }
@keyframes drift-b { to { transform: translate3d(-10vw, 12vh, 0) scale(0.92); } }

.gridlines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(148, 170, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(148, 170, 255, 0.045) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 20%, transparent 75%);
}
.grain {
  position: absolute;
  inset: -50%;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite;
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  20% { transform: translate(-3%, 2%); }
  40% { transform: translate(2%, -3%); }
  60% { transform: translate(-1%, 3%); }
  80% { transform: translate(3%, 1%); }
  100% { transform: translate(0, 0); }
}

/* ---------- nav ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px var(--gutter);
  transition: background 0.3s, border-color 0.3s, backdrop-filter 0.3s;
  border-bottom: 1px solid transparent;
}
.nav.is-scrolled {
  background: rgba(5, 7, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom-color: var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand__icon { width: 30px; height: 30px; filter: drop-shadow(0 4px 14px rgba(26, 156, 174, 0.45)); }
.brand__word {
  font-family: var(--f-mono);
  font-weight: 600;
  letter-spacing: 0.32em;
  font-size: 14px;
}
.nav__links { display: flex; gap: 4px; margin-left: auto; }
.nav__links a {
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.nav__links a:hover { color: var(--text); background: rgba(148, 170, 255, 0.08); }

/* ---------- buttons ---------- */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 52px;
  padding: 0 24px;
  border-radius: 999px;
  font-weight: 500;
  font-size: 15px;
  white-space: nowrap;
  transition: transform 0.25s var(--ease), box-shadow 0.25s, background 0.25s, border-color 0.25s;
  isolation: isolate;
}
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--primary {
  color: #fff;
  background: var(--brand);
  box-shadow: 0 10px 40px -10px rgba(26, 156, 174, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  overflow: hidden;
}
.btn--primary::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: sheen 4.5s var(--ease) infinite 1.5s;
}
@keyframes sheen { 0%, 60% { transform: translateX(-120%); } 100% { transform: translateX(120%); } }
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 16px 50px -10px rgba(26, 156, 174, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.3); }
.btn--primary:hover .ico { transform: translateX(3px); }
.btn .ico { transition: transform 0.25s var(--ease); }
.btn--ghost {
  border: 1px solid var(--line-2);
  background: rgba(14, 19, 40, 0.5);
  backdrop-filter: blur(8px);
}
.btn--ghost:hover { border-color: rgba(148, 170, 255, 0.4); background: rgba(124, 136, 255, 0.1); }

.endpoint-chip {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  height: 52px;
  padding: 0 18px 0 20px;
  border-radius: 999px;
  border: 1px dashed rgba(67, 219, 232, 0.4);
  background: rgba(10, 14, 30, 0.6);
  font-size: 14px;
  color: #bdf4f9;
  transition: border-color 0.2s, background 0.2s;
}
.endpoint-chip:hover { border-color: var(--teal-hi); background: rgba(67, 219, 232, 0.08); }
.endpoint-chip .ico { width: 16px; height: 16px; color: var(--muted); }
.ico--check { display: none; color: var(--ok) !important; }
.is-copied .ico--copy { display: none; }
.is-copied .ico--check { display: block; }

.pulse-dot {
  position: relative;
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
}
.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1.5px solid var(--ok);
  animation: ping 2s var(--ease) infinite;
}
@keyframes ping { 0% { transform: scale(0.4); opacity: 1; } 100% { transform: scale(2); opacity: 0; } }

/* ---------- hero ---------- */
.hero {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(120px, 16vh, 168px) var(--gutter) 40px;
}
.hero__copy { max-width: 980px; }

.acronym {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0 0.42em;
  margin: 0 0 28px;
  padding: 8px 16px 8px 12px;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: rgba(14, 19, 40, 0.55);
  font-family: var(--f-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--dim);
}
.acronym__dot {
  width: 6px; height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--spark);
  box-shadow: 0 0 12px var(--spark);
}
.acronym b {
  font-weight: 600;
  color: var(--text);
  text-shadow: 0 0 0 transparent;
  animation: glyph 6s ease-in-out infinite;
}
.acronym span:nth-of-type(2) b { animation-delay: 0.15s; }
.acronym span:nth-of-type(3) b { animation-delay: 0.3s; }
.acronym span:nth-of-type(5) b:first-child { animation-delay: 0.45s; }
.acronym span:nth-of-type(5) b:last-child { animation-delay: 0.6s; }
.acronym span:nth-of-type(6) b { animation-delay: 0.75s; }
@keyframes glyph {
  0%, 70%, 100% { color: var(--text); text-shadow: none; }
  78% { color: var(--teal-hi); text-shadow: 0 0 14px rgba(67, 219, 232, 0.9); }
}

.hero__title {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(3.1rem, 8.4vw, 7.8rem);
  line-height: 0.95;
  letter-spacing: -0.02em;
}
.hero__title .line { display: block; }
.hero__title em { font-style: italic; }
.grad {
  background: var(--grad);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.1em;
  animation: grad-shift 8s ease-in-out infinite alternate;
}
@keyframes grad-shift { to { background-position: 100% 0; } }
.js .hero__title .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(0.45em) rotate(3deg);
  filter: blur(10px);
  animation: word-in 1s var(--ease) forwards;
  animation-delay: calc(var(--i) * 80ms + 120ms);
}
.js .hero__title .word.grad {
  animation: word-in 1s var(--ease) forwards, grad-shift 8s ease-in-out 1.2s infinite alternate;
  animation-delay: calc(var(--i) * 80ms + 120ms), 1.2s;
}
@keyframes word-in { to { opacity: 1; transform: none; filter: blur(0); } }

.hero__lede {
  max-width: 620px;
  margin: 28px 0 36px;
  font-size: clamp(17px, 1.6vw, 19px);
  color: var(--muted);
}
.js .hero__lede, .js .hero__cta, .js .hero__meta, .js .acronym {
  opacity: 0;
  animation: fade-up 0.9s var(--ease) forwards;
}
.js .acronym { animation-delay: 0s; }
.js .hero__lede { animation-delay: 0.7s; }
.js .hero__cta { animation-delay: 0.85s; }
.js .hero__meta { animation-delay: 1s; }
@keyframes fade-up { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }
.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 30px 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dim);
}
.hero__meta li { display: flex; align-items: center; gap: 22px; }
.hero__meta li + li::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: var(--dim); margin-left: -12px; margin-right: -10px; }

/* ---------- router (shared wiring) ---------- */
.router {
  position: relative;
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 9vw, 150px);
  padding: 64px clamp(20px, 4vw, 48px) 84px;
  border: 1px solid var(--line);
  border-radius: 32px;
  background:
    radial-gradient(ellipse 50% 70% at 50% 50%, rgba(26, 156, 174, 0.12), transparent 70%),
    linear-gradient(180deg, rgba(14, 19, 40, 0.7), rgba(8, 11, 24, 0.55));
  box-shadow: 0 40px 120px -40px rgba(0, 0, 0, 0.8), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}
.router::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(140deg, rgba(124, 136, 255, 0.5), transparent 30%, transparent 70%, rgba(67, 219, 232, 0.45));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}
.wires {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  z-index: 1;
}
.wire {
  fill: none;
  stroke: rgba(140, 160, 255, 0.16);
  stroke-width: 1.5;
  transition: stroke 0.5s, opacity 0.5s;
}
.wire-flow {
  fill: none;
  stroke: rgba(140, 170, 255, 0.4);
  stroke-width: 1.5;
  stroke-dasharray: 1.5 11;
  stroke-linecap: round;
  animation: flow 1.6s linear infinite;
  transition: opacity 0.5s;
}
@keyframes flow { to { stroke-dashoffset: -25; } }
.comet {
  fill: none;
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke: var(--c, var(--spark));
  filter: drop-shadow(0 0 5px var(--c, var(--spark)));
}
.packets { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.pkt {
  position: absolute;
  left: 0; top: 0;
  will-change: transform;
}
.pkt__dot {
  position: absolute;
  width: 9px; height: 9px;
  margin: -4.5px 0 0 -4.5px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 35%, transparent), 0 0 18px 4px var(--c);
}
.pkt__label {
  position: absolute;
  left: 10px;
  bottom: 8px;
  padding: 3px 8px;
  border-radius: 6px;
  white-space: nowrap;
  font-family: var(--f-mono);
  font-size: 11px;
  color: var(--c);
  background: rgba(5, 7, 15, 0.88);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  box-shadow: 0 6px 20px -6px rgba(0, 0, 0, 0.8);
}
.pkt--req { --c: var(--spark); }
.pkt--res { --c: var(--teal-hi); }
.pkt--evt { --c: #b29bff; }
.pkt--err { --c: var(--err); }

.router__col {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.router__col--clients { align-items: flex-start; }
.router__col--servers { align-items: flex-end; }
.router__label {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--dim);
  margin-bottom: 4px;
}
.node {
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(100%, 240px);
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(9, 13, 28, 0.88);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.35s, box-shadow 0.35s, transform 0.35s var(--ease);
}
.node strong { display: block; font-weight: 500; font-size: 15px; line-height: 1.3; }
.node small { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.node__dot {
  width: 8px; height: 8px;
  flex: none;
  border-radius: 50%;
  background: var(--indigo-hi);
  box-shadow: 0 0 10px var(--indigo-hi);
}
.node--server .node__dot { background: var(--ok); box-shadow: 0 0 10px var(--ok); }
.node.is-hit {
  border-color: color-mix(in srgb, var(--hit, var(--spark)) 70%, transparent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--hit, var(--spark)) 12%, transparent), 0 0 30px -4px var(--hit, var(--spark));
  transform: scale(1.025);
}
.node.is-swapping { border-color: rgba(178, 155, 255, 0.6); }
.node.is-swapping .node__dot { background: var(--spark); box-shadow: 0 0 10px var(--spark); }

.hub {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.hub__icon {
  position: relative;
  width: clamp(104px, 12vw, 140px);
  height: auto;
  overflow: visible;
  filter: drop-shadow(0 18px 40px rgba(26, 156, 174, 0.55)) drop-shadow(0 0 30px rgba(47, 61, 143, 0.6));
}
.hub__icon .layer { transform-box: view-box; transform-origin: 512px 512px; animation: layer 6s var(--ease) infinite; }
.hub__icon .layer--1 { animation-name: layer-1; }
.hub__icon .layer--3 { animation-name: layer-3; }
@keyframes layer-1 { 0%, 100% { transform: none; } 45%, 60% { transform: translateY(-34px); } }
@keyframes layer { 0%, 100% { transform: none; } }
@keyframes layer-3 { 0%, 100% { transform: none; } 45%, 60% { transform: translateY(34px); } }
.hub__spark { transform-box: fill-box; transform-origin: center; animation: spark-spin 6s var(--ease) infinite; }
@keyframes spark-spin { 0%, 30% { transform: rotate(0) scale(1); } 55% { transform: rotate(90deg) scale(1.25); } 80%, 100% { transform: rotate(90deg) scale(1); } }
.hub.is-switching .hub__icon { animation: hub-bump 0.7s var(--ease-spring); }
@keyframes hub-bump { 40% { transform: scale(1.12) rotate(-4deg); } }

.hub__rings {
  position: absolute;
  top: calc(clamp(104px, 12vw, 140px) / 2);
  left: 50%;
  width: 0; height: 0;
}
.hub__rings i {
  position: absolute;
  width: 220px; height: 220px;
  margin: -110px 0 0 -110px;
  border-radius: 50%;
  border: 1px solid rgba(67, 219, 232, 0.35);
  animation: ring 4.5s var(--ease) infinite;
}
.hub__rings i:nth-child(2) { animation-delay: 1.5s; }
.hub__rings i:nth-child(3) { animation-delay: 3s; }
@keyframes ring { 0% { transform: scale(0.45); opacity: 0.9; } 100% { transform: scale(1.6); opacity: 0; } }
.hub.is-switching .hub__rings i { border-color: rgba(178, 155, 255, 0.7); }

.hub__ws {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(9, 13, 28, 0.9);
  font-size: 13px;
}
.hub__ws-k { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.hub__ws-v { font-weight: 600; min-width: 4.5em; text-align: center; }
.hub__url { font-size: 12px; color: var(--teal-hi); opacity: 0.85; }

.router__ticker {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 2;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: calc(100% - 32px);
  font-size: 12px;
  white-space: nowrap;
}
.router__ticker-k { font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
.router__ticker code { overflow: hidden; text-overflow: ellipsis; color: var(--muted); }

/* ---------- marquee ---------- */
.marquee { padding: 56px 0 24px; }
.marquee__caption {
  margin: 0 0 18px;
  text-align: center;
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--dim);
}
.marquee__track {
  display: flex;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent);
}
.marquee__row {
  display: flex;
  flex: none;
  gap: 56px;
  padding-right: 56px;
  animation: marquee 40s linear infinite;
}
.marquee__row span {
  font-family: var(--f-display);
  font-size: clamp(28px, 3.4vw, 42px);
  font-style: italic;
  color: rgba(233, 237, 249, 0.32);
  white-space: nowrap;
  transition: color 0.3s;
}
.marquee__row span:hover { color: var(--text); }
.marquee__row span::after { content: "✦"; font-style: normal; font-size: 0.4em; margin-left: 56px; vertical-align: middle; color: rgba(67, 219, 232, 0.4); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- sections ---------- */
.section {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: clamp(80px, 12vw, 150px) var(--gutter) 0;
}
.section__head { max-width: 780px; margin-bottom: clamp(40px, 6vw, 64px); }
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  font-family: var(--f-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-hi);
}
.kicker .ico { width: 12px; height: 12px; color: var(--spark); animation: twinkle 3s ease-in-out infinite; }
@keyframes twinkle { 50% { transform: rotate(90deg) scale(0.7); opacity: 0.6; } }
h2 {
  margin: 0;
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5.2vw, 4.4rem);
  line-height: 1;
  letter-spacing: -0.015em;
}
h2 em {
  font-style: italic;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  padding-right: 0.08em;
}
.section__lede { margin: 22px 0 0; font-size: 18px; color: var(--muted); max-width: 640px; }

.js .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
  transition-delay: var(--d, 0s);
}
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- compare ---------- */
.compare {
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  overflow: hidden;
}
.compare__bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 24px;
  border-bottom: 1px solid var(--line);
}
.seg {
  position: relative;
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(5, 7, 15, 0.7);
  border: 1px solid var(--line);
}
.seg__btn {
  position: relative;
  z-index: 1;
  padding: 9px 18px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--muted);
  transition: color 0.3s;
}
.seg__btn.is-on { color: #fff; }
.seg__thumb {
  position: absolute;
  top: 4px; bottom: 4px;
  left: 4px;
  width: var(--w, 50%);
  transform: translateX(var(--x, 0));
  border-radius: 999px;
  background: rgba(255, 107, 125, 0.22);
  border: 1px solid rgba(255, 107, 125, 0.45);
  transition: transform 0.5s var(--ease), width 0.5s var(--ease), background 0.5s, border-color 0.5s;
}
[data-mode="after"] .seg__thumb { background: var(--brand); border-color: rgba(67, 219, 232, 0.5); }

.stats { display: flex; flex-wrap: wrap; gap: 8px 36px; margin: 0; }
.stats div { display: flex; flex-direction: column-reverse; }
.stats dt { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dim); }
.stats dd { margin: 0; font-family: var(--f-display); font-size: 34px; line-height: 1.1; transition: color 0.5s; color: #ffb3bd; }
[data-mode="after"] .stats dd { color: #b7f5fb; }

.compare__stage {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 10vw, 180px);
  padding: 48px clamp(20px, 4vw, 48px);
  min-height: 400px;
}
.compare__col { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 22px; align-items: flex-start; }
.compare__col--servers { align-items: flex-end; gap: 26px; }
.cnode, .snode {
  position: relative;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-2);
  background: rgba(9, 13, 28, 0.95);
  transition: border-color 0.5s, box-shadow 0.6s var(--ease), transform 0.4s var(--ease);
}
.cnode strong, .snode strong { display: block; font-weight: 500; font-size: 15px; }
.cnode .cfg { display: block; font-family: var(--f-mono); font-size: 11px; color: #ff9eab; transition: color 0.5s; }
[data-mode="after"] .cnode .cfg { color: var(--teal-hi); }
.snode { display: flex; align-items: center; gap: 14px; min-width: 170px; justify-content: space-between; }
.snode__x {
  font-family: var(--f-mono);
  font-size: 12px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 107, 125, 0.16);
  color: #ffb3bd;
  transition: background 0.5s, color 0.5s;
}
[data-mode="before"] .snode {
  border-color: rgba(255, 107, 125, 0.35);
  box-shadow:
    7px 7px 0 -1px rgba(9, 13, 28, 0.95), 7px 7px 0 0 rgba(255, 107, 125, 0.3),
    14px 14px 0 -1px rgba(9, 13, 28, 0.95), 14px 14px 0 0 rgba(255, 107, 125, 0.2);
}
[data-mode="after"] .snode { border-color: rgba(70, 224, 157, 0.4); box-shadow: 0 0 30px -10px rgba(70, 224, 157, 0.5); }
[data-mode="after"] .snode__x { background: rgba(70, 224, 157, 0.15); color: var(--ok); }
.compare__hub {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  transition: opacity 0.6s var(--ease), transform 0.7s var(--ease-spring);
}
.compare__hub svg { width: 88px; height: 88px; filter: drop-shadow(0 12px 30px rgba(26, 156, 174, 0.6)); }
.compare__hub span { font-family: var(--f-mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--muted); }
[data-mode="before"] .compare__hub { opacity: 0; transform: scale(0.5) rotate(-20deg); }
.compare .wire { stroke-width: 1.4; }
.w-before { stroke: rgba(255, 107, 125, 0.32); }
.w-after { stroke: rgba(67, 219, 232, 0.35); }
[data-mode="before"] .w-after, [data-mode="after"] .w-before { opacity: 0; }

/* ---------- workspaces stage ---------- */
.section--wide { max-width: var(--wrap); }
.stage {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  background:
    radial-gradient(ellipse 60% 80% at 15% 100%, rgba(26, 156, 174, 0.55), transparent 60%),
    radial-gradient(ellipse 70% 70% at 90% 0%, rgba(47, 61, 143, 0.85), transparent 60%),
    radial-gradient(ellipse 50% 50% at 60% 70%, rgba(120, 90, 220, 0.3), transparent 70%),
    #0b1022;
  box-shadow: 0 60px 140px -50px rgba(0, 0, 0, 0.9);
  padding-bottom: 40px;
}
.menubar {
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 18px;
  height: 32px;
  padding: 0 18px;
  font-size: 13px;
  background: rgba(10, 12, 24, 0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.menubar__app { font-weight: 600; }
.menubar__spacer { flex: 1; }
.menubar__icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 22px;
  border-radius: 5px;
  color: #fff;
  transition: background 0.2s;
}
.menubar__icon svg { width: 17px; height: 17px; }
.menubar__icon[aria-expanded="true"], .menubar__icon:hover { background: rgba(255, 255, 255, 0.18); }
.menubar__clock { font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.85); }
.dropdown {
  position: absolute;
  top: 30px;
  right: 58px;
  width: 250px;
  padding: 5px;
  border-radius: 10px;
  background: rgba(32, 34, 46, 0.88);
  backdrop-filter: blur(30px) saturate(160%);
  -webkit-backdrop-filter: blur(30px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 20px 50px -10px rgba(0, 0, 0, 0.7);
  font-size: 13px;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: opacity 0.18s, transform 0.25s var(--ease);
}
.dropdown.is-open { opacity: 1; transform: none; pointer-events: auto; }
.dropdown__status { display: flex; align-items: center; gap: 8px; padding: 6px 10px; color: rgba(255, 255, 255, 0.75); }
.dropdown__sep { height: 1px; margin: 5px 8px; background: rgba(255, 255, 255, 0.1); }
.dropdown__label { padding: 3px 10px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.45); }
.dropdown__item, .dd-ws {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px;
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.92);
  cursor: default;
}
.dd-ws { cursor: pointer; width: 100%; text-align: left; }
.dd-ws__check { width: 14px; color: #fff; opacity: 0; }
.dd-ws.is-active .dd-ws__check { opacity: 1; }
.dd-ws__n { margin-left: auto; font-size: 12px; color: rgba(255, 255, 255, 0.45); }
.dd-ws:hover, .dd-ws.is-hover { background: var(--mac-accent); }
.dd-ws:hover .dd-ws__n, .dd-ws.is-hover .dd-ws__n { color: rgba(255, 255, 255, 0.8); }
.dropdown kbd { margin-left: auto; font-family: var(--f-sans); color: rgba(255, 255, 255, 0.45); }

.window {
  position: relative;
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) minmax(0, 1.1fr);
  height: 540px;
  margin: 36px clamp(16px, 4vw, 48px) 0;
  border-radius: 14px;
  overflow: hidden;
  background: #1c1d23;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 0 0.5px rgba(0, 0, 0, 0.8), 0 40px 100px -20px rgba(0, 0, 0, 0.85);
  font-size: 13px;
  color: #ececf1;
}
.win-side {
  padding: 14px 10px;
  background: rgba(40, 42, 54, 0.78);
  border-right: 1px solid rgba(0, 0, 0, 0.4);
}
.win-lights { display: flex; gap: 8px; padding: 2px 6px 18px; }
.win-lights i, .term__lights i { width: 12px; height: 12px; border-radius: 50%; background: #ff5f57; }
.win-lights i:nth-child(2), .term__lights i:nth-child(2) { background: #febc2e; }
.win-lights i:nth-child(3), .term__lights i:nth-child(3) { background: #28c840; }
.win-side__label { margin: 12px 8px 6px; font-size: 11px; font-weight: 600; color: rgba(255, 255, 255, 0.4); }
.ws-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 7px 10px;
  border-radius: 7px;
  text-align: left;
  font-size: 13.5px;
  transition: background 0.2s;
}
.ws-item:hover { background: rgba(255, 255, 255, 0.06); }
.ws-item.is-active { background: rgba(255, 255, 255, 0.12); }
.ws-item__ico { width: 16px; display: grid; place-items: center; color: rgba(255, 255, 255, 0.75); }
.ws-item__ico svg { width: 15px; height: 15px; }
.ws-item__n { margin-left: auto; font-variant-numeric: tabular-nums; color: rgba(255, 255, 255, 0.55); display: flex; gap: 6px; align-items: center; }
.ws-item.is-active .ws-item__n::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 6px var(--ok); }
.ws-item--static { cursor: default; color: rgba(255, 255, 255, 0.85); }

.win-main { display: flex; flex-direction: column; min-width: 0; border-right: 1px solid rgba(0, 0, 0, 0.45); background: #1e1f25; }
.win-main__head { padding: 16px 18px 6px; }
.win-main__head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.win-status { display: flex; align-items: center; gap: 8px; margin: 8px 0 0; color: rgba(255, 255, 255, 0.6); }
.win-status b { color: var(--ok); font-weight: 500; }
.radio { position: relative; width: 14px; height: 10px; }
.radio i { position: absolute; inset: 0; border: 1.5px solid var(--ok); border-radius: 50%; border-top-color: transparent; border-bottom-color: transparent; animation: ping 2s ease-out infinite; }
.radio i + i { animation-delay: 1s; }
.srv-list { flex: 1; overflow: hidden; padding: 6px 8px; }
.srv {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  transition: background 0.2s;
  animation: row-in 0.5s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 45ms);
}
@keyframes row-in { from { opacity: 0; transform: translateX(-14px); } }
.srv:hover { background: rgba(255, 255, 255, 0.04); }
.srv.is-selected { background: #2459d6; border-bottom-color: transparent; }
.srv__dot { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--ok); }
.srv__dot.is-off { background: rgba(255, 255, 255, 0.25); }
.srv__dot.is-starting { background: var(--spark); animation: blink 0.6s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0.2; } }
.srv__body { flex: 1; min-width: 0; }
.srv__name { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 500; }
.srv__tag { font-size: 10.5px; font-weight: 500; padding: 0 6px; border-radius: 5px; background: rgba(255, 255, 255, 0.1); color: rgba(255, 255, 255, 0.65); }
.srv.is-selected .srv__tag { background: rgba(255, 255, 255, 0.22); color: #fff; }
.srv__sub { font-size: 11.5px; color: rgba(255, 255, 255, 0.5); }
.srv.is-selected .srv__sub { color: rgba(255, 255, 255, 0.8); }

.tg {
  position: relative;
  display: inline-block;
  flex: none;
  width: 36px;
  height: 20px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  transition: background 0.25s;
  cursor: pointer;
}
.tg::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.4);
  transition: transform 0.3s var(--ease-spring);
}
.tg.is-on { background: var(--mac-accent); }
.tg.is-on::after { transform: translateX(16px); }
.srv.is-selected .tg.is-on { background: rgba(255, 255, 255, 0.25); }

.win-foot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  white-space: nowrap;
}
.win-foot .pulse-dot { width: 7px; height: 7px; }
.win-foot__sess { color: rgba(255, 255, 255, 0.45); }
.win-foot__btn { margin-left: auto; padding: 3px 10px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); }

.win-tools { display: flex; flex-direction: column; min-width: 0; background: #1b1c21; }
.win-tools__tabs {
  display: flex;
  align-self: center;
  margin: 14px 0 10px;
  padding: 2px;
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.07);
}
.win-tools__tabs span { padding: 3px 14px; border-radius: 5px; color: rgba(255, 255, 255, 0.75); }
.win-tools__tabs .is-on { background: var(--mac-accent); color: #fff; }
.win-tools__head { padding: 6px 16px 8px; color: rgba(255, 255, 255, 0.55); border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.tool-list { flex: 1; overflow: hidden; padding: 0 12px; }
.tool {
  display: flex;
  gap: 12px;
  padding: 10px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  animation: row-in 0.45s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 40ms);
  transition: opacity 0.3s;
}
.tool.is-off .tool__body { opacity: 0.4; }
.tool__name { font-size: 13.5px; font-weight: 500; }
.tool__exp { font-family: var(--f-mono); font-size: 11px; color: rgba(255, 255, 255, 0.4); }
.tool__desc { font-size: 12px; color: rgba(255, 255, 255, 0.62); }

.toasts {
  position: absolute;
  right: clamp(24px, 5vw, 64px);
  bottom: 20px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(340px, calc(100% - 48px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(14, 17, 32, 0.9);
  border: 1px solid rgba(178, 155, 255, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 16px 40px -12px rgba(0, 0, 0, 0.8), 0 0 30px -12px rgba(178, 155, 255, 0.6);
  font-size: 12.5px;
  animation: toast-in 0.55s var(--ease-spring) backwards, toast-out 0.45s var(--ease) forwards;
  animation-delay: var(--d, 0s), calc(var(--d, 0s) + 3.4s);
}
.toast__ico { grid-row: span 2; align-self: center; width: 22px; height: 22px; color: #b29bff; }
.toast b { font-weight: 600; }
.toast code { font-size: 11px; color: #c9b9ff; }
.toast code em { font-style: normal; color: var(--teal-hi); }
@keyframes toast-in { from { opacity: 0; transform: translateX(40px) scale(0.95); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px) scale(0.97); } }
.stage__hint { margin: 16px 0 0; text-align: center; font-size: 13px; color: var(--dim); }

/* ---------- bento ---------- */
.bento { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 22px 24px 26px;
  border-radius: 24px;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  isolation: isolate;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(67, 219, 232, 0.12), transparent 60%);
  transition: opacity 0.4s;
}
.card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(300px circle at var(--mx, 50%) var(--my, 50%), rgba(124, 136, 255, 0.6), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.card:hover::before, .card:hover::after { opacity: 1; }
.card--span2 { grid-column: span 2; }
.card--span3 { grid-column: span 3; }
.card h3 { margin: 0 0 8px; font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
.card p { margin: 0; font-size: 14.5px; color: var(--muted); }
.card p code { font-size: 0.82em; }
.card__viz {
  position: relative;
  height: 190px;
  margin-bottom: 22px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(5, 7, 15, 0.55);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12px;
}

/* namespacing */
.viz-ns { padding: 14px 16px; display: flex; flex-direction: column; gap: 7px; justify-content: center; }
.ns-row {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) 16px minmax(0, 1.4fr) 44px;
  align-items: center;
  gap: 10px;
  opacity: 0.25;
  transition: opacity 0.4s;
}
.ns-row.is-on { opacity: 1; }
.ns-src { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); }
.ns-src b { font-weight: 500; color: #b9c0ff; }
.ns-arrow { color: var(--dim); }
.ns-out { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.ns-out .slug { color: var(--indigo-hi); }
.ns-out .sep { color: var(--dim); }
.ns-out .sfx { color: var(--spark); background: rgba(255, 207, 122, 0.14); border-radius: 4px; padding: 0 2px; }
.ns-out .san { color: var(--teal-hi); text-decoration: underline dotted; text-underline-offset: 3px; }
.ns-len { text-align: right; font-size: 11px; color: var(--dim); }
.ns-len.is-max { color: var(--spark); }

/* switches */
.viz-switch { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px 16px; }
.viz-switch label { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 10px; border-radius: 9px; transition: background 0.3s; }
.viz-switch label span { transition: opacity 0.3s, text-decoration-color 0.3s; }
.viz-switch label:has(.tg:not(.is-on)) span { opacity: 0.4; text-decoration: line-through; }
.viz-switch label.flash { background: rgba(10, 132, 255, 0.14); }

/* keychain */
.viz-key { padding: 16px; display: flex; flex-direction: column; gap: 10px; justify-content: center; }
.kv { display: flex; flex-direction: column; gap: 2px; }
.kv__k { font-size: 11px; color: var(--dim); }
.kv__v { color: #ffb3bd; transition: color 0.3s; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kv__v.is-ref { color: var(--ok); }
.kv__v.is-ref::before { content: "🔒 "; filter: grayscale(1) brightness(1.6); }
.regex { align-self: flex-start; margin-top: 2px; padding: 3px 8px; border-radius: 6px; font-size: 10.5px; color: var(--spark); background: rgba(255, 207, 122, 0.1); border: 1px solid rgba(255, 207, 122, 0.25); }

/* backoff */
.viz-backoff { display: flex; flex-direction: column; justify-content: center; gap: 30px; padding: 20px 26px; }
.bo-status { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.bo-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 12px var(--ok); transition: background 0.3s, box-shadow 0.3s; }
.bo-status[data-state="crashed"] .bo-dot, .bo-status[data-state="error"] .bo-dot { background: var(--err); box-shadow: 0 0 12px var(--err); }
.bo-status[data-state="waiting"] .bo-dot { background: var(--spark); box-shadow: 0 0 12px var(--spark); animation: blink 0.8s steps(2) infinite; }
.bo-text { color: var(--text); }
.bo-track { position: relative; display: grid; grid-template-columns: 1fr 2fr 4fr 8fr 16fr auto; gap: 6px; }
.bo-step { position: relative; display: flex; flex-direction: column; gap: 8px; }
.bo-step i { position: relative; display: block; height: 6px; border-radius: 3px; background: rgba(148, 170, 255, 0.12); overflow: hidden; }
.bo-step i::after { content: ""; position: absolute; inset: 0; transform-origin: left; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--spark), #ffa45c); border-radius: inherit; }
.bo-step span { font-size: 11px; color: var(--dim); transition: color 0.3s; }
.bo-step.is-active span { color: var(--spark); }
.bo-step.is-done span { color: var(--muted); }
.bo-step--end i { width: 44px; }
.bo-step--end.is-active i { background: var(--err); box-shadow: 0 0 10px var(--err); }
.bo-step--end.is-active span { color: var(--err); }

/* import */
.viz-import { padding: 14px; }
.drop {
  position: relative;
  height: 100%;
  border: 1.5px dashed rgba(148, 170, 255, 0.25);
  border-radius: 12px;
  padding: 10px;
  transition: border-color 0.3s, background 0.3s;
}
.drop.is-over { border-color: var(--teal-hi); background: rgba(67, 219, 232, 0.06); }
.drop__label { position: absolute; left: 0; right: 0; top: 50%; transform: translateY(-50%); text-align: center; color: var(--dim); transition: opacity 0.3s; }
.drop.has-rows .drop__label { opacity: 0; }
.drop__rows { display: flex; flex-direction: column; gap: 6px; }
.imp-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 8px; border-radius: 7px; background: rgba(148, 170, 255, 0.06); animation: row-in 0.4s var(--ease) backwards; }
.imp-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { flex: none; font-size: 10.5px; padding: 1px 7px; border-radius: 999px; }
.tag--new { color: var(--ok); background: rgba(70, 224, 157, 0.13); }
.tag--dup { color: var(--spark); background: rgba(255, 207, 122, 0.13); }
.tag--bad { color: var(--err); background: rgba(255, 107, 125, 0.13); }
.tag--safe { color: var(--ok); background: rgba(70, 224, 157, 0.13); }
.tag--warn { color: var(--err); background: rgba(255, 107, 125, 0.15); }
.file-chip {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 2;
  padding: 6px 10px;
  border-radius: 8px;
  white-space: nowrap;
  font-size: 11px;
  background: #1a2140;
  border: 1px solid rgba(124, 136, 255, 0.45);
  box-shadow: 0 10px 30px -6px rgba(0, 0, 0, 0.8);
  animation: file-drop 1.1s var(--ease) forwards;
}
@keyframes file-drop {
  0% { transform: translate(-50%, -190%) rotate(-8deg); opacity: 0; }
  35% { opacity: 1; }
  70% { transform: translate(-50%, -50%) rotate(2deg) scale(1); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(0.6); opacity: 0; }
}

/* export */
.viz-export { padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; }
.viz-export pre { margin: 0; font-size: 10.5px; line-height: 1.55; color: var(--muted); white-space: pre; overflow: hidden; }
.viz-export .k { color: #b9c0ff; }
.viz-export .s { color: #9fe8c9; }
.viz-export .p { color: var(--dim); }
.viz-export .secret { transition: color 0.3s, background 0.3s; border-radius: 3px; }
.viz-export.is-secret .secret { color: #ffb3bd; background: rgba(255, 107, 125, 0.14); }
.export-bar { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mini-tg { display: inline-flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.mini-tg .tg { transform: scale(0.8); transform-origin: left center; margin-right: -6px; }

/* logs */
.viz-logs { display: flex; flex-direction: column; }
.logs__head { display: flex; justify-content: space-between; padding: 9px 14px; border-bottom: 1px solid var(--line); color: var(--dim); font-size: 11px; }
.logs__live { display: inline-flex; align-items: center; gap: 8px; color: var(--ok); }
.logs__live .pulse-dot { width: 6px; height: 6px; }
.logs__body {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 6px 14px 10px;
  overflow: hidden;
  mask-image: linear-gradient(180deg, transparent, #000 40%);
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%);
}
.log {
  display: grid;
  grid-template-columns: 64px 62px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 2.5px 0;
  white-space: nowrap;
  animation: log-in 0.4s var(--ease) backwards;
}
@keyframes log-in { from { opacity: 0; transform: translateY(10px); } }
.log__t { color: var(--dim); }
.log__k { color: var(--indigo-hi); }
.log__k--event { color: #b29bff; }
.log__k--stderr { color: var(--spark); }
.log__m { overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.log__m mark { background: rgba(255, 107, 125, 0.16); color: #ffb3bd; border-radius: 3px; padding: 0 2px; }
.log__r { color: var(--ok); }
.log__r.is-err { color: var(--err); }

/* proxy */
.viz-proxy { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; }
.pill {
  padding: 7px 14px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: rgba(124, 136, 255, 0.08);
  color: #c9cfff;
  animation: bob 3.6s ease-in-out infinite;
}
.pill:nth-child(2) { animation-delay: 0.4s; color: #b7f5fb; border-color: rgba(67, 219, 232, 0.3); background: rgba(67, 219, 232, 0.07); }
.pill:nth-child(3) { animation-delay: 0.8s; color: #ffe2ad; border-color: rgba(255, 207, 122, 0.3); background: rgba(255, 207, 122, 0.07); }
@keyframes bob { 50% { transform: translateY(-5px); } }

/* ---------- connect ---------- */
.connect { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 6vw, 80px); align-items: center; }
.ticks { margin: 28px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; color: var(--muted); font-size: 15px; }
.ticks li { display: flex; gap: 10px; align-items: center; }
.ticks .ico { width: 16px; height: 16px; color: var(--ok); }

.term {
  position: relative;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(7, 9, 20, 0.92);
  box-shadow: 0 50px 120px -40px rgba(26, 156, 174, 0.35), 0 30px 80px -30px rgba(0, 0, 0, 0.9);
  overflow: hidden;
}
.term__bar { display: flex; align-items: center; gap: 16px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, 0.02); }
.term__lights { display: flex; gap: 7px; }
.term__lights i { width: 11px; height: 11px; }
.term__title { font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.tabs { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs__btn { padding: 6px 12px; border-radius: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; transition: background 0.2s, color 0.2s; }
.tabs__btn:hover { color: var(--text); }
.tabs__btn.is-on { background: rgba(124, 136, 255, 0.16); color: #fff; }
.term__body { position: relative; }
.term__code {
  margin: 0;
  min-height: 236px;
  padding: 22px 22px 26px;
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  color: #d5daf0;
}
.term__code .c-k { color: #b9c0ff; }
.term__code .c-s { color: #9fe8c9; }
.term__code .c-p { color: var(--dim); }
.term__code .c-cmd { color: var(--teal-hi); }
.term__code .c-flag { color: var(--spark); }
.term__code .c-prompt { color: var(--indigo-hi); user-select: none; }
.term__code .c-out { color: var(--dim); }
.term__code .c-ok { color: var(--ok); }
.caret { display: inline-block; width: 8px; height: 1.1em; margin-left: 1px; vertical-align: -0.18em; background: var(--teal-hi); animation: caret 1s steps(2) infinite; }
@keyframes caret { 50% { opacity: 0; } }
.copy-btn {
  position: absolute;
  right: 12px;
  top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid var(--line-2);
  background: rgba(14, 19, 40, 0.8);
  transition: color 0.2s, border-color 0.2s;
}
.copy-btn:hover { color: var(--text); border-color: rgba(148, 170, 255, 0.4); }
.copy-btn .ico { width: 14px; height: 14px; }
.copy-btn--bar { position: static; margin-left: auto; }
.term__foot { padding: 11px 22px; border-top: 1px solid var(--line); font-family: var(--f-mono); font-size: 12px; color: var(--dim); }
.term__foot .st { transition: color 0.3s; }
.term__foot .st.is-on { color: var(--ok); }

/* ---------- architecture ---------- */
.arch {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr) minmax(0, 1fr);
  grid-template-areas: ". clients ." "app daemon servers";
  gap: 72px clamp(48px, 8vw, 110px);
  align-items: center;
  padding: 44px clamp(20px, 4vw, 48px);
  border-radius: 28px;
  border: 1px solid var(--line);
  background:
    radial-gradient(ellipse 40% 60% at 50% 65%, rgba(47, 61, 143, 0.3), transparent 70%),
    var(--panel);
}
.arch__box {
  position: relative;
  z-index: 2;
  padding: 18px 20px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: rgba(9, 13, 28, 0.95);
  transition: border-color 0.35s, box-shadow 0.35s;
}
.arch__box strong { display: block; font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.arch__box small { display: block; margin-top: 4px; font-family: var(--f-mono); font-size: 11.5px; color: var(--muted); }
.arch__tag {
  display: inline-block;
  margin-bottom: 10px;
  padding: 2px 8px;
  border-radius: 6px;
  font-family: var(--f-mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--teal-hi);
  background: rgba(67, 219, 232, 0.1);
}
.arch__box--clients { grid-area: clients; justify-self: center; text-align: center; }
.arch__box--app { grid-area: app; }
.arch__box--app .arch__tag { color: #c9cfff; background: rgba(124, 136, 255, 0.14); }
.arch__box--daemon {
  grid-area: daemon;
  padding: 22px 24px;
  border-color: rgba(255, 164, 92, 0.35);
  box-shadow: 0 0 60px -20px rgba(255, 164, 92, 0.4);
}
.arch__box--daemon .arch__tag { color: #ffc28f; background: rgba(255, 164, 92, 0.12); }
.arch__crates { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 14px 0 0; padding: 0; list-style: none; font-family: var(--f-mono); font-size: 11.5px; }
.arch__crates li { padding: 6px 9px; border-radius: 8px; background: rgba(148, 170, 255, 0.06); border: 1px solid var(--line); color: var(--text); }
.arch__crates em { font-style: normal; color: var(--dim); }
.arch__servers { grid-area: servers; display: flex; flex-direction: column; gap: 14px; }
.arch__box--srv { padding: 12px 16px; }
.arch__box--srv strong { font-size: 15px; font-weight: 500; }
.arch__box.is-hit { border-color: color-mix(in srgb, var(--hit, var(--spark)) 70%, transparent); box-shadow: 0 0 34px -6px var(--hit, var(--spark)); }

/* ---------- security ---------- */
.security { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); align-items: center; margin-bottom: 56px; }
.gate {
  border-radius: 20px;
  border: 1px solid var(--line-2);
  background: rgba(7, 9, 20, 0.9);
  overflow: hidden;
  font-family: var(--f-mono);
  font-size: 12.5px;
}
.gate__head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.gate__shield { width: 26px; height: 26px; color: var(--ok); animation: shield 3s ease-in-out infinite; }
.gate__shield svg { width: 100%; height: 100%; }
@keyframes shield { 50% { filter: drop-shadow(0 0 8px var(--ok)); } }
.gate__rows { position: relative; height: 236px; padding: 10px 12px; display: flex; flex-direction: column; justify-content: flex-end; gap: 8px; overflow: hidden; mask-image: linear-gradient(180deg, transparent, #000 30%); -webkit-mask-image: linear-gradient(180deg, transparent, #000 30%); }
.req {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: rgba(148, 170, 255, 0.04);
  animation: log-in 0.45s var(--ease) backwards;
}
.req__h { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req__h b { font-weight: 500; color: var(--text); }
.req__h span { color: var(--muted); }
.req__v { font-size: 11px; padding: 2px 9px; border-radius: 999px; opacity: 0; transform: scale(1.6); transition: opacity 0.3s, transform 0.4s var(--ease-spring); }
.req.is-judged .req__v { opacity: 1; transform: none; }
.req--ok .req__v { color: var(--ok); background: rgba(70, 224, 157, 0.13); }
.req--no .req__v { color: var(--err); background: rgba(255, 107, 125, 0.14); }
.req--no.is-judged { border-color: rgba(255, 107, 125, 0.3); animation: log-in 0.45s var(--ease) backwards, shake 0.4s 0.5s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

.sec-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.sec { padding: 24px; border-radius: 20px; border: 1px solid var(--line); background: var(--panel); }
.sec__n { font-family: var(--f-display); font-style: italic; font-size: 34px; line-height: 1; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sec h3 { margin: 16px 0 8px; font-size: 17px; font-weight: 600; }
.sec p { margin: 0; font-size: 14px; color: var(--muted); }
.sec p code { font-size: 0.82em; }

/* ---------- install ---------- */
.install { display: grid; grid-template-columns: minmax(0, 0.55fr) minmax(0, 1.45fr); gap: 24px; align-items: start; }
.reqs { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; }
.reqs li { display: flex; flex-direction: column; gap: 2px; padding: 14px 18px; border-radius: 16px; border: 1px solid var(--line); background: var(--panel); }
.reqs span { font-family: var(--f-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--dim); }
.reqs b { font-weight: 500; }
.term--install .term__code { min-height: 300px; font-size: 13px; }

/* ---------- cta ---------- */
.cta {
  position: relative;
  max-width: var(--wrap);
  margin: clamp(100px, 14vw, 170px) auto 0;
  padding: 0 var(--gutter);
  text-align: center;
}
.cta__orb { position: relative; width: 120px; height: 120px; margin: 0 auto 36px; }
.cta__orb svg { position: relative; width: 100%; height: 100%; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 24px 50px rgba(26, 156, 174, 0.6)); }
.cta__orb::before {
  content: "";
  position: absolute;
  inset: -60px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent, rgba(124, 136, 255, 0.5), transparent 30%, rgba(67, 219, 232, 0.5), transparent 60%);
  filter: blur(30px);
  animation: spin 10s linear infinite;
}
@keyframes float { 50% { transform: translateY(-12px) rotate(3deg); } }
@keyframes spin { to { transform: rotate(360deg); } }
.cta h2 { font-size: clamp(2.6rem, 6vw, 5.2rem); }
.cta__row { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 40px; }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: var(--wrap);
  margin: clamp(100px, 12vw, 150px) auto 0;
  padding: 28px var(--gutter) 40px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--dim);
}
.foot p { margin: 0; }
.foot > a:last-child { font-family: var(--f-mono); color: var(--muted); }
.foot > a:last-child:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .window { grid-template-columns: 190px minmax(0, 1fr); }
  .win-tools { display: none; }
  .bento { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card--span3 { grid-column: span 2; }
  .sec-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .nav__links { display: none; }
  .nav .btn { margin-left: auto; }

  .router, .compare__stage {
    grid-template-columns: minmax(0, 1fr);
    gap: 56px;
    padding: 36px 16px 76px;
  }
  .router__col { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
  .router__col--clients, .router__col--servers { align-items: stretch; }
  .router__label { width: 100%; text-align: center; margin: 0; }
  .node { width: calc(50% - 5px); padding: 10px 12px; gap: 9px; }
  .router__col--clients .node { width: calc(33.333% - 7px); flex-direction: column; text-align: center; }
  .node strong { font-size: 13.5px; }
  .node small { font-size: 10px; }

  .compare__stage { padding-bottom: 40px; min-height: 0; }
  .compare__col { flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; align-items: stretch; }
  .compare__col--servers { gap: 14px 22px; }
  .cnode { width: calc(33.333% - 7px); padding: 10px; text-align: center; }
  .cnode strong { font-size: 13px; }
  .cnode .cfg { font-size: 9.5px; overflow-wrap: anywhere; }
  .snode { min-width: 0; width: calc(50% - 22px); padding: 10px 12px; }
  .snode strong { font-size: 13.5px; }

  .connect, .security, .install { grid-template-columns: minmax(0, 1fr); }

  .arch {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "clients app" "daemon daemon" "servers servers";
    gap: 56px 16px;
    padding: 28px 16px;
  }
  .arch__box--clients { justify-self: stretch; text-align: left; }
  .arch__servers { flex-direction: row; gap: 10px; }
  .arch__servers .arch__box { flex: 1; min-width: 0; padding: 10px 12px; }
  .arch__box strong { font-size: 16px; }
}

@media (max-width: 640px) {
  .hero__cta { flex-direction: column; align-items: stretch; }
  .hero__cta .btn, .endpoint-chip { justify-content: center; }
  .endpoint-chip code { font-size: 13px; }

  .window { grid-template-columns: minmax(0, 1fr); height: 470px; margin: 20px 12px 0; }
  .win-side { display: none; }
  .win-foot__sess, .win-foot__btn { display: none; }
  .dropdown { right: 10px; }
  .toasts { right: 12px; width: calc(100% - 24px); }

  .bento { grid-template-columns: minmax(0, 1fr); }
  .card--span2, .card--span3 { grid-column: auto; }
  .ns-row { grid-template-columns: minmax(0, 1fr) 12px minmax(0, 1.3fr); }
  .ns-len { display: none; }
  .log { grid-template-columns: 52px minmax(0, 1fr) auto; }
  .log__k { display: none; }

  .sec-grid { grid-template-columns: minmax(0, 1fr); }
  .compare__bar { padding: 16px; }
  .stats { gap: 8px 20px; }
  .stats dd { font-size: 26px; }
  .term__code { font-size: 12px; padding: 18px 16px 22px; }
  .arch__crates { grid-template-columns: 1fr; }
  .arch__servers .arch__box small { display: none; }
  .foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .marquee__row { animation: none; }
}

.wire-flow.w-before { stroke: rgba(255, 107, 125, 0.7); }
.wire-flow.w-after { stroke: rgba(67, 219, 232, 0.75); }
.srv-list, .tool-list { overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,.15) transparent; }
.viz-export pre { line-height: 1.42; }
.export-bar, .mini-tg, .tag { white-space: nowrap; }
.regex { max-width: 100%; font-size: 10px; overflow-wrap: anywhere; }
#connect-code { padding-top: 54px; }

/* plain headings */
.hero__title {
  font-weight: 600;
  font-size: clamp(2.5rem, 6.2vw, 5.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.hero__copy { max-width: 1080px; }
.line--url { margin-top: 0.28em; display: flex; align-items: center; }
.hero__title code.word {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 0.62em;
  letter-spacing: -0.02em;
  color: var(--teal-hi);
  text-shadow: 0 0 40px rgba(67, 219, 232, 0.45);
}
.caret--h1 { width: 0.32em; height: 0.62em; margin-left: 0.12em; vertical-align: 0; }
h2 {
  font-weight: 600;
  font-size: clamp(2rem, 4.2vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.03em;
}
.cta h2 { font-size: clamp(2.2rem, 5vw, 4rem); }
.stats dd { font-family: var(--f-mono); font-weight: 500; font-size: 28px; letter-spacing: -0.02em; }
.sec__n { font-family: var(--f-mono); font-style: normal; font-weight: 500; font-size: 14px; letter-spacing: 0.08em; }
.marquee__row span { font-family: var(--f-mono); font-style: normal; font-weight: 500; font-size: clamp(20px, 2.4vw, 30px); letter-spacing: -0.02em; }
.acronym, .kicker { letter-spacing: 0.06em; }
@media (max-width: 640px) {
  .stats dd { font-size: 22px; }
  .hero__title { max-width: none; }
}

.acronym { padding: 0; border: 0; background: none; font-size: 13px; letter-spacing: 0.02em; }
h1, h2, h3 { text-wrap: balance; }
.section__lede, .hero__lede { text-wrap: pretty; }

.marquee__track { flex-direction: column; gap: 14px; }
.marquee__lane { display: flex; }
.marquee__lane .marquee__row { gap: 40px; padding-right: 40px; animation-duration: var(--dur, 80s); }
.marquee__lane--rev .marquee__row { animation-direction: reverse; }
.marquee__lane:nth-child(2) .marquee__row span { color: rgba(233, 237, 249, 0.22); }
.marquee__lane:nth-child(3) .marquee__row span { color: rgba(233, 237, 249, 0.16); }
.marquee__row span { font-size: clamp(16px, 1.8vw, 22px); }
.marquee__row span::after { margin-left: 40px; }
.marquee__track:hover .marquee__row { animation-play-state: paused; }
