/* Landing Page Custom Animations */

/* Keyframe Animations */
@keyframes slide-up-fade {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

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

@keyframes ken-burns {
    from {
        transform: scale(1.0);
    }
    to {
        transform: scale(1.05);
    }
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 20px rgba(169, 154, 227, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(169, 154, 227, 0.6);
    }
}

/* Animation Classes */
.animate-slide-up-fade {
    animation: slide-up-fade 1s ease-out forwards;
}

.animate-slide-right-fade {
    animation: slide-right-fade 1s ease-out forwards;
}

.animate-slide-in-left {
    animation: slide-in-left 1s ease-out forwards;
}

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

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

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

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

.animate-ken-burns {
    animation: ken-burns 20s ease-in-out infinite alternate;
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Enhanced Transitions */
.transition-all-slow {
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.transition-transform-smooth {
    transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Custom Shadow Effects */
.shadow-3xl {
    box-shadow: 0 35px 60px -12px rgba(0, 0, 0, 0.25);
}

.shadow-brand {
    box-shadow: 0 10px 25px rgba(169, 154, 227, 0.2);
}

.shadow-brand-lg {
    box-shadow: 0 20px 40px rgba(169, 154, 227, 0.3);
}

/* Backdrop Blur Enhanced */
.backdrop-blur-xl {
    backdrop-filter: blur(24px);
}

/* Enhanced Hover Effects */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.hover-glow:hover {
    box-shadow: 0 0 30px rgba(169, 154, 227, 0.4);
}

/* Performance Optimizations */
.gpu-accelerated {
    transform: translateZ(0);
    backface-visibility: hidden;
    perspective: 1000px;
}

/* Responsive Animation Adjustments */
@media (max-width: 768px) {
    .animate-slide-up-fade,
    .animate-slide-right-fade,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-slide-in-up,
    .animate-fade-in-up {
        animation-duration: 0.6s;
    }
    
    .animate-float {
        animation-duration: 2s;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .animate-slide-up-fade,
    .animate-slide-right-fade,
    .animate-slide-in-left,
    .animate-slide-in-right,
    .animate-slide-in-up,
    .animate-fade-in-up,
    .animate-float,
    .animate-ken-burns,
    .animate-pulse-glow {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
}

/* Intersection Observer Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Animation Delays */
.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; }
.stagger-7 { animation-delay: 0.7s; }
.stagger-8 { animation-delay: 0.8s; }

/* Text Utilities */
.line-clamp-1 {
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Mobile Responsive Grid Utilities */
.xs\:grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 475px) {
    .xs\:text-base { font-size: 1rem; }
    .xs\:text-sm { font-size: 0.875rem; }
    .xs\:text-xs { font-size: 0.75rem; }
    .xs\:h-40 { height: 10rem; }
    .xs\:h-\[280px\] { height: 280px; }
    .xs\:p-4 { padding: 1rem; }
    .xs\:space-y-3 > :not([hidden]) ~ :not([hidden]) {
        --tw-space-y-reverse: 0;
        margin-top: calc(0.75rem * calc(1 - var(--tw-space-y-reverse)));
        margin-bottom: calc(0.75rem * var(--tw-space-y-reverse));
    }
    .xs\:flex-row { flex-direction: row; }
    .xs\:items-center { align-items: center; }
    .xs\:line-clamp-1 {
        display: -webkit-box;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
}

/* Enhanced Product Card Animations */
.product-card-enter {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
}

.product-card-enter-active {
    opacity: 1;
    transform: translateY(0) scale(1);
    transition: all 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Mobile Grid Smooth Scrolling */
.smooth-scroll {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
}

/* Button Loading States */
.button-loading {
    pointer-events: none;
    opacity: 0.7;
}

.button-loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    margin: auto;
    border: 2px solid transparent;
    border-top-color: currentColor;
    border-radius: 50%;
    animation: button-loading-spinner 1s ease infinite;
}

@keyframes button-loading-spinner {
    from {
        transform: rotate(0turn);
    }
    to {
        transform: rotate(1turn);
    }
}