/**
 * Sekaira — Dimensional world gates (artwork-first portals)
 */

/* —— Spatial nexus scene —— */
.nexus-scene {
  position: relative;
  width: min(1200px, 100%);
  margin-inline: auto;
}

.nexus-scene--hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px) minmax(0, 1fr);
  grid-template-rows: auto 1fr auto;
  gap: 0 1.25rem;
  min-height: min(86vh, 820px);
  padding: 2.5rem 1rem 2rem;
}

.nexus-scene--hub {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 1.75rem);
  align-items: end;
  min-height: auto;
  padding: 0.5rem 0 1.5rem;
}

.nexus-scene__core {
  grid-column: 2;
  grid-row: 1 / 4;
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  z-index: 5;
  text-align: center;
  width: 100%;
  align-self: center;
  pointer-events: none;
}

.nexus-scene__core .nexus-search {
  pointer-events: auto;
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.nexus-scene__emblem {
  width: clamp(88px, 12vw, 140px);
  height: auto;
  filter: drop-shadow(0 0 32px rgba(46, 200, 255, 0.4));
}

.nexus-scene__brand {
  margin: 0.75rem 0 0.25rem;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--sekaira-text);
}

.nexus-scene__title {
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.8vw, 2.45rem);
  font-weight: 700;
  line-height: 1.12;
  background: var(--sekaira-gradient-text);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nexus-scene__lede {
  margin: 0 0 1.35rem;
  color: var(--sekaira-muted);
  font-size: 0.98rem;
  line-height: 1.5;
  max-width: 22rem;
  margin-inline: auto;
}

.nexus-scene__hub-mark {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  opacity: 0.35;
  pointer-events: none;
}

.nexus-scene__hub-mark img {
  filter: drop-shadow(0 0 40px rgba(46, 200, 255, 0.35));
}

/* Hero gate placement — grid cells, no overlap */
.nexus-scene--hero .scene-minecraft {
  grid-column: 1;
  grid-row: 2;
  justify-self: end;
  align-self: center;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: min(100%, 255px);
}

.nexus-scene--hero .scene-rsps {
  grid-column: 3;
  grid-row: 1;
  justify-self: start;
  align-self: end;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: min(100%, 235px);
}

.nexus-scene--hero .scene-rust {
  grid-column: 3;
  grid-row: 3;
  justify-self: start;
  align-self: start;
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  bottom: auto;
  width: min(100%, 220px);
}

/* Hub row — equal columns */
.nexus-scene--hub .world-gate {
  position: relative;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  transform: none !important;
}

.nexus-scene--hub .scene-rsps {
  transform: translateY(-1rem);
}

.nexus-scene--hub .world-gate:hover,
.nexus-scene--hub .world-gate:focus-visible {
  transform: scale(1.03) translateY(-5px) !important;
}

.nexus-scene--hub .scene-rsps:hover,
.nexus-scene--hub .scene-rsps:focus-visible {
  transform: scale(1.03) translateY(calc(-1rem - 5px)) !important;
}

/* —— Hero backdrop —— */
.nexus-hero {
  position: relative;
  margin: 0 calc(50% - 50vw);
  overflow: hidden;
  padding: 0;
  min-height: min(94vh, 920px);
  display: block;
  background: transparent;
}

/* Nexus hero — centered stage + side ad rails */
.nexus-hero--nexus {
  width: 100vw;
  min-height: min(88vh, 920px);
  margin-top: 0;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: clamp(0.5rem, 2vh, 1.25rem) 0 clamp(1rem, 3vh, 2rem);
  background: #05060c;
}

.nexus-hero--nexus .nexus-hero__layout {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: auto minmax(0, min(1180px, 72vw)) auto;
  align-items: stretch;
  gap: clamp(0.75rem, 2vw, 1.5rem);
  min-height: min(82vh, 860px);
  max-width: 100%;
  margin: 0 auto;
  padding-inline: clamp(0.5rem, 1.5vw, 1rem);
}

.nexus-hero--nexus .nexus-hero__rail {
  align-self: center;
  width: max-content;
  max-width: 180px;
  min-height: 0;
  max-height: min(82vh, 860px);
}

.nexus-hero--nexus .nexus-hero__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: inherit;
}

.nexus-hero--nexus .nexus-hero__centerpiece {
  position: relative;
  z-index: 10;
  pointer-events: none;
  line-height: 0;
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-bottom: clamp(5rem, 14vh, 8rem);
}

.nexus-hero--nexus .nexus-hero__centerpiece picture {
  display: block;
  width: 100%;
}

.nexus-hero--nexus .nexus-hero__centerpiece img {
  width: 100%;
  height: auto;
  max-height: min(72vh, 780px);
  object-fit: contain;
  object-position: center center;
  display: block;
  filter: drop-shadow(0 28px 80px rgba(0, 0, 0, 0.55));
}

.nexus-hero--nexus .nexus-hero__scrim {
  position: absolute;
  inset: 0;
  z-index: 44;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 6, 12, 0.94) 0%, rgba(5, 6, 12, 0.2) 32%, transparent 58%);
}

.nexus-hero--nexus .nexus-hero__content {
  position: absolute;
  left: 50%;
  bottom: clamp(0.5rem, 2vh, 1.25rem);
  transform: translateX(-50%);
  z-index: 45;
  width: min(92%, 40rem);
  text-align: center;
  pointer-events: none;
}

.nexus-hero--nexus .nexus-hero__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 0%, #121a38 0%, #080a14 45%, #05060c 100%),
    radial-gradient(ellipse 60% 45% at 20% 30%, rgba(46, 120, 200, 0.12) 0%, transparent 70%),
    radial-gradient(ellipse 55% 40% at 80% 25%, rgba(140, 60, 200, 0.1) 0%, transparent 68%);
}

.nexus-hero--nexus .nexus-hero__sky::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 12% 22%, rgba(255, 255, 255, 0.55), transparent),
    radial-gradient(1px 1px at 78% 18%, rgba(46, 200, 255, 0.45), transparent),
    radial-gradient(1px 1px at 88% 68%, rgba(216, 76, 255, 0.35), transparent),
    radial-gradient(1px 1px at 32% 78%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 55% 42%, rgba(255, 255, 255, 0.25), transparent);
  opacity: 0.7;
}

.nexus-hero--nexus .nexus-hero__env {
  display: none;
}

.nexus-hero--nexus .nexus-hero__portals {
  display: none;
}

/* Composed hero — layered scene recreated from reference layout */
.nexus-hero--composed {
  min-height: min(100vh, 980px);
  margin-top: -0.5rem;
  background: #05060c;
}

.nexus-hero--composed .nexus-hero__sky {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nexus-hero--composed .nexus-hero__sky img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 35%;
}

.nexus-hero__atmosphere {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 55% at 50% 38%, rgba(120, 60, 200, 0.14) 0%, transparent 68%),
    radial-gradient(ellipse 45% 35% at 18% 28%, rgba(46, 200, 255, 0.1) 0%, transparent 70%),
    radial-gradient(ellipse 45% 35% at 82% 26%, rgba(216, 76, 255, 0.08) 0%, transparent 70%);
}

.nexus-hero__floor {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(to top, rgba(5, 6, 12, 0.98) 0%, rgba(8, 10, 18, 0.75) 35%, transparent 100%),
    radial-gradient(ellipse 80% 55% at 50% 100%, rgba(30, 25, 45, 0.55) 0%, transparent 72%);
}

.nexus-hero__stage {
  position: absolute;
  inset: 0;
  z-index: 3;
  perspective: 1400px;
  perspective-origin: 50% 42%;
  transform-style: preserve-3d;
  pointer-events: none;
}

.nexus-hero__portals {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
}

.nexus-hero__cast {
  position: absolute;
  left: 50%;
  bottom: 8%;
  width: min(92%, 920px);
  transform: translateX(-50%);
  z-index: 35;
  pointer-events: none;
  line-height: 0;
}

.nexus-hero__cast img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 24px 80px rgba(0, 0, 0, 0.65));
}

/* Decorative hero portals */
.hero-portal {
  position: absolute;
  width: var(--portal-w, clamp(160px, 14vw, 220px));
  opacity: var(--portal-opacity, 1);
  transform-style: preserve-3d;
  transform:
    translate(var(--portal-tx, 0), var(--portal-ty, 0))
    translate3d(0, 0, var(--portal-z, 0))
    rotateX(var(--portal-rx, 0deg))
    rotateY(var(--portal-ry, 0deg))
    rotateZ(var(--portal-rz, 0deg));
  z-index: var(--portal-layer, 3);
  pointer-events: none;
}

.hero-portal--center {
  z-index: 20;
}

.hero-portal--distant {
  filter: saturate(0.75) brightness(0.82);
}

.hero-portal__glow {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 130%;
  height: 120%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--portal-spill, rgba(46, 200, 255, 0.35)) 0%, transparent 68%);
  filter: blur(22px);
  opacity: 0.55;
  pointer-events: none;
}

.hero-portal__img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: screen;
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.55));
  animation: heroPortalFloat 10s ease-in-out infinite;
  animation-delay: var(--float-delay, 0s);
}

.hero-portal--float-a .hero-portal__img { --float-delay: 0s; animation-duration: 10s; }
.hero-portal--float-b .hero-portal__img { --float-delay: -1.6s; animation-duration: 11s; }
.hero-portal--float-c .hero-portal__img { --float-delay: -3s; animation-duration: 9.5s; }
.hero-portal--float-d .hero-portal__img { --float-delay: -4.2s; animation-duration: 10.5s; }
.hero-portal--float-e .hero-portal__img { --float-delay: -2.5s; animation-duration: 9.8s; }
.hero-portal--float-f .hero-portal__img { --float-delay: -5s; animation-duration: 11.5s; }

@keyframes heroPortalFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.gate--block { --portal-spill: rgba(46, 200, 255, 0.38); }
.gate--wasteland { --portal-spill: rgba(255, 130, 50, 0.34); }
.gate--fantasy { --portal-spill: rgba(180, 80, 255, 0.38); }
.gate--default { --portal-spill: rgba(46, 200, 255, 0.3); }

.hero-portal--cyberpunk { --portal-spill: rgba(80, 255, 120, 0.32); }
.hero-portal--eastern { --portal-spill: rgba(255, 100, 160, 0.32); }
.hero-portal--jungle { --portal-spill: rgba(120, 220, 80, 0.28); }

.nexus-hero__scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to top, rgba(5, 6, 12, 0.92) 0%, rgba(5, 6, 12, 0.35) 24%, transparent 46%);
  z-index: 4;
}

.nexus-hero--composed .nexus-hero__scrim {
  z-index: 44;
}

.nexus-hero--composed .nexus-hero__content {
  z-index: 45;
}

.nexus-hero__content {
  position: absolute;
  left: 50%;
  bottom: clamp(1.5rem, 4.5vh, 3rem);
  transform: translateX(-50%);
  z-index: 5;
  width: min(92%, 40rem);
  text-align: center;
  pointer-events: none;
}

.nexus-hero__title {
  margin: 0 0 0.65rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 4.2vw, 2.85rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(90deg, #2ec8ff 0%, #7b5cff 52%, #d84cff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 18px rgba(0, 0, 0, 0.45));
}

.nexus-hero__lede {
  margin: 0 0 1.35rem;
  color: rgba(238, 241, 255, 0.88);
  font-size: clamp(0.92rem, 1.7vw, 1.08rem);
  line-height: 1.5;
}

.nexus-hero__search {
  pointer-events: auto;
  margin-inline: auto;
}

/* Legacy cinematic (unused) */
.nexus-hero--cinematic {
  min-height: min(100vh, 960px);
  margin-top: -0.5rem;
}

.nexus-hero--cinematic .nexus-hero__scene {
  position: absolute;
  inset: 0;
}

.nexus-hero--cinematic .nexus-hero__scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
}

.nexus-hero__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.nexus-hero__backdrop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}

.nexus-hero__veil {
  position: absolute;
  inset: 0;
  /* Soft atmospheric vignette only — no rectangular bands */
  background:
    radial-gradient(ellipse 90% 80% at 50% 46%, transparent 0%, rgba(5, 6, 12, 0.28) 52%, rgba(5, 6, 12, 0.65) 100%),
    radial-gradient(ellipse 55% 45% at 50% 44%, rgba(46, 200, 255, 0.06) 0%, transparent 72%);
}

.nexus-scene--hero {
  position: relative;
  z-index: 2;
}

/* —— World gate (dimensional gateway) —— */
.world-gate {
  position: relative;
  display: block;
  text-decoration: none;
  color: var(--sekaira-text);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), filter 0.35s ease;
  z-index: 2;
}

.world-gate:hover,
.world-gate:focus-visible {
  transform: scale(1.04) translateY(-6px);
  z-index: 6;
  filter: brightness(1.08);
}

.world-gate__spill {
  position: absolute;
  left: 50%;
  top: 45%;
  width: 120%;
  height: 80%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse at center, var(--gate-spill, rgba(46, 200, 255, 0.2)) 0%, transparent 65%);
  filter: blur(18px);
  opacity: 0.55;
  transition: opacity 0.35s ease, transform 0.45s ease;
  pointer-events: none;
  z-index: 0;
}

.world-gate:hover .world-gate__spill {
  opacity: 0.85;
  transform: translate(-50%, -50%) scale(1.08);
}

.gate--block { --gate-spill: rgba(46, 200, 255, 0.25); }
.gate--wasteland { --gate-spill: rgba(255, 140, 60, 0.22); }
.gate--fantasy { --gate-spill: rgba(216, 76, 255, 0.25); }

.world-gate__scene {
  position: relative;
  display: block;
  line-height: 0;
  z-index: 1;
}

.world-gate__gate {
  width: 100%;
  height: auto;
  display: block;
  position: relative;
  z-index: 2;
  filter: drop-shadow(0 12px 40px rgba(0, 0, 0, 0.55));
  transition: filter 0.35s ease;
}

.world-gate:hover .world-gate__gate {
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.5)) drop-shadow(0 0 28px var(--gate-spill, rgba(46, 200, 255, 0.35)));
}

.world-gate__environment {
  position: absolute;
  inset: 8% 12% 20%;
  width: auto;
  height: auto;
  max-width: 76%;
  max-height: 62%;
  object-fit: cover;
  z-index: 1;
  border-radius: 4px;
  opacity: 0;
}

.world-gate__character {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  max-width: 90%;
  height: auto;
  z-index: 3;
  pointer-events: none;
}

.world-gate__fx {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 4;
  overflow: hidden;
}

.world-gate__particles {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(2px 2px at 20% 60%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 70% 30%, rgba(46, 200, 255, 0.8), transparent),
    radial-gradient(1px 1px at 45% 80%, rgba(216, 76, 255, 0.7), transparent);
  opacity: 0.35;
  animation: gateParticles 4s ease-in-out infinite;
}

.world-gate:hover .world-gate__particles {
  opacity: 0.65;
  animation-duration: 2.5s;
}

.world-gate__distort {
  position: absolute;
  inset: 15% 10%;
  border-radius: 45% 55% 50% 50%;
  box-shadow: inset 0 0 30px rgba(46, 200, 255, 0.15);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.world-gate__hud {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  transform: none;
  width: 100%;
  max-width: none;
  padding: 2.25rem 0.75rem 0.7rem;
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
  line-height: 1.35;
  border: 0;
  border-radius: 0;
  background: linear-gradient(180deg, transparent 0%, var(--glass-bg) 50%, rgba(12, 16, 34, 0.52) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  box-shadow: none;
}

.world-gate:hover .world-gate__hud,
.world-gate:focus-visible .world-gate__hud {
  opacity: 1;
  pointer-events: auto;
}

.world-gate--hero .world-gate__hud,
.world-gate--lg .world-gate__hud {
  opacity: 1;
  pointer-events: auto;
  background: linear-gradient(180deg, transparent 0%, var(--glass-bg) 45%, rgba(12, 16, 34, 0.5) 100%);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border);
  border-top: 0;
  box-shadow: var(--glass-shadow), var(--glass-highlight);
}

/* Image-only portals in the hero chamber — no card/HUD chrome */
.world-gate--bare {
  background: none;
  border: 0;
  box-shadow: none;
}

.world-gate--bare .world-gate__hud {
  display: none;
}

.world-gate--portal {
  width: min(32vw, 320px);
  filter: drop-shadow(0 16px 48px rgba(0, 0, 0, 0.45));
  transition: transform 0.5s cubic-bezier(0.22, 0.61, 0.36, 1), filter 0.4s ease;
}

.world-gate--portal .world-gate__gate {
  filter: none;
  transition: filter 0.4s ease;
}

.world-gate--portal .world-gate__spill {
  opacity: 0.45;
  width: 140%;
  height: 100%;
}

.world-gate--bare:hover,
.world-gate--bare:focus-visible {
  transform: scale(1.05) translateY(-6px);
  filter: drop-shadow(0 20px 56px rgba(0, 0, 0, 0.5));
}

.world-gate--bare:hover .world-gate__gate,
.world-gate--bare:focus-visible .world-gate__gate {
  filter: drop-shadow(0 0 32px var(--gate-spill, rgba(46, 200, 255, 0.4)));
}

.world-gate--bare:hover .world-gate__spill,
.world-gate--bare:focus-visible .world-gate__spill {
  opacity: 0.9;
}

.world-gate__env {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sekaira-cyan);
}

.world-gate__label {
  display: block;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  margin-top: 0.15rem;
  color: var(--sekaira-text);
}

.world-gate__tagline {
  display: block;
  font-size: 0.76rem;
  color: var(--sekaira-muted);
  margin-top: 0.15rem;
}

.world-gate__stat {
  display: inline-flex;
  justify-content: center;
  align-items: baseline;
  gap: 0.35rem;
  margin-top: 0.3rem;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.world-gate__stat-num {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--sekaira-text);
}

.world-gate__stat-label {
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  color: var(--sekaira-muted);
  text-transform: uppercase;
}

.world-gate__cta {
  display: none;
}

.world-gate--hero .world-gate__cta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sekaira-cyan);
}

.world-gate--lg,
.world-gate--hero {
  position: relative;
}

.world-gate--md {
  position: relative;
}

@keyframes gateParticles {
  0%, 100% { opacity: 0.3; transform: translateY(0); }
  50% { opacity: 0.6; transform: translateY(-4px); }
}

/* —— Discover uses centered gate —— */
.nexus-discover__viewport .world-gate {
  position: relative;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: 300px;
  margin-inline: auto;
  transform: none !important;
}

.nexus-discover__viewport .world-gate:hover,
.nexus-discover__viewport .world-gate:focus-visible {
  transform: scale(1.03) translateY(-4px) !important;
}

.nexus-discover__viewport .world-gate__hud {
  opacity: 1;
  pointer-events: auto;
}

.nexus-discover__viewport .world-gate__cta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--sekaira-cyan);
}

/* —— Live stats bar —— */
.nexus-live {
  position: relative;
  z-index: 4;
  margin: -1.5rem auto 0;
  padding: 0 clamp(1rem, 4vw, 2rem) 2.5rem;
  max-width: min(1120px, 100%);
}

.nexus-live__inner {
  padding: 1.15rem 1.5rem 1.25rem;
  text-align: center;
}

.nexus-live__eyebrow {
  margin: 0 0 0.9rem;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--sekaira-cyan);
}

.nexus-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem 1rem;
}

.nexus-stat {
  padding: 0.25rem 0.5rem;
}

.nexus-stat__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.8vw, 1.75rem);
  font-weight: 700;
  color: var(--sekaira-text);
  line-height: 1.1;
}

.nexus-stat__label {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.76rem;
  color: var(--sekaira-muted);
}

/* —— Section backgrounds —— */
.nexus-scene-wrap {
  position: relative;
  margin: 0 calc(50% - 50vw);
  padding: 3rem clamp(1rem, 4vw, 2rem) 3.5rem;
  background:
    radial-gradient(ellipse 70% 45% at 50% 0%, rgba(46, 200, 255, 0.07), transparent 65%),
    linear-gradient(180deg, rgba(5, 6, 12, 0.97) 0%, rgba(3, 4, 10, 1) 100%);
}

.nexus-scene-wrap .section-head h2,
.section-scene .section-head h2 {
  color: var(--sekaira-text);
  background: none;
  -webkit-background-clip: unset;
  background-clip: unset;
}

.nexus-scene-wrap .section-head p,
.section-scene .section-head p {
  color: var(--sekaira-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* —— Featured / rifts —— */
.nexus-games__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
  gap: 1.25rem;
}

.nexus-game-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.15rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.nexus-game-card:hover,
.nexus-game-card:focus-visible {
  transform: translateY(-4px);
}

.nexus-game-card__gate {
  display: block;
  line-height: 0;
}

.nexus-game-card__gate img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 10px 28px rgba(0, 0, 0, 0.45));
}

.nexus-game-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
}

.nexus-game-card__env {
  font-size: 0.62rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sekaira-cyan);
}

.nexus-game-card__name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--sekaira-text);
}

.nexus-game-card__stat {
  font-size: 0.84rem;
  color: var(--sekaira-muted);
}

.nexus-game-card__cta {
  margin-top: 0.35rem;
  font-size: 0.82rem;
  color: var(--sekaira-cyan);
}

.nexus-featured__spotlight {
  margin-bottom: 1.5rem;
}

.nexus-featured__list {
  margin-top: 0.5rem;
}

.world-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 220px);
  align-items: center;
  gap: 1rem;
  min-height: 240px;
  padding: 0;
}

.world-hero__gate {
  position: relative;
  right: auto;
  top: auto;
  transform: none;
  width: 100%;
  max-width: 200px;
  justify-self: end;
  opacity: 0.92;
  pointer-events: none;
  padding: 1rem 1rem 1rem 0;
}

.world-hero__gate img {
  width: 100%;
  height: auto;
  display: block;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.45));
}

.world-hero__body {
  padding: 1.5rem 1.25rem;
}

.rift-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 76px;
  grid-template-rows: auto auto 1fr;
  column-gap: 0.85rem;
  align-items: center;
  padding: 1rem 1.1rem;
  padding-top: 1rem;
  overflow: hidden;
}

.rift-card__gate {
  grid-column: 2;
  grid-row: 1 / 4;
  position: relative;
  top: auto;
  left: auto;
  transform: none;
  width: 76px;
  height: auto;
  align-self: center;
  opacity: 0.88;
  pointer-events: none;
}

.rift-card__badge {
  grid-column: 1;
  grid-row: 1;
  display: inline-block;
  width: fit-content;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sekaira-cyan);
  margin-bottom: 0.25rem;
}

.rift-card strong {
  grid-column: 1;
  grid-row: 2;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rift-card__meta {
  grid-column: 1;
  grid-row: 3;
  display: block;
  color: var(--sekaira-muted);
  font-size: 0.84rem;
  margin-top: 0.15rem;
}

@media (max-width: 1100px) {
  .nexus-hero--nexus .nexus-hero__layout {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .nexus-hero--nexus .nexus-hero__rail {
    display: none;
  }

  .nexus-hero--nexus {
    min-height: auto;
    padding-bottom: clamp(1.5rem, 4vh, 2.5rem);
  }

  .nexus-hero--nexus .nexus-hero__centerpiece {
    padding-bottom: clamp(4rem, 12vh, 7rem);
  }

  .nexus-hero--nexus .nexus-hero__centerpiece img {
    max-height: min(68vh, 640px);
  }
}

@media (max-width: 900px) {
  .nexus-hero--composed {
    min-height: min(88vh, 760px);
  }

  .nexus-hero--composed .nexus-hero__sky img {
    object-position: center 40%;
  }

  .nexus-hero__cast {
    width: min(100%, 680px);
    bottom: 10%;
  }

  .hero-portal--center {
    --portal-w: clamp(200px, 52vw, 320px) !important;
    top: 36% !important;
  }

  .hero-portal:not(.hero-portal--center) {
    --portal-w: clamp(88px, 22vw, 130px) !important;
  }

  .hero-portal--minecraft { left: 2% !important; top: 12% !important; }
  .hero-portal--rust { left: 0% !important; top: 48% !important; }
  .hero-portal--cyberpunk { right: 2% !important; top: 10% !important; }
  .hero-portal--eastern { right: 0% !important; top: 46% !important; }
  .hero-portal--jungle { display: none; }

  .nexus-hero__content {
    bottom: 1rem;
    width: min(94%, 22rem);
  }

  .nexus-hero__search {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .nexus-hero--cinematic {
    min-height: min(82vh, 720px);
  }

  .nexus-hero--cinematic .nexus-hero__scene img {
    object-position: center 30%;
  }

  .nexus-hero__content {
    bottom: 1.15rem;
    width: min(94%, 22rem);
  }

  .nexus-hero__search {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .nexus-scene--hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
    min-height: auto;
    padding: 1.5rem 0.5rem 2rem;
  }

  .nexus-scene--hub {
    grid-template-columns: 1fr;
    max-width: 320px;
    margin-inline: auto;
  }

  .nexus-scene--hub .scene-rsps {
    transform: none;
  }

  .nexus-scene--hub .scene-rsps:hover,
  .nexus-scene--hub .scene-rsps:focus-visible {
    transform: scale(1.03) translateY(-5px) !important;
  }

  .nexus-scene__core {
    order: -1;
    grid-column: auto;
    grid-row: auto;
    width: 100%;
    padding: 0 0.25rem;
  }

  .nexus-scene--hero .world-gate,
  .nexus-scene--hub .world-gate {
    width: min(100%, 280px) !important;
  }

  .nexus-scene__hub-mark {
    display: none;
  }

  .nexus-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .world-hero {
    grid-template-columns: 1fr;
  }

  .world-hero__gate {
    display: none;
  }

  .nexus-live {
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .world-gate__particles {
    animation: none !important;
  }
}
