/*----------------------------------------------------------------------
  Animation Keyframes (Floating Animationen entfernt/geändert)
----------------------------------------------------------------------*/

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
  from { opacity: 0; transform: translateX(50px); }
  to { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes drawStroke {
  0% { stroke-dashoffset: 1000; opacity: 0; }
  30% { opacity: 0.5; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes blinkLights {
  0%, 100% { opacity: 0.7; fill: var(--color-primary); }
  50% { opacity: 1; fill: var(--color-accent); }
}

@keyframes pulse {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0.4); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(139, 92, 246, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 92, 246, 0); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 5px rgba(139, 92, 246, 0.5); }
  50% { box-shadow: 0 0 20px rgba(139, 92, 246, 0.8); }
}

@keyframes shimmer {
  from { transform: translateX(-150%) skewX(-20deg); }
  to { transform: translateX(150%) skewX(-20deg); }
}

/* Neue Animationen nur für Opacity/Filter (nicht transform) */
@keyframes breathe {
  0%, 100% { 
    opacity: 0.3;
    filter: blur(1px) brightness(1);
  }
  50% { 
    opacity: 0.6;
    filter: blur(0.5px) brightness(1.2);
  }
}

@keyframes shimmerGlow {
  0%, 100% { 
    filter: brightness(1) saturate(1);
  }
  50% { 
    filter: brightness(1.3) saturate(1.4);
  }
}

@keyframes subtlePulse {
  0%, 100% { 
    box-shadow: 0 0 0 rgba(139, 92, 246, 0.2);
  }
  50% { 
    box-shadow: 0 0 8px rgba(139, 92, 246, 0.4);
  }
}

/* Professionelle Feature Card Entrance Animationen (bleiben gleich) */
@keyframes slideInUp {
  0% {
    opacity: 0;
    transform: translateY(60px) scale(0.95);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0px);
  }
}

@keyframes slideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-80px) translateY(20px) scale(0.9) rotate(-3deg);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(0deg);
    filter: blur(0px);
  }
}

@keyframes slideInRight {
  0% {
    opacity: 0;
    transform: translateX(80px) translateY(20px) scale(0.9) rotate(3deg);
    filter: blur(3px);
  }
  100% {
    opacity: 1;
    transform: translateX(0) translateY(0) scale(1) rotate(0deg);
    filter: blur(0px);
  }
}

@keyframes revealUp {
  0% {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
    clip-path: inset(100% 0 0 0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    clip-path: inset(0% 0 0 0);
  }
}

/*----------------------------------------------------------------------
  Animation Classes
----------------------------------------------------------------------*/

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }

.animate-on-load {
  opacity: 0;
  animation: fadeIn 0.8s ease-out forwards;
}

.server-illustration {
  stroke-dasharray: 1000;
  stroke-dashoffset: 1000;
  animation: drawStroke 2s ease-out forwards;
}

.server-illustration rect,
.server-illustration line {
  animation: drawStroke 2s ease-out forwards;
}

.server-illustration circle {
  animation: blinkLights 3s infinite;
  animation-delay: 2s;
}

/* Professionelle Scroll-Animationen für Feature Cards */
.animate-on-scroll {
  opacity: 0;
  transition: none;
}

.animate-on-scroll.show {
  animation-fill-mode: forwards;
}

.animate-on-scroll.from-left.show {
  animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-on-scroll.from-right.show {
  animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.animate-on-scroll.from-bottom.show {
  animation: slideInUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.feature-card.animate-on-scroll {
  opacity: 0;
}

.feature-card.animate-on-scroll.show {
  animation: revealUp 1.2s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

/* Staggered Animation für Feature Grid */
.features-grid .feature-card:nth-child(1).animate-on-scroll.show {
  animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.1s;
}

.features-grid .feature-card:nth-child(2).animate-on-scroll.show {
  animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.2s;
}

.features-grid .feature-card:nth-child(3).animate-on-scroll.show {
  animation: slideInLeft 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.3s;
}

.features-grid .feature-card:nth-child(4).animate-on-scroll.show {
  animation: slideInRight 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
  animation-delay: 0.4s;
}

.feature-card:hover .feature-icon {
  animation: pulse 2s infinite;
}

.pricing-card.featured {
  animation: glow 3s infinite;
}

/* Floating Elements - NUR opacity/filter Animationen */
.floating-element {
  position: absolute;
  border-radius: 50%;
  opacity: 0.4;
  filter: blur(1px);
  z-index: 1;
  will-change: transform, opacity, filter;
}

.floating-element.large {
  width: 35px;
  height: 35px;
  background: var(--gradient-primary);
  animation: breathe 8s ease-in-out infinite, subtlePulse 12s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-element.medium {
  width: 24px;
  height: 24px;
  background: var(--gradient-accent);
  animation: shimmerGlow 6s ease-in-out infinite, breathe 10s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-element.small {
  width: 16px;
  height: 16px;
  background: var(--gradient-violet);
  animation: breathe 7s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-element.tiny {
  width: 10px;
  height: 10px;
  background: var(--gradient-rainbow);
  animation: shimmerGlow 9s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

.floating-element.extra-small {
  width: 8px;
  height: 8px;
  background: var(--gradient-highlight);
  animation: breathe 5s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .floating-element {
    animation: none !important;
    transform: none !important;
  }
  
  .animate-on-scroll.show {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

@media (max-width: 768px) {
  .animate-on-scroll.show {
    animation-duration: 0.6s !important;
  }
  
  .floating-element {
    opacity: 0.2;
  }
  
  .floating-element.large {
    width: 25px;
    height: 25px;
  }
  
  .floating-element.medium {
    width: 18px;
    height: 18px;
  }
  
  .floating-element.small {
    width: 12px;
    height: 12px;
  }
  
  .floating-element.tiny {
    width: 8px;
    height: 8px;
  }
  
  .floating-element.extra-small {
    width: 6px;
    height: 6px;
  }
}
