@import url("https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap");
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: #833471;
  transition: 0.5s;
}

body::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  background: #ffc312;
  transition: 0.5s;
  clip-path: circle(250px at center);
}

.container {
  position: relative;
  width: 1100px;
  height: 400px;
  /* background: red;  */
}

.container .card {
  width: 300px;
  height: 400px;
  background: #fff;
  position: absolute;
  top: calc(50% - 200px);
  left: 50%;
  border-radius: 10px;
  transform: translateX(-50%) translateY(calc(50px * var(--i))) rotate(40deg)
    skew(-20deg, -10deg) scale(0.6);
  box-shadow: 25px 25px 100px rgba(0, 0, 0, 0.2);

  z-index: calc(-1 * var(--i));
  transition: 0.5s;

  display: flex;
  justify-content: center;
  align-items: center;
}

.container .card:nth-child(2) {
  opacity: 0.8;
}

.container .card:nth-child(3) {
  opacity: 0.6;
}

.container:hover .card {
  position: absolute;
  /* top: 50%; */
  /* left: 50%; */
  z-index: 1;
  opacity: 1;
  transform: translateX(
    calc(-50% + calc(350px * var(--i)))
  ); /* translateY(-50%) rotate(0deg) skew(0deg,0deg) scale(1); */
}

.container .card .content {
  position: relative;
  padding: 25px;
  color: #333;
  transition: 0.5s;
  transform: translateY(50px);
  opacity: 0;
}

.container:hover .card .content {
  opacity: 1;
  transition-delay: calc(0.2s * var(--j));
  transform: translateY(0px);
}

@media (max-width: 991px) {
  body::before {
    clip-path: circle(0px at center);
  }
  .container {
    width: 100%;
    /* height: initial; */
    padding: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
  }
  .container .card {
    position: relative;
    /* top: initial;
    left: initial; */
    transform: initial;
    margin: 20px;
    opacity: 1 !important;
  }
  .container:hover,
  .container:hover .card {
    position: relative;
    top: initial;
    left: initial;
    transform: initial;
  }
  .container .card .content {
    transform: initial;
    opacity: 1;
  }
}
