/**
 * Dashboard / app motion layer
 */
@keyframes tacot-fade-up {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes tacot-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes tacot-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -8px, 0); }
}
@keyframes tacot-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(24px, -16px) scale(1.05); }
  66% { transform: translate(-14px, 12px) scale(0.96); }
}
@keyframes tacot-shimmer-bar {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

html.motion-ready body {
  animation: tacot-fade-in 0.4s ease both;
}

.motion-orbs {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.motion-orbs span {
  position: absolute;
  border-radius: 50%;
  filter: blur(52px);
  opacity: 0.28;
  animation: tacot-orb 20s ease-in-out infinite;
}
.motion-orbs span:nth-child(1) {
  width: 380px; height: 380px;
  top: -10%; left: -5%;
  background: rgba(var(--accent-rgb, 88, 101, 242), 0.4);
}
.motion-orbs span:nth-child(2) {
  width: 300px; height: 300px;
  top: 40%; right: -6%;
  background: rgba(235, 69, 158, 0.28);
  animation-delay: -5s;
}
.motion-orbs span:nth-child(3) {
  width: 240px; height: 240px;
  bottom: 0; left: 35%;
  background: rgba(87, 242, 135, 0.12);
  animation-delay: -2s;
}
body > .nav,
body > main,
body > footer,
body > .site-chat {
  position: relative;
  z-index: 1;
}

.reveal {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
.reveal-stagger > .reveal:nth-child(1) { transition-delay: 0.02s; }
.reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.07s; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.12s; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.17s; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.22s; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.27s; }
.reveal-stagger > .reveal:nth-child(7) { transition-delay: 0.32s; }
.reveal-stagger > .reveal:nth-child(8) { transition-delay: 0.37s; }

.card,
.stat-pill,
.person,
.lookup-stat,
.lookup-lifetime-card,
.lookup-result,
.guild-card,
.preset-card {
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 0.25s ease,
    border-color 0.2s ease;
}
.card:hover,
.preset-card:hover,
.guild-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
}
.stat-pill:hover {
  transform: translateY(-2px) scale(1.02);
}
.lookup-lifetime-card {
  animation: tacot-fade-up 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.lookup-lifetime-card:nth-child(1) { animation-delay: 0.05s; }
.lookup-lifetime-card:nth-child(2) { animation-delay: 0.12s; }
.lookup-lifetime-card:nth-child(3) { animation-delay: 0.19s; }

.lookup-xp-fill {
  background-size: 200% 100%;
  animation: tacot-shimmer-bar 2.8s linear infinite;
}

.brand .logo {
  transition: transform 0.3s ease;
}
.brand:hover .logo {
  transform: rotate(-8deg) scale(1.05);
}

.btn {
  transition: transform 0.18s ease, box-shadow 0.18s ease !important;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(0.98); }

.table tbody tr {
  transition: background 0.15s ease, transform 0.15s ease;
}
.table tbody tr:hover {
  background: var(--fill-soft);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .motion-orbs { display: none !important; }
}
