/**
 * ==============================================
 * Experimental: Gooey Effect
 * Dot Gathering
 * ==============================================
 */

@dot-color-hsl: hsl(0, 100%, 0%);

@d: 50px;

.dot-gathering {
  .dot(@width: 12px, @height: 12px, @radius: 6px, @bg-color: @dot-color-hsl, @color: transparent);

  position: relative;
  margin: -1px 0;
  filter: blur(2px);

  &::before,
  &::after {
    .dot(@width: 12px, @height: 12px, @radius: 6px, @bg-color: @dot-color-hsl, @color: transparent);

    content: '';
    display: inline-block;
    position: absolute;
    top: 0;
    left: -@d;
    opacity: 0;
    filter: blur(2px);
    animation: dot-gathering 2s infinite ease-in;
  }

  &::after {
    animation-delay: .5s;
  }
}

@keyframes dot-gathering {
  0% {
    opacity: 0;
    transform: translateX(0);
  }

  35%,
  60% {
    opacity: 1;
    transform: translateX(@d);
  }

  100% {
    opacity: 0;
    transform: translateX(@d * 2);
  }
}
