@import url('https://fonts.googleapis.com/css?family=Archivo+Black');

.glitch-wrapper {
  display: none;
  height: 100vh;
  width: 100vw;
  justify-content: center;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  background-color: black;
  font-family: 'Archivo Black', sans-serif;
}

.glitch {
  color: white;
  font-size: 100px;
  text-transform: uppercase;
  position: relative;
  display: inline-block;
}

.glitch::before,
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: black;
}

.glitch::before {
  left: 2px;
  text-shadow: -2px 0 #49FC00;
  clip: rect(24px, 550px, 90px, 0);
  animation: glitch-anim-2 3s infinite linear alternate-reverse;
}

.glitch::after {
  left: -2px;
  text-shadow: -2px 0 magenta;
  clip: rect(85px, 550px, 140px, 0);
  animation: glitch-anim 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
  0% { clip: rect(10px, 9999px, 80px, 0); }
  10% { clip: rect(50px, 9999px, 100px, 0); }
  20% { clip: rect(90px, 9999px, 130px, 0); }
  30% { clip: rect(40px, 9999px, 100px, 0); }
  40% { clip: rect(80px, 9999px, 140px, 0); }
  50% { clip: rect(60px, 9999px, 120px, 0); }
  60% { clip: rect(70px, 9999px, 110px, 0); }
  70% { clip: rect(30px, 9999px, 90px, 0); }
  80% { clip: rect(50px, 9999px, 100px, 0); }
  90% { clip: rect(20px, 9999px, 70px, 0); }
  100% { clip: rect(10px, 9999px, 80px, 0); }
}

@keyframes glitch-anim-2 {
  0% { clip: rect(30px, 9999px, 100px, 0); }
  10% { clip: rect(60px, 9999px, 120px, 0); }
  20% { clip: rect(40px, 9999px, 110px, 0); }
  30% { clip: rect(80px, 9999px, 140px, 0); }
  40% { clip: rect(20px, 9999px, 90px, 0); }
  50% { clip: rect(50px, 9999px, 100px, 0); }
  60% { clip: rect(10px, 9999px, 80px, 0); }
  70% { clip: rect(70px, 9999px, 130px, 0); }
  80% { clip: rect(60px, 9999px, 120px, 0); }
  90% { clip: rect(40px, 9999px, 110px, 0); }
  100% { clip: rect(30px, 9999px, 100px, 0); }
}


@import url('https://fonts.googleapis.com/css2?family=Exo+2:wght@600&display=swap');

.hello-glitch-wrap {
  display: none;
  background: black url('glitch-bg.png') center center no-repeat;
  background-size: contain;
  height: 100vh;
  width: 100vw;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  align-items: center;
  justify-content: center;
  font-family: 'Exo 2', sans-serif;
}

.hello-glitch {
  color: white;
  font-size: 100px;
  font-weight: 600;
  position: relative;
  animation: blur 8s ease-in-out infinite alternate, shift 4s ease-in-out infinite alternate;
}

.hello-glitch::after,
.hello-glitch::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  background: transparent;
  color: transparent;
  clip: rect(0, 900px, 0, 0);
  animation: glitch-anim 3s infinite linear alternate-reverse, shift 4s ease-in-out infinite alternate;
}

.hello-glitch::after {
  left: 3px;
  text-shadow: -1px 0 red;
  z-index: -2;
  opacity: 0.7;
}

.hello-glitch::before {
  left: 1px;
  text-shadow: -3px 0 cyan;
  z-index: -1;
  opacity: 0.8;
}

@keyframes blur {
  0%,40%,50%,60%,90%,95%,100% {
    text-shadow:
      0 -5px 10px rgba(255,255,255,1),
      0 0 5px rgba(255,255,255,0),
      0 0 10px rgba(255,255,255,0),
      2px 1px 15px rgba(100,240,255,0),
      0 0 20px rgba(255,255,255,0);
  }
  45%,75% {
    text-shadow:
      0 -5px 10px rgba(255,255,255,1),
      0 0 5px rgba(255,255,255,1),
      0 0 10px rgba(255,255,255,1),
      2px 1px 15px rgba(100,240,255,1),
      0 0 20px rgba(255,255,255,1);
  }
  97.5% {
    text-shadow:
      0 -5px 10px rgba(255,255,255,0),
      0 0 5px rgba(255,255,255,0),
      0 0 10px rgba(255,255,255,0),
      2px 1px 4px rgba(255,100,100,1),
      0 0 20px rgba(255,255,255,0);
  }
}

@keyframes shift {
  0%,40%,44%,58%,61%,65%,69%,73%,100% {
    transform: skewX(0deg);
  }
  41% { transform: skewX(10deg); }
  42% { transform: skewX(-10deg); }
  59% { transform: skewX(40deg) skewY(10deg); }
  60% { transform: skewX(-40deg) skewY(-10deg); }
  63% { transform: skewX(10deg) skewY(-5deg); }
  70% { transform: skewX(-50deg) skewY(-20deg); }
  71% { transform: skewX(10deg) skewY(-10deg); }
}

@keyframes glitch-anim {
  0%   { clip: rect(0px, 9999px, 50px, 0); }
  10%  { clip: rect(30px, 9999px, 80px, 0); }
  20%  { clip: rect(70px, 9999px, 100px, 0); }
  30%  { clip: rect(10px, 9999px, 60px, 0); }
  40%  { clip: rect(40px, 9999px, 90px, 0); }
  50%  { clip: rect(20px, 9999px, 70px, 0); }
  60%  { clip: rect(60px, 9999px, 110px, 0); }
  70%  { clip: rect(35px, 9999px, 80px, 0); }
  80%  { clip: rect(50px, 9999px, 100px, 0); }
  90%  { clip: rect(15px, 9999px, 65px, 0); }
  100% { clip: rect(0px, 9999px, 50px, 0); }
}
