/* =========================================
   GLOBAL PARALLAX SYSTEM
========================================= */

.parallax-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;
}

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

.parallax-layer {
  position: absolute;
  inset: 15% 0%;

  will-change: transform;
  transform: translate3d(
    0,
    var(--parallax-y, 0px),
    0
  );
}

.parallax-back {
  z-index: 0;
}

.parallax-middle {
  z-index: 1;
}

.parallax-front {
  z-index: 2;
}

/* =========================================
   BACKGROUND GLOWS
========================================= */

.parallax-glow {
  position: absolute;
  width: 45vw;
  height: 45vw;
  border-radius: 50%;

  filter: blur(100px);
  opacity: 0.25;
}

.glow-one {
  top: 10%;
  left: 5%;

  background: #465cff;
}

.glow-two {
  bottom: 5%;
  right: 5%;

  background: #ffc14d;
}

/* =========================================
   GEOMETRIC ELEMENTS
========================================= */

.parallax-orbit {
  position: absolute;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  transform: rotate(-25deg);
}

.orbit-one {
  width: 500px;
  height: 200px;
  top: 15%;
  right: -5%;
}

.orbit-two {
  width: 350px;
  height: 150px;
  bottom: 10%;
  left: -5%;
}

/* =========================================
   GRID
========================================= */

.parallax-grid {
  position: absolute;
  inset: 0;

  background-image:
    linear-gradient(
      rgba(255,255,255,0.035) 1px,
      transparent 1px
    ),
    linear-gradient(
      90deg,
      rgba(255,255,255,0.035) 1px,
      transparent 1px
    );

  background-size: 60px 60px;

  mask-image: linear-gradient(
    to bottom,
    transparent,
    black 20%,
    black 80%,
    transparent
  );
}

/* =========================================
   CONTENT LAYER
========================================= */

.parallax-content {
  position: relative;
  z-index: 3;
}

/* =========================================
   ACCESSIBILITY
========================================= */

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

/* Less intense on mobile */

@media (max-width: 768px) {
  .parallax-glow {
    width: 80vw;
    height: 80vw;
    filter: blur(65px);
  }

  .parallax-orbit {
    opacity: 0.5;
  }
}
