@import url("https://fonts.googleapis.com/css?family=Spartan&display=swap");
* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  height: 100%;
  margin: 0;
}

body {
  display: contents;
  font-family: "Spartan", sans-serif;
  font-size: 14px;
  align-items: center;
  justify-content: center;
  background-color: #dd1166;
}

@keyframes scale-up {
  from {
    transform: scaleY(1) scaleX(1);
    opacity: 0.5;
  }
  to {
    transform: scaleX(1.3) scaleY(2);
    opacity: 0;
  }
}
.button {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  color: #ffffff;
  border-radius: 40px;
  background-color: #000000;
  cursor: pointer;
  user-select: none;
}
.button__text {
  position: relative;
  margin-right: 12px;
  transition: ease-in-out .18s;
  z-index: 2;
}
.button__icon {
  position: relative;
  transition: ease-in-out .20s;
  z-index: 2;
}
.button:before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  opacity: 0.5;
  border-radius: 40px;
  z-index: -1;
}
.button:after {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: #ffffff;
  z-index: 1;
  transition: ease-in-out .18s;
  transform-origin: center left;
  transform: scaleX(0);
  border-radius: 40px;
}
.button:hover {
  color: #000000;
}
.button:hover:after {
  transform-origin: center right;
  transform: scaleX(1);
  color: #ffffff;
}
.button:hover .button__icon {
  transform: translate3d(400%, 0px, 0px);
  opacity: 0;
}
.button:hover .button__text {
  transform: translate3d(12px, 0px, 0px);
}
.button:active:hover {
  opacity: 0.8;
  transition: opacity ease-in-out .3s;
}
.button.active:before {
  animation: scale-up .3s ease;
}