@import url("https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Rubik", sans-serif;
}

body {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.menu__box {
  display: inline-flex;
  width: 250px;
  height: 400px;

  position: relative;
}

.menu__btn {
  display: inline-flex;
  flex-direction: column;
  width: 50px;
  height: 40px;
  background-color: #54cdff;
  border: none;
  cursor: pointer;
  outline: none;

  transition: border-radius 0.5s;

  position: absolute;
  right: 0;
  top: 0;
}

.menu__btn.--active {
  border-radius: 17px 17px 0 0;
}

.menu__btn::before {
  content: "";
  width: 50px;
  height: 7px;
  background-color: #7200fe;

  transform-origin: left bottom;
  transition: 0.5s;

  margin-bottom: auto;
}
.menu__btn.--active::before {
  width: 40px;
  border-radius: 3px;

  transform: rotate(38deg) translate(8px, -1px);
}

.menu__btn::after {
  content: "";
  width: 50px;
  height: 7px;
  background-color: #7200fe;
  
  transform-origin: center;
  transition: 0.5s;

  margin-bottom: auto;
}
.menu__btn.--active::after {
  width: 40px;
  border-radius: 3px;

  transform: rotate(141deg) translate(-5px, -1px);
}

.menu {
  display: inline-flex;
  width: 50px;
  height: 7px;
  background-color: #7200fe;
  overflow: hidden;

  transition: width 0.5s, height 0.5s, transform 0.5s, border-radius 0.5s;
  transition-delay: 0.5s, 1s, 1.5s, 1s;
  transform-origin: right top;
  transform: rotate(0deg) translateY(0%);

  position: absolute;
  right: 0;
  top: 40px;
}
.menu.--active {
  width: 400px;
  height: 250px;
  border-radius: 27px 27px 0 27px;

  transition-delay: 1.5s, 0.75s, 0s, 0.75s;
  transform: rotate(-90deg) translateY(-100%);
}

.menu::after {
  content: "";
  height: 100%;
  width: 100%;
  background-image: linear-gradient(111deg, #7200fe 0%, #54cdff 100%);
  clip-path: circle(0px at 100% 100%);

  transition: clip-path 1.5s;
  transition-delay: 0s;

  position: absolute;
}

.menu.--active::after {
  clip-path: circle(500px at 100% 100%);

  transition: clip-path 2s;
  transition-delay: 1.4s;
}

.menu ul {
  display: inline-flex;
  width: 250px;
  height: 400px;   
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  
  transform: rotate(90deg);
  transform-origin: 200px 200px;
  transition: opacity 1s;
  transition-delay: 0s;

  position: relative;
  z-index: 10;
}
.menu.--active ul {
  opacity: 1;

  transition: opacity 1.5s;
  transition-delay: 2s;
}

.menu ul li {
  line-height: 160%;
  font-size: 24px;
  text-align: center;
}

.menu ul li:hover {
  font-weight: 600;

  transition: 0.3s;
}

.menu ul li a {
  color: white;
  text-decoration: none;
}
