* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}

.btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 250px;
  height: 100px;
  font-size: 20px;
  border: 2px solid red;
  background-color: #fff;
  border-radius: 15px;
  cursor: pointer;
  overflow: hidden;
  position: relative;
  color: red;
  transition: color 0.3s;
}

.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  transform: scale(0);
  transform-origin: bottom right;
  background: red;
  border-radius: 13px;
  transition: transform 0.3s ease;
  z-index: 0;
}

.btn:hover::before {
  transform: scale(1);
  transform-origin: top left;
}

.btn span {
  position: relative;
  z-index: 2;
  transform: translateZ(0);
  transition: color 0.3s ease;
}

.btn:hover span {
  color: #fff;
}
