/* ============================
   PRIMECAPITAL — Animations
   ============================ */

/* ============================
   KEYFRAMES
   ============================ */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: translateY(0); }
}

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

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

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

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

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

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

@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-8px) rotate(0.5deg); }
  66% { transform: translateY(-4px) rotate(-0.3deg); }
}

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

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 230, 168, 0.2); }
  50% { box-shadow: 0 0 40px rgba(0, 230, 168, 0.4), 0 0 80px rgba(0, 230, 168, 0.1); }
}

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

@keyframes rotateGlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

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

@keyframes fadeOutRight {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(120%); opacity: 0; }
}

@keyframes pulseRing {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.5); opacity: 0; }
}

@keyframes pulseWhatsApp {
  0%, 100% { box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4); }
  50% { box-shadow: 0 4px 30px rgba(37, 211, 102, 0.6), 0 0 60px rgba(37, 211, 102, 0.1); }
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

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

@keyframes particleFloat {
  0%, 100% { transform: translateY(0) translateX(0); opacity: 0; }
  10% { opacity: 1; }
  90% { opacity: 1; }
  100% { transform: translateY(-100vh) translateX(100px); opacity: 0; }
}

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

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

@keyframes chartLine {
  from { stroke-dashoffset: 1000; }
  to { stroke-dashoffset: 0; }
}

@keyframes glowPulse {
  0%, 100% { box-shadow: 0 0 5px rgba(0, 230, 168, 0.2), 0 0 10px rgba(0, 230, 168, 0.1); }
  50% { box-shadow: 0 0 20px rgba(0, 230, 168, 0.3), 0 0 40px rgba(0, 230, 168, 0.15), 0 0 60px rgba(0, 230, 168, 0.05); }
}

/* ============================
   SCROLL ANIMATION CLASSES
   ============================ */
.fade-up {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* ============================
   STAGGER CHILDREN
   ============================ */
.stagger-children > * {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0s; }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.2s; }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.3s; }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.4s; }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.5s; }

.stagger-children.visible > * {
  opacity: 1;
  transform: translateY(0);
}

/* ============================
   FLOATING ANIMATIONS
   ============================ */
.floating {
  animation: float 4s ease-in-out infinite;
}

.floating-slow {
  animation: floatSlow 6s ease-in-out infinite;
}

.floating-card.card-1 { animation: float 5s ease-in-out infinite; }
.floating-card.card-2 { animation: float 4s ease-in-out infinite 1s; }
.floating-card.card-3 { animation: float 4.5s ease-in-out infinite 0.5s; }

/* ============================
   GLOW EFFECTS
   ============================ */
.glow-hover:hover {
  animation: pulseGlow 1.5s infinite;
}

.glow-border {
  position: relative;
}

.glow-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent), transparent, var(--gold));
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.glow-border:hover::before {
  opacity: 1;
}

/* ============================
   HEADER ANIMATION STAGGER
   ============================ */
.hero.loaded .hero-badge {
  animation: fadeInDown 0.8s 0.3s both;
}

.hero.loaded .hero-title {
  animation: fadeInUp 0.8s 0.5s both;
}

.hero.loaded .hero-desc {
  animation: fadeInUp 0.8s 0.7s both;
}

.hero.loaded .hero-btns {
  animation: fadeInUp 0.8s 0.9s both;
}

.hero.loaded .hero-stats {
  animation: fadeInUp 0.8s 1.1s both;
}

.hero.loaded .hero-laptop {
  animation: fadeInRight 1s 0.7s both;
}

.scroll-indicator {
  animation: scrollBounce 2s infinite 2s;
}

/* ============================
   GLASS SHINE EFFECT
   ============================ */
.glass-shine {
  position: relative;
  overflow: hidden;
}

.glass-shine::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04), transparent);
  transform: skewX(-25deg);
  transition: left 0.6s;
}

.glass-shine:hover::after {
  left: 150%;
}

/* ============================
   PARALLAX EFFECT
   ============================ */
.parallax {
  transform: translateY(var(--parallax-y, 0));
  transition: transform 0.1s linear;
}

/* ============================
   INFINITE TICKER
   ============================ */
.ticker-infinite {
  display: flex;
  animation: tickerScroll 30s linear infinite;
}

.ticker-infinite:hover {
  animation-play-state: paused;
}

/* ============================
   PAGE TRANSITION
   ============================ */
.page-transition {
  position: fixed;
  inset: 0;
  z-index: 99997;
  pointer-events: none;
  background: var(--primary);
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.page-transition.active {
  transform: translateY(0);
}

/* ============================
   MOUSE GLOW
   ============================ */
.mouse-glow {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 230, 168, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

/* ============================
   CARD HOVER SCALE
   ============================ */
.hover-scale {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.hover-scale:hover {
  transform: scale(1.03);
}

/* ============================
   LOADING ANIMATIONS
   ============================ */
.loading-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

.loading-shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,0.02) 25%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0.02) 75%);
  background-size: 200% 100%;
  animation: shimmer 2s infinite;
}

/* ============================
   REDUCED MOTION
   ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .fade-up, .fade-left, .fade-right, .scale-in {
    opacity: 1;
    transform: none;
  }
}
