:root {
  --hero-stack-size: 10;
}

.hero {
  display: grid;
  width: 100%;
  justify-content: center;
  transition: background-color 250ms ease-in-out;
  box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14),
    0 3px 1px -2px rgba(0, 0, 0, 0.2),
    0 1px 5px 0 rgba(0, 0, 0, 0.12)
}

.hero__content {
  display: grid;
  grid-template-columns: 60% 40%;
  max-width: 1100px;
  padding: 3rem;
  margin-bottom: -6em;
  color: #ffffff;
  overflow: hidden;
}

.hero__images {
  display: grid;
  align-items: center;
  justify-content: center;
  grid-template-areas: 'images';
  position: relative;
}

.hero__images img {
  grid-area: images;
  border-radius: 3px;
  width: 300px;
  overflow: hidden;
  will-change: transform, opacity;
  box-shadow: 0 16px 24px 2px rgba(0, 0, 0, 0.14),
    0 6px 30px 5px rgba(0, 0, 0, 0.12),
    0 8px 10px -5px rgba(0, 0, 0, 0.2);
}

.hero__info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin: 0 0 6em 0;
  font-size: 20px;
}

.hero__info h1 {
  font-size: 2.5em;
}

.spare-text {
  font-size: 20px;
  max-width: 900px;
  margin: 6em 3em 3em;
  text-align: center;
}

.hidden {
  animation-name: hidden;
  animation-duration: 350ms;
  animation-timing-function: ease-in-out;
  transform: translateX(0%) scale(0.6);
  z-index: calc(-1 * var(--hero-stack-size));
}

.left {
  animation-name: left;
  animation-duration: 350ms;
  animation-timing-function: ease-in-out;
  transform: translateX(-40%) scale(0.6);
  z-index: calc(3 * var(--hero-stack-size));
}

.center {
  animation-name: center;
  animation-duration: 350ms;
  animation-timing-function: ease-in-out;
  transform: translateX(0%) scale(1);
  z-index: calc(4 * var(--hero-stack-size));
}

.right {
  animation-name: right;
  animation-duration: 350ms;
  animation-timing-function: ease-in-out;
  transform: translateX(40%) scale(0.6);
  z-index: calc(2 * var(--hero-stack-size));
}

@keyframes hidden {
  0% {
    transform: translateX(-40%) scale(0.6);
    z-index: calc(2 * var(--hero-stack-size));
  }
  50% {
    z-index: calc(1 * var(--hero-stack-size));
  }
  100% {
    transform: translateX(0%) scale(0.6);
    z-index: calc(-1 * var(--hero-stack-size));
  }
}

@keyframes left {
  0% {
    transform: translateX(0%) scale(1);
    z-index: calc(4 * var(--hero-stack-size));
  }
  50% {
    z-index: calc(3 * var(--hero-stack-size));
  }
  100% {
    transform: translateX(-40%) scale(0.6);
    z-index: calc(2 * var(--hero-stack-size));
  }
}

@keyframes center {
  0% {
    transform: translateX(40%) scale(0.6);
    z-index: calc(2 * var(--hero-stack-size));
  }
  50% {
    z-index: calc(3 * var(--hero-stack-size));
  }
  100% {
    transform: translateX(0%) scale(1);
    z-index: calc(4 * var(--hero-stack-size));
  }
}

@keyframes right {
  0% {
    transform: translateX(0%) scale(0.6);
    z-index: calc(2 * var(--hero-stack-size));
  }
  100% {
    transform: translateX(40%) scale(0.6);
    z-index: calc(2 * var(--hero-stack-size));
  }
}

@media (max-width: 56em) {
  .hero__content {
    grid-template-columns: 100%;
    margin-bottom: 0;
  }

  .hero__info {
    text-align: center;
    margin: 0;
  }
}

@media (max-width: 26em) {
  .hero__images img {
    width: 80vw;
  }
}
