$background: black;
$foreground: white;

@import 'bourbon';

@mixin gitchText($offset, $text) {
  content: $text;
  position: absolute;
  left: $offset;
  top: $offset;
  clip: rect(0, 900px, 0, 0); 
  background-color: $background;
  color: $foreground;
  animation: glitch 3s infinite alternate-reverse;
  animation-delay: 4s;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  background-color: black;
  color: white;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: 'Medula One', sans-serif;
  font-size: 3em;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

span:first-child {
  margin-right: 20px;
}

span:last-child {
  color: black;
  background-color: black;
  animation: fadeWhite 4s forwards;
  animation-delay: 2s;
  position: relative;
}
span:last-child:after {
  content: "deepend";
  position: absolute;
  left: 2px;
  top: 2px;
  clip: rect(0, 900px, 0, 0);
  background-color: black;
  color: white;
  animation: glitch 3s infinite alternate-reverse;
  animation-delay: 4s;
}
span:last-child:before {
  content: "deepend";
  position: absolute;
  left: -2px;
  top: -2px;
  clip: rect(0, 900px, 0, 0);
  background-color: black;
  color: white;
  animation: glitch 3s infinite alternate-reverse;
  animation-delay: 4s;
}

@keyframes fadeWhite {
  100% {
    color: white;
  }
}
@keyframes glitch {
  0% {
    clip: rect(23px, 9999px, 59px, 0);
  }
  5% {
    clip: rect(6px, 9999px, 89px, 0);
  }
  10% {
    clip: rect(77px, 9999px, 1px, 0);
  }
  15% {
    clip: rect(58px, 9999px, 49px, 0);
  }
  20% {
    clip: rect(39px, 9999px, 50px, 0);
  }
  25% {
    clip: rect(39px, 9999px, 72px, 0);
  }
  30% {
    clip: rect(22px, 9999px, 97px, 0);
  }
  35% {
    clip: rect(94px, 9999px, 35px, 0);
  }
  40% {
    clip: rect(3px, 9999px, 67px, 0);
  }
  45% {
    clip: rect(28px, 9999px, 29px, 0);
  }
  50% {
    clip: rect(77px, 9999px, 91px, 0);
  }
  55% {
    clip: rect(14px, 9999px, 62px, 0);
  }
  60% {
    clip: rect(64px, 9999px, 44px, 0);
  }
  65% {
    clip: rect(49px, 9999px, 50px, 0);
  }
  70% {
    clip: rect(72px, 9999px, 41px, 0);
  }
  75% {
    clip: rect(10px, 9999px, 95px, 0);
  }
  80% {
    clip: rect(88px, 9999px, 24px, 0);
  }
  85% {
    clip: rect(13px, 9999px, 27px, 0);
  }
  90% {
    clip: rect(46px, 9999px, 50px, 0);
  }
  95% {
    clip: rect(63px, 9999px, 60px, 0);
  }
  100% {
    clip: rect(89px, 9999px, 28px, 0);
  }
}