:root {
  --bg: #1e1f29;
  --surface: #2a2c3b;
  --border: #3a3d50;
  --text: #c6d0f5;
  --bright: #e6ebff;
  --muted: #a5adce;
  --faint: #737994;
  --green: #3ddc84;
  --green-light: #a8f5c8;
  --green-dark: #0f9d58;
  --green-glow: rgb(61 220 132 / 0.16);
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

code, pre { font-family: var(--mono); font-size: 0.9em; }
:not(pre) > code {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 0.05em 0.4em;
  border-radius: 6px;
}

.sprite { display: none; }
.icon {
  width: 1.1em;
  height: 1.1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.icon.fill { fill: currentColor; stroke: none; }

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px max(16px, calc((100% - 1080px) / 2));
  background: rgb(30 31 41 / 0.5);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  backdrop-filter: blur(16px) saturate(1.3);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.nav.scrolled {
  border-bottom-color: var(--border);
  box-shadow: 0 8px 30px rgb(0 0 0 / 0.25);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--bright);
  font-weight: 700;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.brand:hover { text-decoration: none; }
.brand img { border-radius: 7px; }
.nav nav { display: flex; align-items: center; gap: 6px; font-size: 15px; }
.nav nav a {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  padding: 7px 12px;
  border-radius: 999px;
  transition: color 0.2s, background-color 0.2s;
}
.nav nav a:hover { color: var(--bright); background: rgb(255 255 255 / 0.06); text-decoration: none; }
.nav nav .gh { color: var(--text); border: 1px solid var(--border); margin-left: 6px; }
.nav nav .gh:hover { border-color: var(--muted); }

main, footer {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 16px;
}

.hero {
  position: relative;
  text-align: center;
  padding: 88px 0 56px;
}
.hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  top: -40px;
  left: 50%;
  width: min(900px, 100vw);
  height: 520px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse 50% 50% at 50% 30%, var(--green-glow), transparent 70%);
  pointer-events: none;
}
.hero-logo {
  border-radius: 23px;
  box-shadow:
    0 0 0 1px rgb(255 255 255 / 0.06),
    0 20px 50px rgb(0 0 0 / 0.45),
    0 0 90px rgb(61 220 132 / 0.22);
}
h1 {
  margin: 30px 0 18px;
  font-size: clamp(38px, 7vw, 66px);
  line-height: 1.04;
  letter-spacing: -0.03em;
  color: var(--bright);
  text-wrap: balance;
}
.shine {
  background: linear-gradient(100deg, var(--green-light) 0%, var(--green) 55%, #7ee8ad 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.lede {
  max-width: 640px;
  margin: 0 auto;
  font-size: 19px;
  color: var(--muted);
  text-wrap: pretty;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin: 34px 0 18px;
}
.button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgb(255 255 255 / 0.03);
  color: var(--bright);
  font-weight: 600;
  transition: transform 0.2s var(--ease), border-color 0.2s, box-shadow 0.2s, filter 0.2s;
}
.button:hover { text-decoration: none; border-color: var(--muted); transform: translateY(-1px); }
.button:active { transform: translateY(0); }
.button.primary {
  background: linear-gradient(90deg, var(--green-light), var(--green) 52%, var(--green-dark));
  border: 0;
  padding: 14px 25px;
  color: #0b2416;
}
.button.primary:hover { filter: brightness(1.06); }
.fine { font-size: 14px; color: var(--faint); margin: 0; }

.shots { position: relative; padding: 16px 0 36px; }
.shots::before {
  content: "";
  position: absolute;
  inset: 15% 5% 10%;
  z-index: -1;
  background: radial-gradient(ellipse at center, rgb(61 220 132 / 0.14), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
.phones {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  align-items: start;
}
.phone {
  margin: 0;
  overflow: hidden;
  aspect-ratio: 9 / 20;
  border-radius: clamp(20px, 3.4vw, 36px);
  border: 1px solid rgb(255 255 255 / 0.1);
  background: #000;
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.6),
    0 30px 60px -20px rgb(0 0 0 / 0.7),
    inset 0 0 0 1px rgb(255 255 255 / 0.04);
  transition: transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.phone:nth-child(even) { transform: translateY(28px); }
.phone:hover {
  transform: translateY(-6px);
  box-shadow:
    0 0 0 1px rgb(0 0 0 / 0.6),
    0 40px 70px -20px rgb(0 0 0 / 0.75);
}
.phone:nth-child(even):hover { transform: translateY(22px); }
.phone img {
  display: block;
  width: 400%;
  height: auto;
  transform: translateX(calc(var(--i) * -25%));
}

.section { padding: 96px 0 0; }
h2 {
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  color: var(--bright);
  margin: 0 0 24px;
}
h3 { font-size: 18px; margin: 0 0 6px; color: var(--bright); letter-spacing: -0.01em; }
.muted { color: var(--muted); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}
.grid article {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: start;
  column-gap: 12px;
  row-gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}
.grid h3 { margin: 0; }
.grid p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 16px; }
.badge {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 8px;
  color: var(--green);
  background: rgb(61 220 132 / 0.12);
}
.badge .icon { width: 17px; height: 17px; stroke-width: 2; }

.flow {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  padding: 20px 24px;
  margin-bottom: 28px;
}
.peer {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--bright);
  text-align: center;
  line-height: 1.3;
}
.peer .icon { width: 40px; height: 40px; color: var(--muted); stroke-width: 1.4; }
.peer .muxer-logo { border-radius: 10px; box-shadow: 0 0 0 1px rgb(255 255 255 / 0.14); }
.peer .cmux-logo { margin: -3px 0; }
.device { display: inline-grid; place-items: center; }
.device .icon { grid-area: 1 / 1; }
.device img { grid-area: 1 / 1; border-radius: 4px; margin-top: -4px; }
.link {
  flex: 1;
  position: relative;
  margin-top: 19px;
  min-width: 60px;
  text-align: center;
  font-size: 13px;
  line-height: 1.35;
  color: var(--faint);
}
.link span {
  position: absolute;
  left: 0;
  right: 0;
  top: -26px;
  line-height: 2em;
}
.link::after {
  content: "";
  display: block;
  height: 2px;
  border-radius: 1px;
  background:
    repeating-linear-gradient(90deg, var(--green) 0 10px, transparent 10px 18px),
    linear-gradient(90deg, var(--border), var(--border));
  background-size: 18px 2px, 100% 2px;
  animation: flow 0.9s linear infinite;
}
@keyframes flow { to { background-position: 18px 0, 0 0; } }
.how p { color: var(--muted); text-wrap: pretty; margin-bottom: 0; }

.steps {
  list-style: none;
  counter-reset: step;
  padding: 0;
  margin: 0;
}
.steps li {
  counter-increment: step;
  position: relative;
  padding: 4px 0 36px 46px;
}
.steps h3 { line-height: 34px; margin: 0 0 4px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 6px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface);
  color: var(--green);
  font-weight: 700;
  font-size: 15px;
  font-family: var(--mono);
}
.steps p { margin: 0 0 8px; color: var(--muted); }
.steps p:last-child { margin: 0; }
pre {
  margin: 10px 0 0;
  padding: 14px 56px 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  line-height: 1.6;
  color: var(--bright);
}
pre code { font-size: 14px; }
.code { position: relative; }
.code::after {
  content: "";
  position: absolute;
  top: 1px;
  right: 1px;
  bottom: 1px;
  width: 64px;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, transparent, var(--surface) 55%);
  pointer-events: none;
}
.copy {
  position: absolute;
  z-index: 1;
  top: 8px;
  right: 8px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s, background-color 0.2s;
}
.copy:hover { color: var(--bright); border-color: var(--muted); }
.copy .icon { grid-area: 1 / 1; width: 16px; height: 16px; transition: opacity 0.15s, transform 0.2s var(--ease); }
.copy .done { opacity: 0; transform: scale(0.6); }
.copy.copied { color: var(--green); border-color: rgb(61 220 132 / 0.5); background: rgb(61 220 132 / 0.08); }
.copy.copied .icon { opacity: 0; transform: scale(0.6); }
.copy.copied .done { opacity: 1; transform: scale(1); }

.checks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
.checks li {
  position: relative;
  padding-left: 40px;
  color: var(--muted);
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: rgb(61 220 132 / 0.12);
}
.checks li::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0.1em;
  width: 9px;
  height: 5px;
  margin-top: 7px;
  border-left: 2px solid var(--green);
  border-bottom: 2px solid var(--green);
  transform: rotate(-45deg);
}

footer {
  margin-top: 112px;
  padding-top: 32px;
  padding-bottom: 48px;
  font-size: 14px;
  color: var(--faint);
  text-align: center;
}
footer p { margin: 4px 0; }

.steps li, .grid article { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .link::after { animation: none; }
  .phone, .button { transition: none; }
}

@media (max-width: 900px) {
  .shots { padding-bottom: 0; }
  .phones { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .phone:nth-child(even) { transform: none; }
  .phone:nth-child(even):hover { transform: translateY(-6px); }
}

@media (max-width: 680px) {
  .nav nav a:not(.gh) { display: none; }
  .hero { padding-top: 56px; }
  .hero-logo { width: 80px; height: 80px; border-radius: 19px; }
  .phones {
    display: flex;
    gap: 14px;
    margin: 0 -16px;
    padding: 12px 16px 20px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .phones::-webkit-scrollbar { display: none; }
  .phone { flex: 0 0 min(72vw, 280px); scroll-snap-align: center; }
  .phone:hover, .phone:nth-child(even):hover { transform: none; }
  .section { padding-top: 72px; }
  .flow { flex-direction: column; align-items: stretch; }
  .link { display: flex; flex-direction: column; align-items: center; margin: 0; padding: 8px 0; }
  .link span { position: static; }
  .link::after {
    width: 2px;
    height: 22px;
    margin: 8px 0 0;
    background:
      repeating-linear-gradient(180deg, var(--green) 0 8px, transparent 8px 14px),
      linear-gradient(180deg, var(--border), var(--border));
    background-size: 2px 14px, 2px 100%;
    animation-name: flow-v;
  }
  @keyframes flow-v { to { background-position: 0 14px, 0 0; } }
  .steps li { padding: 2px 0 28px 42px; }
  footer { margin-top: 80px; }
}
