/* Skills Solutions Australia - Animation Styles */

/* ===== ANIMATION KEYFRAMES ===== */
@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);
  }
}

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

@keyframes scaleUp {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes rotateIn {
  from {
    opacity: 0;
    transform: rotate(-10deg) scale(0.9);
  }
  to {
    opacity: 1;
    transform: rotate(0deg) scale(1);
  }
}

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

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes neonPulse {
  0%, 100% {
    box-shadow: 0 0 5px var(--accent-neon);
  }
  50% {
    box-shadow: 0 0 20px var(--accent-neon), 0 0 30px var(--accent-neon);
  }
}

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

@keyframes scanLine {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100vw);
  }
}

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

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

@keyframes counterGlow {
  0% {
    text-shadow: 0 2px 4px rgba(0, 150, 136, 0.3);
  }
  50% {
    text-shadow: 0 4px 12px rgba(0, 150, 136, 0.6), 0 0 20px rgba(0, 150, 136, 0.4);
  }
  100% {
    text-shadow: 0 2px 4px rgba(0, 150, 136, 0.3);
  }
}

@keyframes counterPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes numberFlicker {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

/* ===== SCROLL-TRIGGERED ANIMATION CLASSES ===== */
.animate-on-scroll {
  opacity: 0;
  transition: all 0.6s ease;
}

.animate-on-scroll.animate {
  opacity: 1;
}

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

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

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

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

.scale-up {
  animation: scaleUp 0.6s ease forwards;
}

.rotate-in {
  animation: rotateIn 0.8s ease forwards;
}

.slide-down {
  animation: slideInDown 0.6s ease forwards;
}

/* Stagger delays for grouped animations */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }
.stagger-6 { animation-delay: 0.6s; }

/* ===== HOVER ANIMATIONS ===== */
.hover-lift {
  transition: all var(--transition-normal);
}

.hover-lift:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.hover-scale {
  transition: transform var(--transition-normal);
}

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

.hover-rotate {
  transition: transform var(--transition-normal);
}

.hover-rotate:hover {
  transform: rotate(5deg);
}

.hover-neon {
  transition: all var(--transition-normal);
}

.hover-neon:hover {
  box-shadow: 0 0 20px var(--accent-neon);
  border-color: var(--accent-neon);
}

.hover-gradient {
  background: linear-gradient(45deg, var(--primary-teal), var(--primary-purple));
  background-size: 200% 200%;
  transition: background-position var(--transition-slow);
}

.hover-gradient:hover {
  background-position: 100% 100%;
}

/* ===== RETRO-FUTURISM ANIMATIONS ===== */
.retro-pulse {
  animation: neonPulse 2s ease-in-out infinite;
}

.retro-float {
  animation: floatUpDown 3s ease-in-out infinite;
}

.retro-gradient {
  background: linear-gradient(45deg, 
    var(--primary-teal), 
    var(--primary-purple), 
    var(--accent-neon), 
    var(--primary-teal));
  background-size: 300% 300%;
  animation: gradientShift 5s ease infinite;
}

.scan-lines {
  position: relative;
  overflow: hidden;
}

.scan-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(0, 229, 255, 0.1),
    transparent
  );
  animation: scanLine 3s linear infinite;
  pointer-events: none;
}

.geometric-spin {
  position: relative;
}

.geometric-spin::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  border: 2px solid var(--accent-neon);
  transform: translate(-50%, -50%) rotate(45deg);
  animation: spin 10s linear infinite;
  opacity: 0.3;
}

@keyframes spin {
  from {
    transform: translate(-50%, -50%) rotate(45deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(405deg);
  }
}

/* ===== LOADING ANIMATIONS ===== */
.loading-dots {
  display: inline-flex;
  gap: 4px;
}

.loading-dots span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-teal);
  animation: loadingDot 1.4s ease-in-out infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes loadingDot {
  0%, 80%, 100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(0, 150, 136, 0.3);
  border-top: 3px solid var(--primary-teal);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}

/* ===== PROGRESS ANIMATIONS ===== */
.progress-bar {
  width: 100%;
  height: 8px;
  background: rgba(0, 150, 136, 0.2);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary-teal), var(--primary-purple));
  border-radius: 4px;
  transition: width 1s ease;
  position: relative;
}

.progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progressShimmer 2s ease infinite;
}

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

/* ===== TEXT ANIMATIONS ===== */
.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--primary-teal);
  white-space: nowrap;
  animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from, to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary-teal);
  }
}

.text-reveal {
  position: relative;
  overflow: hidden;
}

.text-reveal::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-teal);
  transform: translateX(-100%);
  animation: textReveal 1.5s ease forwards;
}

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

/* ===== PARTICLE EFFECTS ===== */
.particles {
  position: relative;
  overflow: hidden;
}

.particles::before,
.particles::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.particles::before {
  background-image: 
    radial-gradient(2px 2px at 15% 25%, var(--accent-neon), transparent),
    radial-gradient(1px 1px at 35% 15%, var(--primary-teal), transparent),
    radial-gradient(3px 3px at 65% 35%, var(--primary-purple), transparent),
    radial-gradient(2px 2px at 85% 45%, var(--chrome-silver), transparent),
    radial-gradient(1px 1px at 25% 75%, var(--accent-neon), transparent),
    radial-gradient(2px 2px at 75% 85%, var(--primary-teal), transparent);
  background-repeat: no-repeat;
  animation: particleFloatA 8s ease-in-out infinite;
  opacity: 0.5;
}

.particles::after {
  background-image: 
    radial-gradient(2px 2px at 45% 10%, var(--primary-purple), transparent),
    radial-gradient(1px 1px at 10% 55%, var(--chrome-silver), transparent),
    radial-gradient(3px 3px at 90% 25%, var(--accent-neon), transparent),
    radial-gradient(2px 2px at 55% 65%, var(--primary-teal), transparent),
    radial-gradient(1px 1px at 20% 90%, var(--primary-purple), transparent),
    radial-gradient(2px 2px at 80% 70%, var(--chrome-silver), transparent);
  background-repeat: no-repeat;
  animation: particleFloatB 10s ease-in-out infinite reverse;
  opacity: 0.4;
}

@keyframes particleFloatA {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
  }
  25% {
    transform: translateY(-80px) translateX(40px) rotate(90deg) scale(1.2);
  }
  50% {
    transform: translateY(-40px) translateX(-60px) rotate(180deg) scale(0.8);
  }
  75% {
    transform: translateY(-120px) translateX(20px) rotate(270deg) scale(1.1);
  }
}

@keyframes particleFloatB {
  0%, 100% {
    transform: translateY(0px) translateX(0px) rotate(0deg) scale(1);
  }
  33% {
    transform: translateY(-60px) translateX(-40px) rotate(120deg) scale(0.9);
  }
  66% {
    transform: translateY(-100px) translateX(80px) rotate(240deg) scale(1.3);
  }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.gpu-accelerated {
  transform: translateZ(0);
  will-change: transform;
}

/* ===== REDUCED MOTION SUPPORT ===== */
@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll,
  .fade-up,
  .fade-left,
  .fade-right,
  .fade-in,
  .scale-up,
  .rotate-in,
  .slide-down {
    animation: none;
    opacity: 1;
    transform: none;
  }
  
  .hover-lift:hover,
  .hover-scale:hover,
  .hover-rotate:hover {
    transform: none;
  }
  
  .retro-pulse,
  .retro-float,
  .retro-gradient,
  .scan-lines::before,
  .geometric-spin::after,
  .particles::before {
    animation: none;
  }
  
  .typewriter {
    animation: none;
    border-right: none;
    white-space: normal;
  }
}

/* ===== MOBILE ANIMATION ADJUSTMENTS ===== */
@media (max-width: 768px) {
  .animate-on-scroll {
    animation-duration: 0.5s;
  }
  
  .stagger-1, .stagger-2, .stagger-3, 
  .stagger-4, .stagger-5, .stagger-6 {
    animation-delay: 0.1s;
  }
  
  .particles::before {
    animation-duration: 30s;
  }
}

/* ===== UTILITY ANIMATION CLASSES ===== */
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }
.animate-delay-4 { animation-delay: 0.4s; }
.animate-delay-5 { animation-delay: 0.5s; }

.animate-duration-fast { animation-duration: 0.3s; }
.animate-duration-normal { animation-duration: 0.6s; }
.animate-duration-slow { animation-duration: 1s; }

.animate-ease-in { animation-timing-function: ease-in; }
.animate-ease-out { animation-timing-function: ease-out; }
.animate-ease-in-out { animation-timing-function: ease-in-out; }

/* ===== DARK MODE SPECIFIC ANIMATIONS ===== */
@keyframes gradient-shift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

@keyframes neon-pulse {
  0%, 100% {
    text-shadow: 0 0 5px var(--primary-teal), 0 0 10px var(--primary-teal), 0 0 15px var(--primary-teal);
  }
  50% {
    text-shadow: 0 0 10px var(--primary-teal), 0 0 20px var(--primary-teal), 0 0 30px var(--primary-teal);
  }
}

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

@keyframes glow-pulse {
  0%, 100% {
    box-shadow: var(--glow-soft);
  }
  50% {
    box-shadow: var(--glow-strong);
  }
}

/* ===== PARTICLE ANIMATION CLASSES ===== */
/* Particles are now handled by the main particle system above */

.geometric-pattern::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(45deg, transparent 40%, rgba(0, 229, 255, 0.03) 50%, transparent 60%),
    linear-gradient(-45deg, transparent 40%, rgba(157, 78, 221, 0.03) 50%, transparent 60%);
  background-size: 60px 60px;
  z-index: 1;
}

.scan-lines::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(0, 229, 255, 0.03) 2px,
      rgba(0, 229, 255, 0.03) 4px
    );
  z-index: 1;
}

.retro-grid::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 1;
}

/* ===== PARTICLE ANIMATIONS ===== */
@keyframes particleFloat {
  0% {
    transform: translateY(100vh) translateX(0);
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    transform: translateY(-10vh) translateX(50px);
    opacity: 0;
  }
}

.particle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 1;
}

/* Enhanced glow effects for buttons */
.btn:hover {
  animation: glow-pulse 2s ease-in-out infinite;
}

/* Hover animations for cards */
.card:hover {
  animation: glow-pulse 3s ease-in-out infinite;
}
