/* Premium Fade-In Animation System */

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

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

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Elements start hidden */
.fade-in-element {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Video specific fade-in */
video {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

video.loaded {
    opacity: 1;
}

/* Image fade-in */
img {
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
}

img.loaded {
    opacity: 1;
}

/* Text content fade-in */
.fade-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.fade-text.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger animation delays for multiple elements */
.fade-in-element:nth-child(1) { transition-delay: 0.1s; }
.fade-in-element:nth-child(2) { transition-delay: 0.2s; }
.fade-in-element:nth-child(3) { transition-delay: 0.3s; }
.fade-in-element:nth-child(4) { transition-delay: 0.4s; }
.fade-in-element:nth-child(5) { transition-delay: 0.5s; }
.fade-in-element:nth-child(6) { transition-delay: 0.6s; }

/* Card and container fade-in */
.card, .calculator-container, .product-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.card.visible, .calculator-container.visible, .product-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero section smooth entrance */
.hero-section {
    opacity: 0;
    animation: fadeInScale 1.2s ease-out 0.2s forwards;
}

/* Button hover effects */
.btn, .btn-cta, .btn-calculate {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover, .btn-cta:hover, .btn-calculate:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 212, 255, 0.3);
}

/* Smooth navbar transition */
.navbar {
    opacity: 0;
    animation: fadeIn 0.6s ease-out forwards;
}

/* Product video container */
.product-video-container {
    opacity: 0;
    transform: scale(0.98);
    transition: opacity 1s ease-out, transform 1s ease-out;
}

.product-video-container.visible {
    opacity: 1;
    transform: scale(1);
}

/* Feature sections */
.feature-card, .social-feature, .archway-feature {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.feature-card.visible, .social-feature.visible, .archway-feature.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Pricing cards */
.pricing-card, .price-highlight {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.pricing-card.visible, .price-highlight.visible {
    opacity: 1;
    transform: scale(1);
}

/* Smooth page load */
body {
    opacity: 0;
    animation: fadeIn 0.5s ease-out forwards;
}

/* Performance optimization */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Loading states */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

.loaded {
    opacity: 1;
    pointer-events: auto;
}

/* Page transition DISABLED to restore videos */
#page-transition-loader {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
