@import url('https://fonts.googleapis.com/css2?family=Libre+Baskerville:ital,wght@0,400;0,700;1,400&family=PT+Serif:ital,wght@0,400;0,700;1,400;1,700&family=Playwrite+US+Modern:wght@100..400&display=swap');

.contents{
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    flex-direction: column;
}
.content{
    width: 90vw;
    max-width: 1590px;
    background: rgba(255, 255, 255, 0.067); 
    backdrop-filter: blur(2px) saturate(150%);
    -webkit-backdrop-filter: blur(2px) saturate(150%); 
    border: 1px solid rgba(255, 255, 255, 0.151);
    border-radius: 12px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
    margin-top: 20px;
    opacity: 0;
    transform: scale(0.5);
    animation: popIn 2s ease-in-out forwards;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    justify-items: center;
    align-items: center;
}
@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.6);
    }
    60% {
        opacity: 1;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes popbox{
    0% {
        opacity: 0;
        transform: scale(0.6);
    }

    50% {
        opacity: 0;
        transform: scale(0.6);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@media (max-width: 400px) {
    .content{
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
    .card-wrap {
        height: 250px;
    }
}
.card-wrap {
  width: 90%;
  height: 280px;
  transform: perspective(800px);
  transform-style: preserve-3d;
  cursor: pointer;
  margin: 20px 0;
}

.card {
  position: relative;
  width: 100%;
  height: 100%;
  background-color: #333;
  overflow: hidden;
  border-radius: 10px;
  box-shadow: rgba(0, 0, 0, 0.66) 0 30px 60px 0,
              inset #333 0 0 0 5px,
              inset rgba(255, 255, 255, 0.5) 0 0 0 6px;
  
}

.card-bg {
  opacity: 0.5;
  position: absolute;
  top: -20px;
  left: -20px;
  width: calc(100% + 40px);
  height: calc(100% + 40px);
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
  pointer-events: none;
}

.card-info {
  padding: 20px;
  position: absolute;
  bottom: 0;
  color: #fff;
  transform: translateY(40%);
  transition: transform 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.card-info p {
  opacity: 0;
  text-shadow: black 0 2px 3px;
  transition: opacity 0.6s 1.6s cubic-bezier(0.215, 0.61, 0.355, 1);
}

.card-info::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  transform: translateY(100%);
  transition: 5s 1s cubic-bezier(0.445, 0.05, 0.55, 0.95);
  z-index: 0;
}

.card-info * {
  position: relative;
  z-index: 1;
}

.card-info h1 {
  font-family: "Libre Baskerville", serif;
  font-size: 30px;
  padding-bottom: 10px;
  font-weight: 400;
  text-shadow: rgba(0, 0, 0, 0.5) 0 10px 10px;
}

.card-wrap:hover .card-info {
  transform: translateY(0);
  transition-delay: 0s;
}
.card-wrap:hover .card-info p {
  opacity: 1;
  transition-delay: 0.2s;
}
.card-wrap:hover .card-info::after {
  opacity: 1;
  transform: translateY(0);
  transition: 1s ease;
}

.card-wrap:nth-child(1){
    animation: popbox 1.5s ease-in-out;
}

.card-wrap:nth-child(2){
    animation: popbox 2s ease-in-out;
}

.card-wrap:nth-child(3){
    animation: popbox 2.5s ease-in-out;
}

.card-wrap:nth-child(4){
    animation: popbox 3s ease-in-out;
}

.card-wrap:nth-child(5){
    animation: popbox 3.5s ease-in-out;
}

.card-wrap:nth-child(6){
    animation: popbox 4s ease-in-out;
}