/**
 * PrimeGuard Garage Doors - GSAP Animation Classes & Fallbacks
 * 
 * Provides safe default visibility (no stuck-invisible states if JS/CDN fails),
 * GPU-accelerated transforms, and respect for prefers-reduced-motion.
 */

/* ==========================================================================
   1. BASE REVEAL CLASSES (Hardware-accelerated)
   ========================================================================== */
.gs-reveal,
.gs-reveal-up,
.gs-reveal-left,
.gs-reveal-right,
.gs-reveal-scale,
.gs-reveal-rotate,
.gs-stagger {
    /* Safe default: perfectly visible if JavaScript or GSAP is disabled */
    opacity: 1;
    transform: none;
    backface-visibility: hidden;
}

/* When JavaScript and GSAP initialize, prepare initial off-screen offsets */
html.js-ready:not(.reduced-motion) .gs-reveal-up {
    opacity: 0;
    transform: translateY(35px);
    will-change: transform, opacity;
}

html.js-ready:not(.reduced-motion) .gs-reveal-left {
    opacity: 0;
    transform: translateX(-35px);
    will-change: transform, opacity;
}

html.js-ready:not(.reduced-motion) .gs-reveal-right {
    opacity: 0;
    transform: translateX(35px);
    will-change: transform, opacity;
}

html.js-ready:not(.reduced-motion) .gs-reveal-scale {
    opacity: 0;
    transform: scale(0.92);
    will-change: transform, opacity;
}

html.js-ready:not(.reduced-motion) .gs-reveal-rotate {
    opacity: 0;
    transform: rotate(-3deg) translateY(25px);
    will-change: transform, opacity;
}

html.js-ready:not(.reduced-motion) .gs-reveal {
    opacity: 0;
    will-change: opacity;
}

/* Fallback & post-animation class applied once GSAP finishes */
.gs-animated {
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
    will-change: auto !important;
}

/* Subtle image parallax container */
.gs-parallax {
    overflow: hidden;
}

.gs-parallax img,
.gs-parallax svg {
    will-change: transform;
}

/* ==========================================================================
   2. HERO ENTRANCE KEYFRAMES & ACCENTS
   ========================================================================== */
@keyframes subtleFloat {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-6px); }
    100% { transform: translateY(0px); }
}

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

/* Subtle industrial glow around emergency badges */
@keyframes accentGlow {
    0% { box-shadow: 0 0 10px rgba(255, 107, 44, 0.2); }
    50% { box-shadow: 0 0 25px rgba(255, 107, 44, 0.45); }
    100% { box-shadow: 0 0 10px rgba(255, 107, 44, 0.2); }
}

.glow-pulse {
    animation: accentGlow 3s infinite;
}

/* ==========================================================================
   3. PREFERS-REDUCED-MOTION (Accessibility Standard)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
        transform: none !important;
    }

    .gs-reveal,
    .gs-reveal-up,
    .gs-reveal-left,
    .gs-reveal-right,
    .gs-reveal-scale,
    .gs-reveal-rotate,
    .gs-stagger {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }
}

