body {
  margin: 0;
  padding: 0;
  background-color: #c8d6e5;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
}

.main {
  position: relative;
  width: 800px;
}

h1{
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  font-size: 220px;
  text-transform: uppercase;
}

h1:nth-child(2) {
  color: white;
  transition: 0.5s;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0% 100%);
  background-color: #c8d6e5;
}

h1:nth-child(2):hover {
  clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);

}

h1:nth-child(1):hover ~ h1 {
  clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);

}