/* Catnip homepage v4: one fixed stage, discrete slide states, and no
   scroll-linked text positioning. The old homepage selectors remain available
   to non-home pages, while this file owns every homepage layout decision. */

.home-v4-page {
  --v4-nav: 68px;
  --v4-accent: #bff982;
  --v4-ink: #f3f3f3;
  --v4-muted: rgba(220, 220, 220, 0.72);
  --v4-field: #050505;
  background: var(--v4-field);
  overflow-x: clip;
}

.home-v4-page .nav {
  background: color-mix(in srgb, #050505 86%, transparent);
  border-bottom-color: rgba(206, 231, 190, 0.08);
  backdrop-filter: blur(18px) saturate(120%);
}

.home-v4-page .footer {
  position: relative;
  z-index: 5;
  background: #030303;
}

.home-v4 {
  position: relative;
  color: var(--v4-ink);
  background: var(--v4-field);
  isolation: isolate;
}

.v4-deck {
  --story-slides: 6;
  /* Five transitions at 140svh each give every PPT-like state enough room
     for fast mouse wheels and trackpads without intercepting native scroll. */
  --story-travel: 700svh;
  --story-end-hold: 140svh;
  position: relative;
  height: calc(100svh + var(--story-travel) + var(--story-end-hold));
  min-height: calc(100svh + var(--story-travel) + var(--story-end-hold));
  background:
    radial-gradient(circle at 50% 44%, rgba(92, 133, 79, 0.07), transparent 42%),
    linear-gradient(#050505, #040404);
}

.v4-deck-end-hold {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1px;
  height: var(--story-end-hold);
  pointer-events: none;
}

.v4-deck-viewport {
  position: sticky;
  top: 0;
  height: 100svh;
  min-height: 600px;
  overflow: clip;
  background:
    radial-gradient(circle at 56% 40%, rgba(173, 219, 113, 0.04), transparent 38%),
    linear-gradient(180deg, #050505 0%, #030303 100%);
}

.v4-scroll-anchor {
  position: absolute;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

/* Global fragment navigation keeps anchors below the fixed header through
   scroll-padding-top, so each anchor sits that padding past the point it
   should reveal. That point is where the in-page story jump lands, 0.04 of a
   slide into the slide (STORY_JUMP_INSET in servers.js): (2 + 0.04) / 5 and
   (5 + 0.04) / 5 of the travel. On the exact slide boundary a half-pixel
   rounding showed the previous slide, and the browser's fragment scroll and
   the script's jump disagreed about where to land. */
.v4-anchor-servers { top: calc(var(--story-travel) * 0.408 + var(--nav-h) + 18px); }
.v4-anchor-download { top: calc(var(--story-travel) * 1.008 + var(--nav-h) + 18px); }

.v4-atmosphere,
.v4-atmosphere span {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.v4-atmosphere {
  z-index: 0;
  opacity: 0.8;
  mask-image: linear-gradient(to bottom, transparent 5%, #000 22%, #000 78%, transparent 100%);
}

.v4-atmosphere span:nth-child(1) {
  inset: 10% auto auto 8%;
  width: 34vw;
  height: 34vw;
  border-radius: 50%;
  background: rgba(90, 155, 89, 0.09);
  filter: blur(90px);
  animation: v4-drift-one 16s ease-in-out infinite alternate;
}

.v4-atmosphere span:nth-child(2) {
  inset: auto 3% 4% auto;
  width: 28vw;
  height: 28vw;
  border-radius: 50%;
  background: rgba(173, 219, 113, 0.065);
  filter: blur(100px);
  animation: v4-drift-two 19s ease-in-out infinite alternate;
}

.v4-atmosphere span:nth-child(3) {
  inset: auto auto 4% 20%;
  width: 60vw;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(190, 235, 145, 0.2), transparent);
  box-shadow: 0 0 70px 20px rgba(126, 193, 98, 0.06);
}

@keyframes v4-drift-one { to { transform: translate3d(8vw, 5vh, 0) scale(1.12); } }
@keyframes v4-drift-two { to { transform: translate3d(-7vw, -4vh, 0) scale(0.9); } }

.v4-progress {
  position: fixed;
  z-index: 40;
  top: 50%;
  right: max(18px, 2.2vw);
  display: grid;
  gap: 10px;
  translate: 0 -50%;
  opacity: 0;
  visibility: hidden;
  transition: opacity 220ms ease, visibility 0s linear 220ms;
}

.v4-deck.is-in-view .v4-progress {
  opacity: 1;
  visibility: visible;
  transition-delay: 0s;
}

.v4-progress button {
  position: relative;
  width: 24px;
  height: 20px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
}

.v4-progress button::before,
.v4-progress button span {
  content: "";
  position: absolute;
  top: 50%;
  right: 0;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(229, 238, 222, 0.28);
  translate: 0 -50%;
  transition: width 240ms ease, background-color 240ms ease, box-shadow 240ms ease;
}

.v4-progress button span { display: none; }
.v4-progress button.active::before {
  width: 24px;
  background: var(--v4-accent);
  box-shadow: 0 0 18px rgba(191, 249, 130, 0.42);
}

.v4-progress button:focus-visible {
  outline: 2px solid rgba(239, 249, 231, 0.86);
  outline-offset: 3px;
  border-radius: 7px;
}

.v4-slide-layer {
  position: absolute;
  z-index: 2;
  inset: 0;
  width: 100%;
  height: 100%;
}

.v4-slide {
  position: absolute;
  z-index: 2;
  inset: 0;
  height: 100%;
  min-height: 600px;
  margin: 0;
  padding: calc(var(--v4-nav) + 24px) clamp(34px, 5.4vw, 96px) clamp(34px, 5vh, 58px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translate3d(12vw, 0, 0);
  transition:
    transform 620ms cubic-bezier(.22, 1, .36, 1),
    opacity 420ms ease,
    visibility 0s linear 620ms;
  will-change: transform, opacity;
}

.v4-slide.is-active {
  z-index: 5;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate3d(0, 0, 0);
  transition-delay: 0s;
}

.v4-slide.is-past {
  transform: translate3d(-12vw, 0, 0);
}

.v4-slide[aria-hidden="true"] :is(a, button, input, summary) { pointer-events: none; }

.v4-slide :is(h1, h2, h3, p) { text-wrap: balance; }
/* Hero and full launcher preview */
.v4-slide-launcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  justify-items: center;
  gap: clamp(12px, 2vh, 22px);
}

.v4-hero-copy {
  z-index: 3;
  width: min(1120px, 94vw);
  opacity: var(--launcher-intro-opacity, 1);
  text-align: center;
  transform: translate3d(0, var(--launcher-intro-y, 0), 0);
  filter: blur(var(--launcher-intro-blur, 0));
  will-change: opacity, transform, filter;
}

.v4-hero-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 6.1vw, 7.2rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.065em;
  text-shadow: 0 5px 24px rgba(0, 0, 0, 0.34);
}

.v4-hero-copy h1 span { color: var(--v4-accent); }
.v4-hero-copy > p:last-child {
  margin: 12px auto 0;
  max-width: 780px;
  color: var(--v4-muted);
  font-size: clamp(0.92rem, 1.1vw, 1.16rem);
  line-height: 1.6;
}

.home-v4 .launcher-showcase {
  position: relative;
  align-self: start;
  justify-self: center;
  width: min(1040px, 100%, calc((100svh - 250px) * 1.616));
  margin: 0;
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
}

.home-v4 .launcher-window {
  position: relative;
  width: 100%;
  aspect-ratio: 1102 / 682;
  border: 1px solid rgba(216, 239, 201, 0.24);
  border-radius: clamp(18px, 2vw, 30px);
  overflow: hidden;
  background: #080808;
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.45), 0 0 60px rgba(139, 197, 106, 0.08);
  transform: none !important;
}

.home-v4 .launcher-window::after { display: none; }
.home-v4 .launcher-canvas {
  opacity: 1;
  transform-origin: left top;
  transition: opacity 360ms ease;
}
.home-v4 .launcher-canvas.is-empty {
  opacity: 0;
  pointer-events: none;
}
/* Narrow screens get a touch-first server browser, not a scaled desktop app. */
.mobile-launcher-preview { display: none; }
.mobile-preview-stage { position: relative; overflow: hidden; }
.mobile-preview-stage.is-empty { background: #1a1c1b; }
.mobile-preview-stage > * { transition: opacity 360ms ease; }
.mobile-preview-stage.is-empty > * {
  visibility: hidden;
  opacity: 0 !important;
  pointer-events: none;
}
.mobile-preview-launch:disabled { cursor: default; pointer-events: none; }
.mobile-preview-groups[hidden],
.mobile-preview-hint[hidden] { display: none !important; }
.mobile-preview-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.035);
  transition: opacity 380ms ease, transform 900ms cubic-bezier(.22, 1, .36, 1);
}
.mobile-preview-backdrop.active { opacity: 1; transform: scale(1); }
.mobile-preview-shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.42), rgba(0, 0, 0, 0.1) 62%, transparent),
    linear-gradient(0deg, rgba(0, 0, 0, 0.38), transparent 58%);
}
.mobile-preview-content {
  position: absolute;
  z-index: 2;
  top: 24px;
  left: 24px;
  right: 20px;
  margin: 0;
  color: #f7fbf4;
  text-align: left;
  will-change: opacity, transform, filter;
}
.mobile-preview-identity {
  display: block;
}
.mobile-preview-status-bar { display: flex; align-items: center; gap: 11px; margin-top: 11px; }
.mobile-preview-status { display: inline-flex; align-items: center; gap: 6px; letter-spacing: 0; text-transform: none; }
.mobile-preview-status i { width: 7px; height: 7px; border-radius: 50%; background: var(--v4-accent); box-shadow: 0 0 12px rgba(173, 219, 113, 0.8); }
.mobile-preview-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 54px;
  height: 54px;
  overflow: hidden;
  border: 1px solid rgba(222, 244, 207, 0.5);
  border-radius: 15px;
  background: rgba(8, 8, 8, 0.52);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.38);
  font-weight: 900;
}
.mobile-preview-icon img { width: 100%; height: 100%; object-fit: cover; }
.mobile-preview-content h2 {
  margin: 0;
  font-size: clamp(1.75rem, 8vw, 2.35rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: .04em;
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.96), 0 0 30px rgba(0, 0, 0, 0.42);
}
.mobile-preview-content .mobile-preview-status { color: rgba(247, 251, 244, 0.82); font-size: 0.7rem; font-weight: 800; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.95); }
.mobile-preview-content > p {
  display: -webkit-box;
  overflow: hidden;
  max-width: min(92%, 440px);
  margin: 12px 0 0;
  color: rgba(247, 251, 244, 0.84);
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.52;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.96), 0 6px 16px rgba(0, 0, 0, 0.9);
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.mobile-preview-socials {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  min-height: 20px;
  margin: 0;
  padding-left: 11px;
  border-left: 1px solid rgba(255, 255, 255, 0.24);
}
.mobile-preview-socials a {
  display: inline-flex;
  width: 19px;
  height: 19px;
  color: rgba(255, 255, 255, 0.92);
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.96));
}
.mobile-preview-socials a:active { color: var(--v4-accent); }
.mobile-preview-socials svg { display: block; width: 100%; height: 100%; }
.mobile-preview-actions {
  position: absolute;
  z-index: 4;
  right: 16px;
  bottom: 16px;
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: calc(100% - 32px);
  will-change: opacity, transform, filter;
}
.mobile-preview-mode-tabs {
  position: relative;
  isolation: isolate;
  display: flex;
  gap: 3px;
  max-width: 100%;
  padding: 4px;
  overflow-x: auto;
  border: 1px solid rgba(227, 240, 218, 0.16);
  border-radius: 14px;
  background: rgba(26, 26, 28, 0.58);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(10px);
  scrollbar-width: none;
}
.mobile-preview-mode-tabs::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 4px;
  bottom: 4px;
  left: 4px;
  width: calc((100% - 8px - (var(--mode-count, 1) - 1) * 3px) / var(--mode-count, 1));
  border-radius: 11px;
  background: #f3f5f1;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.22);
  transform: translateX(calc(var(--mode-index, 0) * (100% + 3px)));
  transition: transform 300ms ease-out, width 300ms ease-out;
}
.mobile-preview-mode-tabs[hidden] { display: none; }
.mobile-preview-mode-tabs::-webkit-scrollbar { display: none; }
.mobile-preview-mode-tabs button {
  position: relative;
  z-index: 1;
  min-width: 58px;
  min-height: 30px;
  padding: 4px 10px;
  border: 0;
  border-radius: 11px;
  background: none;
  color: rgba(244, 248, 241, 0.62);
  font: inherit;
  font-size: 0.64rem;
  font-weight: 800;
  white-space: nowrap;
  transition: color 220ms ease;
}
.mobile-preview-mode-tabs button.active { background: transparent; color: #0a0a0a; }
.mobile-preview-launch {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 128px;
  min-height: 52px;
  padding: 10px 18px;
  border: 0;
  border-radius: 16px;
  background: var(--accent-bright);
  box-shadow: 0 16px 44px rgba(16, 24, 10, 0.35);
  color: var(--accent-ink);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 900;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.mobile-preview-launch svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mobile-preview-launch svg path { fill: currentColor; stroke: none; }
.mobile-preview-launch.is-preparing { pointer-events: none; }
.mobile-preview-launch.is-preparing svg { animation: launch-pulse 700ms ease-in-out infinite alternate; }
.mobile-preview-launch.is-ready { background: var(--accent-bright); box-shadow: 0 16px 44px rgba(16, 24, 10, 0.35); }
.mobile-preview-launch:active { transform: scale(0.97); }

.mobile-demo-walker {
  position: absolute;
  z-index: 3;
  right: 4px;
  bottom: -145px;
  width: clamp(225px, 64vw, 255px);
  aspect-ratio: 300 / 440;
  pointer-events: none;
}
.mobile-demo-walker-entrance,
.mobile-demo-walker-bob {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform-origin: bottom right;
}
.mobile-demo-walker-entrance {
  opacity: 0;
  transform: translate(34px, 48px) scale(0.92);
  transition: opacity 250ms ease-in, transform 250ms ease-in;
}
.mobile-demo-walker.show .mobile-demo-walker-entrance {
  opacity: 1;
  transform: translate(0, 0) scale(1);
  transition: opacity 350ms cubic-bezier(.16, 1, .3, 1), transform 350ms cubic-bezier(.16, 1, .3, 1);
}
.mobile-demo-walker-bob { animation: demo-walker-bob 3.5s ease-in-out infinite; }
.mobile-demo-walker canvas { display: block; width: 100% !important; height: 100% !important; }
.mobile-preview-groups {
  display: flex;
  width: 100%;
  gap: 9px;
  overflow-x: auto;
  padding: 2px 1px 4px;
  scrollbar-width: none;
  scroll-snap-type: x proximity;
  overscroll-behavior-inline: contain;
}
.mobile-preview-groups::-webkit-scrollbar { display: none; }
.mobile-preview-group {
  display: grid;
  flex: 0 0 50px;
  justify-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(233, 241, 228, 0.48);
  font: inherit;
  scroll-snap-align: start;
  transition: color 180ms ease, filter 180ms ease;
}
.mobile-preview-group img,
.mobile-preview-group-fallback {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(214, 235, 200, 0.22);
  border-radius: 14px;
  object-fit: cover;
  background: #0a0a0a;
  transition: border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}
.mobile-preview-group.active { color: #eef7e9; }
.mobile-preview-group.active img,
.mobile-preview-group.active .mobile-preview-group-fallback { border-color: var(--v4-accent); box-shadow: 0 0 0 2px rgba(173, 219, 113, 0.15), 0 7px 20px rgba(0, 0, 0, 0.32); transform: translateY(-1px); }
.mobile-preview-hint { margin: 0; color: rgba(225, 236, 219, 0.5); font-size: 0.66rem; line-height: 1.45; text-align: center; }

.mobile-content-exit .mobile-preview-content { animation: mobile-preview-copy-exit 150ms ease-in both; }
.mobile-content-enter .mobile-preview-content { animation: mobile-preview-copy-enter 240ms cubic-bezier(.16, 1, .3, 1) both; }
.mobile-content-exit .mobile-preview-actions { animation: mobile-preview-actions-exit 130ms ease-in both; }
.mobile-content-enter .mobile-preview-actions { animation: mobile-preview-actions-enter 260ms cubic-bezier(.16, 1, .3, 1) both; }

@keyframes mobile-preview-copy-exit {
  from { opacity: 1; transform: translateX(0); filter: blur(0); }
  to { opacity: 0; transform: translateX(-14px); filter: blur(3px); }
}

@keyframes mobile-preview-copy-enter {
  from { opacity: 0; transform: translateX(14px); filter: blur(3px); }
  to { opacity: 1; transform: translateX(0); filter: blur(0); }
}

@keyframes mobile-preview-actions-exit {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to { opacity: 0; transform: translateY(7px) scale(.97); }
}

@keyframes mobile-preview-actions-enter {
  from { opacity: 0; transform: translateY(9px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.download-mobile-copy { display: none; }

html.download-device-mobile .v4-slide-download .download-desktop-copy,
html.download-device-mobile .v4-slide-download .download-area,
html.download-device-mobile .v4-slide-download .version-label { display: none !important; }
html.download-device-mobile .v4-slide-download .download-mobile-copy { display: block; }
html.download-device-mobile .v4-slide-download h2 .download-mobile-copy { display: inline; }
html.download-device-mobile .v4-slide-download .dl-mobile-notice {
  display: grid !important;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  width: min(92vw, 520px);
  margin: 0 auto;
  padding: 16px 18px;
  border: 1px solid rgba(191, 249, 130, 0.18);
  border-radius: 18px;
  background: rgba(12, 21, 13, 0.72);
  color: rgba(235, 244, 230, 0.72);
  text-align: left;
}
html.download-device-mobile .v4-slide-download .dl-mobile-notice svg { width: 36px; height: 36px; color: var(--v4-accent); }
html.download-device-mobile .v4-slide-download .dl-mobile-notice p { margin: 0; font-size: 0.76rem; line-height: 1.5; }

/* Community: the crowd owns the full stage; copy is fixed at the bottom. */
.v4-slide-community { padding-inline: 0; }
.v4-slide-community .community-crowd {
  position: absolute;
  inset: calc(var(--v4-nav) + 6px) 0 4vh;
  margin: 0;
  overflow: visible;
  border: 0;
  background: none;
}

.v4-slide-community .player-stage {
  position: absolute;
  inset: 0;
  min-height: 0;
  overflow: visible;
  perspective: 1000px;
}

.v4-slide-community .player-figure {
  --player-visible-y: -56%;
  position: absolute;
  z-index: var(--player-z);
  left: var(--player-x);
  top: var(--player-y);
  width: var(--player-width);
  aspect-ratio: 1 / 2;
  margin: 0;
  opacity: 0;
  transform: translate3d(-50%, -56%, 0) scale(0.86);
  transform-origin: 50% 100%;
  transition: opacity 260ms ease, transform 420ms cubic-bezier(.22, 1, .36, 1), filter 180ms ease;
  pointer-events: none;
  cursor: default;
  contain: layout paint;
}

.v4-slide-community .player-figure.is-scroll-visible {
  opacity: 1;
  transform: translate3d(-50%, var(--player-visible-y), 0) scale(1);
  pointer-events: auto;
}

.home-v4-page > .player-hover-nameplate {
  position: fixed;
  z-index: 99;
  max-width: min(260px, calc(100vw - 20px));
  padding: 4px 9px 5px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(4, 5, 4, 0.66);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08), 0 3px 12px rgba(0, 0, 0, 0.48);
  color: #fff;
  font-family: inherit;
  font-size: clamp(0.68rem, 0.9vw, 0.92rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0.015em;
  text-align: center;
  text-overflow: ellipsis;
  text-shadow: 2px 2px 0 rgba(0, 0, 0, 0.88);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate3d(-50%, calc(-100% - 5px), 0) scale(0.96);
  transform-origin: 50% 100%;
  transition: opacity 120ms ease, transform 150ms cubic-bezier(.22, 1, .36, 1);
}

.home-v4-page > .player-hover-nameplate.is-visible {
  opacity: 1;
  transform: translate3d(-50%, calc(-100% - 8px), 0) scale(1);
}

.home-v4-page > .player-hover-nameplate.is-below {
  transform: translate3d(-50%, 5px, 0) scale(0.96);
  transform-origin: 50% 0;
}

.home-v4-page > .player-hover-nameplate.is-below.is-visible {
  transform: translate3d(-50%, 8px, 0) scale(1);
}

.v4-slide-community .community-crowd .player-figure.is-scroll-visible:hover,
.v4-slide-community .community-crowd .player-figure.is-scroll-visible:focus-within {
  filter:
    brightness(1.12)
    drop-shadow(0 0 8px rgba(187, 246, 133, 0.58))
    drop-shadow(0 13px 11px rgba(0, 0, 0, 0.46));
  transform: translate3d(-50%, var(--player-visible-y), 0) scale(1);
}

.v4-slide-community .player-skin-view,
.v4-slide-community .player-skin-cutout {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  image-rendering: pixelated;
  pointer-events: none;
}

.v4-slide-community .player-skin-view {
  transform: perspective(760px) rotateX(0deg) rotateY(0deg);
  transform-origin: 50% 82%;
  transition: transform 220ms cubic-bezier(.22, 1, .36, 1);
}

.v4-slide-community .player-figure:hover .player-skin-view,
.v4-slide-community .player-figure:focus-within .player-skin-view {
  transform: perspective(760px) rotateX(-2deg) rotateY(3deg);
}

.v4-slide-community .player-figure:nth-child(even):hover .player-skin-view,
.v4-slide-community .player-figure:nth-child(even):focus-within .player-skin-view {
  transform: perspective(760px) rotateX(-2deg) rotateY(-3deg);
}

.v4-slide-community .player-figure:hover .player-skin-cutout,
.v4-slide-community .player-figure:focus-within .player-skin-cutout {
  transform: none;
}

.v4-slide-community .player-skin-cutout {
  opacity: 0;
  filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.32));
  transition: opacity 220ms ease;
}
.v4-slide-community .player-figure.is-texture-ready .player-skin-cutout { opacity: 0.78; }
.v4-slide-community .player-figure.is-ready .player-skin-cutout {
  opacity: 1;
}
.v4-slide-community .player-figure figcaption { display: none; }
.v4-slide-community .player-stage-empty {
  position: absolute;
  inset: 50% auto auto 50%;
  translate: -50% -50%;
}

.v4-slide-community .community-copy {
  position: absolute;
  z-index: 32;
  inset: auto 4vw 3.4vh;
  text-align: center;
  pointer-events: none;
}

.v4-slide-community .community-copy h2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  gap: 0 0.12em;
  margin: 0;
  font-size: clamp(3.2rem, 6.7vw, 7.5rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.065em;
  text-shadow: 0 5px 0 rgba(0, 0, 0, 0.24), 0 14px 34px rgba(0, 0, 0, 0.74);
}

.v4-slide-community .community-copy strong { color: var(--v4-accent); }
.v4-slide-community .community-copy > p:last-child {
  margin: 10px auto 0;
  max-width: 720px;
  color: rgba(242, 246, 238, 0.76);
  font-size: clamp(0.86rem, 1vw, 1.08rem);
  text-shadow: 0 3px 16px rgba(0, 0, 0, 0.92);
}

/* Unified server explorer: one story, one scalable rail, no duplicate page. */
.v4-slide-servers {
  --server-stage-gutter: clamp(34px, 5.4vw, 96px);
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: clamp(20px, 3vh, 34px);
  min-width: 0;
  overflow: hidden;
}

.v4-slide-servers .server-explorer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: end;
  min-width: 0;
}
.v4-slide-servers .server-explorer-copy { min-width: 0; }
.v4-slide-servers .server-explorer-copy h2,
.v4-slide .experience-copy h2 {
  margin: 0;
  font-size: clamp(3.2rem, 6.3vw, 6.8rem);
  font-weight: 900;
  line-height: 0.94;
  letter-spacing: -0.06em;
}
.v4-slide-servers .server-explorer-copy > p:last-child,
.v4-slide .experience-copy > p:last-child {
  max-width: 700px;
  margin: 14px 0 0;
  color: var(--v4-muted);
  font-size: clamp(0.9rem, 1.05vw, 1.08rem);
  line-height: 1.6;
}
.v4-slide-servers .server-explorer-rail {
  position: relative;
  --server-card-gap: clamp(16px, 1.7vw, 26px);
  width: calc(100% + (var(--server-stage-gutter) * 2));
  min-width: 0;
  min-height: 0;
  margin-inline: calc(var(--server-stage-gutter) * -1);
  overflow: hidden;
}
.v4-slide-servers .server-grid {
  display: grid;
  grid-auto-flow: column;
  grid-template-columns: none;
  grid-template-rows: minmax(0, 1fr);
  grid-auto-columns: calc(50% - clamp(8px, 0.85vw, 13px));
  gap: var(--server-card-gap);
  width: 100%;
  max-width: 100%;
  height: 100%;
  min-height: 0;
  margin: 0;
  padding: 12px var(--server-stage-gutter) 14px;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-inline: contain;
  scroll-behavior: smooth;
  scroll-padding-inline: var(--server-stage-gutter);
  scroll-snap-type: inline mandatory;
  scrollbar-width: none;
}
.v4-slide-servers .server-grid::-webkit-scrollbar { display: none; }
.v4-slide-servers .server-card {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(220, 239, 207, 0.14);
  border-radius: clamp(22px, 2vw, 30px);
  background: #101010;
  grid-column: auto !important;
  grid-row: auto !important;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.24);
  transition: border-color 180ms ease, box-shadow 180ms ease;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}
.v4-slide-servers .server-card:hover,
.v4-slide-servers .server-card:focus-within {
  border-color: color-mix(in srgb, var(--theme-color, #bff982) 82%, white 18%);
  box-shadow:
    0 22px 54px rgba(0, 0, 0, 0.24),
    0 0 0 1px color-mix(in srgb, var(--theme-color, #bff982) 54%, transparent),
    0 0 26px color-mix(in srgb, var(--theme-color, #bff982) 16%, transparent);
  transform: none;
}
.v4-slide-servers .server-card-cover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 1;
  mask-image: none;
  -webkit-mask-image: none;
}
.v4-slide-servers .server-card::after { content: none; }
.v4-slide-servers .server-card-body {
  --server-card-inset: clamp(22px, 2.4vw, 34px);
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: var(--server-card-inset);
  text-shadow: none;
}
.v4-slide-servers .server-card-identity { display: flex; align-items: center; gap: 14px; overflow: visible; }
.v4-slide-servers .server-card-icon {
  flex: 0 0 auto;
  width: clamp(54px, 5vw, 70px);
  height: clamp(54px, 5vw, 70px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 22%;
  background: rgba(5, 5, 5, 0.3);
}
.v4-slide-servers .server-card-icon img { width: 100%; height: 100%; object-fit: cover; }
.v4-slide-servers .server-card-title h3 {
  margin: 0;
  overflow: visible;
  color: #fff;
  font-size: clamp(1.45rem, 2vw, 2.2rem);
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.05em;
  text-overflow: clip;
  white-space: normal;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.4);
}
.v4-slide-servers .server-card-desc {
  display: block;
  margin: clamp(18px, 2.5vh, 28px) 0 12px;
  overflow: visible;
  color: #fff;
  font-size: clamp(0.9rem, 1vw, 1.02rem);
  font-weight: 700;
  line-height: 1.7;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9), 0 0 30px rgba(0, 0, 0, 0.4);
  -webkit-line-clamp: unset;
}
.v4-slide-servers .server-card-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin: 2px 0 0;
}
.v4-slide-servers .server-card-links a {
  display: inline-flex;
  flex: 0 0 20px;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  text-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  filter: none;
  transition: color 150ms ease;
}
.v4-slide-servers .server-card-links a:hover,
.v4-slide-servers .server-card-links a:focus-visible {
  color: #fff;
  border-color: transparent;
  background: transparent;
  filter: none;
  transform: none;
}
.v4-slide-servers .server-card-links a > span {
  display: grid;
  place-items: center;
  box-shadow: none;
  filter: none;
}
.v4-slide-servers .server-card-links svg {
  display: block;
  width: 20px;
  height: 20px;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.88));
}
.v4-slide-servers .server-card-footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: auto; padding: 18px 76px 0 0; }
.v4-slide-servers .server-player-faces {
  display: flex;
  flex: 1 1 0;
  align-items: center;
  min-width: 0;
  padding-left: 7px;
  overflow: hidden;
}
.v4-slide-servers .server-player-face {
  flex: 0 0 auto;
  width: 29px;
  height: 29px;
  margin-left: -7px;
  overflow: hidden;
  border: 2px solid rgba(8, 14, 9, 0.9);
  border-radius: 50%;
  box-shadow: none;
  filter: none;
}
.v4-slide-servers .server-player-face[hidden],
.v4-slide-servers .server-player-overflow[hidden] { display: none; }
.v4-slide-servers .server-player-face img { display: block; width: 100%; height: 100%; border-radius: 50%; box-shadow: none; object-fit: cover; image-rendering: pixelated; filter: none; }
.v4-slide-servers .server-player-overflow {
  flex: 0 0 auto;
  margin-left: 8px;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.96), 0 5px 13px rgba(0, 0, 0, 0.94);
}
.v4-slide-servers .runway-online {
  position: absolute;
  right: var(--server-card-inset);
  bottom: var(--server-card-inset);
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(5, 8, 5, 0.72);
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.24);
  color: #f1f8ed;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
  text-shadow: 0 2px 8px #000;
  transform: none;
  transition: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.v4-slide-servers .runway-online i { width: 7px; height: 7px; border-radius: 50%; background: var(--v4-accent); box-shadow: 0 0 11px rgba(191, 249, 130, 0.7); }
.v4-slide-servers .runway-online.offline i { background: #90998e; box-shadow: none; }
.v4-slide-servers .server-carousel-controls {
  position: absolute;
  z-index: 5;
  inset: 50% calc(var(--server-stage-gutter) + 12px) auto;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  transform: translateY(-50%);
}
.v4-slide-servers .server-carousel-button {
  position: relative;
  display: grid;
  width: 48px;
  height: 48px;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(5, 5, 5, 0.7);
  color: #fff;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
  cursor: pointer;
  pointer-events: auto;
  transition: opacity 160ms ease, color 160ms ease, border-color 160ms ease, background-color 160ms ease, transform 160ms ease;
}
.v4-slide-servers .server-carousel-button span { width: 12px; height: 12px; border-top: 2px solid currentColor; border-right: 2px solid currentColor; }
.v4-slide-servers .server-carousel-button.previous span { margin-left: 4px; transform: rotate(-135deg); }
.v4-slide-servers .server-carousel-button.next span { margin-right: 4px; transform: rotate(45deg); }
.v4-slide-servers .server-carousel-button:hover:not(:disabled),
.v4-slide-servers .server-carousel-button:focus-visible:not(:disabled) { border-color: rgba(191, 249, 130, 0.7); background: rgba(12, 18, 11, 0.86); color: var(--v4-accent); transform: scale(1.06); }
.v4-slide-servers .server-carousel-button:disabled { opacity: 0; cursor: default; pointer-events: none; }
.v4-slide-servers .server-status { position: absolute; inset: 50% auto auto 50%; margin: 0; translate: -50% -50%; color: var(--v4-muted); }

/* Feature layouts share an open composition instead of a containing panel. */
.v4-slide-mode,
.v4-slide-loaders,
.v4-slide-platforms {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(460px, 1.2fr);
  align-items: center;
  gap: clamp(50px, 7vw, 130px);
}

.v4-slide-loaders { grid-template-columns: minmax(370px, 0.9fr) minmax(500px, 1.1fr); }
.v4-slide-platforms { grid-template-columns: minmax(480px, 1.15fr) minmax(370px, 0.85fr); }
.v4-slide .experience-copy { position: relative; z-index: 4; }
.v4-slide-setup .setup-title-line,
.v4-slide-platforms .platform-title-line { display: block; white-space: nowrap; }

.v4-slide-loaders .experience-copy h2 {
  max-width: 520px;
  font-size: clamp(2.8rem, 4.45vw, 5.35rem);
}

.v4-slide-mode .tag-selector-stage {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 22px;
  min-height: min(68svh, 640px);
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.v4-slide-mode .tag-selector-stage::before,
.v4-slide-mode .tag-selector-stage::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 74%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(191, 249, 130, 0.38), transparent);
  transform: rotate(-12deg);
  box-shadow: 0 80px rgba(191, 249, 130, 0.1), 0 -80px rgba(191, 249, 130, 0.1);
}
.v4-slide-mode .tag-selector-stage::after { transform: rotate(18deg); opacity: 0.45; }
.v4-slide-mode .tag-selector-stage > figcaption { color: var(--v4-muted); font-size: 0.85rem; font-weight: 800; letter-spacing: 0.12em; }
.v4-slide-mode .mode-switcher {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  width: min(100%, 570px);
  padding: 6px;
  border: 1px solid rgba(220, 239, 207, 0.16);
  border-radius: 999px;
  background: rgba(4, 9, 5, 0.58);
  backdrop-filter: blur(16px);
}
.v4-slide-mode .mode-selection { position: absolute; top: 6px; bottom: 6px; left: 6px; border-radius: 999px; background: var(--v4-accent); box-shadow: 0 0 34px rgba(191, 249, 130, 0.2); transition: transform 460ms cubic-bezier(.22,1,.36,1), width 460ms cubic-bezier(.22,1,.36,1); }
.v4-slide-mode .mode-switcher button { position: relative; z-index: 2; min-height: 52px; border: 0; background: none; color: rgba(239, 246, 234, 0.58); font: inherit; font-weight: 800; cursor: pointer; }
.v4-slide-mode .mode-switcher button.active { color: #0b120c; }
.v4-slide-mode .feature-launch-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: min(100%, 430px);
  min-height: 88px;
  border: 0;
  border-radius: 26px;
  background: var(--v4-accent);
  color: #0a110b;
  font: inherit;
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  font-weight: 900;
  box-shadow: 0 18px 55px rgba(135, 204, 87, 0.17);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}
.v4-slide-mode .feature-launch-button:hover { transform: translateY(-3px); box-shadow: 0 23px 65px rgba(135, 204, 87, 0.24); }
.v4-slide-mode .feature-launch-button svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* Loader assembly: logos flow into one selected runtime, then fan into payloads. */
.v4-slide-loaders .loader-stage {
  --loader-accent: #d9c6a2;
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  align-content: center;
  gap: clamp(24px, 3vh, 36px);
  min-height: min(72svh, 690px);
  margin: 0;
  border: 0;
  background: none;
  box-shadow: none;
}
.v4-slide-loaders .loader-stage::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 8% 7%;
  background: radial-gradient(circle, color-mix(in srgb, var(--loader-accent) 18%, transparent), transparent 62%);
  filter: blur(28px);
  transition: background 400ms ease;
}
.v4-slide-loaders .loader-choice-row { display: flex; justify-content: center; gap: clamp(18px, 4vw, 58px); }
.v4-slide-loaders .loader-choice {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 9px;
  min-width: 112px;
  padding: 8px 8px 17px;
  border: 0;
  background: none;
  color: rgba(241, 247, 237, 0.48);
  font: inherit;
  cursor: pointer;
  transition: color 280ms ease, transform 420ms cubic-bezier(.22,1,.36,1), filter 280ms ease;
}
.v4-slide-loaders .loader-choice::after { content: ""; position: absolute; inset: auto 16% 0; height: 2px; border-radius: 2px; background: var(--loader-accent); opacity: 0; transform: scaleX(0); transition: opacity 260ms ease, transform 420ms cubic-bezier(.22,1,.36,1); }
.v4-slide-loaders .loader-choice.active { color: #fff; transform: translateY(-8px); filter: drop-shadow(0 9px 17px color-mix(in srgb, var(--loader-accent) 30%, transparent)); }
.v4-slide-loaders .loader-choice.active::after { opacity: 1; transform: scaleX(1); }
.v4-slide-loaders .loader-choice img { width: 76px; height: 44px; object-fit: contain; }
.v4-slide-loaders .loader-choice strong { font-size: 0.9rem; }
.v4-slide-loaders .loader-current {
  position: relative;
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 18px;
  min-width: min(420px, 82%);
  padding: 18px 28px;
}
.v4-slide-loaders .loader-current::before,
.v4-slide-loaders .loader-current::after { content: ""; position: absolute; top: 50%; width: min(11vw, 140px); height: 1px; background: linear-gradient(90deg, transparent, var(--loader-accent)); opacity: 0.5; }
.v4-slide-loaders .loader-current::before { right: 100%; }
.v4-slide-loaders .loader-current::after { left: 100%; transform: scaleX(-1); }
.v4-slide-loaders .loader-current > img { width: 74px; height: 58px; object-fit: contain; }
.v4-slide-loaders .loader-current span { display: grid; gap: 2px; }
.v4-slide-loaders .loader-current small { color: var(--v4-muted); font-size: 0.7rem; }
.v4-slide-loaders .loader-current strong { font-size: clamp(1.7rem, 2.6vw, 2.8rem); line-height: 1; }
.v4-slide-loaders .loader-current > i { width: 10px; height: 10px; margin-left: auto; border-radius: 50%; background: var(--loader-accent); box-shadow: 0 0 20px var(--loader-accent); }
.v4-slide-loaders .install-module-list { display: flex; justify-content: center; gap: clamp(10px, 1.5vw, 20px); margin: 0; padding: 0; list-style: none; }
.v4-slide-loaders .install-module-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  min-width: 150px;
  padding: 15px 17px;
  border-radius: 20px;
  background: rgba(8, 14, 9, 0.56);
  box-shadow: inset 0 0 0 1px rgba(220, 239, 207, 0.11);
  backdrop-filter: blur(12px);
}
.v4-slide-loaders .install-module-list li > span { grid-row: 1 / 3; align-self: center; color: var(--loader-accent); font-size: 1.35rem; }
.v4-slide-loaders .install-module-list strong { font-size: 0.82rem; }
.v4-slide-loaders .install-module-list small { color: rgba(230, 237, 225, 0.5); font-size: 0.64rem; }
.v4-slide-loaders .loader-stage > figcaption { justify-self: center; display: inline-flex; align-items: center; gap: 8px; color: var(--v4-muted); font-size: 0.78rem; }
.v4-slide-loaders .loader-stage > figcaption i { width: 7px; height: 7px; border-radius: 50%; background: var(--loader-accent); }
.v4-slide-loaders .loader-stage.is-switching .loader-current { animation: v4-loader-pulse 540ms cubic-bezier(.22,1,.36,1); }
@keyframes v4-loader-pulse { 40% { transform: scale(0.96); opacity: 0.55; } }

/* One setup story: real in-game scenes carry the visual weight while the
   launcher controls stay open and unobstructed in the foreground. */
.v4-slide-setup {
  display: block;
  overflow: hidden;
  padding: 0;
  background: #050505;
  isolation: isolate;
}

.v4-slide-setup .feature-scene-stage {
  position: absolute;
  inset: var(--v4-nav) 0 0;
  z-index: 1;
  margin: 0;
  overflow: hidden;
  background: #050505;
}

.v4-slide-setup .feature-scene-stack,
.v4-slide-setup .feature-scene,
.v4-slide-setup .feature-scene-scrim {
  position: absolute;
  inset: 0;
}

.v4-slide-setup .feature-scene {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0;
  transform: none;
  filter: saturate(1.03) brightness(0.9);
  transition: opacity 620ms ease;
  will-change: opacity;
}

.v4-slide-setup .feature-scene.active {
  z-index: 1;
  opacity: 1;
  transform: none;
}

.v4-slide-setup .feature-scene-scrim {
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(90deg, #050505 0%, rgba(5, 5, 5, 0.98) 15%, rgba(5, 5, 5, 0.86) 29%, rgba(5, 5, 5, 0.34) 51%, rgba(5, 5, 5, 0.06) 76%),
    linear-gradient(0deg, rgba(5, 5, 5, 0.88) 0%, transparent 34%),
    linear-gradient(180deg, rgba(5, 5, 5, 0.2), transparent 24%);
}

.v4-slide-setup .feature-setup-copy {
  position: relative;
  z-index: 5;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: min(640px, 48vw);
  height: 100%;
  padding: calc(var(--v4-nav) + 30px) 0 5vh max(38px, 6vw);
  text-shadow: 0 4px 25px rgba(0, 0, 0, 0.86);
}

.v4-slide-setup .feature-setup-copy h2 {
  max-width: 620px;
  margin: 0;
  font-size: clamp(3.25rem, 5.25vw, 6.6rem);
  font-weight: 900;
  line-height: 0.92;
  letter-spacing: -0.064em;
}

.v4-slide-setup .feature-ready-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: clamp(18px, 2.5vh, 28px) 0 0;
  padding: 0;
  color: rgba(239, 246, 234, 0.74);
  font-size: 0.82rem;
  font-weight: 800;
  list-style: none;
}

.v4-slide-setup .feature-ready-list li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.v4-slide-setup .feature-ready-list i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--v4-accent);
  box-shadow: 0 0 13px rgba(191, 249, 130, 0.62);
}

.v4-slide-setup .feature-scene-nav {
  position: absolute;
  z-index: 5;
  right: max(42px, 5vw);
  bottom: max(38px, 5vh);
  display: flex;
  align-items: flex-end;
  gap: 9px;
}

.v4-slide-setup .feature-scene-nav button {
  width: 74px;
  height: 43px;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(241, 247, 237, 0.28);
  border-radius: 7px;
  background: #050505;
  opacity: 0.45;
  filter: saturate(0.7);
  cursor: pointer;
  transition: width 440ms cubic-bezier(.22, 1, .36, 1), height 440ms cubic-bezier(.22, 1, .36, 1), opacity 240ms ease, transform 440ms cubic-bezier(.22, 1, .36, 1), filter 240ms ease, border-color 240ms ease;
}

.v4-slide-setup .feature-scene-nav button.active {
  width: 112px;
  height: 64px;
  border-color: rgba(191, 249, 130, 0.9);
  opacity: 1;
  filter: none;
  transform: translateY(-4px);
}

.v4-slide-setup .feature-scene-nav button:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.v4-slide-setup .feature-scene-nav img { width: 100%; height: 100%; object-fit: cover; }
.v4-slide-setup .feature-scene-counter {
  position: absolute;
  z-index: 5;
  right: max(42px, 5vw);
  bottom: calc(max(38px, 5vh) + 79px);
  display: flex;
  align-items: center;
  gap: 9px;
  color: rgba(242, 247, 239, 0.58);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
}
.v4-slide-setup .feature-scene-counter strong { color: #fff; font-size: 0.92rem; }
.v4-slide-setup .feature-scene-counter i { width: 38px; height: 1px; background: rgba(242, 247, 239, 0.28); }

/* White-outline desktop, laptop, and all-in-one devices. */
.v4-slide-platforms .device-stage {
  position: relative;
  min-height: min(72svh, 680px);
  margin: 0;
  border: 0;
  background: none;
}
.v4-slide-platforms .device-outline { position: absolute; inset: 7% 6% 18%; display: grid; place-items: center; opacity: 0; transform: none; pointer-events: none; transition: opacity 420ms ease; will-change: opacity; }
.v4-slide-platforms .device-outline.active { opacity: 1; transform: none; }
.v4-slide-platforms .device-outline.leaving { opacity: 0; transform: none; }
.v4-slide-platforms .device-platform-name { position: absolute; top: 0; left: 50%; translate: -50% 0; color: rgba(242, 248, 238, 0.72); font-size: 0.78rem; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase; }
.v4-slide-platforms .device-machine { position: relative; display: flex; align-items: flex-end; justify-content: center; width: min(100%, 590px); height: 76%; }
.v4-slide-platforms .device-monitor { position: relative; display: flex; flex-direction: column; align-items: center; width: 78%; }
.v4-slide-platforms .device-display { position: relative; width: 100%; aspect-ratio: 16 / 10; overflow: hidden; border: 2px solid rgba(245, 249, 242, 0.75); border-radius: 20px; background: rgba(8, 14, 9, 0.42); box-shadow: 0 0 48px rgba(217, 241, 197, 0.07); }
.v4-slide-platforms .device-launcher-preview {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68%;
  height: auto;
  aspect-ratio: 1102 / 682;
  translate: -50% -50%;
  border: 1px solid rgba(244, 250, 240, 0.38);
  border-radius: 8px;
  object-fit: cover;
  object-position: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.38);
}
.v4-slide-platforms .device-stand { position: relative; display: block; width: 31%; height: 58px; margin-top: -1px; border-inline: 2px solid rgba(245, 249, 242, 0.75); clip-path: polygon(34% 0, 66% 0, 74% 78%, 100% 88%, 100% 100%, 0 100%, 0 88%, 26% 78%); background: rgba(245, 249, 242, 0.75); }
.v4-slide-platforms .device-stand::after { content: ""; position: absolute; inset: 2px; clip-path: inherit; background: #080808; }
.v4-slide-platforms .desktop-tower {
  position: relative;
  width: 28%;
  height: auto;
  aspect-ratio: 0.466 / 1;
  margin-left: 5%;
  border: 2px solid rgba(245, 249, 242, 0.76);
  border-radius: 12px 12px 9px 9px;
  background: rgba(5, 7, 6, 0.32);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.018), 0 18px 32px rgba(0, 0, 0, 0.22);
}
.v4-slide-platforms .desktop-tower::before {
  content: "";
  position: absolute;
  inset: 7% 24% 7% 7%;
  border: 1px solid rgba(245, 249, 242, 0.24);
  border-radius: 6px;
}
.v4-slide-platforms .desktop-tower::after {
  content: "";
  position: absolute;
  top: 0;
  right: 18%;
  bottom: 0;
  width: 1px;
  background: rgba(245, 249, 242, 0.2);
}
.v4-slide-platforms .tower-feet {
  position: absolute;
  right: 10%;
  bottom: -7px;
  left: 10%;
  height: 6px;
  border-right: 10px solid rgba(245, 249, 242, 0.64);
  border-left: 10px solid rgba(245, 249, 242, 0.64);
}
.v4-slide-platforms .laptop-set { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; width: min(92%, 620px); }
.v4-slide-platforms .laptop-set .device-display { width: 76%; border-radius: 18px 18px 8px 8px; }
.v4-slide-platforms .laptop-deck { position: relative; display: block; width: 92%; height: 28px; margin-top: -1px; border: 2px solid rgba(245,249,242,.75); border-radius: 3px 3px 22px 22px; transform: perspective(180px) rotateX(50deg); transform-origin: top; }
.v4-slide-platforms .laptop-deck i { position: absolute; left: 50%; width: 15%; height: 5px; translate: -50% 0; border: 1px solid rgba(245,249,242,.45); border-radius: 0 0 5px 5px; }
.v4-slide-platforms .imac-set .device-monitor { width: 82%; }
.v4-slide-platforms .imac-set .device-display { aspect-ratio: 16 / 11.5; overflow: hidden; }
.v4-slide-platforms .imac-set .device-launcher-preview { top: 43%; }
.v4-slide-platforms .imac-chin { position: absolute; inset: auto 0 0; height: 14%; border-top: 1px solid rgba(245,249,242,.5); background: rgba(245,249,242,.06); }
@media (min-width: 821px) {
  .v4-slide-platforms .device-imac .imac-set .device-monitor { width: 74%; }
}
.v4-slide-platforms .device-cycle-tabs {
  position: absolute;
  right: auto;
  left: 50%;
  bottom: 4%;
  display: flex;
  width: min(280px, 76vw);
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  backdrop-filter: none;
  translate: -50% 0;
}
.v4-slide-platforms .device-cycle-tabs::before {
  content: "";
  position: absolute;
  right: 10%;
  bottom: 1px;
  left: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(237, 244, 233, 0.18) 18% 82%, transparent);
}
.v4-slide-platforms .device-cycle-tabs button {
  position: relative;
  display: inline-flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-width: 0;
  padding: 8px 7px 13px;
  border: 0;
  border-radius: 0;
  background: none;
  color: rgba(237,244,233,.42);
  font: inherit;
  font-size: .72rem;
  cursor: pointer;
  outline: 0;
  transition: none;
}
.v4-slide-platforms .device-cycle-tabs button::after {
  content: "";
  position: absolute;
  right: 24%;
  bottom: 0;
  left: 24%;
  z-index: 1;
  height: 3px;
  border-radius: 999px;
  background: var(--v4-accent);
  box-shadow: 0 0 12px rgba(191, 249, 130, 0.42);
  opacity: 0;
  transform: scaleX(0.35);
  transition: none;
}
.v4-slide-platforms .device-cycle-tabs button span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  transition: none;
}
.v4-slide-platforms .device-cycle-tabs button:focus-visible {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 0 12px rgba(255, 255, 255, 0.28);
}
.v4-slide-platforms .device-cycle-tabs button:focus-visible span {
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.62);
}
.v4-slide-platforms .device-cycle-tabs button.active {
  border: 0;
  background: none;
  color: var(--v4-accent);
  text-shadow: 0 0 14px rgba(191, 249, 130, 0.2);
}
.v4-slide-platforms .device-cycle-tabs button.active::after { opacity: 1; transform: scaleX(1); }
.v4-slide-platforms .device-cycle-tabs button.active span { box-shadow: 0 0 10px rgba(191, 249, 130, 0.72); transform: scale(1.2); }

/* Last slide rises from below; platform copy exits upward with the prior slide. */
.v4-slide-platforms.is-past { transform: translate3d(0, -12vh, 0); }
.v4-slide-download { display: grid; place-items: center; transform: translate3d(0, 13vh, 0); text-align: center; }
.v4-slide-download.is-active { transform: translate3d(0, 0, 0); }
.v4-slide-download.is-past { transform: translate3d(0, -12vh, 0); }
.v4-slide-download .download-finale-inner { position: relative; z-index: 3; display: grid; justify-items: center; width: min(980px, 92vw); }
.v4-slide-download .download-logo { width: clamp(58px, 6vw, 86px); height: auto; margin-bottom: 16px; filter: drop-shadow(0 0 30px rgba(173,219,113,.25)); }
.v4-slide-download h2 { margin: 0; color: var(--v4-accent); font-size: clamp(4rem, 6.5vw, 7.2rem); font-weight: 900; line-height: .92; letter-spacing: -.07em; white-space: nowrap; }
.v4-slide-download .download-lead { max-width: 660px; margin: 18px auto 28px; color: var(--v4-muted); font-size: clamp(.92rem, 1.15vw, 1.15rem); line-height: 1.65; }
.v4-slide-download .download-area { width: min(600px, 92vw); }
.v4-slide-download .dl-primary { width: 100%; min-height: 84px; border: 0; border-radius: 24px; background: var(--v4-accent); color: #080808; box-shadow: 0 20px 70px rgba(126,194,82,.17); }
.v4-slide-download .dl-primary .dl-arrow {
  color: #080b05;
  opacity: 1;
  stroke-width: 2.35;
}
.v4-slide-download .dl-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 20px;
  padding-block: 0;
  line-height: 1;
  box-sizing: border-box;
  color: #0a0f06;
  border-color: rgba(8, 13, 5, 0.32);
  background: rgba(8, 13, 5, 0.1);
  font-weight: 750;
  opacity: 1;
}
.v4-slide-download .version-label { margin-top: 18px; }
.v4-slide-download .download-warning { margin: 18px 0 0; color: rgba(233,239,229,.5); font-size: .76rem; }

/* The complete package matrix lives in the top layer instead of expanding
   inside the final story slide. It therefore never collides with the footer. */
.download-versions-dialog {
  inset: 0;
  width: min(760px, calc(100vw - 32px));
  max-width: none;
  max-height: min(76svh, 720px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  color: var(--v4-ink);
  border: 1px solid rgba(219, 238, 207, 0.16);
  border-radius: 26px;
  background: rgba(10, 10, 10, 0.97);
  box-shadow: 0 36px 110px rgba(0, 0, 0, 0.72);
}

.download-versions-dialog[open] {
  animation: download-versions-in 180ms ease-out both;
}

.download-versions-dialog[open].is-closing {
  pointer-events: none;
  animation: download-versions-out 160ms ease-in both;
}

.download-versions-dialog::backdrop {
  background: rgba(0, 0, 0, 0.74);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.download-versions-dialog[open]::backdrop {
  animation: download-versions-backdrop-in 180ms ease-out both;
}

.download-versions-dialog[open].is-closing::backdrop {
  animation: download-versions-backdrop-out 160ms ease-in both;
}

.download-versions-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  max-height: inherit;
}

.download-versions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 0;
}

.download-versions-header h2 {
  margin: 0;
  color: var(--v4-ink);
  font-size: clamp(1.2rem, 2.2vw, 1.55rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.download-versions-close {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: rgba(238, 244, 233, 0.72);
  border: 1px solid rgba(219, 238, 207, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.035);
  cursor: pointer;
}

.download-versions-close:hover,
.download-versions-close:focus-visible {
  color: var(--v4-accent);
  border-color: rgba(191, 249, 130, 0.46);
  outline: none;
}

.download-versions-close svg { width: 18px; height: 18px; }

.download-versions-dialog .dl-others-list {
  position: static;
  inset: auto;
  z-index: auto;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 22px 28px;
  min-height: 0;
  max-height: none;
  padding: 8px 26px 28px;
  overflow-y: auto;
  overscroll-behavior: contain;
  text-align: left;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  scrollbar-gutter: stable both-edges;
}

.download-versions-dialog .dl-platform-group {
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.download-versions-dialog .dl-platform-group-linux {
  grid-column: 1 / -1;
  padding-top: 20px;
  border-top: 1px solid rgba(219, 238, 207, 0.1);
}

.download-versions-dialog .dl-platform-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.download-versions-dialog .dl-platform-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 26px;
  height: 26px;
  color: rgba(238, 244, 233, 0.88);
  border-radius: 0;
  background: transparent;
}

.download-versions-dialog .dl-platform-icon svg {
  width: 18px;
  height: 18px;
}

.download-versions-dialog .dl-platform-head h3 {
  margin: 0;
  color: var(--v4-ink);
  font-size: 1rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.download-versions-dialog .dl-platform-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}

.download-versions-dialog .dl-variant {
  min-width: 0;
  min-height: 68px;
  gap: 8px;
  padding: 12px 14px;
  color: #080b05;
  border: 0;
  border-radius: 16px;
  background: var(--v4-accent);
  box-shadow: 0 12px 30px rgba(126, 194, 82, 0.1);
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.download-versions-dialog .dl-variant .dl-info {
  min-width: 0;
}

.download-versions-dialog .dl-variant .dl-platform {
  overflow: hidden;
  padding-bottom: 1px;
  color: #080b05;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.download-versions-dialog .dl-variant .dl-meta {
  color: rgba(8, 11, 5, 0.58);
  font-size: 0.71rem;
  white-space: nowrap;
}

.download-versions-dialog .dl-variant .dl-arrow {
  color: #080b05;
  opacity: 0.9;
}

.download-versions-dialog .dl-variant.is-recommended {
  box-shadow:
    inset 0 0 0 1px rgba(8, 11, 5, 0.24),
    0 12px 30px rgba(126, 194, 82, 0.14);
}

.download-versions-dialog .dl-variant:hover,
.download-versions-dialog .dl-variant:focus-visible {
  background: #cdfb99;
  box-shadow:
    inset 0 0 0 1px rgba(8, 11, 5, 0.3),
    0 0 0 3px rgba(191, 249, 130, 0.12),
    0 14px 34px rgba(126, 194, 82, 0.18);
  outline: none;
}

@keyframes download-versions-in {
  from { opacity: 0; transform: scale(0.975); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes download-versions-out {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0; transform: scale(0.982); }
}

@keyframes download-versions-backdrop-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes download-versions-backdrop-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes download-versions-sheet-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes download-versions-sheet-out {
  from { opacity: 1; transform: translateY(0); }
  to { opacity: 0; transform: translateY(18px); }
}

.v4-slide-download .download-horizon { position: absolute; inset: auto 0 0; height: 26vh; perspective: 500px; opacity: .26; overflow: hidden; }
.v4-slide-download .download-horizon::before { content: ""; position: absolute; inset: 0 -20%; background-image: linear-gradient(rgba(173,219,113,.13) 1px, transparent 1px), linear-gradient(90deg, rgba(173,219,113,.13) 1px, transparent 1px); background-size: 70px 44px; transform: rotateX(62deg) scale(1.2); transform-origin: bottom; }
.v4-slide-download .download-horizon span { position: absolute; bottom: -40px; width: var(--bubble-size, 38px); height: var(--bubble-size, 38px); border: 1px solid rgba(191,249,130,.22); background: rgba(191,249,130,.035); animation: v4-bubble 9s linear infinite; }
.v4-slide-download .download-horizon span:nth-child(1) { left: 8%; --bubble-size: 18px; animation-delay: -2s; }
.v4-slide-download .download-horizon span:nth-child(2) { left: 18%; --bubble-size: 34px; animation-delay: -6s; }
.v4-slide-download .download-horizon span:nth-child(3) { left: 29%; --bubble-size: 12px; animation-delay: -4s; }
.v4-slide-download .download-horizon span:nth-child(4) { left: 41%; --bubble-size: 46px; animation-delay: -8s; }
.v4-slide-download .download-horizon span:nth-child(5) { left: 53%; --bubble-size: 22px; animation-delay: -1s; }
.v4-slide-download .download-horizon span:nth-child(6) { left: 65%; --bubble-size: 14px; animation-delay: -5s; }
.v4-slide-download .download-horizon span:nth-child(7) { left: 75%; --bubble-size: 40px; animation-delay: -7s; }
.v4-slide-download .download-horizon span:nth-child(8) { left: 85%; --bubble-size: 20px; animation-delay: -3s; }
.v4-slide-download .download-horizon span:nth-child(9) { left: 92%; --bubble-size: 10px; animation-delay: -6.5s; }
@keyframes v4-bubble { to { transform: translate3d(18px, -27vh, 0) rotate(35deg); opacity: 0; } }

@media (max-width: 1100px) {
  .home-v4-page { --v4-nav: 64px; }
  .v4-slide { padding-inline: 34px; }
  .v4-slide-servers { --server-stage-gutter: 34px; }
  .v4-progress { right: 10px; }
  .v4-slide-mode,
  .v4-slide-loaders,
  .v4-slide-platforms { grid-template-columns: 1fr 1.1fr; gap: 36px; }
  .v4-slide-loaders { grid-template-columns: .9fr 1.1fr; }
  .v4-slide-community .community-copy h2 { font-size: clamp(3rem, 8vw, 6rem); }
  .v4-slide-servers .server-grid { grid-auto-columns: calc(50% - clamp(8px, 0.85vw, 13px)); }
}

@media (max-width: 820px) {
  .download-versions-dialog {
    inset: auto 0 0;
    width: 100%;
    max-height: min(82svh, 700px);
    margin: 0;
    border-width: 1px 0 0;
    border-radius: 24px 24px 0 0;
  }

  .download-versions-dialog[open] {
    animation-name: download-versions-sheet-in;
  }

  .download-versions-dialog[open].is-closing {
    animation-name: download-versions-sheet-out;
  }

  .download-versions-header { padding: 18px 18px 14px; }
  .download-versions-dialog .dl-others-list {
    grid-template-columns: 1fr;
    gap: 0;
    padding: 4px 18px max(22px, env(safe-area-inset-bottom));
  }
  .download-versions-dialog .dl-platform-group-linux { grid-column: auto; }
  .download-versions-dialog .dl-platform-group { padding: 12px 0 16px; }
  .download-versions-dialog .dl-platform-group + .dl-platform-group {
    padding-top: 16px;
    border-top: 1px solid rgba(219, 238, 207, 0.1);
  }
  .download-versions-dialog .dl-platform-options { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .download-versions-dialog .dl-platform-group-macos .dl-platform-options { grid-template-columns: 1fr; }
  .download-versions-dialog .dl-variant { min-height: 62px; padding: 10px 12px; }

  .v4-slide { min-height: 560px; }
  .v4-slide { padding: calc(var(--v4-nav) + 18px) 20px 34px; }
  .v4-slide-servers { --server-stage-gutter: 20px; }
  .v4-progress { top: auto; right: 50%; bottom: 12px; display: flex; gap: 4px; translate: 50% 0; }
  .v4-progress button { width: 17px; height: 20px; }
  .v4-progress button::before,
  .v4-progress button span {
    right: auto;
    left: 50%;
    translate: -50% -50%;
  }
  .v4-progress button.active::before { width: 17px; }
  .v4-slide-launcher { gap: 12px; }
  .v4-hero-copy { width: 96vw; }
  .v4-hero-copy h1 { font-size: clamp(2.65rem, 10.5vw, 5rem); }
  .v4-hero-copy > p:last-child { max-width: 92vw; margin-top: 8px; font-size: .86rem; }
  .home-v4 .launcher-showcase { width: min(96vw, 100%, calc((100svh - 245px) * 1.616)); }

  .v4-slide-community .community-crowd {
    inset: calc(var(--v4-nav) + 8px) auto 8vh 50%;
    width: 116vw;
    transform: translateX(-50%);
  }
  .v4-slide-community .community-copy { inset-inline: 16px; bottom: 5vh; }
  .v4-slide-community .community-copy h2 { font-size: clamp(2.45rem, 9.8vw, 4.4rem); }
  .v4-slide-community .community-copy > p:last-child { font-size: .78rem; }

  .v4-slide-servers .server-explorer-head { grid-template-columns: 1fr; align-items: start; gap: 12px; }
  .v4-slide-servers .server-explorer-copy h2,
  .v4-slide .experience-copy h2 { font-size: clamp(2.6rem, 10vw, 4.6rem); }
  .v4-slide-servers .server-explorer-copy > p:last-child,
  .v4-slide .experience-copy > p:last-child { margin-top: 12px; font-size: .86rem; }
  .v4-slide-servers { gap: 16px; }
  .home-page .v4-slide-servers .server-grid {
    grid-template-columns: none;
    grid-auto-columns: 100%;
  }
  .v4-slide-servers .server-card-title h3 {
    font-size: clamp(1.7rem, 4.2vw, 2rem);
  }
  .v4-slide-servers .server-card-desc {
    font-size: clamp(1rem, 2.15vw, 1.08rem);
    line-height: 1.72;
  }
  .v4-slide-servers .server-card-links {
    gap: 13px;
  }
  .v4-slide-servers .server-card-links a {
    flex-basis: 25px;
    width: 25px;
    height: 25px;
    color: rgba(255, 255, 255, 0.78);
  }
  .v4-slide-servers .server-card-links svg {
    width: 25px;
    height: 25px;
  }

  .v4-slide-mode,
  .v4-slide-loaders,
  .v4-slide-platforms { grid-template-columns: 1fr; grid-template-rows: auto minmax(0, 1fr); align-items: start; gap: 12px; }
  .v4-slide .experience-copy { max-width: 94vw; }
  .v4-slide-mode .tag-selector-stage,
  .v4-slide-loaders .loader-stage,
  .v4-slide-platforms .device-stage { min-height: 0; height: 58svh; }
  .v4-slide-platforms .device-stage { order: 2; }
  .v4-slide-platforms .experience-copy { order: 1; }
  .v4-slide-platforms .device-outline {
    inset: 4% 0 18%;
    grid-template-rows: 24px minmax(0, 1fr);
    row-gap: 12px;
    place-items: stretch center;
  }
  .v4-slide-platforms .device-platform-name {
    position: static;
    z-index: 2;
    grid-row: 1;
    align-self: start;
    justify-self: center;
    translate: none;
  }
  .v4-slide-platforms .device-machine {
    grid-row: 2;
    align-self: stretch;
    height: 100%;
  }
  .v4-slide-platforms .device-imac .imac-set .device-monitor {
    width: min(63%, 375px);
  }
  .v4-slide-platforms .device-imac .device-stand {
    width: 28%;
    height: 40px;
  }
  .v4-slide-loaders .loader-choice-row { gap: 12px; }
  .v4-slide-loaders .loader-choice { min-width: 86px; }
  .v4-slide-loaders .loader-choice img { width: 58px; height: 34px; }
  .v4-slide-loaders .loader-current { min-width: min(340px, 78vw); }
  .v4-slide-loaders .install-module-list li { min-width: 0; padding: 12px; }
  .v4-slide-download h2 { font-size: clamp(3.8rem, 14vw, 6.4rem); }
}

@media (max-width: 767px) {
  .home-v4-page a[href],
  .home-v4-page button:not(:disabled),
  .home-v4-page [role="button"]:not([aria-disabled="true"]),
  .home-v4-page [role="tab"]:not([aria-disabled="true"]) {
    cursor: pointer;
  }
  .home-v4-page button:disabled,
  .home-v4-page [aria-disabled="true"] {
    cursor: not-allowed;
  }
  .v4-slide-launcher {
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    gap: clamp(10px, 1.8svh, 16px);
    padding-inline: 16px;
  }
  .v4-slide-launcher .v4-hero-copy { width: min(100%, 610px); }
  .home-v4 .launcher-showcase { display: none !important; }
  .mobile-launcher-preview {
    display: grid;
    align-self: start;
    width: min(100%, 520px);
    min-width: 0;
    gap: 9px;
    margin: 0;
  }
  .mobile-preview-stage {
    width: 100%;
    height: clamp(310px, 49svh, 430px);
    border: 1px solid rgba(216, 239, 201, 0.22);
    border-radius: clamp(21px, 6vw, 30px);
    background: #080808;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 40px rgba(139, 197, 106, 0.08);
  }
  .mobile-preview-status-bar { gap: 9px; }
  .mobile-preview-socials { gap: 8px; padding-left: 9px; }
  .mobile-preview-socials a { width: 18px; height: 18px; }

  .v4-slide-download .download-desktop-copy,
  .v4-slide-download .download-area,
  .v4-slide-download .version-label { display: none !important; }
  .v4-slide-download .download-mobile-copy { display: block; }
  .v4-slide-download h2 .download-mobile-copy { display: inline; }
  .v4-slide-download .download-finale-inner { width: min(92vw, 560px); }
  .v4-slide-download .download-logo { width: 58px; height: 58px; }
  .v4-slide-download h2 { max-width: 92vw; font-size: clamp(2.9rem, 13.5vw, 5rem); line-height: 0.95; white-space: normal; }
  .v4-slide-download .download-lead { max-width: 560px; margin-block: 14px 22px; }
  .v4-slide-download .dl-mobile-notice {
    display: grid !important;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 13px;
    width: min(100%, 520px);
    margin: 0 auto;
    padding: 16px 18px;
    border: 1px solid rgba(191, 249, 130, 0.18);
    border-radius: 18px;
    background: rgba(12, 21, 13, 0.72);
    color: rgba(235, 244, 230, 0.72);
    text-align: left;
  }
  .v4-slide-download .dl-mobile-notice svg { width: 36px; height: 36px; color: var(--v4-accent); }
  .v4-slide-download .dl-mobile-notice p { margin: 0; font-size: 0.76rem; line-height: 1.5; }
}

@media (max-width: 560px) {
  .home-v4-page { --v4-nav: 60px; }
  .v4-deck-viewport { min-height: 520px; }
  .v4-slide-layer { min-height: 0; }
  .v4-slide { min-height: 520px; }
  .v4-slide { padding: calc(var(--v4-nav) + 10px) 14px 40px; }
  .v4-slide-servers { --server-stage-gutter: 14px; }
  .v4-hero-copy h1 { font-size: clamp(2.35rem, 12vw, 3.6rem); }
  .v4-hero-copy > p:last-child { display: none; }
  .mobile-preview-stage { height: clamp(300px, 47svh, 390px); }
  .v4-slide-community .community-crowd {
    inset: calc(var(--v4-nav) + 4px) auto 9vh calc(50% + 3vw);
    width: 144vw;
    transform: translateX(-50%);
  }
  .v4-slide-community .community-copy { bottom: 6vh; }
  .v4-slide-community .community-copy h2 { font-size: clamp(2.1rem, 11vw, 3.2rem); line-height: .98; }
  .v4-slide-community .community-copy > p:last-child { display: none; }
  .v4-slide-community .player-figure { --player-visible-y: -52%; transform: translate3d(-50%,-52%,0) scale(.82); }
  .v4-slide-community .player-figure.is-scroll-visible { transform: translate3d(-50%,var(--player-visible-y),0) scale(1); }

  .v4-slide-servers .server-explorer-copy h2,
  .v4-slide .experience-copy h2 { font-size: clamp(2.25rem, 11.5vw, 3.6rem); }
  .v4-slide-servers .server-explorer-copy > p:last-child,
  .v4-slide .experience-copy > p:last-child { display: -webkit-box; overflow: hidden; font-size: .78rem; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
  .home-page .v4-slide-servers .server-grid {
    grid-template-columns: none;
    grid-auto-columns: 100%;
  }
  .v4-slide-servers .server-card-body { --server-card-inset: 20px; padding: var(--server-card-inset); }
  .v4-slide-servers .server-card-desc { margin-top: 15px; -webkit-line-clamp: unset; }

  .v4-slide-mode .tag-selector-stage,
  .v4-slide-loaders .loader-stage,
  .v4-slide-platforms .device-stage { height: 61svh; }
  .v4-slide-mode .mode-switcher { grid-template-columns: repeat(3, minmax(72px, 1fr)); }
  .v4-slide-mode .mode-switcher button { min-height: 45px; font-size: .76rem; }
  .v4-slide-mode .feature-launch-button { min-height: 68px; border-radius: 20px; }
  .v4-slide-loaders .loader-stage { gap: 15px; }
  .v4-slide-loaders .experience-copy h2 {
    font-size: clamp(1.95rem, 9vw, 2.5rem);
    line-height: 0.98;
  }
  .v4-slide-loaders .loader-choice { min-width: 68px; padding-inline: 2px; }
  .v4-slide-loaders .loader-choice img { width: 48px; height: 28px; }
  .v4-slide-loaders .loader-current { min-width: 82vw; padding: 12px 16px; }
  .v4-slide-loaders .loader-current > img { width: 54px; height: 42px; }
  .v4-slide-loaders .install-module-list { gap: 6px; }
  .v4-slide-loaders .install-module-list li { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 10px 7px; text-align: center; }
  .v4-slide-loaders .install-module-list li > span { font-size: 1rem; }
  .v4-slide-loaders .install-module-list strong { font-size: .68rem; }
  .v4-slide-loaders .install-module-list small { font-size: .53rem; }
  .v4-slide-platforms .device-outline { inset-inline: 0; }
  .v4-slide-platforms .device-imac .imac-set .device-monitor { width: min(62%, 380px); }
  .v4-slide-platforms .device-imac .device-stand { width: 28%; height: 40px; }
  .v4-slide-platforms .device-cycle-tabs button { padding-inline: 9px; font-size: .62rem; }
  .v4-slide-download .download-logo { margin-bottom: 10px; }
  .v4-slide-download h2 { font-size: clamp(2.75rem, 14vw, 4rem); }
  .v4-slide-download .download-lead { margin-block: 12px 20px; font-size: .82rem; }
  .v4-slide-download .dl-primary { min-height: 76px; border-radius: 21px; }
  .v4-slide-download .download-warning { max-width: 88vw; font-size: .66rem; }
}

@media (max-width: 767px) and (max-height: 650px) {
  .v4-slide-launcher { gap: 8px; padding-top: calc(var(--v4-nav) + 7px); padding-bottom: 26px; }
  .v4-slide-launcher .v4-hero-copy h1 { font-size: clamp(2rem, 10.5vw, 2.9rem); }
  .mobile-preview-stage { height: clamp(270px, 44svh, 300px); }
  .mobile-preview-content { top: 20px; left: 20px; right: 16px; }
  .mobile-preview-content h2 { font-size: 1.55rem; }
  .mobile-preview-content > p { margin-top: 8px; font-size: 0.8rem; -webkit-line-clamp: 2; }
  .mobile-preview-status-bar { gap: 9px; margin-top: 8px; }
  .mobile-preview-socials { gap: 8px; margin: 0; padding-left: 9px; }
  .mobile-preview-socials a { width: 17px; height: 17px; }
  .mobile-preview-actions { right: 12px; bottom: 12px; }
  .mobile-preview-launch { min-width: 112px; min-height: 44px; border-radius: 14px; font-size: 0.8rem; }
  .mobile-demo-walker { right: 4px; bottom: -125px; width: 225px; }
  .mobile-preview-mode-tabs button { min-width: 52px; min-height: 27px; padding-inline: 8px; }
  .mobile-preview-groups { padding-bottom: 2px; }
  .mobile-preview-group { flex-basis: 52px; gap: 3px; }
  .mobile-preview-group img,
  .mobile-preview-group-fallback { width: 42px; height: 42px; border-radius: 12px; }
  .mobile-preview-hint { display: none; }
}

@media (max-height: 700px) and (min-width: 821px) {
  .v4-slide { padding-top: calc(var(--v4-nav) + 12px); padding-bottom: 22px; }
  .v4-hero-copy h1 { font-size: clamp(2.8rem, 5vw, 5rem); }
  .v4-hero-copy > p:last-child { margin-top: 6px; }
  .home-v4 .launcher-showcase { width: min(850px, calc((100svh - 200px) * 1.616)); }
  .v4-slide-community .community-copy { bottom: 2.8vh; }
  .v4-slide-mode .tag-selector-stage,
  .v4-slide-loaders .loader-stage,
  .v4-slide-platforms .device-stage { min-height: 0; height: 72svh; }
}

@media (prefers-reduced-motion: reduce) {
  .download-versions-dialog[open],
  .download-versions-dialog[open]::backdrop,
  .v4-atmosphere span,
  .v4-slide-download .download-horizon span { animation: none !important; }
  .v4-slide,
  .v4-hero-copy,
  .v4-slide-community .player-figure,
  .mobile-preview-backdrop,
  .mobile-preview-mode-tabs::before,
  .mobile-preview-content,
  .mobile-preview-actions {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}

/* Merged setup slide responsive composition. Kept after the shared breakpoints
   so the screenshot stage cannot inherit the former two-panel grid. */
@media (max-width: 1100px) {
  .v4-slide-setup .feature-setup-copy {
    width: min(590px, 54vw);
    padding-left: 42px;
  }
  .v4-slide-setup .feature-setup-copy h2 { font-size: clamp(3rem, 5.8vw, 5.4rem); }
  .v4-slide-setup .feature-scene-scrim {
    background:
      linear-gradient(90deg, #050505 0%, rgba(5, 5, 5, 0.96) 23%, rgba(5, 5, 5, 0.55) 54%, rgba(5, 5, 5, 0.1) 84%),
      linear-gradient(0deg, rgba(5, 5, 5, 0.9) 0%, transparent 36%);
  }
  .v4-slide-setup .feature-scene-nav,
  .v4-slide-setup .feature-scene-counter { right: 34px; }
}

@media (max-width: 820px) {
  .v4-slide-setup { padding: 0; }
  .v4-slide-setup .feature-scene-stage { inset: var(--v4-nav) 0 0; }
  .v4-slide-setup .feature-scene {
    height: 58%;
    object-position: center 42%;
    transform: none;
  }
  .v4-slide-setup .feature-scene.active { transform: none; }
  .v4-slide-setup .feature-scene-scrim {
    background:
      linear-gradient(0deg, #050505 0%, #050505 39%, rgba(5, 5, 5, 0.93) 49%, rgba(5, 5, 5, 0.18) 73%, rgba(5, 5, 5, 0.08) 100%),
      linear-gradient(90deg, rgba(5, 5, 5, 0.2), transparent 60%);
  }
  .v4-slide-setup .feature-setup-copy {
    position: absolute;
    inset: auto 24px clamp(58px, 8svh, 76px);
    width: auto;
    max-width: none;
    height: auto;
    padding: 0;
  }
  .v4-slide-setup .feature-setup-copy h2 {
    max-width: 680px;
    font-size: clamp(2.7rem, 9.6vw, 4.8rem);
  }
  .v4-slide-setup .feature-ready-list { margin-top: 14px; }
  /* Pinned to the top corner here, so the thumbnails hang from a shared top
     edge instead of standing on the desktop strip's bottom edge. */
  .v4-slide-setup .feature-scene-nav {
    top: 16px;
    right: 18px;
    bottom: auto;
    align-items: flex-start;
  }
  .v4-slide-setup .feature-scene-nav button { width: 48px; height: 29px; border-radius: 5px; }
  .v4-slide-setup .feature-scene-nav button.active { width: 72px; height: 42px; transform: none; }
  .v4-slide-setup .feature-scene-counter { display: none; }
}

@media (max-width: 560px) {
  .v4-slide-setup { padding: 0; }
  .v4-slide-setup .feature-scene { height: 49%; object-position: center; }
  .v4-slide-setup .feature-scene-scrim {
    background: linear-gradient(0deg, #050505 0%, #050505 49%, rgba(5, 5, 5, 0.92) 58%, rgba(5, 5, 5, 0.08) 82%);
  }
  .v4-slide-setup .feature-setup-copy { inset: auto 15px clamp(58px, 8svh, 76px); }
  .v4-slide-setup .feature-setup-copy h2 { font-size: clamp(2.25rem, 11vw, 3.35rem); }
  .v4-slide-setup .feature-ready-list { gap: 5px 12px; font-size: 0.68rem; }
  .v4-slide-setup .feature-ready-list i { width: 5px; height: 5px; }
  .v4-slide-setup .feature-scene-nav { top: 12px; right: 12px; gap: 6px; }
  .v4-slide-setup .feature-scene-nav button { width: 37px; height: 23px; }
  .v4-slide-setup .feature-scene-nav button.active { width: 57px; height: 34px; }
}

@media (max-width: 400px) {
  .v4-slide-setup .feature-ready-list { margin-top: 12px; font-size: 0.75rem; }
}

@media (max-height: 700px) and (min-width: 821px) {
  .v4-slide-setup { padding: 0; }
  .v4-slide-setup .feature-setup-copy { padding-top: calc(var(--v4-nav) + 18px); padding-bottom: 20px; }
  .v4-slide-setup .feature-setup-copy h2 { font-size: clamp(2.7rem, 4.6vw, 4.6rem); }
  .v4-slide-setup .feature-ready-list { margin-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .v4-slide-setup .feature-scene,
  .v4-slide-setup .feature-scene-nav button { transition-duration: 1ms !important; }
}
