/* ---------- HOME PAGE ---------- */

.home-auth-bar {
  justify-self: end;
  position: relative;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 8px;
}


.home-page {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 10%, rgba(255, 197, 176, 0.12), transparent 18%),
    linear-gradient(180deg, #211458 0%, #3c287a 46%, #2d2674 72%, #221f62 100%);
}

.home-page .arcade-shell {
  width: 100%;
  min-height: 100vh;
  padding: 0;
}

.home-page::before {
  background:
    radial-gradient(circle at 50% 6%, rgba(255, 197, 176, 0.22), transparent 20%),
    radial-gradient(circle at 18% 18%, rgba(123, 246, 255, 0.12), transparent 16%),
    radial-gradient(circle at 86% 12%, rgba(255, 121, 183, 0.12), transparent 18%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent 24%);
}

.home-page .home-hero {
  position: relative;
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.home-stage {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  justify-items: center;
  align-content: start;
  width: 100%;
  min-height: 100vh;
  padding: 14px clamp(18px, 4vw, 36px) 0;
  background:
    linear-gradient(180deg, #20145b 0%, #35206d 18%, #7c4195 52%, #4b3188 72%, #252263 100%);
}

.home-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 18%, transparent 82%, rgba(255, 255, 255, 0.02)),
    radial-gradient(circle at 50% 44%, rgba(255, 179, 170, 0.14), transparent 18%);
  pointer-events: none;
  z-index: 1;
}

.home-stage::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 42%;
  background: linear-gradient(180deg, rgba(58, 48, 141, 0) 0%, #352f88 34%, #2a2874 68%, #1f1d66 100%);
  pointer-events: none;
  z-index: 0;
}

.home-stage__stars {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 7% 11%, rgba(153, 255, 255, 0.95) 0 1px, transparent 1.8px),
    radial-gradient(circle at 16% 33%, rgba(255, 232, 167, 0.95) 0 1.2px, transparent 2px),
    radial-gradient(circle at 27% 18%, rgba(255, 255, 255, 0.8) 0 1px, transparent 1.8px),
    radial-gradient(circle at 39% 27%, rgba(153, 255, 255, 0.82) 0 1.1px, transparent 2px),
    radial-gradient(circle at 58% 16%, rgba(255, 255, 255, 0.86) 0 1px, transparent 1.8px),
    radial-gradient(circle at 66% 31%, rgba(255, 232, 167, 0.96) 0 1.2px, transparent 2px),
    radial-gradient(circle at 79% 15%, rgba(153, 255, 255, 0.84) 0 1.1px, transparent 2px),
    radial-gradient(circle at 88% 27%, rgba(255, 232, 167, 0.9) 0 1px, transparent 1.9px),
    radial-gradient(circle at 11% 47%, rgba(255, 255, 255, 0.75) 0 1px, transparent 1.9px),
    radial-gradient(circle at 82% 45%, rgba(153, 255, 255, 0.82) 0 1.1px, transparent 1.9px);
  opacity: 0.95;
  pointer-events: none;
  z-index: 0;
  animation: homeStageDrift 18s linear infinite;
}

.home-page .hero h1,
.home-page .hero-sub,
.home-page .hero-actions {
  position: relative;
  z-index: 4;
}

.home-stage__masthead {
  position: relative;
  z-index: 6;
  display: grid;
  gap: clamp(20px, 5vh, 56px);
  width: min(94vw, 1160px);
  padding-top: clamp(6px, 2vh, 18px);
}

.home-stage__header {
  display: grid;
  justify-items: center;
  gap: 10px;
  width: 100%;
  padding-top: clamp(20px, 7vh, 72px);
  text-align: center;
}

.home-page .hero h1 {
  margin: 0 0 2px;
}

.home-page .hero-sub {
  margin: 8px 0 0;
  max-width: 42rem;
  text-align: center;
}

.home-page .pixel-text {
  color: transparent !important;
  text-shadow: none !important;
  font-size: 0 !important;
  line-height: 0 !important;
}

.pixel-text__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pixel-text__svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
  shape-rendering: crispEdges;
}

.pixel-text__pixel {
  fill: #fff8ff;
}

.home-page .pixel-text--title {
  width: min(94vw, 1120px);
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.42));
}

.home-page .pixel-text--subtitle {
  width: min(84vw, 760px);
  margin-left: auto;
  margin-right: auto;
  filter: drop-shadow(0 3px 0 rgba(0, 0, 0, 0.28));
}

.hero-cta.pixel-text {
  padding-top: 18px;
  padding-bottom: 18px;
}

.hero-cta.pixel-text .pixel-text__svg {
  width: min(100%, 400px);
}

.home-stage__scene {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.home-stage__scene::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 12%;
  background:
    linear-gradient(
      180deg,
      rgba(31, 17, 87, 0) 0%,
      rgba(24, 18, 87, 0.04) 44%,
      rgba(20, 17, 83, 0.16) 76%,
      rgba(19, 18, 86, 1) 100%
    );
  z-index: 0;
}

.home-stage__sun {
  position: absolute;
  left: 50%;
  bottom: 44%;
  width: min(36vw, 390px);
  aspect-ratio: 1 / 1;
  transform: translateX(-50%);
  border-radius: 50%;
  background:
    linear-gradient(180deg, #ffd7b9 0%, #ffbfaa 38%, #ee86b3 72%, #d154a2 100%);
  box-shadow:
    0 0 70px rgba(255, 185, 165, 0.22),
    0 0 120px rgba(255, 136, 178, 0.1);
  z-index: 0;
}

.home-stage__sun::after {
  content: "";
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background:
    repeating-linear-gradient(
      to bottom,
      transparent 0 18px,
      rgba(255, 107, 158, 0.48) 18px 22px
    );
  opacity: 0.3;
}

.home-stage__skyline {
  position: absolute;
  left: 50%;
  bottom: 44%;
  width: min(82vw, 980px);
  height: min(15vw, 168px);
  transform: translateX(-50%);
  background: linear-gradient(180deg, #2a2b69, #19153d);
  clip-path: polygon(
    0 100%, 0 90%, 3% 90%, 3% 78%, 5% 78%, 5% 88%, 7% 88%, 7% 70%, 9% 70%,
    9% 84%, 11% 84%, 11% 68%, 12% 68%, 12% 82%, 14% 82%, 14% 58%, 15% 58%,
    15% 52%, 16% 52%, 16% 80%, 18% 80%, 18% 60%, 20% 60%, 20% 84%, 22% 84%,
    22% 66%, 24% 66%, 24% 88%, 26% 88%, 26% 48%, 27% 48%, 27% 74%, 28% 74%,
    28% 40%, 29% 40%, 29% 82%, 31% 82%, 31% 30%, 32% 30%, 32% 84%, 34% 84%,
    34% 60%, 36% 60%, 36% 86%, 38% 86%, 38% 46%, 39% 46%, 39% 38%, 40% 38%,
    40% 28%, 41% 28%, 41% 76%, 43% 76%, 43% 54%, 44% 54%, 44% 22%, 45% 22%,
    45% 86%, 47% 86%, 47% 58%, 48% 58%, 48% 34%, 49% 34%, 49% 18%, 50% 18%,
    50% 86%, 52% 86%, 52% 44%, 53% 44%, 53% 26%, 54% 26%, 54% 20%, 55% 20%,
    55% 82%, 57% 82%, 57% 46%, 59% 46%, 59% 86%, 61% 86%, 61% 58%, 62% 58%,
    62% 38%, 63% 38%, 63% 82%, 65% 82%, 65% 60%, 66% 60%, 66% 74%, 68% 74%,
    68% 84%, 70% 84%, 70% 52%, 71% 52%, 71% 42%, 72% 42%, 72% 70%, 74% 70%,
    74% 86%, 76% 86%, 76% 54%, 78% 54%, 78% 72%, 80% 72%, 80% 88%, 83% 88%,
    83% 66%, 85% 66%, 85% 82%, 88% 82%, 88% 90%, 92% 90%, 92% 78%, 94% 78%,
    94% 90%, 98% 90%, 98% 82%, 100% 82%,
    100% 100%
  );
  box-shadow: 0 -1px 0 rgba(255, 164, 209, 0.22);
  z-index: 3;
}

.home-stage__grid {
  position: absolute;
  left: -10%;
  right: -10%;
  top: 56%;
  bottom: -26%;
  height: auto;
  background:
    linear-gradient(180deg, rgba(255, 116, 191, 0.12) 0%, rgba(78, 59, 178, 0.18) 10%, rgba(52, 43, 152, 0.36) 30%, rgba(36, 32, 119, 0.86) 62%, rgba(31, 29, 102, 1) 100%),
    linear-gradient(90deg, rgba(255, 73, 168, 0.96) 0 2px, transparent 2px 76px),
    linear-gradient(180deg, rgba(255, 73, 168, 0.96) 0 2px, transparent 2px 50px);
  background-size: 100% 100%, 76px 100%, 100% 50px;
  box-shadow: none;
  transform: perspective(980px) rotateX(74deg);
  transform-origin: center top;
  z-index: 1;
}

.home-stage__grid::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 10%;
  background:
    linear-gradient(180deg, rgba(255, 120, 193, 0.7) 0%, rgba(255, 120, 193, 0.18) 58%, rgba(255, 120, 193, 0) 100%);
}

.home-stage__grid::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.015) 8%, rgba(23, 20, 89, 0.05) 18%, transparent 30%),
    radial-gradient(circle at 50% 0%, rgba(255, 132, 189, 0.12), transparent 22%);
}

.home-page .hero-actions {
  position: absolute;
  left: 50%;
  bottom: 12%;
  transform: translateX(-50%) translateZ(0);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: min(94vw, 980px);
  flex-wrap: wrap;
  padding: 0 clamp(12px, 3vw, 24px);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  min-width: min(100%, 440px);
  padding: 0 34px;
  border-radius: var(--profile-radius-md);
  color: #fff8ff;
  text-decoration: none;
  text-transform: uppercase;
  font-size: clamp(1.1rem, 2.4vw, 1.85rem);
  letter-spacing: 0.08em;
  background: linear-gradient(180deg, #27272d 0%, #0b0b11 100%);
  border: 2px solid #f4f0ff;
  box-shadow:
    0 0 0 5px rgba(15, 14, 32, 0.86),
    0 18px 36px rgba(0, 0, 0, 0.44),
    0 0 28px rgba(255, 255, 255, 0.08);
  transition: transform 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

.hero-cta:hover,
.hero-cta.gamepad-selected {
  transform: translateY(-5px);
  border-color: #fff8ff;
  box-shadow:
    0 0 0 5px rgba(15, 14, 32, 0.86),
    0 24px 44px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(255, 152, 198, 0.18);
}

.hero-cta--secondary {
  background: linear-gradient(180deg, #1f2534 0%, #080b14 100%);
  border-color: rgba(232, 246, 255, 0.92);
  box-shadow:
    0 0 0 5px rgba(12, 16, 31, 0.86),
    0 18px 36px rgba(0, 0, 0, 0.44),
    0 0 28px rgba(153, 255, 255, 0.12);
}

.hero-cta--secondary:hover,
.hero-cta--secondary.gamepad-selected {
  box-shadow:
    0 0 0 5px rgba(12, 16, 31, 0.86),
    0 24px 44px rgba(0, 0, 0, 0.5),
    0 0 34px rgba(153, 255, 255, 0.18);
}

@keyframes homeStageDrift {
  0% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(0, -8px, 0);
  }
  100% {
    transform: translate3d(0, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-stage__stars {
    animation: none;
  }
}

@media (max-width: 920px) {
  .home-page .hero-actions {
    bottom: 13%;
  }

  .hero-cta {
    min-width: min(100%, 460px);
  }
}

@media (max-width: 820px) {
  .home-stage {
    min-height: 100vh;
  }

  .home-stage__sun {
    width: min(52vw, 260px);
    bottom: 45%;
  }

  .home-stage__skyline {
    width: min(92vw, 760px);
    height: min(20vw, 126px);
    bottom: 44.5%;
  }

  .home-stage__grid {
    top: 56%;
    bottom: -22%;
    height: auto;
  }

  .home-page .hero h1 {
    max-width: none;
    font-size: clamp(2.4rem, 10vw, 4.4rem);
  }

  .home-page .hero-sub {
    font-size: 0.88rem;
    letter-spacing: 0.03em;
  }
}

@media (max-width: 640px) {
  .home-stage {
    padding-top: 8px;
    min-height: 100vh;
  }

  .home-stage__masthead {
    gap: 16px;
    padding-top: 0;
  }

  .home-stage__header {
    padding-top: clamp(12px, 6vw, 28px);
  }

  .home-page .hero-actions {
    bottom: 10%;
    gap: 10px;
    padding: 0 12px;
  }

  .hero-cta {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    min-height: 62px;
    padding: 0 10px;
    font-size: 0.9rem;
  }

  .home-stage__sun {
    width: min(62vw, 220px);
    bottom: 45.5%;
  }

  .home-stage__skyline {
    bottom: 45%;
    width: min(94vw, 560px);
    height: 88px;
  }

  .home-stage__grid {
    top: 57%;
    bottom: -18%;
    height: auto;
    background-size: 100% 100%, 44px 100%, 100% 34px;
  }
}
