.button {
    display: flex;
    padding: 0.75rem 1rem;
    border-radius: 2rem;
    justify-content: center;
    align-items: center;
    width: fit-content;
    font-weight: 400;
    font-size: 1.125rem;
    z-index: 2;
}

.button--gray {
    background-color: #E5E5E5;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.button--gray::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(-100% - 1rem);
  width: calc(100% + 1rem);
  border-radius: 0 2rem 2rem 0;
  height: 100%;
  background-color: #3D3D3D;
  z-index: -1;
  transition: left 0.3s ease;
}

.button--gray:hover::after {
    left: 0;
}

.button--gray:hover {
    color: white;
    background-color: transparent;
}

.button--dark-gray {
    background-color: #3D3D3D;
    color: white;
    position: relative;
    transition: 0.3s;
    overflow: hidden;
}

.button--dark-gray::after {
  content: "";
  position: absolute;
  top: 0;
  left: calc(-100% - 1rem);
  width: calc(100% + 1rem);
  border-radius: 0 2rem 2rem 0;
  height: 100%;
  background-color: #E5E5E5;
  z-index: -1;
  transition: left 0.3s ease;
}

.button--dark-gray:hover::after {
    left: 0;
}

.button--dark-gray:hover {
    color: var(--black);
    background-color: transparent;
}