/* Check my videoblog: https://www.youtube.com/watch?v=dQw4w9WgXcQ */

html,
body {
  margin: 0;
  padding: 0;
  cursor: pointer;
}

body {
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-transition: 1s -webkit-filter ease-in;
  transition: 1s -webkit-filter ease-in;
  -o-transition: 1s filter ease-in;
  transition: 1s filter ease-in;
  transition: 1s filter ease-in, 1s -webkit-filter ease-in;
  background-color: #111;
}

.body--invert {
  -webkit-filter: grayscale(1);
          filter: grayscale(1);
}

canvas {
  margin: auto;
  width: 100%;
}

* {
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  -moz-osx-font-smoothing: grayscale;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
}

.super-block {
  position: absolute;
  top: 50%;
  left: 50%;
  -webkit-transform: translate(-50%, -50%);
      -ms-transform: translate(-50%, -50%);
          transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background-color: #fff;
  -webkit-clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
          clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
  -webkit-animation: clipik 6s ease-in-out infinite;
          animation: clipik 6s ease-in-out infinite;
  -webkit-transition: 0.8s border-radius ease-in-out, 0.8s background-color ease-in-out, 0.4s -webkit-transform ease-in-out;
  transition: 0.8s border-radius ease-in-out, 0.8s background-color ease-in-out, 0.4s -webkit-transform ease-in-out;
  -o-transition: 0.4s transform ease-in-out, 0.8s border-radius ease-in-out, 0.8s background-color ease-in-out;
  transition: 0.4s transform ease-in-out, 0.8s border-radius ease-in-out, 0.8s background-color ease-in-out;
  transition: 0.4s transform ease-in-out, 0.8s border-radius ease-in-out, 0.8s background-color ease-in-out, 0.4s -webkit-transform ease-in-out;
}

.super-block--elite{
  border-radius: 100%;
  background-color: turquoise;
}

@-webkit-keyframes clipik {
  0% {
    -webkit-clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);

  }

  20% {
    -webkit-clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
  }

  40% {
    -webkit-clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
            clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 50% 50%, 0 50%);

  }

  60% {
    -webkit-clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);
            clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);

  }
  80%{
    -webkit-clip-path: polygon(0 0, 0 0, 0 100%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);
            clip-path: polygon(0 0, 0 0, 0 100%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);

  }

  100% {
    -webkit-clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);

  }
}

@keyframes clipik {
  0% {
    -webkit-clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);

  }

  20% {
    -webkit-clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 50% 50%, 100% 50%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
  }

  40% {
    -webkit-clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 50% 50%, 0 50%);
            clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 50% 50%, 0 50%);

  }

  60% {
    -webkit-clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);
            clip-path: polygon(0 0, 0 0, 50% 50%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);

  }
  80%{
    -webkit-clip-path: polygon(0 0, 0 0, 0 100%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);
            clip-path: polygon(0 0, 0 0, 0 100%, 100% 100%, 100% 100%, 50% 100%, 100% 0, 0 50%);

  }

  100% {
    -webkit-clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);
            clip-path: polygon(0 0, 50% 0, 100% 0, 100% 50%, 100% 100%, 50% 100%, 0 100%, 0 50%);

  }
}