@import url("https://fonts.googleapis.com/css?family=Montserrat:100");
html, body, h1 {
  padding: 0;
  margin: 0;
  font-family: "Montserrat", sans-serif;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  touch-action: none;
  background: black;
  color: white;
  width: 100%;
  min-height: 100vh;
  overflow: hidden;
  perspective: 100vmin;
}
body::after {
  content: "";
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: 1;
  box-shadow: inset 0px 0px 400px black, inset 0px 0px 200px black;
}

canvas {
  width: 100%;
  height: 100%;
  touch-action: none;
  position: absolute;
  z-index: 1;
}

#app {
  height: 100vh;
  width: 100%;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-size: cover;
  background-position: center;
  z-index: 2;
}

#wrapper {
  text-align: center;
}

.sub {
  color: #64dcdc;
  letter-spacing: 1em;
}

/* Our mixin positions a copy of our text
directly on our existing text, while
also setting content to the appropriate
text set in the data-text attribute. */
.glitch {
  position: relative;
  color: white;
  font-size: 4em;
  letter-spacing: 0.5em;
  /* Animation provies a slight random skew. Check bottom of doc
  for more information on how to random skew. */
  animation: glitch-skew 1s infinite linear alternate-reverse;
}
.glitch::before {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  left: 2px;
  text-shadow: -2px 0 #ff00c1;
  /* Creates an initial clip for our glitch. This works in
  a typical top,right,bottom,left fashion and creates a mask
  to only show a certain part of the glitch at a time. */
  clip: rect(44px, 450px, 56px, 0);
  /* Runs our glitch-anim defined below to run in a 5s loop, infinitely,
  with an alternating animation to keep things fresh. */
  animation: glitch-anim 5s infinite linear alternate-reverse;
}
.glitch::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  left: -2px;
  text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
  animation: glitch-anim2 1s infinite linear alternate-reverse;
}
/* Creates an animation with 20 steaps. For each step, it calculates 
a percentage for the specific step. It then generates a random clip
box to be used for the random glitch effect. Also adds a very subtle
skew to change the 'thickness' of the glitch.*/
@keyframes glitch-anim {
  0% {
    clip: rect(53px, 9999px, 28px, 0);
    transform: skew(0.79deg);
  }
  5% {
    clip: rect(33px, 9999px, 41px, 0);
    transform: skew(0.3deg);
  }
  10% {
    clip: rect(41px, 9999px, 64px, 0);
    transform: skew(0.36deg);
  }
  15% {
    clip: rect(25px, 9999px, 66px, 0);
    transform: skew(0.46deg);
  }
  20% {
    clip: rect(88px, 9999px, 36px, 0);
    transform: skew(0.46deg);
  }
  25% {
    clip: rect(72px, 9999px, 22px, 0);
    transform: skew(0.53deg);
  }
  30% {
    clip: rect(29px, 9999px, 67px, 0);
    transform: skew(0.34deg);
  }
  35% {
    clip: rect(20px, 9999px, 80px, 0);
    transform: skew(0.31deg);
  }
  40% {
    clip: rect(82px, 9999px, 71px, 0);
    transform: skew(0.64deg);
  }
  45% {
    clip: rect(14px, 9999px, 74px, 0);
    transform: skew(0.45deg);
  }
  50% {
    clip: rect(90px, 9999px, 23px, 0);
    transform: skew(0.47deg);
  }
  55% {
    clip: rect(64px, 9999px, 56px, 0);
    transform: skew(0.42deg);
  }
  60% {
    clip: rect(18px, 9999px, 57px, 0);
    transform: skew(0.21deg);
  }
  65% {
    clip: rect(96px, 9999px, 2px, 0);
    transform: skew(0.16deg);
  }
  70% {
    clip: rect(1px, 9999px, 6px, 0);
    transform: skew(0.34deg);
  }
  75% {
    clip: rect(75px, 9999px, 34px, 0);
    transform: skew(0.06deg);
  }
  80% {
    clip: rect(47px, 9999px, 54px, 0);
    transform: skew(0.53deg);
  }
  85% {
    clip: rect(33px, 9999px, 64px, 0);
    transform: skew(0.62deg);
  }
  90% {
    clip: rect(75px, 9999px, 2px, 0);
    transform: skew(0.8deg);
  }
  95% {
    clip: rect(32px, 9999px, 14px, 0);
    transform: skew(0.57deg);
  }
  100% {
    clip: rect(10px, 9999px, 20px, 0);
    transform: skew(0.69deg);
  }
}
@keyframes glitch-anim2 {
  0% {
    clip: rect(19px, 9999px, 73px, 0);
    transform: skew(0.93deg);
  }
  5% {
    clip: rect(17px, 9999px, 13px, 0);
    transform: skew(0.35deg);
  }
  10% {
    clip: rect(53px, 9999px, 11px, 0);
    transform: skew(0.05deg);
  }
  15% {
    clip: rect(68px, 9999px, 86px, 0);
    transform: skew(0.79deg);
  }
  20% {
    clip: rect(70px, 9999px, 70px, 0);
    transform: skew(0.04deg);
  }
  25% {
    clip: rect(10px, 9999px, 99px, 0);
    transform: skew(0.87deg);
  }
  30% {
    clip: rect(1px, 9999px, 35px, 0);
    transform: skew(0.04deg);
  }
  35% {
    clip: rect(31px, 9999px, 83px, 0);
    transform: skew(0.76deg);
  }
  40% {
    clip: rect(52px, 9999px, 57px, 0);
    transform: skew(0.49deg);
  }
  45% {
    clip: rect(96px, 9999px, 40px, 0);
    transform: skew(0.16deg);
  }
  50% {
    clip: rect(73px, 9999px, 47px, 0);
    transform: skew(0.01deg);
  }
  55% {
    clip: rect(40px, 9999px, 54px, 0);
    transform: skew(0.99deg);
  }
  60% {
    clip: rect(82px, 9999px, 34px, 0);
    transform: skew(0.74deg);
  }
  65% {
    clip: rect(54px, 9999px, 59px, 0);
    transform: skew(0.53deg);
  }
  70% {
    clip: rect(88px, 9999px, 17px, 0);
    transform: skew(0.95deg);
  }
  75% {
    clip: rect(47px, 9999px, 4px, 0);
    transform: skew(0.24deg);
  }
  80% {
    clip: rect(12px, 9999px, 34px, 0);
    transform: skew(0.1deg);
  }
  85% {
    clip: rect(8px, 9999px, 52px, 0);
    transform: skew(0.28deg);
  }
  90% {
    clip: rect(36px, 9999px, 57px, 0);
    transform: skew(0.39deg);
  }
  95% {
    clip: rect(37px, 9999px, 50px, 0);
    transform: skew(0.92deg);
  }
  100% {
    clip: rect(71px, 9999px, 94px, 0);
    transform: skew(0.34deg);
  }
}
@keyframes glitch-skew {
  0% {
    transform: skew(2deg);
  }
  10% {
    transform: skew(-2deg);
  }
  20% {
    transform: skew(-4deg);
  }
  30% {
    transform: skew(0deg);
  }
  40% {
    transform: skew(4deg);
  }
  50% {
    transform: skew(2deg);
  }
  60% {
    transform: skew(0deg);
  }
  70% {
    transform: skew(1deg);
  }
  80% {
    transform: skew(-4deg);
  }
  90% {
    transform: skew(4deg);
  }
  100% {
    transform: skew(5deg);
  }
}