/* 2048 Robot Factory - polish: animations, hover, keyboard focus, reduced motion. */

@keyframes bob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(calc(var(--u) * -0.7));
  }
}
@keyframes scorepop {
  0% {
    opacity: 0;
    transform: translate(-50%, 6px) scale(0.7);
  }
  20% {
    opacity: 1;
    transform: translate(-50%, -6px) scale(1.05);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -34px) scale(1);
  }
}
@keyframes deny {
  0%,
  100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(calc(var(--u) * -1.1));
  }
  75% {
    transform: translateX(calc(var(--u) * 1.1));
  }
}
@keyframes bump {
  0% {
    transform: scale(1);
  }
  35% {
    transform: scale(1.06);
  }
  100% {
    transform: scale(1);
  }
}
@keyframes spin-back {
  to {
    transform: rotate(-360deg);
  }
}
@keyframes twist {
  0% {
    transform: rotate(0);
  }
  50% {
    transform: rotate(-8deg);
  }
  100% {
    transform: rotate(0);
  }
}

.plate.bump,
.combo.bump {
  animation: bump 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.combo.on.bump {
  animation: none;
}
#btn-undo.spin-back .ico {
  animation: spin-back 0.5s ease;
}
#btn-pause.twist {
  animation: twist 0.35s ease;
}
.is-new {
  filter: drop-shadow(0 0 calc(var(--u) * 1.4) rgba(255, 220, 90, 0.8));
}

:focus-visible {
  outline: calc(var(--u) * 0.7) solid #8dffe0;
  outline-offset: calc(var(--u) * 0.6);
  border-radius: calc(var(--u) * 2);
}
.rbtn:focus-visible {
  border-radius: 50%;
}
.pbtn:focus-visible {
  border-radius: 99px;
}
.board:focus-visible {
  outline: none;
}

@media (hover: hover) {
  .rbtn:hover:not(.is-disabled),
  .pbtn:hover {
    filter: brightness(1.08);
    transform: translateY(calc(var(--u) * -0.3));
  }
  .rbtn.is-pressed,
  .pbtn.is-pressed {
    filter: brightness(0.86);
    transform: translateY(calc(var(--u) * 0.5)) scale(0.97);
  }
}

/* reduced motion: only turns off springs, sway and flight; the state stays the same */
.is-reduced .blip,
.is-reduced .menu .logo,
.is-reduced .golden {
  animation: none;
}
.is-reduced .screen,
.is-reduced .card,
.is-reduced .milestone,
.is-reduced .combo,
.is-reduced .badge {
  transition-duration: 0.01s;
}
.is-reduced .bgl {
  transition-duration: 0.01s;
}
@media (prefers-reduced-motion: reduce) {
  .blip,
  .menu .logo,
  .golden {
    animation: none;
  }
  .screen,
  .card,
  .milestone,
  .combo,
  .badge,
  .bgl,
  .g-blip,
  .g-now {
    transition-duration: 0.01s;
  }
  .score-pop {
    animation-duration: 0.01s;
  }
}
/* End of css/05-polimento.css (complete file). */
