:root {
  --font-size-big: 4rem;
  --font-size-small: 1.5rem;
  --light: #fff;
  --dark: #191919;
  --gray: #757474;
  --dark-gray: #292929;
  --yellow: #f5d300;
}

body {
  background-color: var(--dark);
  font-family: 'Open Sans', sans-serif;
}

.text {
  opacity: 0;
  position: absolute;
  z-index: 7;
  text-align: center;
  height: calc(var(--font-size-big) * 1.5);
  padding: 0 1rem;
  top: 50%;
  left: 50%;
  font-size: var(--font-size-big);
  font-weight: 700;
  line-height: calc(var(--font-size-big) * 1.5);
  animation: on .6s ease-in-out 3.7s forwards;
  transform: translateX(-50%) translateY(-50%);
}

.splash {
  width: 100vw;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  overflow: hidden;
}
.splash_logo {
  position: absolute;
  margin: 0;
  top: 50vh;
  z-index: 5;
  left: 50vw;
  text-align: center;
  padding: 0 0.5rem;
  height: calc(var(--font-size-small) * 1.5);
  line-height: calc(var(--font-size-small) * 1.5);
  font-size: var(--font-size-small);
  font-weight: 600;
  color: var(--light);
  opacity: 1;
  will-change: opacity;
  transform: translateX(-50%) translateY(-50%);
  animation: logo .3s ease-in 1.5s forwards, off .6s ease-in-out 3.2s forwards;
}
.splash_svg {
  position: relative;
  margin: auto;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  bottom: 0;
  right: 0;
}
.splash_svg svg {
  width: 100%;
  height: 100%;
  backface-visibility: visible;
}
.splash_svg svg rect {
  width: 100%;
  height: 100%;
  fill: var(--yellow);
  stroke: 0;
  clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
  animation: expand .7s ease-in forwards 2.7s;
}
.splash_minimize {
  position: absolute;
  margin: auto;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 4;
}
.splash_minimize svg {
  width: 100%;
  height: 100%;
  backface-visibility: visible;
}
.splash_minimize svg rect {
  width: 100%;
  height: 100%;
  clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
  animation: scale .2s ease-out forwards 1s, hide 1.3s ease-out forwards 1.2s;
}

@keyframes scale {
  100% {
    clip-path: polygon(45vw 40vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
  }
}

@keyframes hide {
  100% {
    fill: transparent;
  }
}

@keyframes off {
  100% {
    opacity: 0;
  }
}

@keyframes on {
  100% {
    opacity: 1;
  }
}

@keyframes logo {
  100% {
    color: var(--dark-gray);
  }
}

@keyframes expand {
  25% {
    clip-path: polygon(0vw 0vh, 55vw 40vh, 55vw 60vh, 45vw 60vh);
    fill: var(--light);
  }
  50% {
    clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 45vw 60vh);
    fill: var(--yellow);
  }
  75% {
    clip-path: polygon(0vw 0vh, 100vw 0vh, 55vw 60vh, 0vw 100vh);
    fill: var(--light);
  }
  100% {
    clip-path: polygon(0vw 0vh, 100vw 0vh, 100vw 100vh, 0vw 100vh);
    fill: var(--yellow);
  }
}
