﻿/* Utilities: Modern Premium Animations */

/* Base classes for scroll elements */
.fade-in,
.fade-in-up,
.fade-in-scale,
.slide-in-left,
.slide-in-right {
  opacity: 1;
  filter: blur(0px);
  transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  transition: opacity 1.2s cubic-bezier(0.22, 1, 0.36, 1), 
              transform 1.2s cubic-bezier(0.22, 1, 0.36, 1),
              filter 1.2s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform, opacity, filter;
  backface-visibility: hidden;
}

/* Scroll-pending state (when out of viewport) */
.scroll-pending.fade-in {
  transform: translate3d(0, 15px, 0);
}
.scroll-pending.fade-in-up {
  transform: translate3d(0, 30px, 0);
}
.scroll-pending.fade-in-scale {
  transform: scale3d(0.95, 0.95, 1);
}
.scroll-pending.slide-in-left {
  transform: translate3d(-30px, 0, 0);
}
.scroll-pending.slide-in-right {
  transform: translate3d(30px, 0, 0);
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.7;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* Applied by JS to off-screen elements - blur and semi-transparent instead of completely hidden */
.scroll-pending {
  opacity: 0.3 !important;
  filter: blur(8px) !important;
}

/* Respect reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  .fade-in,
  .fade-in-up,
  .fade-in-scale,
  .slide-in-left,
  .slide-in-right {
    transition: none !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }
  .scroll-pending {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
  }

}
