/* ═══════════════════════════════════════════════════════════════
   EXPERIENCE UPGRADE — Premium Corporate Enhancements
   Afrocon Limited · Visual Experience Layer
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. HERO SECTION — Ken Burns, Parallax, Gradient Overlay ── */

/* Ken Burns slow zoom on hero background */
.hero-bg-kenburns {
  animation: kenBurns 25s ease-in-out infinite alternate;
  will-change: transform;
  transform-origin: center center;
}

@keyframes kenBurns {
  0%   { transform: scale(1)    translate(0, 0); }
  50%  { transform: scale(1.08) translate(-1%, 1%); }
  100% { transform: scale(1.04) translate(1%, -0.5%); }
}

/* Animated gradient overlay on hero */
.hero-gradient-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(
    135deg,
    rgba(5, 37, 143, 0.45) 0%,
    rgba(30, 58, 138, 0.30) 30%,
    rgba(249, 115, 22, 0.12) 60%,
    rgba(5, 37, 143, 0.35) 100%
  );
  background-size: 300% 300%;
  animation: gradientShift 12s ease-in-out infinite;
  pointer-events: none;
}

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Hero particle canvas */
#heroParticleCanvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  opacity: 0.6;
}

/* Scroll indicator enhanced */
.scroll-indicator-wrap {
  z-index: 10;
}


/* ── 2. STICKY HEADER ENHANCEMENTS ── */

header {
  transition: box-shadow 0.4s ease, background-color 0.4s ease, backdrop-filter 0.4s ease;
}

header.header-scrolled {
  background-color: rgba(255, 255, 255, 0.97) !important;
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Active nav link highlight */
header nav a.nav-active {
  color: #05258f !important;
  position: relative;
}

header nav a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, #f97316, #05258f);
  border-radius: 2px;
  animation: navActiveIn 0.3s ease forwards;
}

@keyframes navActiveIn {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}


/* ── 3. SCROLL REVEAL ANIMATIONS ── */

/* Base state for scroll-reveal elements */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Slide from left */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Slide from right */
.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* Scale in */
.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.5s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delay classes */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }


/* ── 4. ENHANCED CARD HOVERS ── */

/* Premium card lift + glow */
.card-premium {
  transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.4s ease,
              border-color 0.3s ease;
}

.card-premium:hover {
  transform: translateY(-8px) scale(1.01);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.08),
    0 8px 16px rgba(5, 37, 143, 0.06),
    0 0 0 1px rgba(5, 37, 143, 0.08);
}

/* Subtle border glow on hover */
.card-glow:hover {
  border-color: rgba(249, 115, 22, 0.25) !important;
  box-shadow:
    0 0 20px rgba(249, 115, 22, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.06);
}


/* ── 5. BUTTON ENHANCEMENTS ── */

/* Ripple effect container */
.btn-ripple {
  position: relative;
  overflow: hidden;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-ripple:hover {
  transform: translateY(-2px);
}

.btn-ripple:active {
  transform: translateY(0);
}

/* Ripple animation */
.btn-ripple .ripple-effect {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 0.6s ease-out;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* Gradient shift on hover */
.btn-gradient-shift {
  background-size: 200% 100%;
  background-position: 0% 0%;
  transition: background-position 0.4s ease, transform 0.25s ease, box-shadow 0.3s ease;
}

.btn-gradient-shift:hover {
  background-position: 100% 0%;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.3);
}


/* ── 6. IMAGE HOVER EFFECTS ── */

.img-hover-zoom {
  overflow: hidden;
  border-radius: inherit;
}

.img-hover-zoom img {
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
              filter 0.4s ease;
  will-change: transform;
}

.img-hover-zoom:hover img {
  transform: scale(1.06);
  filter: brightness(1.02) saturate(1.05);
}

/* Image overlay reveal */
.img-overlay-reveal {
  position: relative;
  overflow: hidden;
}

.img-overlay-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5, 37, 143, 0.4) 0%,
    transparent 50%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.img-overlay-reveal:hover::after {
  opacity: 1;
}


/* ── 7. BACK TO TOP BUTTON ── */

.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 999;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #05258f, #1e3a8a);
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(5, 37, 143, 0.3);
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.4s ease,
              visibility 0.4s ease,
              transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
              background 0.3s ease,
              box-shadow 0.3s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.back-to-top:hover {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 8px 24px rgba(249, 115, 22, 0.4);
  transform: translateY(-3px) scale(1.05);
}

.back-to-top:active {
  transform: translateY(0) scale(0.95);
}

.back-to-top svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.back-to-top:hover svg {
  transform: translateY(-2px);
}


/* ── 8. ANIMATED COUNTERS ── */

.counter-value {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: transform 0.3s ease;
}


/* ── 9. SECTION DIVIDERS ── */

.section-divider {
  position: relative;
  height: 1px;
  width: 100%;
  overflow: hidden;
}

.section-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(5, 37, 143, 0.12),
    rgba(249, 115, 22, 0.12),
    transparent
  );
  animation: dividerSlide 4s ease-in-out infinite;
}

@keyframes dividerSlide {
  0%   { left: -100%; }
  100% { left: 100%; }
}


/* ── 10. PARALLAX SECTION BACKGROUNDS ── */

.parallax-bg {
  position: relative;
  overflow: hidden;
}

.parallax-bg > .parallax-layer {
  position: absolute;
  inset: -20%;
  will-change: transform;
  transition: transform 0.05s linear;
}


/* ── 11. IMAGE LAZY LOADING SKELETON ── */

.img-skeleton {
  background: linear-gradient(90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

img[data-src]:not([src]) {
  background: linear-gradient(90deg,
    #f0f0f0 25%,
    #e0e0e0 50%,
    #f0f0f0 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  min-height: 200px;
}


/* ── 12. FOOTER ENHANCEMENTS ── */

footer a {
  position: relative;
}

footer .text-gray-400:hover,footer ul li:hover p {
  color: #FFF;
  font-weight:bold;
}


footer a.w-10:hover {
  transform: translateY(-3px);
  transition: transform 0.3s ease, background-color 0.3s ease;
}


/* ── 13. SMOOTH SECTION TRANSITIONS ── */

section {
  position: relative;
}


/* ── 14. TYPOGRAPHY ANIMATION ── */

.text-reveal {
  overflow: hidden;
}

.text-reveal span {
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.text-reveal.revealed span {
  transform: translateY(0);
}


/* ── 15. PREFERS-REDUCED-MOTION ── */

@media (prefers-reduced-motion: reduce) {
  .hero-bg-kenburns {
    animation: none !important;
  }

  .hero-gradient-overlay {
    animation: none !important;
  }

  #heroParticleCanvas {
    display: none !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .btn-ripple .ripple-effect {
    animation: none !important;
  }

  .back-to-top {
    transition: none !important;
  }

  .section-divider::after {
    animation: none !important;
  }

  .img-skeleton,
  img[data-src]:not([src]) {
    animation: none !important;
  }

  .counter-value {
    transition: none !important;
  }

  .parallax-bg > .parallax-layer {
    transition: none !important;
    transform: none !important;
  }

  .btn-gradient-shift {
    transition: none !important;
  }

  .card-premium {
    transition: none !important;
  }

  .img-hover-zoom img {
    transition: none !important;
  }

  * {
    scroll-behavior: auto !important;
  }
}


/* ── 16. FOCUS & KEYBOARD NAVIGATION ── */

.back-to-top:focus-visible {
  outline: 2px solid #f97316;
  outline-offset: 3px;
}

.btn-ripple:focus-visible {
  outline: 2px solid #05258f;
  outline-offset: 3px;
}

/* ── 17. PROCESS TIMELINE ── */

.timeline-line {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg,
    rgba(5, 37, 143, 0.08),
    rgba(5, 37, 143, 0.2),
    rgba(249, 115, 22, 0.2),
    rgba(249, 115, 22, 0.08)
  );
  transform: translateX(-50%);
}

.timeline-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, #05258f, #1e3a8a);
  border: 3px solid white;
  box-shadow: 0 0 0 3px rgba(5, 37, 143, 0.15), 0 2px 8px rgba(0,0,0,0.1);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-dot.active {
  background: linear-gradient(135deg, #f97316, #ea580c);
  box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.2), 0 4px 12px rgba(249, 115, 22, 0.3);
  transform: translateX(-50%) scale(1.3);
}

@media (max-width: 768px) {
  .timeline-line {
    left: 24px;
  }
  .timeline-dot {
    left: 24px;
  }
}
