.home-grid {
  display: grid;
  list-style: none;
  grid-gap: 1.5rem;
  line-height: 0;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-flow: dense;
}

.home-grid li {
  position: relative;
  overflow: hidden;
  background: #000;
  line-height: 0;
}

.home-grid a {
  display: block;
  height: 10rem;
}

.home-grid img {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: all .3s;
}

.home-grid figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  color: #fff;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  line-height: 1;
  text-align: center;
  background: rgba(0,0,0,0);
  opacity: 0;
  visibility: hidden;
  transition: all .3s ease;
  z-index: 3;
}

.home-grid li:hover figcaption {
  opacity: 1;
  visibility: visible;
}

@media screen and (max-width: 600px) {
  .home-grid {
    grid-template-columns: 1fr;
  }
}

@media screen and (min-width: 45em) {
  .home-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .home-grid a {
    padding-bottom: 52.65%;
  }
}
