/* Motion module "logo". Every rule starts with .motion-logo (the class the loader sets on <html> or, in the demo, on the stage). */

/* Parts of the inline logo (site/snippets/logo.php): .logo__splash (yellow), .logo__blot (olive blob behind it), .logo__dot (orange). */
.motion-logo .logo__img g {
  transform-box: fill-box;
  transform-origin: 50% 50%;
}

.motion-logo .motion-logo__play .logo__splash {
  animation: motion-logo-wobble 640ms;
}

.motion-logo .motion-logo__play .logo__blot {
  animation: motion-logo-wobble-back 640ms 60ms;
}

.motion-logo .motion-logo__play .logo__dot {
  animation: motion-logo-pop 480ms 140ms;
}

@keyframes motion-logo-wobble {
  0%   { transform: rotate(0) scale(1);        animation-timing-function: cubic-bezier(0.3, 0.6, 0.4, 1); }
  25%  { transform: rotate(-3deg) scale(1.04); animation-timing-function: cubic-bezier(0.4, 0, 0.4, 1); }
  55%  { transform: rotate(2deg) scale(0.985); animation-timing-function: cubic-bezier(0.4, 0, 0.4, 1); }
  80%  { transform: rotate(-0.8deg) scale(1.01); animation-timing-function: cubic-bezier(0.4, 0, 0.3, 1); }
  100% { transform: rotate(0) scale(1); }
}

@keyframes motion-logo-wobble-back {
  0%   { transform: rotate(0) scale(1);        animation-timing-function: cubic-bezier(0.3, 0.6, 0.4, 1); }
  25%  { transform: rotate(2deg) scale(1.025); animation-timing-function: cubic-bezier(0.4, 0, 0.4, 1); }
  55%  { transform: rotate(-1.5deg) scale(0.99); animation-timing-function: cubic-bezier(0.4, 0, 0.4, 1); }
  100% { transform: rotate(0) scale(1); }
}

@keyframes motion-logo-pop {
  0%   { transform: scale(1);    animation-timing-function: ease-out; }
  22%  { transform: scale(0.78); animation-timing-function: cubic-bezier(0.3, 1.4, 0.5, 1); }
  62%  { transform: scale(1.28); animation-timing-function: ease-in-out; }
  82%  { transform: scale(0.96); animation-timing-function: ease-out; }
  100% { transform: scale(1); }
}
