@import url('https://fonts.googleapis.com/css2?family=Permanent+Marker&display=swap');
html{
  height: 100%;
}

.cardcontainer{
  height: 100%;
  display: flex;
  place-items: center;
  justify-content: space-evenly;
  background-color: #000;
}
.card{
  display: grid;
  grid-template-columns: 300px;
  grid-template-rows: 300px;
  overflow: hidden;
  width: 300px;
  height: 300px;
  box-shadow: 0 0 40px rgb(226, 224, 224);
  margin-top: 5%;
  margin-bottom: 2%;
}
.card img{
  width: 100%;
  grid-area: 1 / 1 / span 1 / span 1;
  transition: 0.3s ease-out;
}
.card p{
  z-index: 111;
  color: #fff;
  grid-area: 1 / 1 / span 1 / span 1;
}
.card .text{
  z-index: 111;
  color: #fff;
  grid-area: 1 / 1 / span 1 / span 1;
}
.text{
  height: 100%;
  width: 100%;
  display: flex;
  place-items: center;
  justify-content: center;
  font-family: permanent marker;
  font-size: 1em;
  text-align: center;
  transition: 0.3s ease-out;
}
.card:hover img{
  transform: scale(1.2, 1.2);
}
.card:hover .text{
  background-color: rgba(0,0,0,.5);
}