/* Khazanat Elmamlka — High-Performance GPU Animations (60fps, Zero CLS) */

/* 1. Above-the-Fold Staggered Entrance */
@keyframes qaboHeroFadeUp {
  from {
    opacity: 0;
    transform: translate3d(0, 18px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

@keyframes qaboHeroScaleIn {
  from {
    opacity: 0;
    transform: scale(0.96) translate3d(0, 12px, 0);
  }
  to {
    opacity: 1;
    transform: scale(1) translate3d(0, 0, 0);
  }
}

@keyframes qaboHeaderDrop {
  from {
    opacity: 0;
    transform: translate3d(0, -10px, 0);
  }
  to {
    opacity: 1;
    transform: translate3d(0, 0, 0);
  }
}

.qabo-sticky-header {
  animation: qaboHeaderDrop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.qabo-hero-title {
  animation: qaboHeroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.qabo-hero-subtitle {
  animation: qaboHeroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.qabo-hero-badges {
  animation: qaboHeroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.28s both;
}

.qabo-hero-actions {
  animation: qaboHeroFadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) 0.36s both;
}

.qabo-hero-media {
  animation: qaboHeroScaleIn 0.65s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}

/* 2. Scroll-Reveal States (Intersection Observer) */
[data-animate] {
  opacity: 0;
  will-change: transform, opacity;
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-animate="fade-up"] {
  transform: translate3d(0, 36px, 0);
}

[data-animate="fade-in"] {
  transform: translate3d(0, 0, 0);
}

[data-animate="zoom-in"] {
  transform: scale(0.9);
}

[data-animate="slide-right"] {
  transform: translate3d(-36px, 0, 0);
}

[data-animate="slide-left"] {
  transform: translate3d(36px, 0, 0);
}

[data-animate].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  will-change: auto;
}

/* 3. Micro-Interactions (GPU-only transitions) */
.qabo-btn,
.qabo-btn-whatsapp,
.qabo-inline-link,
.qabo-pill-links a {
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.22s ease, background-color 0.22s ease, color 0.22s ease;
}

.qabo-btn:hover,
.qabo-btn-whatsapp:hover,
.qabo-inline-link:hover,
.qabo-pill-links a:hover {
  transform: translate3d(0, -2px, 0);
}

.qabo-btn:active,
.qabo-btn-whatsapp:active {
  transform: translate3d(0, 0, 0) scale(0.98);
}

.qabo-service-card,
.qabo-why-card,
.qabo-step-card,
.qabo-acc-item,
.qabo-info-card {
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.28s ease;
}

.qabo-service-card-img img {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.qabo-service-card:hover .qabo-service-card-img img {
  transform: scale(1.04);
}

/* Nav link subtle underline slide */
@media (min-width: 901px) {
  .menu-items > li > a {
    position: relative;
  }
  .menu-items > li > a::after {
    content: "";
    position: absolute;
    bottom: 4px;
    right: 10px;
    left: 10px;
    height: 2px;
    background: var(--qabo-accent, #078c00);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  }
  .menu-items > li > a:hover::after {
    transform: scaleX(1);
  }
}

/* 4. Accessibility: Respect Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  .qabo-sticky-header,
  .qabo-hero-title,
  .qabo-hero-subtitle,
  .qabo-hero-badges,
  .qabo-hero-actions,
  .qabo-hero-media {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .qabo-btn,
  .qabo-btn-whatsapp,
  .qabo-service-card,
  .qabo-service-card-img img,
  .qabo-why-card,
  .qabo-step-card,
  .menu-items > li > a::after {
    transition: none !important;
  }
}

