#background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100dvw;
  height: 100dvh;
  overflow: hidden;
  /* background-image: url("https://stevec.dev/images/phone2.jpg"); */
  background-image: url("https://stevec.dev/images/striped.jpg");
  background-size: cover;
  background-position: center;
  z-index: -1;
}

#background > * {
  position: absolute;
  top: calc(var(--centerShift_y) + var(--gap_top) * var(--ratio));
  left: calc(var(--centerShift_x) + var(--gap_left) * var(--ratio));
  width: calc(var(--clip_w) * var(--ratio));
  height: calc(var(--clip_h) * var(--ratio));
}

.outer {
  width: calc(var(--clip_w) * var(--ratio));
  height: calc(var(--clip_h) * var(--ratio));
  object-fit: cover;
  display: grid;
  place-items: center;
  filter: unset;
  opacity: 0;
  transition: opacity 2s;
  background: var(--white);
  background-position: center;
  background-size: auto
    calc(max(var(--clip_w), var(--clip_h)) * var(--ratio) * 2);
  background-repeat: no-repeat;
  will-change: background-position;
  transform: translateZ(0);
}

#background label:nth-of-type(odd) .outer {
  animation: bg1 8s ease-in-out infinite alternate both;
}
#background label:nth-of-type(even) .outer {
  animation: bg2 9s ease-in-out infinite alternate both;
}
#background label:nth-of-type(3n) .outer {
  animation-direction: alternate-reverse;
}

@keyframes bg1 {
  0% {
    background-position: 0% 0%;
  }
  100% {
    background-position: 100% 100%;
  }
}

@keyframes bg2 {
  0% {
    background-position: 100% 0%;
  }
  100% {
    background-position: 0% 100%;
  }
}
