/* =====================================================
   AECOM.tech - Professional Animations & Effects
   ===================================================== */

/* ===== KEYFRAME ANIMATIONS ===== */

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

@keyframes fadeInDown {
  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);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes blurIn {
  from {
    opacity: 0;
    filter: blur(10px);
  }
  to {
    opacity: 1;
    filter: blur(0);
  }
}

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

@keyframes floatSlow {
  0%, 100% {
    transform: translateY(0px) rotate(0deg);
  }
  50% {
    transform: translateY(-15px) rotate(3deg);
  }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(37, 99, 235, 0.6);
  }
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes borderGlow {
  0%, 100% {
    border-color: rgba(37, 99, 235, 0.5);
  }
  50% {
    border-color: rgba(147, 51, 234, 0.5);
  }
}

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

/* ===== ANIMATION CLASSES ===== */

.animate-fadeInUp {
  animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeInDown {
  animation: fadeInDown 0.6s ease-out forwards;
}

.animate-fadeInLeft {
  animation: fadeInLeft 0.6s ease-out forwards;
}

.animate-fadeInRight {
  animation: fadeInRight 0.6s ease-out forwards;
}

.animate-scaleIn {
  animation: scaleIn 0.5s ease-out forwards;
}

.animate-blurIn {
  animation: blurIn 0.6s ease-out forwards;
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-float-slow {
  animation: floatSlow 8s ease-in-out infinite;
}

.animate-pulse-glow {
  animation: pulseGlow 2s ease-in-out infinite;
}

.animate-gradient {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

.animate-border-glow {
  animation: borderGlow 2s ease-in-out infinite;
}

.animate-bounce-slow {
  animation: bounce 2s ease-in-out infinite;
}

/* ===== DELAY CLASSES ===== */

.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }
.delay-500 { animation-delay: 500ms; }
.delay-600 { animation-delay: 600ms; }
.delay-700 { animation-delay: 700ms; }
.delay-800 { animation-delay: 800ms; }

/* ===== SCROLL ANIMATION (Initial State) ===== */

[data-animate] {
  opacity: 0;
}

[data-animate].animated {
  opacity: 1;
}

[data-animate="fadeInUp"].animated {
  animation: fadeInUp 0.6s ease-out forwards;
}

[data-animate="fadeInDown"].animated {
  animation: fadeInDown 0.6s ease-out forwards;
}

[data-animate="fadeInLeft"].animated {
  animation: fadeInLeft 0.6s ease-out forwards;
}

[data-animate="fadeInRight"].animated {
  animation: fadeInRight 0.6s ease-out forwards;
}

[data-animate="scaleIn"].animated {
  animation: scaleIn 0.5s ease-out forwards;
}

[data-animate="blurIn"].animated {
  animation: blurIn 0.6s ease-out forwards;
}

/* ===== HOVER EFFECTS ===== */

.hover-lift {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.hover-glow {
  transition: box-shadow 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 30px rgba(37, 99, 235, 0.4);
}

.hover-scale {
  transition: transform 0.3s ease;
}

.hover-scale:hover {
  transform: scale(1.05);
}

.hover-scale-sm {
  transition: transform 0.2s ease;
}

.hover-scale-sm:hover {
  transform: scale(1.02);
}

/* ===== BACKGROUND PATTERNS ===== */

.bg-grid-pattern {
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-grid-pattern-dark {
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.05) 1px, transparent 1px);
  background-size: 50px 50px;
}

.bg-dot-pattern {
  background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.1) 1px, transparent 0);
  background-size: 24px 24px;
}

.bg-dot-pattern-dark {
  background-image: radial-gradient(circle at 1px 1px, rgba(0, 0, 0, 0.07) 1px, transparent 0);
  background-size: 24px 24px;
}

.bg-gradient-mesh {
  background:
    radial-gradient(at 20% 30%, rgba(37, 99, 235, 0.15) 0px, transparent 50%),
    radial-gradient(at 80% 20%, rgba(147, 51, 234, 0.1) 0px, transparent 50%),
    radial-gradient(at 60% 80%, rgba(6, 182, 212, 0.1) 0px, transparent 50%);
}

/* ===== GLASSMORPHISM ===== */

.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.glass-dark {
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-card {
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ===== TEXT GRADIENT ===== */

.text-gradient {
  background: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #06b6d4 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.text-gradient-animated {
  background: linear-gradient(135deg, #2563eb 0%, #9333ea 50%, #06b6d4 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradientShift 3s ease infinite;
}

/* ===== ANIMATED BORDER ===== */

.animated-border {
  position: relative;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(147, 51, 234, 0.1));
  border-radius: 1rem;
}

.animated-border::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 1rem;
  padding: 2px;
  background: linear-gradient(135deg, #2563eb, #9333ea, #06b6d4);
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradientShift 3s ease infinite;
  background-size: 200% 200%;
}

/* ===== DECORATIVE ELEMENTS ===== */

.floating-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.5;
  animation: float 8s ease-in-out infinite;
}

.floating-orb-primary {
  background: rgba(37, 99, 235, 0.4);
}

.floating-orb-secondary {
  background: rgba(147, 51, 234, 0.3);
}

.floating-orb-accent {
  background: rgba(6, 182, 212, 0.3);
}

/* ===== SCROLL INDICATOR ===== */

.scroll-indicator {
  animation: bounce 2s ease-in-out infinite;
}

/* ===== HEADER SCROLL STATES ===== */

.header-transparent {
  background: transparent;
  border-bottom-color: transparent;
}

.header-glass {
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom-color: rgba(226, 232, 240, 0.5);
}

.dark .header-glass {
  background: rgba(15, 23, 42, 0.8);
  border-bottom-color: rgba(51, 65, 85, 0.5);
}

/* ===== CARD STYLES ===== */

.card-tech {
  background: white;
  border: 1px solid rgba(226, 232, 240, 1);
  border-radius: 1rem;
  transition: all 0.3s ease;
}

.dark .card-tech {
  background: rgba(30, 41, 59, 1);
  border-color: rgba(51, 65, 85, 1);
}

.card-tech:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(37, 99, 235, 0.3);
}

.dark .card-tech:hover {
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  border-color: rgba(37, 99, 235, 0.5);
}

/* ===== IMAGE EFFECTS ===== */

.img-overlay {
  position: relative;
  overflow: hidden;
}

.img-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.2), rgba(147, 51, 234, 0.2));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.img-overlay:hover::after {
  opacity: 1;
}

.img-overlay img {
  transition: transform 0.5s ease;
}

.img-overlay:hover img {
  transform: scale(1.05);
}

/* ===== BUTTON STYLES ===== */

.btn-primary-glow {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn-primary-glow::before {
  content: '';
  position: absolute;
  inset: -2px;
  background: linear-gradient(135deg, #2563eb, #9333ea, #06b6d4);
  border-radius: inherit;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.3s ease;
  filter: blur(10px);
}

.btn-primary-glow:hover::before {
  opacity: 0.5;
}

/* ===== COUNTER ANIMATION ===== */

.counter {
  font-variant-numeric: tabular-nums;
}

/* ===== LOGOS MARQUEE ===== */

@keyframes marquee {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

.marquee-container {
  overflow: hidden;
  width: 100%;
  position: relative;
}

.marquee-track {
  display: flex;
  align-items: center;
  animation: marquee 40s linear infinite;
  width: max-content;
  will-change: transform;
}

@media (max-width: 768px) {
  .marquee-track {
    animation-duration: 25s;
  }
}

.marquee-track:hover {
  animation-play-state: paused;
}

.logo-item {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: all 0.3s ease;
  flex-shrink: 0;
  object-fit: contain;
}

.logo-item:hover {
  filter: grayscale(0%);
  opacity: 1;
}

.dark .logo-item {
  filter: grayscale(100%) brightness(1.5);
  opacity: 0.6;
}

.dark .logo-item:hover {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* ===== RESPONSIVE ADJUSTMENTS ===== */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
