/**
 * ==============================================================================
 * SugarLife® MedTech Digital Architecture (v4.2.0-PRO)
 * 60fps Micro-Interactions, Hardware-Accelerated Animations & Transitions
 * 
 * Performance & Accessibility:
 * - GPU Composited (transform & opacity only) to prevent main-thread jank
 * - @media (prefers-reduced-motion: reduce) compliant for accessibility
 * 
 * Lead Engineering: SugarLife MedTech R&D Lab (Leopoldstraße 128, 80802 München)
 * ==============================================================================
 */

/* Fade In Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

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

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

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

@keyframes slideRight {
  from {
    transform: translateX(-100%);
  }
  to {
    transform: translateX(0);
  }
}

/* Skeleton Loading Shimmer */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-loading {
  background: linear-gradient(90deg, #f0ede6 25%, #fbfaf7 50%, #f0ede6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* Pulse Ring for Medical TIR (Time-in-Range) & Live Indicators */
@keyframes pulseRing {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0);
  }
}

.indicator-pulse-tir {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: #10B981;
  animation: pulseRing 2s cubic-bezier(0.45, 0, 0.55, 1) infinite;
}

/* Gentle Float Animation for Highlight Cards */
@keyframes floatGentle {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

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

/* Hero Badge Glow */
@keyframes gentleGlow {
  0%, 100% {
    box-shadow: 0 0 15px rgba(0, 168, 150, 0.2);
  }
  50% {
    box-shadow: 0 0 25px rgba(0, 168, 150, 0.4);
  }
}

/* Utility Animation Classes */
.animate-fade-in {
  animation: fadeIn 0.4s ease-out forwards;
}

.animate-fade-in-up {
  animation: fadeInUp 0.5s ease-out forwards;
}

.animate-scale-in {
  animation: scaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Stagger delays */
.delay-100 { animation-delay: 100ms; }
.delay-200 { animation-delay: 200ms; }
.delay-300 { animation-delay: 300ms; }
.delay-400 { animation-delay: 400ms; }

/* Interactive Hover Micro-Interactions */
.hover-lift {
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

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

.hover-glow {
  transition: box-shadow var(--transition-base);
}

.hover-glow:hover {
  box-shadow: 0 0 20px rgba(36, 77, 61, 0.2);
}

/* Accessible Reduced Motion */
@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;
  }
}
