/* Animated gradient and grid background for the homepage hero. */
.home-hero {
  isolation: isolate;
  overflow: hidden;
  background: #f8fafc;
}

.home-hero > .page-shell {
  position: relative;
  z-index: 3;
}

.home-hero__background {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.home-hero__mesh {
  position: absolute;
  z-index: 0;
  inset: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    135deg,
    #f8fafc 0%,
    #eff6ff 18%,
    #f0fdf4 36%,
    #f5f3ff 54%,
    #ecfeff 72%,
    #fdf4ff 88%,
    #f8fafc 100%
  );
  background-size: 300% 300%;
  opacity: 0.9;
  animation: home-hero-gradient-flow 18s ease infinite;
}

.home-hero__orb {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  filter: blur(85px);
  opacity: 0.75;
  will-change: transform;
}

.home-hero__orb--blue {
  width: 540px;
  height: 540px;
  top: -120px;
  left: 20%;
  background: radial-gradient(
    circle,
    rgba(37, 99, 235, 0.22) 0%,
    rgba(56, 189, 248, 0.09) 60%,
    transparent 80%
  );
  animation: home-hero-orb-blue 22s ease-in-out infinite alternate;
}

.home-hero__orb--green {
  width: 480px;
  height: 480px;
  top: 30%;
  right: -80px;
  background: radial-gradient(
    circle,
    rgba(16, 185, 129, 0.18) 0%,
    rgba(52, 211, 153, 0.07) 60%,
    transparent 80%
  );
  animation: home-hero-orb-green 26s ease-in-out infinite alternate;
}

.home-hero__orb--purple {
  width: 460px;
  height: 460px;
  bottom: 8%;
  left: -80px;
  background: radial-gradient(
    circle,
    rgba(139, 92, 246, 0.18) 0%,
    rgba(192, 132, 252, 0.06) 60%,
    transparent 80%
  );
  animation: home-hero-orb-purple 24s ease-in-out infinite alternate;
}

.home-hero__orb--gold {
  width: 420px;
  height: 420px;
  right: 22%;
  bottom: -60px;
  background: radial-gradient(
    circle,
    rgba(245, 158, 11, 0.16) 0%,
    rgba(251, 191, 36, 0.05) 60%,
    transparent 80%
  );
  animation: home-hero-orb-gold 20s ease-in-out infinite alternate;
}

.home-hero__grid {
  position: absolute;
  z-index: 2;
  inset: 0;
  background-size: 42px 42px;
  background-image:
    linear-gradient(to right, rgba(203, 213, 225, 0.35) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 213, 225, 0.35) 1px, transparent 1px);
  -webkit-mask-image: radial-gradient(
    ellipse 85% 75% at 50% 35%,
    #000 40%,
    transparent 95%
  );
  mask-image: radial-gradient(
    ellipse 85% 75% at 50% 35%,
    #000 40%,
    transparent 95%
  );
}

@keyframes home-hero-gradient-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }
}

@keyframes home-hero-orb-blue {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(120px, 70px) scale(1.15); }
  100% { transform: translate(-50px, 110px) scale(0.95); }
}

@keyframes home-hero-orb-green {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-110px, -60px) scale(1.2); }
  100% { transform: translate(-160px, 80px) scale(0.9); }
}

@keyframes home-hero-orb-purple {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(100px, -80px) scale(1.18); }
  100% { transform: translate(60px, 50px) scale(1.02); }
}

@keyframes home-hero-orb-gold {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-80px, -100px) scale(1.2); }
  100% { transform: translate(90px, -30px) scale(0.92); }
}

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

@media (max-width: 640px) {
  .home-hero__orb {
    filter: blur(70px);
  }
}
