/* =====================================================================
   SIGMINT BUILDER — animations.css
   Reveal-on-scroll, hover lifts, pulses, spinners and button shine.
   Everything is disabled automatically under prefers-reduced-motion.
   ===================================================================== */

@keyframes sbFadeUp   { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }
@keyframes sbFadeIn   { from { opacity: 0; } to { opacity: 1; } }
@keyframes sbPopIn    { 0% { opacity: 0; transform: scale(.96); } 100% { opacity: 1; transform: none; } }
@keyframes sbPulse    { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }
@keyframes sbSpin     { to { transform: rotate(360deg); } }
@keyframes sbShine    { 0% { left: -60%; } 100% { left: 130%; } }
@keyframes sbShimmer  { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes sbBounce   { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sbDots     { 0%, 20% { opacity: .25; transform: translateY(0); }
                        50%      { opacity: 1;   transform: translateY(-3px); }
                        80%, 100%{ opacity: .25; transform: translateY(0); } }
@keyframes sbProgress { from { width: 0; } to { width: 92%; } }

/* ------------------------------------------------------- reveal */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s cubic-bezier(.2, .7, .3, 1), transform .55s cubic-bezier(.2, .7, .3, 1);
  will-change: opacity, transform;
}
.reveal.in { opacity: 1; transform: none; }

/* ------------------------------------------------------- lifts */
.card-hover,
.stat-card,
.qa,
.option-card {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card-hover:hover,
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.qa:hover        { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.option-card:hover { border-color: var(--brand-300); }

/* ------------------------------------------------------ buttons */
.btn { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute; top: 0; left: -60%;
  width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .28), transparent);
  transform: skewX(-18deg);
}
.btn-primary:hover::after { animation: sbShine .7s ease; }
.btn:active { transform: translateY(1px); }

/* ------------------------------------------------------- status */
.badge-pulse .dot,
.dot-pulse {
  animation: sbPulse 1.6s ease-in-out infinite;
}
.is-loading,
.spinner {
  animation: sbSpin .8s linear infinite;
}
[data-loading-submit] { animation: sbPulse 1s ease-in-out infinite; }

/* --------------------------------------------------- skeletons */
.skeleton {
  background: linear-gradient(90deg, #eef2f7 25%, #f8fafc 37%, #eef2f7 63%);
  background-size: 400px 100%;
  animation: sbShimmer 1.3s linear infinite;
  border-radius: 8px;
}

/* ------------------------------------------------- splash dots */
.pv-splash-dots i,
[data-pv-splash-dots] i {
  animation: sbDots 1.2s infinite;
}
.pv-splash-dots i:nth-child(2),
[data-pv-splash-dots] i:nth-child(2) { animation-delay: .18s; }
.pv-splash-dots i:nth-child(3),
[data-pv-splash-dots] i:nth-child(3) { animation-delay: .36s; }

/* ------------------------------------------- toast & dropdowns */
.toast            { animation: sbPopIn .28s cubic-bezier(.2, .7, .3, 1); }
.user-dropdown,
.dropdown-menu    { animation: sbPopIn .16s ease; }
.panel            { animation: sbFadeIn .3s ease; }
tr[data-href]     { transition: background .15s ease; }

/* ------------------------------------------------- live build */
.build-running .build-icon { animation: sbSpin 1.1s linear infinite; }
.pulse-dot::after {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  margin-left: 6px;
  border-radius: 50%;
  background: currentColor;
  animation: sbPulse 1.4s ease-in-out infinite;
}

/* ------------------------------------------------ progress bar */
.progress i { transition: width .7s cubic-bezier(.2, .7, .3, 1); }

/* --------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
}
