/* TeDaCo Premium - Advanced Animations */

/* Loading Screen Animations */
@keyframes loading-progress {
  0% { width: 0%; }
  100% { width: 100%; }
}

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

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

.tedaco-logo-animated {
  animation: logo-pulse 2s ease-in-out infinite;
}

/* Network Background Animations */
@keyframes network-pulse {
  0%, 100% {
    opacity: 0.3;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}

@keyframes data-flow {
  0% {
    transform: translateX(-100%);
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    transform: translateX(100%);
    opacity: 0;
  }
}

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

.network-animation {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.network-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.1) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: network-pulse 8s ease-in-out infinite;
}

.data-flow {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary), transparent);
  animation: data-flow 3s linear infinite;
}

.connection-nodes::before,
.connection-nodes::after {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  background: var(--primary);
  border-radius: 50%;
  box-shadow: 0 0 20px var(--primary);
}

.connection-nodes::before {
  top: 20%;
  left: 20%;
  animation: float 4s ease-in-out infinite;
}

.connection-nodes::after {
  bottom: 20%;
  right: 20%;
  animation: float 4s ease-in-out infinite 2s;
}

.tech-particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--accent);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

.tech-particle:nth-child(1) {
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.tech-particle:nth-child(2) {
  top: 60%;
  left: 80%;
  animation-delay: 2s;
}

.tech-particle:nth-child(3) {
  bottom: 30%;
  left: 30%;
  animation-delay: 4s;
}

/* Typewriter Effect */
@keyframes typewriter {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes blink {
  50% { border-color: transparent; }
}

.typewriter {
  overflow: hidden;
  border-right: 2px solid var(--primary);
  white-space: nowrap;
  animation: 
    typewriter 3s steps(20) 1s forwards,
    blink 1s step-end infinite;
}

/* Gradient Text Animation */
@keyframes gradient-shift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

.gradient-text {
  background: linear-gradient(45deg, var(--primary), var(--accent), var(--primary));
  background-size: 200% 200%;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: gradient-shift 3s ease infinite;
}

/* Hover Animations */
.service-card {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 
    0 25px 50px -12px rgba(56, 189, 248, 0.25),
    0 0 0 1px rgba(56, 189, 248, 0.3);
}

.service-icon {
  transition: all 0.3s ease;
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
  color: var(--accent);
}

/* Button Animations */
.btn {
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.3);
}

/* Portfolio Filter Animation */
.portfolio-item {
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.portfolio-item.hidden {
  opacity: 0;
  transform: scale(0.8);
  pointer-events: none;
}

.portfolio-overlay {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.3s ease;
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Animations */
@keyframes slide-in-left {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-right {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slide-in-up {
  from {
    opacity: 0;
    transform: translateY(50px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-on-scroll {
  opacity: 0;
  animation-fill-mode: forwards;
}

.animate-on-scroll.slide-in-left {
  animation: slide-in-left 0.8s ease forwards;
}

.animate-on-scroll.slide-in-right {
  animation: slide-in-right 0.8s ease forwards;
}

.animate-on-scroll.slide-in-up {
  animation: slide-in-up 0.8s ease forwards;
}

/* Video Play Button Animation */
@keyframes pulse-ring {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Play button styles removed - not needed for auto-playing videos */

/* Mobile Optimizations */
@media (max-width: 768px) {
  .typewriter {
    animation: none;
    border: none;
    white-space: normal;
  }
  
  .service-card:hover {
    transform: none;
  }
  
  .tech-particle {
    display: none;
  }
}
