/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1), transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-36px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-left.revealed { opacity: 1; transform: translateX(0); }

.reveal-right {
  opacity: 0;
  transform: translateX(36px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal-right.revealed { opacity: 1; transform: translateX(0); }

.reveal-scale {
  opacity: 0;
  transform: scale(0.94) translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.reveal-fade {
  opacity: 0;
  transition: opacity 0.9s ease;
}
.reveal-fade.revealed { opacity: 1; }

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }
.reveal-delay-4 { transition-delay: 0.32s; }
.reveal-delay-5 { transition-delay: 0.4s; }

/* Stagger children */
.stagger-children > * {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}
.stagger-children.revealed > *:nth-child(1) { transition-delay: 0.05s; opacity: 1; transform: none; }
.stagger-children.revealed > *:nth-child(2) { transition-delay: 0.12s; opacity: 1; transform: none; }
.stagger-children.revealed > *:nth-child(3) { transition-delay: 0.19s; opacity: 1; transform: none; }
.stagger-children.revealed > *:nth-child(4) { transition-delay: 0.26s; opacity: 1; transform: none; }
.stagger-children.revealed > *:nth-child(5) { transition-delay: 0.33s; opacity: 1; transform: none; }
.stagger-children.revealed > *:nth-child(6) { transition-delay: 0.4s; opacity: 1; transform: none; }

/* Trust items animate in */
.trust-bar.revealed .trust-item {
  animation: trustPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.trust-bar.revealed .trust-item:nth-child(1) { animation-delay: 0.05s; }
.trust-bar.revealed .trust-item:nth-child(2) { animation-delay: 0.12s; }
.trust-bar.revealed .trust-item:nth-child(3) { animation-delay: 0.19s; }
.trust-bar.revealed .trust-item:nth-child(4) { animation-delay: 0.26s; }
.trust-bar.revealed .trust-item:nth-child(5) { animation-delay: 0.33s; }
@keyframes trustPop {
  from { opacity: 0; transform: scale(0.85); }
  to { opacity: 1; transform: scale(1); }
}

/* Hero entrance */
.hero-content .hero-badge { animation: heroFadeUp 0.9s ease 0.1s both; }
.hero-content .hero-title { animation: heroFadeUp 1s ease 0.25s both; }
.hero-content .hero-subtitle { animation: heroFadeUp 1s ease 0.4s both; }
.hero-content .hero-cta { animation: heroFadeUp 1s ease 0.55s both; }
.hero-content .hero-stats { animation: heroFadeUp 1s ease 0.7s both; }

@keyframes heroFadeUp {
  from { opacity: 0; transform: translateY(36px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero ambient */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
}
.hero-glow-1 {
  width: 420px; height: 420px;
  background: rgba(248, 188, 21, 0.18);
  top: 10%; left: -8%;
  animation: floatGlow 12s ease-in-out infinite;
}
.hero-glow-2 {
  width: 300px; height: 300px;
  background: rgba(248, 188, 21, 0.1);
  bottom: 15%; right: -5%;
  animation: floatGlow 14s ease-in-out infinite reverse;
}
@keyframes floatGlow {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -20px) scale(1.08); }
}

.hero-particles {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}
.hero-particles span {
  position: absolute;
  width: 4px; height: 4px;
  background: var(--brand-yellow);
  border-radius: 50%;
  opacity: 0.35;
  animation: particleFloat 8s ease-in-out infinite;
}
.hero-particles span:nth-child(1) { top: 20%; left: 15%; }
.hero-particles span:nth-child(2) { top: 45%; left: 75%; width: 6px; height: 6px; animation-delay: 1.5s; }
.hero-particles span:nth-child(3) { top: 70%; left: 40%; animation-delay: 3s; }
.hero-particles span:nth-child(4) { top: 30%; left: 55%; animation-delay: 4.5s; }
.hero-particles span:nth-child(5) { top: 60%; left: 85%; animation-delay: 2s; }
@keyframes particleFloat {
  0%, 100% { transform: translateY(0); opacity: 0.2; }
  50% { transform: translateY(-24px); opacity: 0.55; }
}

.hero-bg { transition: transform 0.1s linear; will-change: transform; }

/* Card shine on hover (desktop) */
.service-card::before,
.feature-card::before,
.ref-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(105deg, transparent 40%, rgba(248, 188, 21, 0.08) 50%, transparent 60%);
  opacity: 0;
  pointer-events: none;
}
.service-card, .feature-card, .ref-card { position: relative; overflow: hidden; }
@media (hover: hover) {
  .service-card:hover::before, .feature-card:hover::before, .ref-card:hover::before {
    opacity: 1;
    animation: cardShine 1s ease;
  }
}
@keyframes cardShine {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Icon bob */
.service-icon { animation: iconBob 4s ease-in-out infinite; }
@keyframes iconBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Section title line */
.section-title::after {
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.15s;
}
.section-title.revealed::after,
.revealed .section-title::after,
.reveal.revealed .section-title::after {
  transform: scaleX(1);
}

.mwm-divider.revealed,
.reveal.revealed .mwm-divider {
  transform: scaleX(1);
}

/* Pulse buttons */
@keyframes pulse-brand {
  0%, 100% { box-shadow: 0 0 0 0 rgba(248, 188, 21, 0.45); }
  50% { box-shadow: 0 0 0 12px rgba(248, 188, 21, 0); }
}
.btn-brand-pulse { animation: pulse-brand 2.5s infinite; }

/* Shimmer */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
.loading-shimmer {
  background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-elevated) 50%, var(--bg-card) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

.fade-in { animation: fadeIn 0.6s ease forwards; }
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Compliance badges */
.compliance-badge {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.compliance-badges.revealed .compliance-badge {
  opacity: 1;
  transform: scale(1);
}
.compliance-badges.revealed .compliance-badge:nth-child(1) { transition-delay: 0.05s; }
.compliance-badges.revealed .compliance-badge:nth-child(2) { transition-delay: 0.12s; }
.compliance-badges.revealed .compliance-badge:nth-child(3) { transition-delay: 0.19s; }
.compliance-badges.revealed .compliance-badge:nth-child(4) { transition-delay: 0.26s; }

/* Process steps */
.process-card {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.process-row.revealed .process-card {
  opacity: 1;
  transform: translateY(0);
}
.process-row.revealed .process-card:nth-child(1) { transition-delay: 0.08s; }
.process-row.revealed .process-card:nth-child(2) { transition-delay: 0.16s; }
.process-row.revealed .process-card:nth-child(3) { transition-delay: 0.24s; }
.process-row.revealed .process-card:nth-child(4) { transition-delay: 0.32s; }

/* MWM step cards pop */
.mwm-steps .stagger-children.revealed .mwm-step-card {
  animation: stepPop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.mwm-steps .stagger-children.revealed .mwm-step-card:nth-child(1) { animation-delay: 0.08s; }
.mwm-steps .stagger-children.revealed .mwm-step-card:nth-child(2) { animation-delay: 0.18s; }
.mwm-steps .stagger-children.revealed .mwm-step-card:nth-child(3) { animation-delay: 0.28s; }
@keyframes stepPop {
  from { opacity: 0; transform: translateY(28px) scale(0.96); }
  to { opacity: 1; transform: none; }
}

.mwm-input-live {
  animation: mwmInputIn 0.5s ease both;
}
@keyframes mwmInputIn {
  from { opacity: 0; transform: translateX(-12px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Scroll line accent */
.animate-line {
  position: relative;
}
.animate-line::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 3px;
  width: 0;
  background: var(--brand-yellow);
  transition: width 1s cubic-bezier(0.22, 1, 0.36, 1);
}
.animate-line.revealed::before { width: 100%; }

/* Floating CTA gentle */
.floating-cta { animation: ctaFloat 3s ease-in-out infinite; }
@keyframes ctaFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

/* Tap feedback mobile */
@media (hover: none) {
  .btn-brand:active, .btn-outline-light:active, .service-card:active {
    transform: scale(0.98);
    transition: transform 0.15s ease;
  }
}

.counter { font-variant-numeric: tabular-nums; }

body.is-loaded { animation: bodyIn 0.4s ease; }
@keyframes bodyIn {
  from { opacity: 0.97; }
  to { opacity: 1; }
}

.mwm-teaser-link {
  transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
}
.mwm-teaser-link:hover {
  border-color: var(--brand-yellow) !important;
  box-shadow: var(--shadow-brand);
}

.navbar.scrolled .brand-logo-img {
  filter: drop-shadow(0 0 12px rgba(248, 188, 21, 0.35));
}

/* Subpage heroes */
.page-hero .container > h1,
.page-hero .container > .display-5 {
  animation: heroFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
.page-hero .container > .lead,
.page-hero .container > p.lead {
  animation: heroFadeUp 0.85s ease 0.28s both;
}

/* WhatsApp FAB ring */
.whatsapp-float {
  position: fixed;
}
.whatsapp-float::after {
  content: '';
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.55);
  animation: waPulse 2.4s ease-out infinite;
  pointer-events: none;
}
@keyframes waPulse {
  0% { transform: scale(1); opacity: 0.85; }
  70%, 100% { transform: scale(1.4); opacity: 0; }
}

.glass-panel.revealed {
  animation: glassIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes glassIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

.feature-card.revealed {
  animation: featurePop 0.55s cubic-bezier(0.34, 1.4, 0.64, 1) both;
}
@keyframes featurePop {
  from { opacity: 0; transform: translateY(18px) scale(0.97); }
  to { opacity: 1; transform: none; }
}

.service-icon.icon-pulse-once {
  animation: iconPulseOnce 0.65s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes iconPulseOnce {
  0% { transform: scale(1); }
  45% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.mwm-prize.revealed,
.mwm-reward.revealed .mwm-prize {
  animation: prizeGlow 0.9s ease 0.2s both;
}
@keyframes prizeGlow {
  from { opacity: 0.6; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); text-shadow: 0 0 36px rgba(248, 188, 21, 0.35); }
}

.offcanvas.showing,
.offcanvas.show {
  animation: offcanvasIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes offcanvasIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

.accordion-button:not(.collapsed) {
  color: var(--brand-yellow);
  transition: color 0.3s ease;
}

@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal-left, .reveal-right, .reveal-scale, .reveal-fade,
  .stagger-children > *, .hero-glow, .hero-particles span,
  .service-icon, .floating-cta, .hero-content *, .compliance-badge,
  .process-card, .trust-item, .btn-brand-pulse {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}
