/* Custom Animations */

.fade-in-up {
  animation: fadeInUp 0.8s ease forwards;
}

.fade-in-left {
  animation: fadeInLeft 0.8s ease forwards;
}

.fade-in-right {
  animation: fadeInRight 0.8s ease forwards;
}

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

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

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

/* ===== Hero Slide Text Animations ===== */
@keyframes heroFadeUp {
  from {
    opacity: 0;
    transform: translateY(45px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

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

@keyframes heroZoomIn {
  from {
    opacity: 0;
    transform: scale(0.85);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes heroLineGrow {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

.hero-slide.hero-animate .hero-badge {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}

.hero-slide.hero-animate .hero-tagline {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}

.hero-slide.hero-animate .hero-content h1 {
  animation: heroSlideRight 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.25s both;
}

.hero-slide.hero-animate .hero-content p:not(.hero-tagline) {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.45s both;
}

.hero-slide.hero-animate .hero-btns {
  animation: heroFadeUp 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

.hero-slide.hero-animate .hero-btns .btn {
  animation: heroZoomIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.7s both;
}

.hero-slide.hero-animate .hero-btns .btn-outline-gold {
  animation-delay: 0.85s;
}

.hero-slide.hero-animate .hero-icon-float {
  animation: heroIconPop 0.7s cubic-bezier(0.22, 1, 0.36, 1) both, floatIcon 3s ease-in-out 1s infinite;
}

/* Related banner images - staggered populate */
.hero-slide.hero-animate .hero-pop-img {
  animation: imagePopulate 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards,
             imageFloatSoft 5s ease-in-out 1.1s infinite;
}

.hero-slide.hero-animate .hero-pop-img.img-1 { animation-delay: 0.3s, 1.1s; }
.hero-slide.hero-animate .hero-pop-img.img-2 { animation-delay: 0.45s, 1.3s; }
.hero-slide.hero-animate .hero-pop-img.img-3 { animation-delay: 0.6s, 1.5s; }
.hero-slide.hero-animate .hero-pop-img.img-4 { animation-delay: 0.75s, 1.7s; }

.hero-slide.hero-animate .hero-pop-img.img-2,
.hero-slide.hero-animate .hero-pop-img.img-4 {
  animation-name: imagePopulate, imageFloatSoftAlt;
}

@keyframes imagePopulate {
  0% {
    opacity: 0;
    transform: scale(0.55) translateY(45px) rotate(-4deg);
  }
  70% {
    opacity: 1;
    transform: scale(1.04) translateY(-4px) rotate(1deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0) rotate(0deg);
  }
}

@keyframes imageFloatSoft {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-10px) scale(1.02); }
}

@keyframes imageFloatSoftAlt {
  0%, 100% { transform: translateY(0) scale(1); }
  50% { transform: translateY(-8px) scale(1.015); }
}

/* Reset pop images when slide is not active */
.hero-slide:not(.hero-animate) .hero-pop-img {
  opacity: 0;
  transform: scale(0.55) translateY(40px);
  animation: none;
}

.hero-slide.hero-animate .hero-icon-float:nth-child(1) { animation-delay: 0.5s, 1s; }
.hero-slide.hero-animate .hero-icon-float:nth-child(2) { animation-delay: 0.65s, 1.2s; }
.hero-slide.hero-animate .hero-icon-float:nth-child(3) { animation-delay: 0.8s, 1.4s; }
.hero-slide.hero-animate .hero-icon-float:nth-child(4) { animation-delay: 0.95s, 1.6s; }

@keyframes heroIconPop {
  from {
    opacity: 0;
    transform: scale(0) translateY(20px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Background zoom per slide */
.hero-slide.hero-animate .hero-bg {
  animation: heroBgZoom 7s ease-out forwards;
}

@keyframes heroBgZoom {
  from { transform: scale(1.12); }
  to { transform: scale(1); }
}

.slide-excavator.hero-animate .hero-bg { animation: heroBgPanRight 8s ease-out forwards; }
.slide-graph.hero-animate .hero-bg { animation: heroBgZoom 7s ease-out forwards; }
.slide-house.hero-animate .hero-bg { animation: heroBgPanLeft 8s ease-out forwards; }
.slide-factory.hero-animate .hero-bg { animation: heroBgZoom 7s ease-out forwards; }
.slide-building.hero-animate .hero-bg { animation: heroBgPanUp 8s ease-out forwards; }
.slide-wealth.hero-animate .hero-bg { animation: heroBgZoom 7s ease-out forwards; }

@keyframes heroBgPanRight {
  from { transform: scale(1.1) translateX(-20px); }
  to { transform: scale(1.05) translateX(0); }
}

@keyframes heroBgPanLeft {
  from { transform: scale(1.1) translateX(20px); }
  to { transform: scale(1.05) translateX(0); }
}

@keyframes heroBgPanUp {
  from { transform: scale(1.12) translateY(20px); }
  to { transform: scale(1.05) translateY(0); }
}

/* Background ambient effects animation */
.hero-slide.hero-animate .fx-orb {
  animation: fxOrbFloat 6s ease-in-out infinite;
}

.hero-slide.hero-animate .fx-orb.orb-1 { animation-delay: 0s; }
.hero-slide.hero-animate .fx-orb.orb-2 { animation-delay: 1.2s; }
.hero-slide.hero-animate .fx-orb.orb-3 { animation-delay: 2.4s; }

.hero-slide.hero-animate .fx-pulse {
  animation: fxPulseRing 4s ease-out infinite;
}

.hero-slide.hero-animate .fx-icon {
  animation: fxIconDrift 5s ease-in-out infinite;
}

.hero-slide.hero-animate .fx-icon.icon-1 { animation-delay: 0.2s; }
.hero-slide.hero-animate .fx-icon.icon-2 { animation-delay: 0.9s; }
.hero-slide.hero-animate .fx-icon.icon-3 { animation-delay: 1.6s; }

.hero-slide.hero-animate .fx-beam {
  animation: fxBeamScan 3.5s ease-in-out infinite;
}

.hero-slide.hero-animate .fx-beam.beam-2 { animation-delay: 1.2s; }

@keyframes fxOrbFloat {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) scale(0.8);
  }
  20% { opacity: 0.6; }
  50% {
    opacity: 0.9;
    transform: translateY(-60px) scale(1.1);
  }
  80% { opacity: 0.3; }
}

@keyframes fxPulseRing {
  0% {
    opacity: 0;
    transform: scale(0.5);
  }
  40% {
    opacity: 0.5;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.6);
  }
}

@keyframes fxIconDrift {
  0%, 100% {
    opacity: 0;
    transform: translateY(0) rotate(0deg);
  }
  15% { opacity: 0.85; }
  50% {
    opacity: 1;
    transform: translateY(-70px) rotate(8deg);
  }
  85% { opacity: 0.4; }
}

@keyframes fxBeamScan {
  0%, 100% {
    opacity: 0;
    width: 0;
  }
  30% {
    opacity: 0.7;
    width: 180px;
  }
  60% {
    opacity: 0.3;
    width: 220px;
  }
}

/* Floating currency particles - removed */

/* Slide-specific icon animations */
.slide-excavator .hero-icon-float:nth-child(1) { animation-name: excavatorMove, floatIcon; }
.slide-excavator.hero-animate .hero-deco-gear { animation: decoGear 4s ease-in-out infinite; }

@keyframes excavatorMove {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-10px) rotate(4deg); }
}

@keyframes decoGear {
  0%, 100% { transform: translateY(0) rotate(-5deg); opacity: 0.15; }
  50% { transform: translateY(-15px) rotate(5deg); opacity: 0.25; }
}

.slide-graph.hero-animate .hero-deco-bars .bar {
  animation: barGrow 1.2s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-graph.hero-animate .hero-deco-bars .bar:nth-child(1) { animation-delay: 0.3s; }
.slide-graph.hero-animate .hero-deco-bars .bar:nth-child(2) { animation-delay: 0.45s; }
.slide-graph.hero-animate .hero-deco-bars .bar:nth-child(3) { animation-delay: 0.6s; }
.slide-graph.hero-animate .hero-deco-bars .bar:nth-child(4) { animation-delay: 0.75s; }
.slide-graph.hero-animate .hero-deco-bars .bar:nth-child(5) { animation-delay: 0.9s; }

@keyframes barGrow {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 1;
  }
}

.slide-graph .hero-icon-float:nth-child(1) {
  animation-name: graphGrow, floatIcon;
}

@keyframes graphGrow {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.18); }
}

.slide-house.hero-animate .hero-deco-house {
  animation: houseAppear 1s cubic-bezier(0.22, 1, 0.36, 1) 0.4s both;
}

.slide-house.hero-animate .hero-deco-doc {
  animation: docSlide 1.2s cubic-bezier(0.22, 1, 0.36, 1) 0.6s both;
}

@keyframes houseAppear {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.7);
  }
  to {
    opacity: 0.2;
    transform: translateY(0) scale(1);
  }
}

@keyframes docSlide {
  from {
    opacity: 0;
    transform: translateX(60px) rotate(10deg);
  }
  to {
    opacity: 0.18;
    transform: translateX(0) rotate(0deg);
  }
}

.slide-house .hero-icon-float:nth-child(3) {
  animation-name: rotateRupee, floatIcon;
}

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

.slide-factory.hero-animate .hero-deco-truck {
  animation: truckDrive 4s ease-in-out infinite;
}

.slide-factory.hero-animate .hero-deco-smoke span {
  animation: smokeRise 2.5s ease-out infinite;
}

.slide-factory.hero-animate .hero-deco-smoke span:nth-child(2) { animation-delay: 0.8s; }
.slide-factory.hero-animate .hero-deco-smoke span:nth-child(3) { animation-delay: 1.6s; }

@keyframes truckDrive {
  0%, 100% { transform: translateX(0); opacity: 0.15; }
  50% { transform: translateX(40px); opacity: 0.25; }
}

@keyframes smokeRise {
  0% {
    opacity: 0;
    transform: translateY(0) scale(0.5);
  }
  30% { opacity: 0.4; }
  100% {
    opacity: 0;
    transform: translateY(-60px) scale(1.5);
  }
}

.slide-factory .hero-icon-float:nth-child(2) {
  animation-name: truckMove, floatIcon;
}

@keyframes truckMove {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(18px); }
}

.slide-building.hero-animate .hero-deco-crane {
  animation: craneMove 3s ease-in-out infinite;
}

.slide-building.hero-animate .hero-deco-skyline span {
  animation: buildingGrow 1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-building.hero-animate .hero-deco-skyline span:nth-child(1) { animation-delay: 0.2s; }
.slide-building.hero-animate .hero-deco-skyline span:nth-child(2) { animation-delay: 0.35s; }
.slide-building.hero-animate .hero-deco-skyline span:nth-child(3) { animation-delay: 0.5s; }
.slide-building.hero-animate .hero-deco-skyline span:nth-child(4) { animation-delay: 0.65s; }
.slide-building.hero-animate .hero-deco-skyline span:nth-child(5) { animation-delay: 0.8s; }

@keyframes craneMove {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(12deg) translateY(-8px); }
}

@keyframes buildingGrow {
  from {
    transform: scaleY(0);
    opacity: 0;
  }
  to {
    transform: scaleY(1);
    opacity: 0.25;
  }
}

.slide-wealth.hero-animate .hero-deco-chart svg polyline {
  stroke-dasharray: 300;
  animation: chartDraw 2s ease-out 0.5s forwards;
}

.slide-wealth.hero-animate .hero-deco-coins span {
  animation: coinStack 1.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.slide-wealth.hero-animate .hero-deco-coins span:nth-child(1) { animation-delay: 0.4s; }
.slide-wealth.hero-animate .hero-deco-coins span:nth-child(2) { animation-delay: 0.6s; }
.slide-wealth.hero-animate .hero-deco-coins span:nth-child(3) { animation-delay: 0.8s; }

@keyframes chartDraw {
  from { stroke-dashoffset: 300; opacity: 0; }
  to { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes coinStack {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.5);
  }
  to {
    opacity: 0.3;
    transform: translateY(0) scale(1);
  }
}

.slide-wealth .hero-icon-float:nth-child(2) {
  animation-name: coinBounce, floatIcon;
}

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

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

/* Shimmer effect for gold text */
.gold-shimmer {
  background: linear-gradient(90deg, #c9a227, #e8c547, #c9a227);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
  to { background-position: 200% center; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .hero-slide.hero-animate *,
  .hero-bg,
  .hero-bg-effects .fx-orb,
  .hero-bg-effects .fx-icon,
  .hero-bg-effects .fx-beam,
  .hero-bg-effects .fx-pulse,
  .hero-pop-img {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }

  .hero-slide:not(.hero-animate) .hero-pop-img {
    opacity: 0;
  }
}
