.image-grid {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-content: center;
  align-items: center;
  justify-content: center;
  max-width: 60%;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  background: #100028;
}

.image-grid__item {
  display: flex;
  flex-direction: column;
  flex-grow: 0;
  flex-shrink: 0;
  flex-basis: 400px;
  align-items: stretch;
  justify-content: center;
  position: relative;
  height: 270px;
  margin-right: 14px;
  margin-bottom: 14px;
  transition: transform 0.14s ease-in, text-shadow 0.1s ease-in;
}
.image-grid__item:before {
  content: "";
  visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: none;
  border-radius: 3px;
  box-shadow: 0 10px 24px 0px rgba(0, 0, 0, 0.06),
    0 8px 20px -2px rgba(0, 0, 0, 0.1), 0 6px 10px -6px rgba(0, 0, 0, 0.2);
  transition: visibility 0.1s ease-out, opacity 0.1s ease-out;
  opacity: 0;
}
.image-grid__item:hover:before {
  visibility: visible;
  opacity: 1;
}

.grid-item {
  display: flex;
  position: relative;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  align-items: stretch;
  justify-content: center;
  text-decoration: none;
  color: #eeeeee;
  overflow: hidden;
}
.grid-item:hover .grid-item__image {
  transform: scale(1.2);
}
.grid-item:hover .grid-item__hover {
  visibility: visible;
  opacity: 1;
}
.grid-item:hover .grid-item__name {
  visibility: visible;
  transform: scale(1);
  opacity: 1;
}

.grid-item__image {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-size: cover;
  background-position: center center;
  transform: scale(1);
  will-change: transform;
  transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 0;
}

.grid-item__hover {
  visibility: hidden;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(rgba(47, 48, 50, 0.2), rgba(47, 48, 50, 0.7));
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.15);
  border-radius: 0;
  transition: visibility 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  opacity: 0;
}

.grid-item__name {
  visibility: hidden;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  flex-shrink: 1;
  align-items: center;
  font-size: 2rem;
  font-weight: 300;
  text-shadow: 0px 0px 30px rgba(0, 0, 0, 0.4), 2px 2px 6px rgba(0, 0, 0, 0.3);
  justify-content: center;
  letter-spacing: 1px;
  transform: scale(0.6);
  transform-origin: center center;
  transition: visibility 0.14s ease-out, opacity 0.14s ease-out,
    transform 0.24s ease;
  opacity: 0;
  text-align: center;
  font-weight: 900;
}
