*,
*::after,
*::before {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.image-wrapper > img {
  display: block;
  max-width: 100%;
}

main {
  display: grid;
  place-items: center;
  min-height: 30vh;
  width: 100%;
  border: 8px white solid;
  box-shadow: 3px 3px 7px rgba(0,0,0,.5);
  margin-bottom: 25px;

  animation: fade-up 1s ease-in-out backwards;
  animation-timeline: view();
  animation-range-start: cover;
  animation-range-end: 300px;
}


#main-first {
  animation-delay: 1s;
}
#main-second {
  animation-delay: 3s;
}
#main-third {
  animation-delay: 5s;
}
#main-fourth {
  animation-delay: 1s;
}
#main-fifth {
  animation-delay: 3s;
}
#main-sixth {
  animation-delay: 5s;
}
#main-seventh {
  animation-delay: 1s;
}
#main-eighth {
  animation-delay: 3s;
}
#main-ninth {
  animation-delay: 5s;
}

.image-wrapper {
  display: grid;
  place-content: center;
  position: relative;
  overflow: hidden;
  border-radius: 0rem;
  --position: 50%;
}

.image-container {
  max-width: 100%;
  max-height: auto;
  aspect-ratio: 1/1;
}

.slider-image {
  width: 100%;
  height:100%;
  object-fit: cover;
  object-position: left;
}

.image-before {
  position: absolute;
  inset: 0;
  width: var(--position);
  /*filter: grayscale(100%)*/
}

.slider {
  position: absolute;
  inset: 0;
  cursor: pointer;
  opacity: 0;
  /* for Firefox */
  width: 100%;
  height: 100%;
}


.slider-line {
  position: absolute;
  inset: 0;
  width: .2rem;
  height: 100%;
  background-color: #fff;
  /* z-index: 10; */
  left: var(--position);
  transform: translateX(-50%);
  pointer-events: none;
}

.slider-button {
  position: absolute;
  background-color: #fff;
  color: black;
  padding: .5rem;
  border-radius: 100vw;
  display: grid;
  place-items: center;
  top: 50%;
  left: var(--position);
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 100;
  box-shadow: 1px 1px 1px hsl(0, 50%, 2%, .5);
}

/* KEYFRAME ANIMATIONS */

@keyframes fade-in { 
  from {scale: .8; opacity: 0;}
  to {scale: 1; opacity: 1;}
}

@keyframes fade-up {
  0% {
    transform: translateY(100px);
    opacity: 0;
  }
  100% {
    transform: translateY(0);
    opacity: 1;
  }
}
@media(prefers-reduced-motion){
  main {
    transition: none;
  }
}