.background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.background::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("../assets/bedge-grunge.png") repeat;
  opacity: 0.5;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.blob {
  position: absolute;
  border-radius: 100%;
  filter: blur(40px);
  opacity: 0.3;
  animation: float 20s infinite alternate ease-in-out;
}

.blob:nth-child(1) {
  background: linear-gradient(to right,
      var(--color-primary),
      var(--color-secondary));
  width: 150vw;
  height: 150vw;
  top: -100%;
  left: -25%;
  animation-delay: 0s;
}

.blob:nth-child(2) {
  background: linear-gradient(to right,
      var(--color-tertiary),
      var(--color-secondary));
  width: 150vw;
  height: 150vw;
  bottom: -100%;
  right: -25%;
  animation-delay: -5s;
}

.blob:nth-child(3) {
  background: linear-gradient(to right,
      var(--color-accent),
      var(--color-primary));
  width: 100vw;
  height: 100vw;
  top: 30%;
  left: -50%;
  animation-delay: -10s;
}

@keyframes float {
  0% {
    transform: translate(0, 0) scale(1);
  }

  50% {
    transform: translate(2%, 2%) scale(1.02);
  }

  100% {
    transform: translate(-2%, -2%) scale(0.98);
  }
}

@media (min-width: 1024px) {
  .blob {
    filter: blur(80px);
    opacity: 0.5;
  }

  .blob:nth-child(1) {
    width: 60vw;
    height: 60vw;
    top: -20%;
    left: -10%;
  }

  .blob:nth-child(2) {
    width: 60vw;
    height: 60vw;
    bottom: -30%;
    right: -10%;
  }

  .blob:nth-child(3) {
    width: 40vw;
    height: 40vw;
    top: 40%;
    left: 30%;
  }
}

@media (min-width: 640px) {
  .blob {
    filter: blur(50px);
    opacity: 0.35;
  }
}

@media (min-width: 768px) {
  .blob {
    filter: blur(60px);
    opacity: 0.4;
    animation: none;
  }

  .blob:nth-child(1) {
    width: 120vw;
    height: 120vw;
    top: -70%;
    left: -20%;
  }

  .blob:nth-child(2) {
    width: 120vw;
    height: 120vw;
    bottom: -70%;
    right: -20%;
  }

  .blob:nth-child(3) {
    width: 80vw;
    height: 80vw;
    top: 30%;
    left: -30%;
  }
}
