/* ============================================================
   BÓVEDA DIGITAL — Animations & Micro-interactions
   ============================================================ */

/* ---- Keyframes ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-12px); }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(108, 99, 255, 0); }
  100% { box-shadow: 0 0 0 0 rgba(108, 99, 255, 0); }
}

@keyframes pulse-gold {
  0% { box-shadow: 0 0 0 0 rgba(245, 200, 66, 0.4); }
  70% { box-shadow: 0 0 0 16px rgba(245, 200, 66, 0); }
  100% { box-shadow: 0 0 0 0 rgba(245, 200, 66, 0); }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes bounce-in {
  0% { transform: scale(0); opacity: 0; }
  60% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(1); }
}

@keyframes glitch {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-2px, 1px); }
  40% { transform: translate(2px, -1px); }
  60% { transform: translate(-1px, 2px); }
  80% { transform: translate(1px, -2px); }
}

@keyframes orbit {
  from { transform: rotate(0deg) translateX(80px) rotate(0deg); }
  to { transform: rotate(360deg) translateX(80px) rotate(-360deg); }
}

@keyframes gradient-shift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes border-pulse {
  0%, 100% { border-color: rgba(108, 99, 255, 0.3); }
  50% { border-color: rgba(245, 200, 66, 0.6); }
}

@keyframes count-up {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---- Utility Animation Classes ---- */
.animate-float { animation: float 4s ease-in-out infinite; }
.animate-pulse-ring { animation: pulse-ring 2s ease-out infinite; }
.animate-pulse-gold { animation: pulse-gold 2s ease-out infinite; }
.animate-spin { animation: spin 1s linear infinite; }
.animate-bounce-in { animation: bounce-in 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) forwards; }
.animate-shimmer {
  background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.06) 50%, transparent 100%);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* ---- Magnetic Button Effect ---- */
.btn-magnetic {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}

/* ---- 3D Card Tilt ---- */
.tilt-card {
  transform-style: preserve-3d;
  transform: perspective(1000px);
  transition: transform 0.1s ease;
}

.tilt-card__content {
  transform: translateZ(20px);
}

/* ---- Gradient Text Animation ---- */
.text-animated-gradient {
  background: linear-gradient(
    270deg,
    var(--accent-indigo-light),
    var(--accent-gold),
    var(--accent-indigo-light)
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 4s linear infinite;
}

/* ---- Number Counter ---- */
.counter { display: inline-block; }

/* ---- Typewriter ---- */
.typewriter::after {
  content: '|';
  animation: blink 0.8s step-end infinite;
  color: var(--accent-gold);
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* ---- Progress Bar Fill Animation ---- */
.progress-animated .progress-bar__fill {
  animation: fillBar 1.5s ease-out forwards;
  width: 0 !important;
}

@keyframes fillBar {
  to { width: var(--target-width); }
}

/* ---- Card Hover Glow ---- */
.card-glow {
  position: relative;
}

.card-glow::after {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--accent-indigo), transparent, var(--accent-gold));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.card-glow:hover::after { opacity: 1; }

/* ---- Orbit Decoration ---- */
.orbit-container {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.orbit-dot {
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-indigo);
}

.orbit-dot--1 { animation: orbit 4s linear infinite; }
.orbit-dot--2 { animation: orbit 6s linear infinite reverse; background: var(--accent-gold); }

/* ---- Page Transition ---- */
.page-transition {
  animation: fadeIn 0.4s ease both;
}

/* ---- Reveal Variants ---- */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.93);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal-left.visible,
.reveal-right.visible,
.reveal-scale.visible {
  opacity: 1;
  transform: none;
}

/* ---- Hero Floating Elements ---- */
.hero-float-1 { animation: float 5s ease-in-out infinite; }
.hero-float-2 { animation: float 7s ease-in-out 1s infinite; }
.hero-float-3 { animation: float 6s ease-in-out 2s infinite; }

/* ---- Live Indicator ---- */
.live-dot {
  display: inline-block;
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse-live 2s ease-in-out infinite;
}

@keyframes pulse-live {
  0%, 100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.4); transform: scale(1); }
  50% { box-shadow: 0 0 0 8px rgba(34, 197, 94, 0); transform: scale(1.1); }
}

/* ---- Skeleton Pulse ---- */
@keyframes skeleton-pulse {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

.loading-pulse { animation: skeleton-pulse 1.5s ease-in-out infinite; }

/* ---- Notification Bell ---- */
@keyframes bell-shake {
  0%, 100% { transform: rotate(0deg); }
  10%, 30%, 50%, 70%, 90% { transform: rotate(8deg); }
  20%, 40%, 60%, 80% { transform: rotate(-8deg); }
}

.bell-animate { animation: bell-shake 0.8s cubic-bezier(0.36, 0.07, 0.19, 0.97); }

/* ---- Stagger Children ---- */
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ---- Vault Door Effect ---- */
.vault-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  animation: vault-spin 8s linear infinite;
}

@keyframes vault-spin {
  0% { filter: drop-shadow(0 0 6px rgba(108, 99, 255, 0.5)); }
  50% { filter: drop-shadow(0 0 12px rgba(245, 200, 66, 0.5)); }
  100% { filter: drop-shadow(0 0 6px rgba(108, 99, 255, 0.5)); }
}

/* ---- Reduced Motion Overrides ---- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .hero__title,
  .hero__subtitle,
  .hero__eyebrow,
  .hero__actions,
  .hero__stats {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
