/* mirui.rs landing mode — editorial shell around the single live Gallery stage. */

:root {
  --site-bg: #f3f4f7;
  --site-paper: #fbfbfd;
  --site-ink: #202126;
  --site-muted: #6d707b;
  --site-faint: #999ca7;
  --site-rule: rgba(32, 33, 38, 0.14);
  --site-grid: rgba(52, 82, 255, 0.11);
  --site-blue: #3452ff;
  --site-blue-dark: #223bd5;
  --site-blue-wash: #e6eafd;
  --site-lime: #d4f87c;
  --site-shadow: 0 28px 80px -42px rgba(22, 27, 51, 0.34);
  --site-gutter: clamp(20px, 5vw, 76px);
  --site-max: 1440px;
}

html { scrollbar-gutter: stable; }

html[data-mode="focus"] { overflow-y: scroll; }

:root[data-theme="dark"] {
  --site-bg: #111216;
  --site-paper: #191a20;
  --site-ink: #f1f2f6;
  --site-muted: #a4a7b2;
  --site-faint: #747783;
  --site-rule: rgba(241, 242, 246, 0.14);
  --site-grid: rgba(140, 154, 255, 0.12);
  --site-blue: #6075ff;
  --site-blue-dark: #8c9aff;
  --site-blue-wash: #242942;
  --site-lime: #c8ee72;
  --site-shadow: 0 30px 90px -42px rgba(0, 0, 0, 0.76);
}

html[data-mode="home"] {
  height: auto;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: auto;
  overscroll-behavior-x: none;
  overscroll-behavior-y: auto;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
  background: var(--site-bg);
  color: var(--site-ink);
}

html[data-mode="home"] body {
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: 100%;
  overflow-x: clip;
  overflow-y: visible;
  overscroll-behavior: auto;
  background: var(--site-bg);
  color: var(--site-ink);
}

html[data-mode="home"] .demo-focus { display: none; }
html[data-mode="focus"] .site-home { display: none; }

.site-home {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
  min-height: 100dvh;
  background:
    linear-gradient(var(--site-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--site-grid) 1px, transparent 1px),
    var(--site-bg);
  background-size: 80px 80px;
  background-position: -1px -1px;
  color: var(--site-ink);
}

.site-home button,
.site-home a { -webkit-tap-highlight-color: transparent; }

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 72px;
  padding: 12px var(--site-gutter);
  border-bottom: 1px solid var(--site-rule);
  background: color-mix(in srgb, var(--site-bg) 88%, transparent);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: var(--site-ink);
  text-decoration: none;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.055em;
}

.site-logo-mark {
  display: grid;
  grid-template-columns: repeat(2, 8px);
  grid-template-rows: repeat(2, 8px);
  gap: 3px;
  width: 19px;
  height: 19px;
}

.site-logo-mark i {
  display: block;
  border-radius: 2px;
  background: var(--site-blue);
}

.site-logo-mark i:nth-child(2) { border-radius: 50%; }
.site-logo sup { align-self: flex-start; margin-top: 1px; font: 600 10px/1 var(--font-mono); }

.site-nav {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--site-paper) 86%, transparent);
  box-shadow: 0 8px 30px -22px rgba(26, 31, 56, 0.6);
}

.site-nav a,
.site-nav button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--site-muted);
  font: 600 11px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
}

.site-nav a:hover,
.site-nav button:hover,
.site-nav a:focus-visible,
.site-nav button:focus-visible {
  color: var(--site-ink);
  background: var(--site-blue-wash);
  outline: none;
}

.site-nav .active {
  color: var(--site-bg);
  background: var(--site-ink);
}

.site-nav .nav-disc {
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  box-shadow: 3px -3px 0 -2px currentColor;
}

.site-actions {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 7px;
}

.site-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  background: color-mix(in srgb, var(--site-paper) 82%, transparent);
  color: var(--site-ink);
  font: 700 11px/1 var(--font-mono);
  text-decoration: none;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.site-action:hover,
.site-action:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--site-blue) 55%, transparent);
  background: var(--site-blue-wash);
  outline: none;
}

.site-action svg { display: block; }
.site-action .ico-moon { display: none; }
:root[data-theme="light"] .site-action .ico-sun { display: none; }
:root[data-theme="light"] .site-action .ico-moon { display: block; }
.site-menu-toggle { display: none; }

.site-main {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  padding: 72px 0 0;
  overflow: visible;
  background: transparent;
}

.home-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(280px, 32fr) minmax(500px, 68fr);
  align-items: center;
  gap: clamp(20px, 2.6vw, 44px);
  min-height: 0;
  padding: clamp(28px, 3vw, 46px) var(--site-gutter) 12px;
  max-width: 1370px;
  margin: 0 auto;
}

.home-hero::before {
  content: "";
  position: absolute;
  left: 32%;
  top: 9%;
  width: min(58vw, 800px);
  aspect-ratio: 1.8;
  border: 1px dashed color-mix(in srgb, var(--site-blue) 36%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
  pointer-events: none;
}

.hero-copy {
  position: relative;
  top: auto;
  z-index: 3;
  align-self: start;
}

.section-kicker,
.hero-kicker {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 22px;
  color: var(--site-muted);
  font: 650 10px/1.4 var(--font-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.section-kicker::before,
.hero-kicker::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--site-blue);
}

.hero-title {
  margin: 0;
  max-width: 610px;
  font-size: clamp(56px, 6.1vw, 89px);
  font-weight: 760;
  line-height: 0.87;
  letter-spacing: -0.085em;
}

.hero-title > span { display: block; white-space: nowrap; }
.hero-title .signal { color: var(--site-blue); }

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 34px;
}

.site-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 52px;
  padding: 0 25px;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  background: var(--site-paper);
  color: var(--site-ink);
  font: 700 12px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 12px 36px -28px rgba(21, 28, 64, 0.72);
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.site-cta.primary {
  border-color: var(--site-blue);
  background: var(--site-blue);
  color: white;
}

.site-cta:hover,
.site-cta:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 20px 45px -26px color-mix(in srgb, var(--site-blue) 58%, transparent);
  outline: none;
}

.hero-feature-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 34px;
}

.feature-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: color-mix(in srgb, var(--site-ink) 16%, transparent);
  cursor: pointer;
  transition: width 180ms ease, border-radius 180ms ease, background 180ms ease;
}

.feature-dot.active {
  width: 30px;
  border-radius: 999px;
  background: var(--site-blue);
}

.hero-step {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--site-rule);
  border-radius: 50%;
  background: var(--site-paper);
  color: var(--site-ink);
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease;
}

.hero-step:hover,
.hero-step:focus-visible {
  transform: scale(1.08);
  background: var(--site-blue);
  color: white;
  outline: none;
}

.feature-name {
  min-width: 120px;
  margin-left: 7px;
  color: var(--site-muted);
  font: 600 11px/1 var(--font-mono);
}

.hero-runtime {
  position: relative;
  z-index: 2;
  min-width: 0;
  height: clamp(520px, calc(100svh - 190px), 650px);
  display: grid;
  place-items: center;
  padding: clamp(28px, 3.4vw, 54px);
  isolation: isolate;
  touch-action: pan-y;
  cursor: grab;
  --hero-drag: 0px;
  --hero-prev-x: -66%;
  --hero-prev-y: -34%;
  --hero-prev-rotate: -7deg;
  --hero-next-x: -34%;
  --hero-next-y: -70%;
  --hero-next-rotate: 8deg;
  --hero-side-scale: 0.82;
}

.hero-runtime.dragging { cursor: grabbing; }

.hero-runtime::before {
  content: "";
  position: absolute;
  inset: 7% 1% 6% 6%;
  border-radius: 36px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--site-blue) 8%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--site-blue) 8%, transparent) 1px, transparent 1px),
    color-mix(in srgb, var(--site-blue-wash) 72%, transparent);
  background-size: 36px 36px;
  border: 1px solid color-mix(in srgb, var(--site-blue) 22%, transparent);
  transform: rotate(3deg);
  box-shadow: var(--site-shadow);
  z-index: -4;
}

.hero-runtime::after {
  content: "";
  position: absolute;
  inset: 2% 0 2% 2%;
  border: 1px dashed color-mix(in srgb, var(--site-blue) 32%, transparent);
  border-radius: 50%;
  transform: rotate(-8deg);
  z-index: -3;
  pointer-events: none;
}

.home-stage-host {
  position: relative;
  z-index: 3;
  --hero-stage-x: 0px;
  --hero-stage-y: 0px;
  --hero-stage-scale-x: 1;
  --hero-stage-scale-y: 1;
  width: min(76%, 760px);
  height: 100%;
  min-width: 0;
  display: grid;
  place-items: center;
  transform: translateX(var(--hero-drag));
  transition: opacity 240ms ease, transform 420ms cubic-bezier(.22, 1, .36, 1);
  pointer-events: none;
}

.home-stage-host .stage { pointer-events: auto; }

.hero-preview {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(58%, 540px);
  margin: 0;
  padding: 9px;
  border: 1px solid color-mix(in srgb, var(--site-blue) 24%, var(--site-rule));
  border-radius: 20px;
  background: color-mix(in srgb, var(--site-paper) 88%, var(--site-blue-wash));
  box-shadow: 0 34px 80px -42px rgba(11, 17, 54, 0.72);
  overflow: hidden;
  color: inherit;
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  opacity: 0.72;
  transition: transform 520ms cubic-bezier(.22, 1, .36, 1), opacity 260ms ease, filter 260ms ease;
}

.hero-preview:hover,
.hero-preview:focus-visible {
  opacity: 1;
  filter: brightness(1.08);
  outline: 2px solid color-mix(in srgb, var(--site-blue) 58%, transparent);
  outline-offset: 3px;
}

.hero-preview img {
  display: block;
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: 13px;
  object-fit: cover;
  opacity: 0.72;
  filter: saturate(0.74) contrast(0.94);
  -webkit-user-drag: none;
}

.hero-preview-bar {
  display: flex;
  justify-content: space-between;
  padding: 2px 4px 8px;
  color: var(--site-muted);
  font: 650 8px/1 var(--font-mono);
  letter-spacing: 0.12em;
}

.hero-preview-prev {
  z-index: 0;
  transform:
    translate(calc(var(--hero-prev-x) + var(--hero-drag)), var(--hero-prev-y))
    rotate(var(--hero-prev-rotate))
    scale(var(--hero-side-scale));
}

.hero-preview-next {
  z-index: 1;
  transform:
    translate(calc(var(--hero-next-x) + var(--hero-drag)), var(--hero-next-y))
    rotate(var(--hero-next-rotate))
    scale(var(--hero-side-scale));
}

.hero-preview-open {
  position: absolute;
  right: 20px;
  bottom: 18px;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--site-lime);
  color: #1d2215;
  font: 700 21px/1 var(--font-ui);
  box-shadow: 0 14px 30px -18px rgba(12, 18, 5, 0.82);
}

.hero-source-card,
.hero-device-card {
  position: absolute;
  z-index: 5;
  border: 1px dashed color-mix(in srgb, var(--site-blue) 46%, transparent);
  background: color-mix(in srgb, var(--site-paper) 92%, transparent);
  color: var(--site-blue);
  box-shadow: 0 22px 46px -34px rgba(20, 26, 75, 0.66);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.hero-source-card {
  top: 10%;
  left: 1%;
  width: 118px;
  padding: 17px 17px 13px;
  transform: rotate(-8deg);
}

.hero-source-card strong { display: block; font: 700 30px/1 var(--font-mono); }
.hero-source-card i { display: block; width: 70%; height: 4px; margin-top: 9px; background: color-mix(in srgb, var(--site-blue) 28%, transparent); }
.hero-source-card i + i { width: 46%; margin-top: 5px; }
.hero-source-card span,
.hero-device-card small { display: block; margin-top: 12px; font: 650 7px/1 var(--font-mono); letter-spacing: 0.14em; }

.hero-device-card {
  left: 8%;
  bottom: 7%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 12px 14px;
  transform: rotate(7deg);
}

.hero-device-card > span { font-size: 24px; line-height: 1; }
.hero-device-card small { margin: 0; color: var(--site-muted); }

.hero-scene-plus,
.hero-scene-drag {
  position: absolute;
  z-index: 5;
  color: var(--site-faint);
  font: 700 18px/1 var(--font-mono);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.hero-scene-drag { font-size: 8px; letter-spacing: 0.16em; }
.hero-scene-plus-top { top: 3%; right: 2%; }
.hero-scene-plus-bottom { left: 0; bottom: 3%; }
.hero-scene-drag { right: 8%; bottom: 2%; }

.hero-scene-burst {
  position: absolute;
  right: -1%;
  bottom: 14%;
  z-index: 5;
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--site-lime);
  color: #1d2215;
  font: 500 54px/1 var(--font-ui);
  transform: rotate(9deg);
  box-shadow: 0 22px 55px -34px rgba(35, 44, 5, 0.82);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.site-home .stage {
  max-width: 100%;
  border-radius: 22px;
  transform: none;
  box-shadow:
    0 34px 80px -42px rgba(10, 15, 40, 0.74),
    0 0 0 1px color-mix(in srgb, var(--site-blue) 16%, transparent);
  transition: opacity 300ms ease, transform 480ms cubic-bezier(.22, 1, .36, 1);
  view-transition-name: live-stage;
}

.hero-runtime.switching .home-stage-host {
  pointer-events: none;
}

.hero-preview-flight {
  display: block;
  z-index: 4;
  pointer-events: none;
  --hero-flight-x: 0px;
  --hero-flight-y: 0px;
  --hero-flight-scale-x: 1;
  --hero-flight-scale-y: 1;
}

.hero-preview-incoming-prev {
  transform: translate(-102%, 4%) rotate(-12deg) scale(.68);
  opacity: 0;
  pointer-events: none;
}

.hero-preview-incoming-next {
  transform: translate(2%, -108%) rotate(13deg) scale(.68);
  opacity: 0;
  pointer-events: none;
}

.hero-runtime.switch-next .home-stage-host {
  opacity: 0.72;
  transform:
    translate(var(--hero-stage-x), var(--hero-stage-y))
    rotate(-7deg)
    scale(var(--hero-stage-scale-x), var(--hero-stage-scale-y));
}

.hero-runtime.switch-prev .home-stage-host {
  opacity: 0.72;
  transform:
    translate(var(--hero-stage-x), var(--hero-stage-y))
    rotate(8deg)
    scale(var(--hero-stage-scale-x), var(--hero-stage-scale-y));
}

.hero-runtime.switch-next #hero-preview-prev {
  opacity: 0;
  transform: translate(-102%, 4%) rotate(-12deg) scale(.68);
}

.hero-runtime.switch-prev #hero-preview-next {
  opacity: 0;
  transform: translate(2%, -108%) rotate(13deg) scale(.68);
}

.hero-runtime.switch-next .hero-preview-incoming-next {
  opacity: 0.72;
  transform:
    translate(calc(var(--hero-next-x) + var(--hero-drag)), var(--hero-next-y))
    rotate(var(--hero-next-rotate))
    scale(var(--hero-side-scale));
}

.hero-runtime.switch-prev .hero-preview-incoming-prev {
  opacity: 0.72;
  transform:
    translate(calc(var(--hero-prev-x) + var(--hero-drag)), var(--hero-prev-y))
    rotate(var(--hero-prev-rotate))
    scale(var(--hero-side-scale));
}

.hero-runtime.switch-next .hero-preview-flight-next,
.hero-runtime.switch-prev .hero-preview-flight-prev {
  z-index: 4;
  opacity: 1;
  filter: none;
  transform:
    translate(
      calc(-50% + var(--hero-flight-x)),
      calc(-50% + var(--hero-flight-y))
    )
    rotate(0)
    scale(var(--hero-flight-scale-x), var(--hero-flight-scale-y));
}

.hero-runtime.handoff .home-stage-host {
  opacity: 0;
  transform: translateX(var(--hero-drag));
  transition: none;
}

.hero-runtime.handoff.switch-next #hero-preview-prev {
  opacity: 0.72;
  transform:
    translate(calc(var(--hero-prev-x) + var(--hero-drag)), var(--hero-prev-y))
    rotate(var(--hero-prev-rotate))
    scale(var(--hero-side-scale));
  transition: none;
}

.hero-runtime.handoff.switch-prev #hero-preview-next {
  opacity: 0.72;
  transform:
    translate(calc(var(--hero-next-x) + var(--hero-drag)), var(--hero-next-y))
    rotate(var(--hero-next-rotate))
    scale(var(--hero-side-scale));
  transition: none;
}

.hero-runtime.handoff.stage-ready .home-stage-host {
  opacity: 1;
  transition: opacity 160ms ease;
}

.hero-runtime.handoff.stage-ready .hero-preview-flight {
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
}

html[data-mode="focus"] .stage { view-transition-name: live-stage; }

.site-home .stage-meta { margin-bottom: 9px; }
.site-home .stage-meta .size { display: none; }
.site-home .resize-ring { display: none; }

.signal-band {
  position: relative;
  z-index: 4;
  width: calc(100vw + 96px);
  max-width: none;
  margin-left: calc(50% - 50vw - 48px);
  overflow: hidden;
  border-block: 1px solid color-mix(in srgb, white 26%, transparent);
  background: var(--site-blue);
  color: white;
  transform: rotate(-1deg);
  transform-origin: center;
}

.signal-track {
  display: flex;
  width: max-content;
  padding: 15px 0;
  animation: signal-scroll 28s linear infinite;
}

.signal-loop {
  display: flex;
  flex: none;
  align-items: center;
  gap: clamp(28px, 3vw, 58px);
}

.signal-sequence {
  display: inline-flex;
  align-items: center;
  gap: clamp(18px, 2vw, 34px);
  font-size: clamp(18px, 2vw, 30px);
  font-weight: 650;
  letter-spacing: -0.035em;
  white-space: nowrap;
}

.signal-sequence b { font: inherit; }

@keyframes signal-scroll { to { transform: translateX(-50%); } }

.catalog-section { padding-top: clamp(76px, 8vw, 128px); }
.catalog-nav {
  display: flex;
  max-width: 100%;
  min-width: 0;
  gap: 8px;
  margin-bottom: 38px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-padding-inline: 8px;
  scrollbar-width: none;
}
.catalog-nav::-webkit-scrollbar { display: none; }
.catalog-nav button {
  flex: 0 0 auto;
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  background: var(--site-paper);
  color: var(--site-muted);
  font: 650 10px/1 var(--font-mono);
  letter-spacing: .07em;
  text-transform: uppercase;
  cursor: pointer;
}
.catalog-nav button:hover { border-color: var(--site-blue); color: var(--site-blue); }
.catalog-nav button[aria-selected="true"] {
  border-color: var(--site-ink);
  background: var(--site-ink);
  color: var(--site-bg);
  box-shadow: 0 12px 24px -18px color-mix(in srgb, var(--site-ink) 72%, transparent);
}
.catalog-nav button:focus-visible {
  outline: 2px solid var(--site-blue);
  outline-offset: 3px;
}
.catalog-groups {
  position: relative;
  overflow: clip;
  overflow-clip-margin: 18px;
  touch-action: pan-y;
}
.catalog-group-transitioning {
  position: absolute;
  inset: 0 0 auto;
  width: 100%;
}
.catalog-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--site-rule);
}
.catalog-group-head h3 { margin: 0; font-size: clamp(22px, 2.5vw, 34px); letter-spacing: -.045em; }
.catalog-group-head span { color: var(--site-faint); font: 600 10px/1 var(--font-mono); }
.catalog-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.catalog-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--site-rule);
  border-radius: 15px;
  background: var(--site-paper);
  box-shadow: 0 16px 36px -32px rgba(15, 20, 40, .5);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}
.catalog-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--site-blue) 44%, var(--site-rule));
  box-shadow: 0 20px 44px -28px rgba(15, 20, 40, .55);
}
.catalog-card[hidden], .catalog-group[hidden] { display: none; }
.catalog-cover {
  position: relative;
  aspect-ratio: 4 / 3;
  margin: 7px 7px 0;
  overflow: hidden;
  border-radius: 10px;
  background: #0b0d12;
}
.catalog-card[data-fixed-square="true"] .catalog-cover { aspect-ratio: 1; }
.catalog-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.catalog-open {
  position: absolute;
  inset: 0;
  width: 100%;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.catalog-info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; padding: 12px; }
.catalog-title-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--site-ink);
  text-align: left;
  cursor: pointer;
}
.catalog-title-button strong { display: block; overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.catalog-title-button small { display: block; margin-top: 5px; color: var(--site-faint); font: 600 9px/1.2 var(--font-mono); }
.catalog-source {
  width: 32px;
  height: 32px;
  border: 1px solid var(--site-rule);
  border-radius: 50%;
  background: transparent;
  color: var(--site-muted);
  cursor: pointer;
}
.catalog-source:hover { border-color: var(--site-blue); color: var(--site-blue); }

.demo-focus {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: 100%;
  height: 100%;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg);
}
.focus-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel) 92%, transparent);
}
.focus-toolbar .focus-back { order: -1; width: 34px; height: 34px; }
.focus-toolbar .brand-mark { display: none; }
.focus-toolbar .brand-text .tag { letter-spacing: .1em; }
.focus-toolbar .nav-toggle, .focus-toolbar .live-chip { display: none; }
.focus-toolbar .topbar-spacer { flex: 1; }
.focus-toolbar .theme-toggle,
.focus-toolbar .language-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--ink-dim);
  cursor: pointer;
}
.focus-toolbar .theme-toggle .ico-moon { display: none; }
:root[data-theme="light"] .focus-toolbar .theme-toggle .ico-sun { display: none; }
:root[data-theme="light"] .focus-toolbar .theme-toggle .ico-moon { display: block; }
.focus-toolbar .gh { color: var(--ink-dim); text-decoration: none; }
.focus-body { min-width: 0; min-height: 0; overflow: hidden; }
.focus-body > aside, .focus-body > .nav-backdrop { display: none; }
.focus-body > main {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 30px;
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
  transition: grid-template-columns 360ms cubic-bezier(.22, 1, .36, 1);
}
.focus-body > main.source-open {
  grid-template-columns: minmax(0, 1fr) min(680px, 46vw);
}
.focus-body > main .stage-wrap {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  padding: clamp(14px, 3vw, 32px);
}
.focus-body > main .code-panel {
  position: relative;
  inset: auto;
  grid-column: 2;
  grid-row: 1;
  width: 100%;
  height: calc(100% - 36px);
  margin-block: 18px;
  transform: none;
  border-radius: var(--r3) 0 0 var(--r3);
  transition: box-shadow 280ms ease;
}
.focus-body > main:not(.source-open) .code-panel {
  box-shadow: none;
}
.focus-body > main:not(.source-open) .code-inner {
  visibility: hidden;
}
.focus-body > main.source-open .code-inner {
  visibility: visible;
}

.home-section {
  position: relative;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(92px, 10vw, 160px) var(--site-gutter);
}

.section-head {
  display: grid;
  grid-template-columns: 1fr minmax(260px, 0.7fr);
  align-items: end;
  gap: 40px;
  margin-bottom: 42px;
}

.section-title {
  margin: 0;
  font-size: clamp(58px, 8vw, 112px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.section-title .signal { color: var(--site-blue); }

.section-intro {
  margin: 0;
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.7;
}

.play-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
}

.play-filters {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  gap: 7px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.play-filters::-webkit-scrollbar { display: none; }

.play-filter {
  flex: 0 0 auto;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--site-rule);
  border-radius: 999px;
  background: var(--site-paper);
  color: var(--site-muted);
  font: 650 10px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.play-filter.active,
.play-filter[aria-selected="true"] {
  border-color: var(--site-ink);
  background: var(--site-ink);
  color: var(--site-bg);
}

.play-filter:focus-visible {
  outline: 2px solid var(--site-blue);
  outline-offset: 3px;
}

.play-search {
  position: relative;
  flex: 0 1 260px;
}

.play-search input {
  width: 100%;
  min-height: 40px;
  padding: 0 14px 0 36px;
  border: 0;
  border-bottom: 1px solid var(--site-rule);
  border-radius: 0;
  outline: none;
  background: transparent;
  color: var(--site-ink);
  font: 600 12px/1 var(--font-mono);
}

.play-search svg {
  position: absolute;
  left: 10px;
  top: 12px;
  color: var(--site-muted);
  pointer-events: none;
}

.play-count {
  flex: 0 0 auto;
  color: var(--site-muted);
  font: 650 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
}

.demo-grid-viewport {
  position: relative;
  overflow: clip;
  overflow-clip-margin: 18px;
  touch-action: pan-y;
}

.demo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.demo-card {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: 1px solid var(--site-rule);
  border-radius: 16px;
  background: color-mix(in srgb, var(--site-paper) 92%, transparent);
  color: var(--site-ink);
  text-align: left;
  overflow: hidden;
  box-shadow: 0 24px 60px -48px rgba(18, 25, 59, 0.7);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.demo-card:hover,
.demo-card:focus-within {
  transform: translateY(-7px);
  border-color: color-mix(in srgb, var(--site-blue) 55%, transparent);
  box-shadow: 0 34px 70px -44px color-mix(in srgb, var(--site-blue) 36%, transparent);
}

.demo-card[hidden] { display: none; }

.game-cover {
  position: relative;
  aspect-ratio: 3 / 2;
  margin: 10px 10px 0;
  border-radius: 10px;
  overflow: hidden;
  background: #11151b;
}

.game-cover img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  transition: transform 540ms cubic-bezier(.22, 1, .36, 1), filter 260ms ease;
}

.demo-card:hover .game-cover img,
.demo-card:focus-within .game-cover img {
  transform: scale(1.035);
  filter: saturate(1.08) contrast(1.03);
}

.cover-index {
  position: absolute;
  z-index: 2;
  left: 11px;
  top: 11px;
  padding: 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  background: rgba(7, 10, 14, 0.72);
  color: rgba(255, 255, 255, 0.88);
  font: 650 9px/1 var(--font-mono);
  letter-spacing: 0.1em;
  backdrop-filter: blur(10px);
  pointer-events: none;
}

.card-cover-button {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  padding: 11px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #1d2215;
  cursor: pointer;
}

.card-cover-button span {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--site-lime);
  font: 750 20px/1 var(--font-ui);
  box-shadow: 0 12px 25px -14px #000;
  transition: transform 200ms cubic-bezier(.22, 1, .36, 1), background 200ms ease;
}

.card-cover-button:hover span,
.card-cover-button:focus-visible span {
  transform: rotate(8deg) scale(1.08);
}

.card-cover-button:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--site-blue) 44%, transparent);
  outline-offset: -3px;
}

.card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 78px;
  border-bottom: 1px solid var(--site-rule);
}

.card-title,
.card-source {
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.card-title {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 13px 15px;
  text-align: left;
}

.card-title strong {
  overflow: hidden;
  max-width: 100%;
  font-size: 17px;
  letter-spacing: -0.025em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.card-title small {
  margin-top: 6px;
  color: var(--site-muted);
  font: 650 8px/1 var(--font-mono);
  letter-spacing: 0.11em;
}

.card-source {
  width: 58px;
  border-left: 1px solid var(--site-rule);
  color: var(--site-muted);
  font: 700 11px/1 var(--font-mono);
}

.card-title:hover,
.card-title:focus-visible,
.card-source:hover,
.card-source:focus-visible {
  background: color-mix(in srgb, var(--site-blue) 7%, transparent);
  outline: none;
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 15px 12px;
  color: var(--site-muted);
  font: 650 9px/1 var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.all-demos-row {
  display: flex;
  justify-content: center;
  padding-top: 38px;
}

.build-section {
  max-width: none;
  border-block: 1px solid var(--site-rule);
  background: color-mix(in srgb, var(--site-blue-wash) 66%, var(--site-bg));
}

.build-inner {
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(92px, 10vw, 154px) var(--site-gutter);
}

.build-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
  gap: clamp(34px, 7vw, 110px);
  align-items: center;
}

.build-copy h2 {
  margin: 0;
  font-size: clamp(54px, 7vw, 104px);
  line-height: 0.9;
  letter-spacing: -0.075em;
}

.build-copy > p {
  max-width: 520px;
  margin: 28px 0 0;
  color: var(--site-muted);
  font-size: 16px;
  line-height: 1.7;
}

.capability-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin-top: 35px;
  border: 1px solid var(--site-rule);
  background: var(--site-rule);
}

.capability-list span {
  padding: 15px;
  background: var(--site-bg);
  color: var(--site-muted);
  font: 650 10px/1.35 var(--font-mono);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.build-demo {
  position: relative;
  min-width: 0;
  min-height: 560px;
  outline: none;
  touch-action: pan-y;
}

.build-card-stack {
  position: relative;
  height: 500px;
  perspective: 1200px;
  isolation: isolate;
}

.build-demo-card {
  position: absolute;
  left: 50%;
  top: 46%;
  width: min(86%, 700px);
  height: 390px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--site-blue) 25%, var(--site-rule));
  border-radius: 20px;
  background: #11131a;
  color: #e7e9f4;
  box-shadow: var(--site-shadow);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  transition:
    transform 620ms cubic-bezier(.2, .82, .2, 1),
    opacity 360ms ease,
    border-color 240ms ease,
    box-shadow 360ms ease;
  will-change: transform;
}

.build-demo-card.is-active {
  z-index: 3;
  opacity: 1;
  transform: translate(-50%, -50%) rotate(-1.2deg) scale(1);
  box-shadow: 0 36px 82px -44px rgba(18, 24, 71, .82);
}

.build-demo-card.is-prev {
  z-index: 1;
  opacity: .48;
  transform: translate(-82%, -35%) rotate(-7deg) scale(.78);
}

.build-demo-card.is-next {
  z-index: 2;
  opacity: .67;
  transform: translate(-18%, -67%) rotate(7deg) scale(.8);
}

.build-demo-card:hover,
.build-demo-card:focus-visible {
  border-color: color-mix(in srgb, var(--site-blue) 72%, white 12%);
}

.build-demo-card:focus-visible { outline: 3px solid color-mix(in srgb, var(--site-blue) 52%, transparent); }

.build-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  min-height: 46px;
  padding: 0 17px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  color: #8d93a8;
  font: 600 10px/1 var(--font-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.build-code-card pre {
  margin: 0;
  padding: clamp(20px, 3vw, 36px);
  overflow-x: auto;
  font: 500 clamp(10px, 1vw, 14px)/1.65 var(--font-mono);
  tab-size: 4;
}

.build-code-card .kw { color: #ff8896; }
.build-code-card .macro { color: #a996ff; }
.build-code-card .type { color: #72e4d2; }
.build-code-card .str { color: #d4f87c; }
.build-code-card .num { color: #ffd37b; }

.build-responsive-card { background: #161a25; }

.build-responsive-body {
  height: 294px;
  display: grid;
  grid-template-columns: .7fr .9fr 1.6fr;
  align-items: center;
  gap: 16px;
  padding: 26px;
  background:
    linear-gradient(rgba(122, 139, 255, .07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(122, 139, 255, .07) 1px, transparent 1px);
  background-size: 24px 24px;
}

.build-screen {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(156, 165, 204, .3);
  border-radius: 12px;
  background: #0d1118;
  box-shadow: 0 20px 34px -24px #000;
}

.build-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 28%, rgba(255,255,255,.08), transparent 68%);
  transform: translateX(-120%);
  animation: build-screen-scan 3.8s ease-in-out infinite;
}

.build-screen-label {
  position: absolute;
  left: 8px;
  top: 7px;
  color: #7f89a6;
  font: 650 8px/1 var(--font-mono);
}

.build-screen-compact {
  aspect-ratio: 1;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  place-items: end center;
  gap: 4px;
  padding: 34px 12px 13px;
}

.build-screen-compact strong {
  grid-column: 1 / -1;
  align-self: center;
  color: var(--site-lime);
  font: 700 30px/1 var(--font-ui);
}

.build-screen-compact i {
  width: 100%;
  height: var(--bar, 45%);
  border-radius: 3px;
  background: var(--site-blue);
}
.build-screen-compact i:nth-of-type(2) { --bar: 72%; }
.build-screen-compact i:nth-of-type(3) { --bar: 56%; }
.build-screen-compact i:nth-of-type(4) { --bar: 88%; }

.build-screen-mobile {
  aspect-ratio: .62;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 22px 14px;
}

.build-screen-mobile small,
.build-screen-wide small { color: #7f89a6; font: 650 8px/1 var(--font-mono); }
.build-screen-mobile strong { margin: 9px 0 18px; font-size: 30px; }

.build-screen-wide {
  aspect-ratio: 1.55;
  display: grid;
  grid-template-columns: .8fr 1.2fr;
  align-items: center;
  gap: 18px;
  padding: 22px;
}

.build-screen-wide > div:first-of-type { display: flex; flex-direction: column; gap: 10px; }
.build-screen-wide strong { font-size: 35px; }

.build-wave {
  height: 52px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.build-wave i {
  flex: 1;
  height: 28%;
  border-radius: 999px;
  background: linear-gradient(var(--site-lime), #68dbc9);
  animation: build-meter 1.4s ease-in-out infinite alternate;
}
.build-wave i:nth-child(2n) { height: 76%; animation-delay: -430ms; }
.build-wave i:nth-child(3n) { height: 48%; animation-delay: -760ms; }

.build-card-note {
  position: absolute;
  left: 18px;
  bottom: 14px;
  margin: 0;
  color: #7f89a6;
  font: 650 8px/1 var(--font-mono);
  letter-spacing: .12em;
}

.build-route-card { background: #121620; }

.build-route-map {
  position: relative;
  height: 298px;
  display: grid;
  grid-template-columns:
    minmax(96px, .9fr)
    minmax(24px, .22fr)
    minmax(84px, .72fr)
    minmax(32px, .3fr)
    minmax(120px, 1fr);
  grid-template-rows: repeat(3, 1fr);
  align-items: center;
  gap: 10px 0;
  padding: 26px 32px 34px;
}

.build-route-source,
.build-route-scene,
.build-route-target {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 16px;
  border: 1px solid rgba(138, 151, 201, .28);
  border-radius: 12px;
  background: #0d1118;
}

.build-route-source { grid-row: 1 / 4; justify-content: center; min-height: 126px; }
.build-route-scene {
  grid-column: 3;
  grid-row: 1 / 4;
  justify-content: center;
  min-height: 106px;
  border-color: rgba(169, 150, 255, .52);
  background: color-mix(in srgb, #0d1118 88%, #a996ff);
}
.build-route-target { grid-column: 5; }
.build-route-source small,
.build-route-scene small,
.build-route-target small { color: #7f89a6; font: 650 8px/1 var(--font-mono); }
.build-route-source strong { color: #a996ff; }
.build-route-scene strong { color: #c1b3ff; }
.build-route-scene span { color: #a996ff; font: 650 8px/1 var(--font-mono); }
.build-route-target strong { color: #72e4d2; }
.build-route-target span { color: #d4f87c; font: 650 8px/1 var(--font-mono); }

.build-route-connector {
  grid-column: 2;
  grid-row: 1 / 4;
  position: relative;
  height: 2px;
  background: #a996ff;
}

.build-route-connector::after,
.build-route-branches i::after {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  border-left: 6px solid currentColor;
  color: #a996ff;
  transform: translateY(-50%);
}

.build-route-branches {
  grid-column: 4;
  grid-row: 1 / 4;
  position: relative;
  align-self: stretch;
}

.build-route-branches::before {
  content: "";
  position: absolute;
  left: 0;
  top: 16.66%;
  bottom: 16.66%;
  width: 1px;
  background: rgba(114, 228, 210, .52);
}

.build-route-branches i {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: #72e4d2;
}

.build-route-branches i:nth-child(1) { top: 16.66%; }
.build-route-branches i:nth-child(2) { top: 50%; }
.build-route-branches i:nth-child(3) { top: 83.33%; }
.build-route-branches i::after { color: #72e4d2; }

.build-demo-controls {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: 0;
  width: min(88%, 680px);
  min-height: 58px;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto 42px;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--site-blue) 28%, var(--site-rule));
  border-radius: 16px;
  background: color-mix(in srgb, var(--site-bg) 86%, transparent);
  box-shadow: 0 24px 50px -38px #11152f;
  backdrop-filter: blur(16px);
  transform: translateX(-50%);
}

.build-demo-controls > button,
.build-demo-dots button {
  border: 0;
  color: var(--site-ink);
  cursor: pointer;
}

.build-demo-controls > button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--site-rule);
  border-radius: 50%;
  background: var(--site-paper);
}

.build-demo-readout { display: flex; min-width: 0; flex-direction: column; gap: 4px; }
.build-demo-readout b { font-size: 13px; }
.build-demo-readout small {
  overflow: hidden;
  color: var(--site-muted);
  font: 600 8px/1 var(--font-mono);
  letter-spacing: .08em;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.build-demo-dots { display: flex; gap: 7px; }
.build-demo-dots button {
  width: 7px;
  height: 7px;
  padding: 0;
  border-radius: 50%;
  background: var(--site-rule-strong);
  transition: width 260ms ease, border-radius 260ms ease, background 260ms ease;
}
.build-demo-dots button[aria-selected="true"] { width: 25px; border-radius: 99px; background: var(--site-blue); }

@keyframes build-screen-scan {
  45%, 100% { transform: translateX(120%); }
}

@keyframes build-meter {
  to { height: 92%; }
}

.target-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border: 1px solid var(--site-rule);
  border-radius: 18px;
  overflow: hidden;
  background: var(--site-rule);
}

.target-strip article {
  min-height: 160px;
  padding: 20px;
  background: var(--site-paper);
}

.target-strip article + article { border-left: 1px solid var(--site-rule); }

.target-strip small {
  display: block;
  color: var(--site-blue);
  font: 700 9px/1 var(--font-mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.target-strip h3 { margin: 42px 0 6px; font-size: 18px; }
.target-strip p { margin: 0; color: var(--site-muted); font-size: 12px; line-height: 1.55; }

.start-section {
  position: relative;
  overflow: hidden;
  border-top: 1px solid rgba(139, 152, 255, .24);
  background:
    linear-gradient(rgba(114, 132, 255, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(114, 132, 255, .1) 1px, transparent 1px),
    #171a29;
  background-size: 72px 72px;
  color: #f2f3f8;
}

:root[data-theme="dark"] .start-section { background-color: #0d0f17; }

.start-section::before {
  content: "";
  position: absolute;
  width: min(58vw, 760px);
  aspect-ratio: 1;
  right: -18%;
  top: -48%;
  border: 1px dashed rgba(104, 124, 255, .42);
  border-radius: 50%;
  pointer-events: none;
}

.start-inner {
  position: relative;
  z-index: 1;
  max-width: var(--site-max);
  margin: 0 auto;
  padding: clamp(92px, 10vw, 154px) var(--site-gutter);
}

.start-head {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, .65fr);
  align-items: end;
  gap: clamp(36px, 8vw, 120px);
  margin-bottom: 56px;
}

.start-head .section-kicker { color: #9da8db; }
.start-head h2 {
  margin: 18px 0 0;
  font-size: clamp(58px, 7.5vw, 112px);
  line-height: .86;
  letter-spacing: -.078em;
}
.start-head .signal { color: #7184ff; }
.start-head > p {
  max-width: 480px;
  margin: 0;
  color: #aeb3c6;
  font-size: 15px;
  line-height: 1.75;
}

.start-grid {
  display: grid;
  grid-template-columns: minmax(280px, .7fr) minmax(480px, 1.3fr);
  gap: 18px;
  align-items: stretch;
}

.start-card {
  position: relative;
  min-width: 0;
  padding: 22px;
  border: 1px solid rgba(184, 192, 229, .24);
  border-radius: 22px;
  background: rgba(11, 13, 21, .86);
  box-shadow: 0 30px 70px -46px rgba(0, 0, 0, .9);
}

.start-template-card {
  border-color: rgba(113, 132, 255, .62);
  background: linear-gradient(145deg, rgba(36, 42, 72, .96), rgba(12, 14, 22, .96));
  transform: rotate(.45deg);
  transform-origin: center;
}

.start-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(184, 192, 229, .18);
  color: #8f96ae;
  font: 650 9px/1 var(--font-mono);
  letter-spacing: .12em;
}

.start-card-body {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 18px;
  align-items: center;
  min-height: 154px;
}

.start-card-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--site-lime);
  color: #12161d;
  font-size: 30px;
}

.start-card h3 { margin: 0; color: #f2f3f8; font-size: clamp(24px, 3vw, 38px); letter-spacing: -.045em; }
.start-card-body p,
.start-template-copy { margin: 12px 0 0; color: #aeb3c6; font-size: 13px; line-height: 1.65; }

.start-command {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  min-height: 62px;
  overflow: hidden;
  border: 1px solid rgba(184, 192, 229, .2);
  border-radius: 12px;
  background: #080a10;
}

.start-command code {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 14px 17px;
  overflow-x: auto;
  color: #d4f87c;
  font: 650 11px/1.55 var(--font-mono);
  scrollbar-width: none;
}
.start-command code::-webkit-scrollbar { display: none; }
.start-command-stack code { flex-direction: column; align-items: flex-start; justify-content: center; }
.start-command-stack code span { white-space: nowrap; }
.start-command-stack code span:first-child { color: #8b93ac; }

.start-command button {
  min-width: 66px;
  padding: 0 13px;
  border: 0;
  border-left: 1px solid rgba(184, 192, 229, .2);
  background: transparent;
  color: #aeb3c6;
  font: 700 9px/1 var(--font-mono);
  letter-spacing: .09em;
  cursor: pointer;
}
.start-command button:hover,
.start-command button:focus-visible,
.start-command button.is-copied { background: #7184ff; color: white; outline: none; }

.start-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 20px;
  color: #f2f3f8;
  font: 650 10px/1 var(--font-mono);
  letter-spacing: .09em;
  text-decoration: none;
  text-transform: uppercase;
}
.start-link:hover { color: var(--site-lime); }

.start-template-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 28px;
}
.start-template-title small { color: #929ab5; font: 650 10px/1 var(--font-mono); letter-spacing: .08em; }
.start-template-title h3 { margin-top: 5px; font-size: clamp(30px, 4vw, 52px); }
.start-template-title > a {
  display: grid;
  place-items: center;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--site-lime);
  color: #12161d;
  font-size: 25px;
  text-decoration: none;
  transition: transform 180ms ease;
}
.start-template-title > a:hover { transform: translate(3px, -3px); }
.start-template-copy { max-width: 620px; margin-bottom: 24px; }

.template-targets {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 18px;
}
.template-targets a {
  padding: 9px 11px;
  border: 1px solid rgba(184, 192, 229, .22);
  border-radius: 999px;
  color: #b9bfd1;
  font: 650 9px/1 var(--font-mono);
  letter-spacing: .06em;
  text-decoration: none;
}
.template-targets a:hover,
.template-targets a:focus-visible { border-color: #7184ff; background: rgba(113, 132, 255, .16); color: white; outline: none; }

.site-footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 30px;
  align-items: end;
  padding: 58px var(--site-gutter) 34px;
  border-top: 1px solid var(--site-rule);
  background: var(--site-ink);
  color: var(--site-bg);
}

.footer-wordmark {
  margin: 0;
  font-size: clamp(64px, 11vw, 168px);
  line-height: 0.76;
  letter-spacing: -0.085em;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px 18px;
  max-width: 480px;
}

.footer-links a {
  color: inherit;
  font: 650 10px/1 var(--font-mono);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  text-decoration: none;
}

.footer-links a:hover { color: var(--site-lime); }

.site-mobile-menu {
  display: none;
}

.home-empty {
  grid-column: 1 / -1;
  padding: 42px;
  border: 1px dashed var(--site-rule);
  color: var(--site-muted);
  text-align: center;
  font: 600 12px/1.5 var(--font-mono);
}

html.site-motion-ready .reveal:not(.in-view) {
  opacity: 0;
  transform: translateY(24px);
}

.reveal {
  transition: opacity 700ms cubic-bezier(.22, 1, .36, 1), transform 700ms cubic-bezier(.22, 1, .36, 1);
  transition-delay: var(--reveal-delay, 0ms);
}

html.site-motion-off,
html.site-motion-off body { scroll-behavior: auto; }
html.site-motion-off .signal-track { animation-play-state: paused; }
html.site-motion-off .reveal { transition-duration: 0.01ms; transition-delay: 0ms; }
html.site-motion-off .hero-runtime::before { transform: none; }
html.site-motion-off .build-demo-card { transition-duration: .01ms; }
html.site-motion-off .build-screen::after,
html.site-motion-off .build-wave i { animation-play-state: paused; }

::view-transition-old(root) { animation: site-fade-out 180ms ease both; }
::view-transition-new(root) { animation: site-fade-in 420ms cubic-bezier(.22, 1, .36, 1) both; }
::view-transition-group(live-stage) { animation-duration: 520ms; animation-timing-function: cubic-bezier(.22, 1, .36, 1); }

@keyframes site-fade-out { to { opacity: 0; transform: scale(0.992); } }
@keyframes site-fade-in { from { opacity: 0; transform: translateY(10px); } }

@media (max-width: 1080px) {
  .home-hero {
    grid-template-columns: minmax(238px, 0.76fr) minmax(410px, 1.4fr);
    gap: 24px;
    padding-top: 56px;
  }
  .home-hero::before { left: 27%; top: 12%; width: 70%; }
  .hero-title { font-size: clamp(60px, 7.5vw, 82px); }
  .hero-runtime {
    height: clamp(560px, calc(100svh - 190px), 780px);
    padding-inline: 10px;
    --hero-prev-x: -72%;
    --hero-prev-y: -22%;
    --hero-next-x: -30%;
    --hero-next-y: -92%;
  }
  .home-stage-host { width: 90%; }
  .demo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .target-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .target-strip article + article { border-left: 0; }
  .target-strip article { border-right: 1px solid var(--site-rule); border-bottom: 1px solid var(--site-rule); }
}

@media (max-width: 820px) {
  .site-header { grid-template-columns: 1fr auto; min-height: 64px; }
  .site-main { padding: 64px 0 0; }
  .site-nav { display: none; }
  .site-actions .desktop-only { display: none; }
  .site-menu-toggle { display: inline-flex; }
  .site-mobile-menu {
    position: fixed;
    z-index: 70;
    top: 64px;
    left: 0;
    right: 0;
    display: grid;
    gap: 1px;
    padding: 14px var(--site-gutter) 18px;
    border-bottom: 1px solid var(--site-rule);
    background: color-mix(in srgb, var(--site-bg) 94%, transparent);
    backdrop-filter: blur(20px);
    transform: translateY(-130%);
    visibility: hidden;
    transition: transform 220ms ease, visibility 0s linear 220ms;
  }
  .site-mobile-menu.open {
    transform: translateY(0);
    visibility: visible;
    transition-delay: 0s;
  }
  .site-mobile-menu a,
  .site-mobile-menu button {
    min-height: 50px;
    display: flex;
    align-items: center;
    padding: 0 4px;
    border: 0;
    border-bottom: 1px solid var(--site-rule);
    background: transparent;
    color: var(--site-ink);
    font: 700 14px/1 var(--font-mono);
    text-decoration: none;
  }
  .home-hero {
    grid-template-columns: 1fr;
    min-height: auto;
    padding-top: 72px;
  }
  .home-hero::before { left: 5%; top: 38%; width: 90%; }
  .hero-copy { position: relative; top: auto; max-width: 680px; }
  .hero-title { font-size: clamp(70px, 17vw, 128px); }
  .hero-runtime { height: clamp(500px, 90vw, 650px); padding-inline: 16px; }
  .hero-preview { width: min(78%, 620px); }
  .hero-source-card { left: 3%; }
  .hero-scene-burst { right: 1%; width: 74px; height: 74px; font-size: 43px; }
  .section-head,
  .build-grid { grid-template-columns: 1fr; }
  .section-intro { max-width: 620px; }
  .build-grid { gap: 48px; }
  .build-demo { width: 100%; max-width: 780px; margin-inline: auto; }
  .target-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .start-head,
  .start-grid { grid-template-columns: 1fr; }
  .start-head { gap: 24px; }
  .start-head > p { max-width: 620px; }
  .start-template-card { transform: none; }
}

@media (max-width: 560px) {
  :root { --site-gutter: 18px; }
  .site-header { padding-inline: 18px; }
  .site-logo { font-size: 23px; }
  .site-actions { gap: 5px; }
  .site-action { min-width: 36px; height: 36px; padding-inline: 9px; }
  .home-hero { padding-top: 42px; padding-bottom: 16px; }
  .hero-copy {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    column-gap: 14px;
  }
  .hero-kicker { margin-bottom: 17px; }
  .hero-kicker { grid-column: 1 / -1; }
  .hero-title { font-size: clamp(62px, 21vw, 94px); }
  .hero-actions { align-items: center; flex-wrap: nowrap; margin: 0 0 9px; }
  .hero-actions .site-cta {
    flex: 0 0 46px;
    width: 46px;
    min-width: 46px;
    min-height: 46px;
    padding: 0;
    border-radius: 50%;
  }
  .hero-actions .site-cta span:not(:first-child) {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .hero-feature-nav { grid-column: 1 / -1; margin-top: 22px; }
  .hero-runtime {
    height: 420px;
    margin-inline: -8px;
    padding: 36px 7px 20px;
    --hero-next-x: -48%;
    --hero-next-y: -66%;
    --hero-next-rotate: 5deg;
    --hero-side-scale: 0.86;
  }
  .home-stage-host { width: 92%; }
  .hero-runtime::before { inset: 8% 1% 5%; border-radius: 24px; transform: rotate(1.2deg); }
  .hero-runtime::after { inset: 3% 1% 3% 1%; }
  .hero-preview { width: 88%; padding: 6px; border-radius: 15px; }
  .hero-preview-prev { display: none; }
  .hero-preview-bar { padding-bottom: 5px; }
  .hero-source-card,
  .hero-scene-plus,
  .hero-scene-drag { display: none; }
  .hero-device-card { left: 2%; bottom: 4%; padding: 8px 10px; }
  .hero-device-card > span { font-size: 19px; }
  .hero-scene-burst { right: 0; bottom: 11%; width: 64px; height: 64px; font-size: 37px; }
  .site-home .stage { transform: none; }
  .section-head { gap: 20px; margin-bottom: 30px; }
  .section-title { font-size: clamp(58px, 20vw, 84px); }
  .play-toolbar { align-items: stretch; flex-direction: column; }
  .play-search { flex-basis: auto; width: 100%; }
  .demo-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
  .catalog-cover { margin: 5px 5px 0; }
  .catalog-info { padding: 9px; }
  .focus-toolbar .gh-label { display: none; }
  .game-cover { margin: 8px 8px 0; }
  .capability-list { grid-template-columns: 1fr; }
  .build-demo { min-height: 440px; margin-inline: -6px; width: calc(100% + 12px); }
  .build-card-stack { height: 382px; }
  .build-demo-card { top: 45%; width: 94%; height: 300px; border-radius: 16px; }
  .build-demo-card.is-prev { transform: translate(-72%, -35%) rotate(-6deg) scale(.79); }
  .build-demo-card.is-next { transform: translate(-28%, -66%) rotate(6deg) scale(.8); }
  .build-card-head { min-height: 39px; padding-inline: 13px; font-size: 8px; }
  .build-code-card pre { padding: 14px; font-size: 8.2px; line-height: 1.55; }
  .build-responsive-body { height: 221px; gap: 7px; padding: 14px; }
  .build-screen-compact { padding: 28px 8px 9px; }
  .build-screen-compact strong,
  .build-screen-mobile strong { font-size: 21px; }
  .build-screen-mobile { padding: 18px 9px; }
  .build-screen-wide { gap: 7px; padding: 10px; }
  .build-screen-wide strong { font-size: 22px; }
  .build-route-map {
    height: 224px;
    grid-template-columns: minmax(62px, .9fr) 17px minmax(58px, .75fr) 20px minmax(74px, 1fr);
    gap: 5px 0;
    padding: 13px 14px 27px;
  }
  .build-route-source,
  .build-route-scene,
  .build-route-target { gap: 4px; padding: 9px; }
  .build-route-source { min-height: 94px; }
  .build-route-scene { min-height: 82px; }
  .build-route-source strong,
  .build-route-scene strong,
  .build-route-target strong { font-size: 10px; }
  .build-demo-controls { width: 96%; grid-template-columns: 38px minmax(0, 1fr) auto 38px; gap: 7px; }
  .build-demo-controls > button { width: 34px; height: 34px; }
  .target-strip { grid-template-columns: 1fr; }
  .target-strip article { min-height: 130px; }
  .target-strip h3 { margin-top: 28px; }
  .start-inner { padding-inline: 18px; }
  .start-head { margin-bottom: 34px; }
  .start-head h2 { font-size: clamp(54px, 17vw, 78px); }
  .start-card { padding: 16px; border-radius: 17px; }
  .start-card-body { min-height: 132px; }
  .start-template-title { margin-top: 22px; }
  .start-command { grid-template-columns: minmax(0, 1fr) 55px; }
  .start-command code { padding: 12px; font-size: 8.5px; }
  .start-command button { min-width: 55px; padding-inline: 8px; }
  .template-targets { gap: 5px; }
  .template-targets a { padding: 8px 9px; font-size: 8px; }
  .site-footer { grid-template-columns: 1fr; gap: 42px; }
  .footer-links { justify-content: flex-start; }
}

@media (max-width: 760px), (max-width: 1000px) and (max-height: 500px) {
  .focus-body > main,
  .focus-body > main.source-open {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr) 34px;
    transition: grid-template-rows 360ms cubic-bezier(.22, 1, .36, 1);
  }
  .focus-body > main.source-open {
    grid-template-rows: minmax(0, 1fr) min(44%, 420px);
  }
  .focus-body > main .stage-wrap {
    grid-column: 1;
    grid-row: 1;
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) 12px max(12px, env(safe-area-inset-left, 0px));
  }
  .focus-body > main .code-panel {
    grid-column: 1;
    grid-row: 2;
    width: 100%;
    height: 100%;
    margin: 0;
    border-radius: var(--r3) var(--r3) 0 0;
  }
}

@media (max-width: 390px) {
  .site-actions .hide-tiny { display: none; }
  .hero-title { font-size: 63px; }
  .hero-runtime { height: 390px; }
  .hero-actions .site-cta { flex-basis: 46px; }
  .catalog-grid { grid-template-columns: 1fr; }
}

@media (min-width: 561px) and (max-width: 980px) {
  .catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-height: 560px) and (orientation: landscape) {
  .home-hero {
    min-height: auto;
    padding-top: 34px;
    padding-bottom: 54px;
  }
  .hero-title { font-size: clamp(54px, 10vw, 86px); }
  .hero-copy > p { margin-top: 18px; font-size: 14px; }
  .hero-actions, .hero-feature-nav { margin-top: 18px; }
  .hero-runtime { height: 410px; }
}

@media (prefers-reduced-motion: reduce) {
  .signal-track { animation: none; }
  .demo-card,
  .site-action,
  .site-cta,
  .site-mobile-menu { transition-duration: 0.01ms; }
  .demo-card:hover,
  .site-action:hover,
  .site-cta:hover { transform: none; }
  ::view-transition-old(root),
  ::view-transition-new(root),
  ::view-transition-group(live-stage) { animation-duration: 0.01ms; }
  .focus-body > main { transition-duration: 0.01ms; }
}

.transition-origin { view-transition-name: live-stage; }
.stage.transition-detached { view-transition-name: none !important; }
