/* ═══════════════════════════════════════════
   OneMobile Cloud — Animations & Effects
   ═══════════════════════════════════════════ */

/* ═══════ SCROLL-TRIGGERED ANIMATIONS ═══════ */
.anim-fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.anim-delay-1 { transition-delay: 0.1s; }
.anim-delay-2 { transition-delay: 0.2s; }
.anim-delay-3 { transition-delay: 0.3s; }
.anim-delay-4 { transition-delay: 0.4s; }
.anim-delay-5 { transition-delay: 0.5s; }

/* ═══════ GLOW PULSE ON FEATURED CARD ═══════ */
.pricing-featured::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: var(--radius);
  background: var(--gradient-main);
  z-index: -1;
  opacity: 0.5;
  animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.3; filter: blur(8px); }
  50% { opacity: 0.6; filter: blur(12px); }
}

/* ═══════ FEATURE CARD BORDER GLOW ═══════ */
.feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  padding: 1px;
  background: linear-gradient(135deg, transparent 0%, transparent 40%, rgba(0, 200, 83, 0.3) 50%, transparent 60%, transparent 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  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;
}

.feature-card {
  position: relative;
  overflow: hidden;
}

.feature-card:hover::before {
  opacity: 1;
}

/* ═══════ SERVICE CARD GRADIENT SWEEP ═══════ */
.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(0, 200, 83, 0.03) 50%, transparent 100%);
  transition: left 0.6s;
}

.service-card:hover::after {
  left: 100%;
}

/* ═══════ STEP CARD GLOW ═══════ */
.step-card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 2px;
  background: var(--gradient-main);
  opacity: 0;
  transition: opacity 0.3s;
}

.step-card {
  position: relative;
}

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

/* ═══════ COUNTER ANIMATION ═══════ */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ NAV LINK UNDERLINE ═══════ */
.nav-links a:not(.nav-cta)::after {
  content: '';
  display: block;
  width: 0;
  height: 2px;
  background: var(--gradient-main);
  transition: width 0.3s;
  margin-top: 2px;
  border-radius: 1px;
}

.nav-links a:not(.nav-cta):hover::after {
  width: 100%;
}

/* ═══════ BUTTON SHIMMER ═══════ */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.15) 50%, transparent 100%);
  transition: left 0.5s;
}

.btn-primary {
  position: relative;
  overflow: hidden;
}

.btn-primary:hover::before {
  left: 100%;
}

/* ═══════ WHATSAPP TYPING INDICATOR ═══════ */
.wa-msg-in:last-child .wa-msg-text::after {
  content: '';
  display: inline-block;
  width: 4px;
  height: 4px;
  background: #8696a0;
  border-radius: 50%;
  margin-left: 4px;
  animation: typingDot 1.4s infinite;
}

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

/* ═══════ FLOATING ELEMENTS ═══════ */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.ai-main-card .ai-visual {
  animation: float 6s ease-in-out infinite;
}

/* ═══════ SECTION DIVIDER GLOW ═══════ */
.features-section::before,
.services-section::before,
.ai-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: var(--gradient-main);
  opacity: 0.3;
}

/* ═══════ PORTAL FRAME SHINE ═══════ */
.portal-frame::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: conic-gradient(from 0deg, transparent 0%, rgba(0, 200, 83, 0.03) 25%, transparent 50%);
  animation: portalSpin 8s linear infinite;
  z-index: -1;
}

.portal-frame {
  position: relative;
}

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

/* ═══════ REDUCED MOTION ═══════ */
@media (prefers-reduced-motion: reduce) {
  .anim-fade-up {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .wave-bar,
  .ai-main-card .ai-visual,
  .scroll-arrow,
  .pricing-featured::before,
  .portal-frame::before {
    animation: none;
  }
}
