/* author: Dovydas */
*, *:before, *:after {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

html {
  height: 100%;
}

body {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
      -ms-flex-align: center;
          align-items: center;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
  min-height: 100%;
  background-color: #f5f6f9;
}

.logo-container {
  position: relative;
}

.logo-container:before {
  content: "";
  position: absolute;
  top: calc( 100% - 2px);
  width: 100%;
  height: 4px;
  background-color: #cf0000;
  -webkit-transform-origin: center center;
          transform-origin: center center;
  -webkit-transform: scaleX(0);
          transform: scaleX(0);
  -webkit-animation: line-animation 3s ease infinite alternate;
          animation: line-animation 3s ease infinite alternate;
}

.logo-container h1#page-logo {
  font: bold 8rem 'Arial', sans-serif;
  -webkit-animation: clip-path-reveal-1 3s ease infinite alternate;
          animation: clip-path-reveal-1 3s ease infinite alternate;
}

@-webkit-keyframes line-animation {
  0% {
    -webkit-transform: scaleX(0);
            transform: scaleX(0);
  }
  15% {
    -webkit-transform: scaleX(0);
            transform: scaleX(0);
  }
  20%, 25% {
    -webkit-transform: scaleX(1);
            transform: scaleX(1);
    top: calc( 100% - 2px);
  }
  50% {
    -webkit-transform: scaleX(1);
            transform: scaleX(1);
    top: 0px;
  }
  70% {
    -webkit-transform: scaleX(0.2);
            transform: scaleX(0.2);
    top: 0px;
  }
  80%, 100% {
    -webkit-transform: scaleX(0.2);
            transform: scaleX(0.2);
    top: 0px;
  }
}

@keyframes line-animation {
  0% {
    -webkit-transform: scaleX(0);
            transform: scaleX(0);
  }
  15% {
    -webkit-transform: scaleX(0);
            transform: scaleX(0);
  }
  20%, 25% {
    -webkit-transform: scaleX(1);
            transform: scaleX(1);
    top: calc( 100% - 2px);
  }
  50% {
    -webkit-transform: scaleX(1);
            transform: scaleX(1);
    top: 0px;
  }
  70% {
    -webkit-transform: scaleX(0.2);
            transform: scaleX(0.2);
    top: 0px;
  }
  80%, 100% {
    -webkit-transform: scaleX(0.2);
            transform: scaleX(0.2);
    top: 0px;
  }
}

@-webkit-keyframes clip-path-reveal-1 {
  0%, 25% {
    -webkit-clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
            clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
  }
  50% {
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }
}

@keyframes clip-path-reveal-1 {
  0%, 25% {
    -webkit-clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
            clip-path: polygon(0 100%, 100% 100%, 100% 100%, 0% 100%);
  }
  50% {
    -webkit-clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
            clip-path: polygon(0 0, 100% 0, 100% 100%, 0% 100%);
  }
}
