body {
  margin: 0;
  padding: 0;
  height: 100vh;
  background-color: #ffffff;
  color: #222;
}

main {
  padding: 1rem 2rem;
}

ul {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 80px;
  gap: 2.5rem;
  padding: 1rem;
}

li {
  list-style: none;
}

a {
  display: block;
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  background-color: #ffc4e5;
  color: #222;
  transform: translate(0, 0) rotateY(0) skewY(0);
  transition: all 0.2s ease-in;
  cursor: pointer;
}

a:hover {
  color: #fff;
  transform: translate(-15px, -5px) rotateY(-15deg) skewY(-10deg);
}

a span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translate(0, 0);
  transition: all 0.2s ease-in;
}

a .label {
  display: flex;
  justify-content: center;
  align-items: center;
}

/* line */
a span:nth-of-type(4) {
  border-top: 1px solid #222;
  border-left: 1px solid #222;
  transform: translate(-4px, -4px);
  opacity: 0.5;
}

a span:nth-of-type(4)::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  border-bottom: 1px solid #222;
  transition: all 0.2s ease-in;
}

a span:nth-of-type(4)::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  height: 0;
  border-right: 1px solid #222;
  transition: all 0.2s ease-in;
}

/* hover */

a:hover span:nth-of-type(1) {
  transform: translate(8px, 4px);
  background-color: #e08dbb;
}

a:hover span:nth-of-type(2) {
  transform: translate(16px, 8px);
  background-color: #bd6093;
}

a:hover span:nth-of-type(3) {
  transform: translate(24px, 12px);
  background-color: #94386a;
}

a:hover span:nth-of-type(4) {
  transform: translate(30px, 16px);
  transition-delay: 0.2s;
}

a:hover span:nth-of-type(4)::before {
  width: 100%;
  transition-delay: 0.4s;
}

a:hover span:nth-of-type(4)::after {
  height: 100%;
  transition-delay: 0.6s;
  top: 0;
}

/*tablet*/
@media (max-width: 1200px) {
  ul {
    grid-template-columns: repeat(3, 1fr);
  }
}

/*tablet*/
@media (max-width: 1023px) {
  ul {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*mobile*/
@media (max-width: 700px) {
  ul {
    grid-template-columns: repeat(1, 1fr);
    grid-auto-rows: 70px;
    gap: 2rem;
  }
}
