@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;
  --gold: #956d3c;
  --bronze: #634625;
}

body {
  margin: 0;
  padding:0;
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color:rgb(195, 253, 233);
  font-family: 'Raleway', Arial, Helvetica, sans-serif
}
.loader {
  width: 300px;
  height: 60px;
  border: 7px solid var(--emerald);
  border-radius: 10px;
  text-align: center;
  line-height: 60px;
  position: relative;
  overflow: hidden;
}
span {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  font-size: 48px;
  text-transform: uppercase;
  font-weight: 600;
}
.top-half {
  color: var(--gold);
  animation: split 4s linear 2;
  clip-path: polygon(0 0, 100% 0, 100% 50%, 0 50%);
}
.bottom-half {
  color: var(--darkBlue);
  animation: split 4s linear 2 reverse;
  clip-path: polygon(0 100%, 100% 100%, 100% 50%, 0 50%);

}
@keyframes split {
  0% {transform: translateX(100%);}
  40% {transform: translateX(0);}
  60% {transform: translateX(0);}
  100% {transform: translateX(-100%);}
}