@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&family=Raleway:ital,wght@0,100..900;1,100..900&display=swap');

:root {
  --darkBlue: #19313e;
  --cream: #ffe4c4;
  --emerald: #40755e;
  --lightEmerald: #97bead;
  --gold: #956d3c;
  --bronze: #634625;
}

body {
  margin: 0;
  padding:0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--lightEmerald);
  font-family: 'Raleway', Arial, Helvetica, sans-serif;
} 
.main {
  position: relative;
  width: 8000px;
}
h1 {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  padding: 0;
  width: 100%;
  text-align: center;
  font-size: 140px;
  text-transform: uppercase;
}
h1:nth-child(2) {
  color: white;
  transition: .5s;
  clip-path: polygon(0 0, 100% 0, 100% 0, 0% 100%);
  background-color: var(--lightEmerald);}
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);
  }