@import url("https://fonts.googleapis.com/css2?family=Share+Tech+Mono&display=swap");

#display {
  background-color: #000;
  overflow: hidden;
}

.grid-container h1 {
  color: green;
  font-family: "Share Tech Mono", "Cascadia Code", Menlo, Monaco, "Courier New",
    monospace;
  font-size: 6rem;
  filter: drop-shadow(0px 0px 5px currentColor);

  &::after {
    content: "";
    display: inline-block;
    width: 0.2em;
    height: 0.7em;
    background-color: currentColor;
    margin-left: 0.1em;
    animation: blink 1s linear infinite forwards;
    vertical-align: baseline;
  }
}

.grid-container {
  --grid: 10rem;
  width: 100%;
  min-height: 150vh;
  position: absolute;
  top: 0;
  left: 0;
  margin-top: 5rem;
  transform-style: preserve-3d;
  perspective: 100rem;
  animation: rotate 100s linear infinite forwards;
  /* overflow:hidden; */

  .plane {
    --dir: 1;
    width: 300%;
    height: 150%;
    min-height: 70rem;
    position: absolute;
    bottom: 0;
    transform-style: preserve-3d;
    transform-origin: bottom center;
    transform: translateX(-50%) rotateX(85deg);

    &:last-child {
      --dir: -1;
      top: 0;
      transform-origin: top center;
      transform: translateX(-50%) rotateX(-85deg);

      & > * {
        &::after {
          background-image: linear-gradient(
            to top,
            rgba(0, 0, 0, 255) var(--grid),
            rgba(0, 0, 0, 0)
          );
        }
      }
    }

    & > * {
      transform-style: preserve-3d;
      height: 100%;
      width: 100%;
      position: absolute;

      &::before,
      &::after {
        content: "";
        display: block;
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;
      }

      &::before {
        background-image: repeating-linear-gradient(
            to left,
            #ff4d5a,
            #ff4d5a 4px,
            transparent 4px,
            transparent var(--grid)
          ),
          repeating-linear-gradient(
            to bottom,
            #ff4d5a,
            #ff4d5a 4px,
            transparent 4px,
            transparent var(--grid)
          );
        animation: move 1s linear infinite forwards;
      }

      &::after {
        background-image: linear-gradient(
          to bottom,
          rgba(0, 0, 0, 255) var(--grid),
          rgba(0, 0, 0, 0)
        );
        z-index: 1;
        transform: translateZ(1px);
      }
    }

    .glow {
      filter: blur(1rem);
      z-index: 1;
      mix-blend-mode: plus-lighter;
    }
  }
}

@keyframes move {
  from {
    transform: translateY(0px);
  }

  to {
    transform: translateY(calc(var(--grid) * var(--dir)));
  }
}

@keyframes blink {
  0% {
    visibility: visible;
  }

  50% {
    visibility: visible;
  }

  51% {
    visibility: hidden;
  }

  100% {
    visibility: hidden;
  }
}

.image-container {
  /* position: absolute; */
  top: 0;
  left: 0;
  text-align: center;
  /* margin-top: -100rem; */
  align-items: center;
  justify-content: center;
}

.img-contain {
  /* position: absolute; */
  /* padding-top: -10rem; */
  margin-top: 4rem;
  gap: 2rem;
  display: flex;
  justify-content: space-between;
}

.img-contain2 {
  /* position: absolute; */
  /* padding-top: -10rem; */
  margin-top: 4rem;
  gap: 2rem;
  display: flex;
  justify-content: space-between;
}

.img-contain2 img {
  width: 150px;
  /* padding: 2rem; */
  border: 10px solid white;
}

.img-contain2 img:nth-child(1) {
  transform: rotate(-10deg);
}
.img-contain2 img:nth-child(2) {
  transform: rotate(10deg);
}

.img-contain3 {
  /* position: absolute; */
  /* padding-top: -10rem; */
  margin-top: 4rem;
  gap: 2rem;
  display: flex;
  justify-content: space-between;
}

.img-contain3 img {
  width: 150px;
  /* padding: 2rem; */
  border: 10px solid white;
}

.img-contain3 img:nth-child(1) {
  transform: rotate(-10deg);
}
.img-contain3 img:nth-child(2) {
  transform: rotate(10deg);
}

.img-contain img {
  width: 150px;
  /* padding: 2rem; */
  border: 10px solid white;
}

.img-contain img:nth-child(1) {
  transform: rotate(-10deg);
}
.img-contain img:nth-child(2) {
  transform: rotate(10deg);
}
