@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/bricolage-grotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/inter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #09090f;
  --surface: #12121c;
  --surface-2: #191927;
  --line: #24243a;
  --text: #f4f2ff;
  --muted: #a3a1c2;
  --faint: #8785a8; /* 4.9:1 or better on every surface (WCAG AA) */
  --accent: #8b7bff;
  --accent-2: #b8adff;
  --gold: #ffd27a;
  --mint: #63e6cf;
  --radius: 16px;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
  --font: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Code", Menlo, Consolas, monospace;
  --gutter: max(20px, calc((100% - 1180px) / 2));
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}
html {
  overflow-x: clip;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
}
a {
  color: inherit;
}
h1,
h2,
h3 {
  margin: 0;
  font-family: var(--display);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
h1 {
  font-size: clamp(3rem, 6.4vw, 5.6rem);
  font-weight: 700;
}
h1 em {
  font-style: normal;
  background: linear-gradient(100deg, var(--gold), #ff9f6e 45%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 650;
}
h3 {
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}
p {
  margin: 0;
}
:focus-visible {
  outline: 2px solid var(--accent-2);
  outline-offset: 3px;
}

.top,
main > section,
.foot {
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
section {
  padding-top: 120px;
  scroll-margin-top: 40px;
}

/* header */
.top {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 32px;
  padding-top: 16px;
  padding-bottom: 16px;
  background: rgba(9, 9, 15, 0.72);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(36, 36, 58, 0.6);
}
.brand {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.top nav {
  display: flex;
  gap: 26px;
  margin-right: auto;
}
.top nav a,
.link {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.95rem;
  white-space: nowrap;
}
.top nav a:hover,
.link:hover {
  color: var(--text);
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.btn {
  display: inline-block;
  white-space: nowrap;
  border: 0;
  cursor: pointer;
  text-decoration: none;
  background: var(--text);
  color: var(--bg);
  font: 600 1rem var(--font);
  padding: 13px 24px;
  border-radius: 999px;
  transition:
    transform 0.15s,
    background 0.15s;
}
.btn:hover {
  transform: translateY(-1px);
  background: #fff;
}
.btn.small {
  padding: 8px 18px;
  font-size: 0.9rem;
}
.btn.ghost {
  background: transparent;
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover {
  box-shadow: inset 0 0 0 1px var(--accent);
}

/* hero */
.hero {
  overflow-x: clip;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas:
    "copy phone"
    "console phone";
  column-gap: 72px;
  row-gap: 40px;
  align-items: start;
  padding-top: 72px;
  padding-bottom: 40px;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  right: 0;
  top: -120px;
  width: 900px;
  height: 900px;
  background:
    radial-gradient(340px circle at 60% 40%, rgba(139, 123, 255, 0.28), transparent),
    radial-gradient(220px circle at 75% 70%, rgba(255, 210, 122, 0.12), transparent);
  pointer-events: none;
}
.hero-copy {
  grid-area: copy;
  padding-top: 48px;
}
.lead {
  color: var(--muted);
  font-size: 1.22rem;
  margin: 26px 0 34px;
  max-width: 31em;
}
.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

/* live API console */
.console {
  grid-area: console;
  align-self: end;
  background: #07070c;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  max-width: 600px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45);
}
.console-head {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.console-head .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #2c2c44;
}
.console-title {
  margin-left: 8px;
  color: var(--faint);
  font: 0.8rem var(--mono);
}
.console pre {
  margin: 0;
  padding: 18px 20px 20px;
  min-height: 300px;
  font: 0.82rem/1.65 var(--mono);
  color: #d9d4ff;
  overflow-x: auto;
  white-space: pre;
}
.console .m {
  color: var(--mint);
  font-weight: 700;
}
.console .p {
  color: var(--text);
}
.console .h {
  color: var(--faint);
}
.console .k {
  color: var(--accent-2);
}
.console .s {
  color: #ffd9a3;
}
.console .n {
  color: #7fe3ff;
}
.console .ok {
  color: var(--mint);
}
.console .err {
  color: #ff8fa3;
}
.console .flash {
  animation: flash 0.6s;
}
@keyframes flash {
  from {
    background: rgba(139, 123, 255, 0.25);
  }
}

/* phone */
.phone-wrap {
  grid-area: phone;
  display: grid;
  justify-items: center;
  gap: 14px;
}
.phone {
  width: 380px;
  height: 780px;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(160deg, #2a2a3c, #15151f 40%, #23233a);
  box-shadow:
    0 0 0 1px #34344c,
    0 50px 120px rgba(0, 0, 0, 0.6),
    0 0 120px rgba(139, 123, 255, 0.18);
}
.screen {
  position: relative;
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
  background: #0e0e16;
  display: flex;
  flex-direction: column;
  isolation: isolate;
}
.phone-note {
  color: var(--faint);
  font-size: 0.85rem;
}
.status {
  display: flex;
  justify-content: space-between;
  padding: 14px 28px 4px;
  font-size: 0.82rem;
  font-weight: 600;
}
.status-icons {
  display: flex;
  gap: 4px;
  align-items: center;
}
.status-icons i {
  width: 16px;
  height: 9px;
  border-radius: 3px;
  background: var(--text);
  opacity: 0.85;
}
.status-icons i:first-child {
  width: 12px;
}
.app-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 20px;
  font-weight: 600;
  font-size: 0.95rem;
}
.app-bar .back {
  font-size: 1.6rem;
  line-height: 1;
}
.app-bar .more {
  color: var(--muted);
}

.post {
  flex: 1;
  padding: 6px 18px 0;
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 0.92rem;
}
.post-head {
  display: flex;
  gap: 10px;
  align-items: center;
}
.post-head small {
  display: block;
  color: var(--faint);
  font-size: 0.75rem;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: #0b0b1a;
  font-weight: 700;
  font-size: 0.85rem;
  flex: none;
}
.avatar.alt {
  background: var(--mint);
}
.post-media {
  height: 160px;
  border-radius: 16px;
  overflow: hidden;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 220, 240, 0.55), transparent 55%),
    linear-gradient(160deg, #f9a8d4, #a78bfa 55%, #4c1d95);
}
.post-media img {
  height: 150px;
  width: auto;
  filter: drop-shadow(0 10px 18px rgba(40, 0, 60, 0.45));
}
.received {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 0.8rem;
}
.received strong {
  color: var(--text);
}
.recv-row {
  display: flex;
  flex-direction: row-reverse;
}
.recv-row img {
  width: 30px;
  height: 30px;
  object-fit: contain;
  margin-left: -6px;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.recv-row img.new {
  animation: pop 0.5s cubic-bezier(0.3, 1.8, 0.5, 1);
}
@keyframes pop {
  from {
    transform: scale(0);
  }
}

.tray {
  position: relative;
  z-index: 4;
  background: var(--surface);
  border-top: 1px solid var(--line);
  border-radius: 26px 26px 0 0;
  padding: 14px 14px 22px;
  display: grid;
  gap: 12px;
}
.tray-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.92rem;
}
.tray-head strong {
  margin-right: auto;
}
.balance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-2);
  border-radius: 999px;
  padding: 4px 10px 4px 6px;
  font-weight: 600;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
}
.balance.shake {
  animation: shake 0.4s;
  color: #ff8fa3;
}
@keyframes shake {
  25% {
    transform: translateX(-4px);
  }
  75% {
    transform: translateX(4px);
  }
}
.coin {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, #c98a1e);
  box-shadow: inset 0 0 0 2px rgba(150, 90, 0, 0.35);
}
.topup {
  border: 0;
  background: none;
  color: var(--gold);
  font: 600 0.82rem var(--font);
  cursor: pointer;
  padding: 4px 2px;
}
.topup.pulse {
  animation: glow 1s 3;
}
@keyframes glow {
  50% {
    text-shadow: 0 0 12px var(--gold);
    transform: scale(1.08);
  }
}
.tray-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.tray-grid button {
  border: 1px solid transparent;
  background: var(--surface-2);
  border-radius: 14px;
  padding: 8px 2px 6px;
  color: var(--text);
  display: grid;
  justify-items: center;
  gap: 2px;
  cursor: pointer;
  font: 600 0.72rem var(--font);
  font-variant-numeric: tabular-nums;
  transition:
    transform 0.12s,
    border-color 0.12s;
}
.tray-grid button:hover {
  transform: translateY(-2px);
}
.tray-grid button[aria-checked="true"] {
  border-color: var(--accent);
  background: #221f45;
}
.tray-grid img {
  width: 48px;
  height: 48px;
  object-fit: contain;
}
.tray-grid .cost {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.tray-grid .cost i {
  width: 9px;
  height: 9px;
}
.send {
  border: 0;
  border-radius: 999px;
  padding: 13px;
  background: linear-gradient(90deg, #7b6bff, #b07bff);
  color: #fff;
  font: 700 0.95rem var(--font);
  cursor: pointer;
}
.send:active {
  transform: scale(0.98);
}

/* effects inside the phone */
.dim {
  position: absolute;
  inset: 0;
  z-index: 5;
  background: radial-gradient(circle at 50% 40%, rgba(20, 12, 40, 0.55), rgba(0, 0, 0, 0.88));
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}
.dim.on {
  opacity: 1;
}
.fx {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}
.fx .gift {
  position: absolute;
  left: 0;
  top: 0;
  width: 120px;
  height: 120px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.6));
  will-change: transform, opacity;
}
.fx .spark {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-2);
}
.fx .coin-drop {
  position: absolute;
  top: -20px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff3c4, var(--gold) 45%, #c98a1e);
}
.fx .rays {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 760px;
  height: 760px;
  margin: -380px 0 0 -380px;
  background: repeating-conic-gradient(
    from 0deg,
    rgba(255, 220, 140, 0.45) 0 7deg,
    transparent 7deg 20deg
  );
  -webkit-mask: radial-gradient(circle, #000 0, transparent 60%);
  mask: radial-gradient(circle, #000 0, transparent 60%);
}
.fx .halo {
  position: absolute;
  left: 50%;
  top: 38%;
  width: 300px;
  height: 300px;
  margin: -150px 0 0 -150px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(255, 220, 140, 0.7),
    rgba(139, 123, 255, 0.25) 45%,
    transparent 70%
  );
}
.toast {
  position: absolute;
  z-index: 7;
  left: 12px;
  bottom: 280px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 16px 5px 5px;
  border-radius: 999px;
  white-space: nowrap;
  font-size: 0.8rem;
  line-height: 1.25;
  background: linear-gradient(90deg, rgba(123, 107, 255, 0.95), rgba(176, 123, 255, 0.7));
  transform: translateX(-130%);
  opacity: 0;
  pointer-events: none;
  transition:
    transform 0.4s cubic-bezier(0.2, 1.3, 0.4, 1),
    opacity 0.2s;
}
.toast.show {
  opacity: 1;
  transform: translateX(0);
}
.toast.big {
  padding: 7px 20px 7px 7px;
  font-size: 0.9rem;
  color: #2a1600;
  background: linear-gradient(90deg, #c98a1e, var(--gold) 50%, #e8a93a);
  box-shadow: 0 0 30px rgba(255, 200, 100, 0.55);
}
.toast .avatar {
  width: 28px;
  height: 28px;
  font-size: 0.72rem;
}
.toast.big .avatar {
  width: 34px;
  height: 34px;
}
.toast img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}
.toast.big img {
  width: 46px;
  height: 46px;
}
.toast .combo {
  min-width: 2ch;
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 800;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff3c4;
  text-shadow:
    0 2px 0 rgba(80, 40, 0, 0.55),
    0 0 14px rgba(255, 200, 100, 0.7);
}
.toast .combo.pop {
  animation: combo-pop 0.35s cubic-bezier(0.3, 1.9, 0.5, 1);
}
@keyframes combo-pop {
  from {
    transform: scale(1.9);
  }
}

/* section heads */
.section-head {
  display: grid;
  gap: 14px;
  max-width: 40em;
  margin-bottom: 44px;
}
.section-head p {
  color: var(--muted);
  font-size: 1.08rem;
}

/* api parts */
.api h2 {
  max-width: 13em;
  margin-bottom: 48px;
}
.api h2 span {
  color: var(--faint);
}
.parts {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.parts li {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) auto;
  gap: 28px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.parts .num {
  font: 600 0.9rem var(--mono);
  color: var(--accent-2);
}
.parts p {
  color: var(--muted);
  margin-top: 8px;
  max-width: 34em;
}
.parts code {
  font: 0.85rem var(--mono);
  color: var(--mint);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

/* how it works: a purchase to a gift on screen */
.flow-map {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 4.6fr);
  gap: 40px;
  align-items: stretch;
}
.flow-outside,
.flow-inside {
  position: relative;
  display: grid;
  gap: 18px;
  align-content: start;
  padding: 22px;
  border-radius: 20px;
}
.flow-outside {
  border: 1px dashed color-mix(in srgb, var(--gold) 35%, var(--line));
}
.flow-inside {
  border: 1px solid var(--line);
  background: var(--surface);
  gap: 24px;
}
/* The arrow from the store to the API. */
.flow-outside::after,
.flow-steps .flow-step:not(:last-child)::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-top: 2px solid var(--accent);
  border-right: 2px solid var(--accent);
  transform: rotate(45deg);
}
.flow-outside::after {
  top: 50%;
  right: -25px;
  margin-top: -5px;
}
.flow-label {
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--faint);
}
.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px;
}
.flow-step {
  position: relative;
  display: grid;
  gap: 10px;
  align-content: start;
}
.flow-step svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--accent-2);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.flow-outside .flow-step svg {
  stroke: var(--gold);
}
.flow-step h3 {
  font-size: 1.05rem;
}
.flow-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}
.flow-steps .flow-step:not(:last-child)::after {
  top: 14px;
  right: -16px;
}
.flow-step code {
  justify-self: start;
  font: 0.74rem var(--mono);
  color: var(--mint);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 5px 8px;
  border-radius: 8px;
  overflow-wrap: anywhere;
}
.flow-tag {
  justify-self: start;
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--mint);
  border: 1px solid color-mix(in srgb, var(--mint) 40%, var(--line));
  padding: 3px 9px;
  border-radius: 999px;
}
.flow-outside .flow-tag {
  color: var(--gold);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--line));
}
.flow-ledger {
  display: grid;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.flow-ledger-title {
  margin: 0;
  color: var(--muted);
}
.flow-ledger table {
  width: 100%;
  max-width: 36rem;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.flow-ledger th,
.flow-ledger td {
  padding: 8px 12px;
  text-align: left;
  border-top: 1px solid var(--line);
}
.flow-ledger th {
  border-top: 0;
  color: var(--faint);
  font: 600 0.72rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.flow-ledger .num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.flow-ledger .plus {
  color: var(--mint);
}
.flow-ledger .minus {
  color: #ff9d8a;
}
@media (max-width: 1020px) {
  .flow-map {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .flow-outside::after {
    top: auto;
    right: auto;
    bottom: -26px;
    left: 50%;
    margin: 0 0 0 -5px;
    transform: rotate(135deg);
  }
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-steps .flow-step::after {
    display: none;
  }
}
@media (max-width: 560px) {
  .flow-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* gift wall */
.wall {
  display: grid;
  gap: 18px;
  margin: 0 calc(-1 * var(--gutter));
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  overflow: hidden;
}
.wall-row {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 110s linear infinite;
}
.wall-row.reverse {
  animation-direction: reverse;
  animation-duration: 130s;
}
.wall:hover .wall-row {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.tile {
  flex: none;
  width: 150px;
  padding: 14px 10px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.tile img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s;
}
.tile:hover img {
  transform: scale(1.12) rotate(-3deg);
}
.tile span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The four components after the gift lands: four across, then two by two (never 3 + 1). */
.ways.after .way-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1020px) {
  .ways.after .way-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .ways.after .way-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ways to build the catalog */
.way-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.way-list li {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, #1d1a40, var(--surface) 70%);
}
.way-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 140px;
  margin-bottom: 18px;
}
.way-art img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 -10px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}
.way-art img:nth-child(2) {
  width: 130px;
  height: 130px;
  z-index: 1;
}
.way-art .own {
  width: 110px;
  height: 110px;
  margin-right: 8px;
}
.way-art .upload {
  width: 90px;
  height: 90px;
  margin-bottom: 4px;
  border-radius: 20px;
  border: 2px dashed #4a4680;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-size: 2rem;
}
.way-list p {
  color: var(--muted);
  margin-top: 8px;
}

/* trust */
.trust h2 {
  max-width: 12em;
  margin-bottom: 40px;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 40px;
  color: var(--muted);
}
.checks li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.checks strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

/* pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
  background: var(--surface);
}
.plan.featured {
  border-color: var(--accent);
  background: radial-gradient(ellipse at 50% 0%, #221e4a, var(--surface) 70%);
}
.plan h3 {
  font-size: 1.15rem;
}
.price {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price span {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.plan li::before {
  content: "✓";
  color: var(--mint);
  margin-right: 10px;
}
.plan .btn {
  text-align: center;
  margin-top: 6px;
}
.soon {
  margin-top: 6px;
  text-align: center;
  padding: 12px;
  border-radius: 999px;
  color: var(--faint);
  border: 1px dashed var(--line);
  font-size: 0.92rem;
}

/* faq */
.faq h2 {
  margin-bottom: 32px;
  text-align: center;
}
.faq-list {
  border-top: 1px solid var(--line);
  max-width: 820px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--accent-2);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 44em;
}

/* final */
.final {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding-top: 140px;
}
.final-icons {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}
.final-icons img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 -16px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
.final-icons img:nth-child(2) {
  width: 230px;
  height: 230px;
  z-index: 1;
}
.final p {
  color: var(--muted);
  margin-bottom: 8px;
}

/* footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 120px;
  padding-top: 44px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.foot-brand {
  display: grid;
  gap: 10px;
  max-width: 30em;
}
.foot-brand .brand {
  color: var(--text);
}
.foot nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-content: start;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}

/* Below 1140px the eight nav links, the logo and the two actions no longer fit on one line
   (they need about 1,085px). With script the links move into a hamburger menu (button in
   .top-actions, panel under the header); without script they wrap onto their own rows under
   the logo, so nothing is hidden. */
.menu-btn {
  display: none;
}
@media (max-width: 1140px) {
  .top {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .top nav {
    order: 3;
    flex: 0 0 100%;
    flex-wrap: wrap;
    gap: 0;
    margin: 0;
  }
  .top nav a {
    padding: 8px 9px 8px 0;
    font-size: 0.88rem;
  }
  .top-actions {
    margin-left: auto;
    gap: 14px;
  }

  .js .top {
    flex-wrap: nowrap;
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .js .menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-right: -10px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--text);
    cursor: pointer;
    border-radius: 12px;
  }
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after {
    display: block;
    width: 22px;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition:
      transform 0.2s ease,
      background-color 0.2s ease;
  }
  .menu-icon {
    position: relative;
  }
  .menu-icon::before,
  .menu-icon::after {
    content: "";
    position: absolute;
    left: 0;
  }
  .menu-icon::before {
    top: -7px;
  }
  .menu-icon::after {
    top: 7px;
  }
  .menu-btn[aria-expanded="true"] .menu-icon {
    background: transparent;
  }
  .menu-btn[aria-expanded="true"] .menu-icon::before {
    transform: translateY(7px) rotate(45deg);
  }
  .menu-btn[aria-expanded="true"] .menu-icon::after {
    transform: translateY(-7px) rotate(-45deg);
  }
  .js .top nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    flex-wrap: nowrap;
    margin: 0;
    padding: 6px var(--gutter) 12px;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition:
      opacity 0.18s ease,
      transform 0.18s ease,
      visibility 0s linear 0.18s;
  }
  .js .top nav.open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .js .top nav a {
    display: flex;
    align-items: center;
    min-height: 48px;
    padding: 0 4px;
    font-size: 1rem;
    border-bottom: 1px solid var(--line);
  }
  .js .top nav a:last-child {
    border-bottom: 0;
  }
}
@media (prefers-reduced-motion: reduce) {
  .menu-icon,
  .menu-icon::before,
  .menu-icon::after,
  .js .top nav {
    transition: none;
  }
}
@media (max-width: 1020px) {
  .flow-map {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
  }
  .flow-outside::after {
    top: auto;
    right: auto;
    bottom: -26px;
    left: 50%;
    margin: 0 0 0 -5px;
    transform: rotate(135deg);
  }
  .flow-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .flow-steps .flow-step::after {
    display: none;
  }
}
@media (max-width: 560px) {
  .flow-steps {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* gift wall */
.wall {
  display: grid;
  gap: 18px;
  margin: 0 calc(-1 * var(--gutter));
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  overflow: hidden;
}
.wall-row {
  display: flex;
  gap: 18px;
  width: max-content;
  animation: marquee 110s linear infinite;
}
.wall-row.reverse {
  animation-direction: reverse;
  animation-duration: 130s;
}
.wall:hover .wall-row {
  animation-play-state: paused;
}
@keyframes marquee {
  to {
    transform: translateX(-50%);
  }
}
.tile {
  flex: none;
  width: 150px;
  padding: 14px 10px 12px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  text-align: center;
}
.tile img {
  width: 112px;
  height: 112px;
  object-fit: contain;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.5));
  transition: transform 0.25s;
}
.tile:hover img {
  transform: scale(1.12) rotate(-3deg);
}
.tile span {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* The four components after the gift lands: four across, then two by two (never 3 + 1). */
.ways.after .way-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1020px) {
  .ways.after .way-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .ways.after .way-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ways to build the catalog */
.way-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.way-list li {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 24px;
  background: radial-gradient(ellipse at 50% 0%, #1d1a40, var(--surface) 70%);
}
.way-art {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  height: 140px;
  margin-bottom: 18px;
}
.way-art img {
  width: 100px;
  height: 100px;
  object-fit: contain;
  margin: 0 -10px;
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.55));
}
.way-art img:nth-child(2) {
  width: 130px;
  height: 130px;
  z-index: 1;
}
.way-art .own {
  width: 110px;
  height: 110px;
  margin-right: 8px;
}
.way-art .upload {
  width: 90px;
  height: 90px;
  margin-bottom: 4px;
  border-radius: 20px;
  border: 2px dashed #4a4680;
  display: grid;
  place-items: center;
  color: var(--accent-2);
  font-size: 2rem;
}
.way-list p {
  color: var(--muted);
  margin-top: 8px;
}

/* trust */
.trust h2 {
  max-width: 12em;
  margin-bottom: 40px;
}
.checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 30px 40px;
  color: var(--muted);
}
.checks li {
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.checks strong {
  display: block;
  color: var(--text);
  font-weight: 600;
  margin-bottom: 4px;
}

/* pricing */
.plans {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.plan {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 28px;
  display: grid;
  gap: 16px;
  align-content: start;
  background: var(--surface);
}
.plan.featured {
  border-color: var(--accent);
  background: radial-gradient(ellipse at 50% 0%, #221e4a, var(--surface) 70%);
}
.plan h3 {
  font-size: 1.15rem;
}
.price {
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1;
}
.price span {
  font-family: var(--font);
  font-size: 0.95rem;
  color: var(--muted);
  font-weight: 400;
  letter-spacing: 0;
  margin-left: 4px;
}
.plan ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 8px;
  color: var(--muted);
}
.plan li::before {
  content: "✓";
  color: var(--mint);
  margin-right: 10px;
}
.plan .btn {
  text-align: center;
  margin-top: 6px;
}
.soon {
  margin-top: 6px;
  text-align: center;
  padding: 12px;
  border-radius: 999px;
  color: var(--faint);
  border: 1px dashed var(--line);
  font-size: 0.92rem;
}

/* faq */
.faq h2 {
  margin-bottom: 32px;
  text-align: center;
}
.faq-list {
  border-top: 1px solid var(--line);
  max-width: 820px;
  margin-inline: auto;
}
.faq details {
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 1.08rem;
  list-style: none;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}
.faq summary::-webkit-details-marker {
  display: none;
}
.faq summary::after {
  content: "+";
  color: var(--accent-2);
  font-size: 1.4rem;
  line-height: 1;
  transition: transform 0.2s;
}
.faq details[open] summary::after {
  transform: rotate(45deg);
}
.faq details p {
  color: var(--muted);
  margin-top: 12px;
  max-width: 44em;
}

/* final */
.final {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  text-align: center;
  gap: 16px;
  padding-top: 140px;
}
.final-icons {
  display: flex;
  align-items: flex-end;
  margin-bottom: 10px;
}
.final-icons img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: 0 -16px;
  filter: drop-shadow(0 14px 22px rgba(0, 0, 0, 0.55));
}
.final-icons img:nth-child(2) {
  width: 230px;
  height: 230px;
  z-index: 1;
}
.final p {
  color: var(--muted);
  margin-bottom: 8px;
}

/* footer */
.foot {
  display: flex;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  margin-top: 120px;
  padding-top: 44px;
  padding-bottom: 56px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.foot-brand {
  display: grid;
  gap: 10px;
  max-width: 30em;
}
.foot-brand .brand {
  color: var(--text);
}
.foot nav {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
  align-content: start;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--text);
}

/* Below 1140px the eight nav links, the logo and the two actions no longer fit on one line
   (they need about 1,085px): the nav moves to its own scrollable row under the logo (no script
   needed). */
@media (max-width: 1140px) {
  .top {
    flex-wrap: wrap;
    gap: 8px 16px;
    padding-top: 10px;
    padding-bottom: 6px;
  }
  .top nav {
    order: 3;
    flex: 0 0 100%;
    margin: 0 calc(var(--gutter) * -1);
    padding: 0 calc(var(--gutter) + 24px) 0 var(--gutter);
    gap: 0;
    overflow-x: auto;
    scrollbar-width: none;
    /* The links scroll sideways: fade the right edge so a cut word ("Pric") reads as "more" and
       not as a bug; the extra right padding lets the last link scroll clear of the fade. */
    -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
    mask-image: linear-gradient(90deg, #000 calc(100% - 32px), transparent);
  }
  .top nav a {
    padding: 10px 7px;
    font-size: 0.88rem;
  }
  .top-actions {
    margin-left: auto;
    gap: 14px;
  }
}
/* On a phone the eight links wrap onto two rows instead of scrolling sideways: nothing is hidden
   behind a swipe. */
@media (max-width: 700px) {
  .top nav {
    flex-wrap: wrap;
    overflow-x: visible;
    padding: 0 var(--gutter);
    -webkit-mask-image: none;
    mask-image: none;
  }
  .top nav a {
    padding: 8px 9px 8px 0;
  }
}
@media (max-width: 1020px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "copy" "phone" "console";
  }
  .hero-copy {
    padding-top: 8px;
  }
  .hero-glow {
    top: 300px;
    right: -300px;
  }
  .console {
    max-width: none;
  }
  .checks {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  section {
    padding-top: 88px;
  }
  .final-icons img {
    width: 100px;
    height: 100px;
  }
  .final-icons img:nth-child(2) {
    width: 160px;
    height: 160px;
  }
  .way-list,
  .plans,
  .checks {
    grid-template-columns: minmax(0, 1fr);
  }
  .parts li {
    grid-template-columns: 44px minmax(0, 1fr);
  }
  .parts code {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }
}
@media (max-width: 480px) {
  /* Sign in is in the footer on small screens. */
  .top-actions .link {
    display: none;
  }
}
@media (max-width: 420px) {
  .phone {
    width: 100%;
    height: 740px;
    border-radius: 46px;
  }
  .screen {
    border-radius: 36px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .wall-row {
    animation: none;
  }
  .wall {
    overflow-x: auto;
  }
  html {
    scroll-behavior: auto;
  }
}

/* legal pages */
.doc-page {
  padding: 72px var(--gutter) 0;
}
.doc {
  max-width: 760px;
  margin-inline: auto;
}
.doc-kicker {
  color: var(--accent-2);
  font: 600 0.85rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 14px;
}
.doc h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.doc-meta {
  color: var(--faint);
  font-size: 0.9rem;
  margin-top: 14px;
}
.doc-intro {
  color: var(--muted);
  font-size: 1.15rem;
  margin: 22px 0 8px;
}
.doc h2 {
  font-size: 1.5rem;
  margin: 44px 0 12px;
  scroll-margin-top: 90px;
}
.doc h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
  color: var(--text);
}
.doc p,
.doc li {
  color: #cfcce6;
}
/* A list is a grid: without min-width a long inline code (a URL, a path) stretches its row past
   the screen and the page, which clips horizontally, cuts the text off on a phone. */
.doc li {
  min-width: 0;
}
.doc code {
  overflow-wrap: anywhere;
}
.doc p {
  margin: 0 0 12px;
}
.doc ul {
  margin: 0 0 12px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
.doc a {
  color: var(--accent-2);
}
.doc code {
  font: 0.88em var(--mono);
  color: var(--mint);
  background: var(--surface);
  padding: 1px 6px;
  border-radius: 6px;
}
.foot a[aria-current] {
  color: var(--text);
}

/* Docs page: two columns for API vs SDK and a plain diagram. */
.doc-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 28px 0 8px;
}
.doc-two section {
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.doc-two h3 {
  margin: 0 0 4px;
}
.doc-sub {
  margin: 0 0 12px;
  color: var(--faint);
  font-size: 0.92rem;
}
.doc-code {
  overflow-x: auto;
  margin: 16px 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--muted);
  font: 0.86rem/1.7 var(--mono);
}
@media (max-width: 720px) {
  .doc-two {
    grid-template-columns: 1fr;
  }
}

/* beta pill */
.pill {
  justify-self: start;
  width: fit-content;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid #3a3570;
  background: rgba(139, 123, 255, 0.12);
  color: var(--accent-2);
  font: 600 0.8rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.hero-copy .pill {
  margin-bottom: 18px;
}
.more {
  color: var(--accent-2);
  font-weight: 600;
  text-decoration: none;
}
.more::after {
  content: " →";
}
.more:hover {
  text-decoration: underline;
}

/* live rooms */
.rooms {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}
.rooms-copy {
  display: grid;
  gap: 20px;
}
.rooms h2 span {
  color: var(--faint);
}
.rooms-copy > p {
  color: var(--muted);
  font-size: 1.08rem;
  max-width: 36em;
}
.rooms code {
  font: 0.9em var(--mono);
  color: var(--mint);
}
.checks.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px 32px;
}
.room-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 18px;
  background: radial-gradient(ellipse at 50% 0%, #1d1a40, var(--surface) 70%);
}
.room-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin-bottom: 14px;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ff8a9a;
  font: 600 0.8rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ff5c7a;
  box-shadow: 0 0 10px #ff5c7a;
}
.room-card ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.room-card li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--muted);
  font-size: 0.95rem;
}
.room-card li strong {
  color: var(--text);
}
.room-card li img {
  width: 44px;
  height: 44px;
  object-fit: contain;
}

/* sdks */
.sdk-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.sdk-list li {
  display: grid;
  gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.sdk-list strong {
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 600;
}
.sdk-list span {
  color: var(--muted);
  font-size: 0.92rem;
}
.sdks .note {
  margin-top: 20px;
  color: var(--faint);
}
.sdks .note a {
  color: var(--accent-2);
}

/* pricing: free plan block */
.free-plan {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  align-items: center;
  gap: 28px;
  max-width: 920px;
}
.free-plan .price {
  margin-top: 12px;
}
.free-plan p:not(.price) {
  color: var(--muted);
  margin-bottom: 18px;
}
/* Planned plans (numbers: packages/worker-core/src/plans.ts) */
.plans-note {
  margin: 36px 0 14px;
  color: var(--muted);
  font-weight: 600;
}
.plans.plans-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.plans-4 .price {
  font-size: 2.2rem;
}
.plan-enterprise {
  margin-top: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 26px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.plan-enterprise h3 {
  font-size: 1.15rem;
  margin: 0 0 6px;
}
.plan-enterprise p {
  margin: 0;
  max-width: 720px;
  color: var(--muted);
}
.plan-enterprise .btn {
  flex: none;
  text-align: center;
}
@media (max-width: 700px) {
  .plan-enterprise {
    flex-direction: column;
    align-items: stretch;
  }
}
.plans-terms {
  margin-top: 18px;
  max-width: 760px;
  color: var(--muted);
}
.plans-terms {
  margin-left: auto;
  margin-right: auto;
}
.plans-terms#example {
  text-align: center;
}
@media (max-width: 1020px) {
  .plans.plans-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 560px) {
  .plans.plans-4 {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* final */
.final > p a {
  color: var(--accent-2);
}
@media (max-width: 1020px) {
  .rooms {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }
  .sdk-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 760px) {
  .checks.two,
  .free-plan {
    grid-template-columns: minmax(0, 1fr);
  }
  .sdk-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ---------- the real demo, embedded ---------- */
.screen .status {
  flex: none;
}
.demo-frame {
  display: block;
  width: 100%;
  flex: 1;
  border: 0;
  background: #0a0a11;
  /* Shown once the demo page has loaded (site.js adds .ready), so the first frames of the page
     inside are never visible half-drawn. */
  opacity: 0;
  transition: opacity 0.25s ease;
}
.demo-frame.ready {
  opacity: 1;
}
.demo-frame.failed {
  display: none;
}
.demo-fallback {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: var(--surface);
  color: var(--muted);
  font-size: 0.95rem;
}
.show-viewport .demo-fallback {
  height: 100%;
  box-sizing: border-box;
}
.show-stage[data-device="web"] .demo-fallback {
  position: absolute;
  inset: 0;
}
.demo-fallback p {
  margin: 0;
}
.demo-fallback a {
  color: var(--accent-2);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.showcase {
  padding: 96px var(--gutter) 40px;
  text-align: center;
}
.showcase h2 span {
  color: var(--muted);
}
.showcase .lead {
  max-width: 620px;
  margin: 16px auto 28px;
  color: var(--muted);
}
.show-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
}
.seg {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
}
.seg button {
  padding: 8px 14px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
}
.seg button:hover {
  color: var(--text);
}
.seg button[aria-selected="true"],
.seg button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 50%, transparent);
}
.show-caption {
  min-height: 3.2em;
  max-width: 640px;
  margin: 18px auto 22px;
  color: var(--muted);
}
.show-stage {
  display: flex;
  justify-content: center;
}
/* Phone: the same frame as the hero. */
.show-stage[data-device="phone"] .show-device {
  width: 380px;
  height: 780px;
  padding: 11px;
  border-radius: 54px;
  background: linear-gradient(160deg, #2a2a3c, #15151f 40%, #23233a);
  box-shadow:
    0 0 0 1px #34344c,
    0 50px 120px rgba(0, 0, 0, 0.6);
}
.show-stage[data-device="phone"] .browser-bar {
  display: none;
}
.show-stage[data-device="phone"] .show-viewport {
  height: 100%;
  border-radius: 44px;
  overflow: hidden;
}
.show-stage[data-device="phone"] .demo-frame {
  height: 100%;
}
/* Web: a browser window; the page inside is 1280 px wide, scaled to fit. */
.show-stage[data-device="web"] .show-device {
  width: min(1100px, 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--surface);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.5);
}
.browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.browser-bar .dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
}
.browser-url {
  margin-left: 12px;
  padding: 3px 14px;
  border-radius: 8px;
  background: var(--bg);
  color: var(--faint);
  font-size: 0.8rem;
}
.show-stage[data-device="web"] .show-viewport {
  position: relative;
  overflow: hidden;
}
.show-stage[data-device="web"] .demo-frame {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 800px;
  transform-origin: 0 0;
}
@media (max-width: 720px) {
  .show-stage[data-device="phone"] .show-device {
    width: min(380px, 100%);
    height: 700px;
  }
}

/* The demo inside the frames shows no scrollbars (it is a phone screen, not a page). */
.demo-frame {
  color-scheme: dark;
}

/* Gift library page. */
.gifts-head {
  max-width: 760px;
  margin-inline: auto;
}
.gifts-head h1 {
  font-size: clamp(2.2rem, 5vw, 3.4rem);
}
.gifts-head .doc-intro strong {
  color: var(--text);
}
.gifts-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: 36px 0 8px;
}
.gifts-controls label {
  color: var(--muted);
  font-weight: 500;
}
.gifts-controls select {
  max-width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
}
.gifts-controls select:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.gifts-status {
  margin: 0;
  color: var(--faint);
  font-size: 0.9rem;
}
.lib-group {
  margin-top: 44px;
}
.lib-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
}
.lib-head h2 {
  font-size: 1.5rem;
}
.lib-meta {
  margin: 0;
  color: var(--accent-2);
  font: 600 0.82rem var(--mono);
}
.lib-desc {
  margin: 6px 0 18px;
  color: var(--muted);
}
.lib-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 12px;
}
.lib-grid li {
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 12px 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.lib-grid img {
  width: 100%;
  max-width: 112px;
  height: auto;
  aspect-ratio: 1;
}
.lib-name {
  font-size: 0.88rem;
  line-height: 1.3;
}
.lib-price {
  color: var(--gold);
  font: 600 0.8rem var(--mono);
}
.gifts-empty,
.gifts-foot {
  max-width: 760px;
  margin: 40px auto 0;
  color: var(--muted);
}
.gifts-foot {
  margin-top: 56px;
}
.gifts-page a {
  color: var(--accent-2);
}
.top nav a[aria-current] {
  color: var(--text);
}
.doc-note {
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface);
}

/* Brand icon (full-bleed square): rounded like an app icon wherever it is used as a logo. */
img[src$="logo-96.png"] {
  border-radius: 22%;
}
/* Optical centring: the stack mark carries more weight low (centroid at 52 % of its height), so
   the logo sits 1.5 px higher to line up with the cap height of the wordmark. */
.brand img {
  position: relative;
  top: -1.5px;
}
.foot-brand .brand img {
  top: -1px;
}

/* SDK maturity line under each platform, console footnote, stacked pricing notes */
.sdk-list em {
  margin-top: 6px;
  color: var(--faint);
  font-size: 0.82rem;
  font-style: normal;
  line-height: 1.4;
}
.console-note {
  padding: 0 20px 16px;
  color: var(--faint);
  font-size: 0.78rem;
}
.console-note a {
  color: var(--accent-2);
}
.plans-terms code {
  font: 0.9em var(--mono);
  color: var(--mint);
}

/* Use cases: home cards, /use-cases/ page blocks and the feature matrix. */
.uc-cards li {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.uc-cards p {
  flex: 1;
}
.uc-cards a,
.uc-more a {
  color: var(--accent-2);
  font-weight: 600;
  margin-top: 10px;
}
.uc-more {
  margin-top: 22px;
}
.uc-toc ul {
  columns: 2;
  column-gap: 32px;
  list-style: none;
  padding: 0;
  display: block;
  margin: 28px 0 0;
}
.uc-toc li {
  margin-bottom: 8px;
  break-inside: avoid;
}
.uc {
  scroll-margin-top: 90px;
  padding-top: 0;
  border-top: 1px solid var(--line);
  margin-top: 44px;
}
.uc h2 {
  margin-top: 28px;
}
.uc-scenario {
  font-size: 1.05rem;
}
.uc-reminder {
  font-size: 0.92rem;
  color: var(--muted);
}
.uc-flow {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.uc-scroll {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.uc-matrix {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.uc-matrix th,
.uc-matrix td {
  padding: 10px 12px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  color: #cfcce6;
}
.uc-matrix thead th {
  color: var(--text);
  background: var(--surface);
}
.uc-matrix tbody th {
  text-align: left;
  font-weight: 600;
}
.uc-matrix tbody tr:last-child th,
.uc-matrix tbody tr:last-child td {
  border-bottom: 0;
}
.uc-matrix td {
  color: var(--mint);
}
.uc-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.uc-connect {
  list-style: none;
  padding: 0;
}
.uc-connect li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 4px 18px 10px;
  background: var(--surface);
}
@media (max-width: 720px) {
  .uc-toc ul {
    columns: 1;
  }
}

/* Developer docs: sidebar layout, tables, cards (docs hub and reference pages). */
.doc-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 56px;
  max-width: 1080px;
  margin-inline: auto;
}
.doc-layout .doc {
  margin: 0;
  max-width: 760px;
  min-width: 0;
}
.doc-side {
  position: sticky;
  top: 90px;
  align-self: start;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  font-size: 0.92rem;
}
.doc-side-title {
  margin: 18px 0 6px;
  color: var(--faint);
  font: 600 0.74rem var(--mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.doc-side-title:first-child {
  margin-top: 0;
}
.doc-side ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 2px;
}
.doc-side a {
  display: block;
  padding: 5px 10px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
}
.doc-side a:hover {
  color: var(--text);
  background: var(--surface);
}
.doc-side a[aria-current="page"] {
  color: var(--text);
  background: var(--surface-2);
}
.doc-side-m {
  display: none;
}
.doc-end {
  margin-top: 48px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  color: var(--faint);
}
.doc-table-wrap {
  overflow-x: auto;
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.doc-table th,
.doc-table td {
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--line);
  color: #cfcce6;
}
.doc-table tr:last-child td {
  border-bottom: 0;
}
.doc-table th {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  white-space: nowrap;
}
.doc-table td:first-child {
  min-width: 90px;
}
.doc-table code {
  white-space: nowrap;
}
.doc-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 12px 0 8px;
}
.doc .doc-card {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--muted);
  text-decoration: none;
}
.doc .doc-card:hover {
  border-color: #3a3570;
}
.doc .doc-card strong {
  color: var(--text);
}
.doc .doc-card span {
  font-size: 0.92rem;
}
.doc ul.doc-check {
  list-style: none;
  padding-left: 0;
}
.doc ul.doc-check li {
  padding-left: 28px;
  position: relative;
}
.doc ul.doc-check li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 14px;
  height: 14px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
}
.doc ol {
  margin: 0 0 12px;
  padding-left: 22px;
  display: grid;
  gap: 8px;
}
@media (max-width: 900px) {
  .doc-layout {
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
  .doc-side {
    display: none;
  }
  .doc-side-m {
    display: block;
    margin: 0 0 24px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
  }
  .doc-side-m summary {
    padding: 12px 16px;
    cursor: pointer;
    font-weight: 600;
  }
  .doc-side-m nav {
    padding: 0 12px 12px;
  }
  .doc-cards {
    grid-template-columns: 1fr;
  }
}
.doc-table td:last-child {
  min-width: 240px;
}

/* Platform tabs for code samples (tabs.js). Without JavaScript every snippet shows, stacked. */
.ptabs {
  margin: 16px 0;
}
.ptabs .ptab-bar {
  display: none;
}
.ptabs.is-tabs .ptab-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: -1px;
}
.ptabs.is-tabs .ptab-label {
  display: none;
}
.ptab-label {
  margin: 16px 0 0;
  color: var(--faint);
  font-size: 0.86rem;
  font-weight: 600;
}
.ptab {
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px 10px 0 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.ptab[aria-selected="true"] {
  border-bottom-color: var(--surface);
  background: var(--surface);
  color: var(--text);
}
.ptab:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.ptabs.is-tabs .doc-code {
  margin-top: 0;
  border-top-left-radius: 0;
}
.ptab-panel .doc-code {
  margin-top: 8px;
}
.ptab-panel .ptab-note {
  margin: 8px 0 0;
  color: var(--faint);
  font-size: 0.9rem;
}
.ptab-na {
  margin: 8px 0;
  padding: 14px 18px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.plat-tag {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--faint);
  font-size: 0.72rem;
  font-weight: 600;
  vertical-align: middle;
}
.look {
  margin: 0 0 8px;
  color: var(--muted);
}
.look::before {
  content: "Looks like: ";
  color: var(--faint);
  font-weight: 600;
}

/* Pricing (2026-10-23): four cards of equal height with the action at the bottom, one share strip. */
.pricing .section-head p {
  margin-top: 10px;
  color: var(--muted);
  max-width: 640px;
}
.plans-4 .plan {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
}
.plans-4 .plan ul {
  flex: 1;
  align-content: start;
  font-size: 0.95rem;
}
.plans-4 .plan li {
  position: relative;
  padding-left: 24px;
}
.plans-4 .plan li::before {
  position: absolute;
  left: 0;
  margin-right: 0;
}
.plans-4 .plan .btn,
.plans-4 .plan .soon {
  margin-top: 8px;
  text-align: center;
}
.plans-4 .plan .soon {
  border: 1px dashed var(--line);
  color: var(--muted);
  font-size: 0.9rem;
}
.share {
  margin-top: 18px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
}
.share h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
}
.share-tiers {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.share-tiers li {
  display: grid;
  gap: 4px;
  padding: 14px 16px;
  border-radius: 14px;
  background: #15132b;
}
.share-tiers strong {
  font-family: var(--display);
  font-size: 1.7rem;
  letter-spacing: -0.02em;
}
.share-tiers span {
  color: var(--muted);
  font-size: 0.92rem;
}
.share > p {
  margin: 0;
  color: var(--muted);
}
@media (max-width: 760px) {
  .share-tiers {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* "Built for big rooms": the load-test numbers under the hero (docs/benchmarks). */
.scale {
  position: relative;
  padding-top: 72px;
  padding-bottom: 72px;
}
.scale-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font: 600 0.82rem var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.scale h2 em {
  font-style: normal;
  background: linear-gradient(90deg, var(--gold), #ff5fa2 55%, var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.scale-sub {
  margin: 16px 0 36px;
  color: var(--muted);
  font-size: 1.15rem;
}
.scale-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.scale-stat {
  padding: 30px 28px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
}
.scale-stat b {
  display: block;
  font: 800 clamp(2.6rem, 5vw, 4rem) / 1 var(--display);
  letter-spacing: -0.04em;
  background: linear-gradient(90deg, var(--gold), #ff5fa2);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.scale-stat span {
  display: block;
  margin-top: 14px;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.4;
}
.scale-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-top: 28px;
}
.scale-chip {
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}
.scale-foot .more {
  margin-left: 6px;
}
@media (max-width: 760px) {
  .scale {
    padding-top: 48px;
    padding-bottom: 48px;
  }
  .scale-stats {
    grid-template-columns: 1fr;
  }
}
