/* Page Transition CSS - Conservative, CLS-safe version */

/* ============================================================
   RULE: Only animate things that are BELOW the fold or
   user-triggered. Never hide above-fold content.
   Opacity-only transitions are safe (no layout shifts).
   ============================================================ */

/* Video fade-in: videos start invisible and fade in when ready.
   This is safe because videos don't affect surrounding layout. */
video {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

video.loaded {
    opacity: 1;
}

/* Explicitly-opted-in fade elements (must be added in HTML, never via JS).
   Only use on elements that are BELOW the initial viewport. */
.fade-in-element {
    opacity: 0;
    transition: opacity 0.7s ease-out;
}

.fade-in-element.visible {
    opacity: 1;
}

/* Button hover effects (user-triggered, never cause CLS) */
.btn, .btn-cta, .btn-calculate {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

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

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

/* Page transition overlay - disabled */
#page-transition-loader {
    display: none !important;
    opacity: 0 !important;
    pointer-events: none !important;
}
