.mesh {
  position: fixed;
  inset: 0;
  z-index: var(--z-mesh);
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(
      120% 90% at 50% 0%,
      #f8faff 0%,
      var(--bg) 48%,
      var(--bg-deep) 100%
    );
}

.mesh__blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
  filter: blur(90px);
  opacity: 0.85;
}

.mesh__blob--1 {
  top: -18vh;
  left: -10vw;
  width: 62vw;
  height: 62vw;
  background: radial-gradient(circle, var(--blob-violet) 0%, transparent 68%);
  animation: drift-1 26s var(--ease-inout) infinite alternate;
}

.mesh__blob--2 {
  top: 8vh;
  right: -16vw;
  width: 54vw;
  height: 54vw;
  background: radial-gradient(circle, var(--blob-cyan) 0%, transparent 68%);
  opacity: 0.75;
  animation: drift-2 32s var(--ease-inout) infinite alternate;
}

.mesh__blob--3 {
  bottom: -24vh;
  left: 18vw;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, var(--blob-magenta) 0%, transparent 70%);
  opacity: 0.7;
  animation: drift-3 38s var(--ease-inout) infinite alternate;
}

.mesh__blob--4 {
  top: 42vh;
  left: 32vw;
  width: 44vw;
  height: 44vw;
  background: radial-gradient(circle, var(--blob-indigo) 0%, transparent 70%);
  opacity: 0.72;
  animation: drift-4 29s var(--ease-inout) infinite alternate;
}

@keyframes drift-1 {
  to {
    transform: translate3d(14vw, 10vh, 0) scale(1.18);
  }
}

@keyframes drift-2 {
  to {
    transform: translate3d(-12vw, 16vh, 0) scale(0.86);
  }
}

@keyframes drift-3 {
  to {
    transform: translate3d(16vw, -14vh, 0) scale(1.12);
  }
}

@keyframes drift-4 {
  to {
    transform: translate3d(-18vw, -8vh, 0) scale(1.24);
  }
}

.mesh__grain {
  position: absolute;
  inset: -50%;
  opacity: 0.04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.mesh__vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    115% 85% at 50% 40%,
    transparent 45%,
    rgb(180 190 230 / 0.28) 100%
  );
}

@media (max-width: 900px) {
  .mesh__blob {
    filter: blur(60px);
  }

  .mesh__blob--3,
  .mesh__blob--4 {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mesh__blob {
    animation: none !important;
    transform: none !important;
    will-change: auto;
  }
}
