/* ===================================================
   ANIMATIONS.CSS — Keyframes, Transitions, Scroll FX
   =================================================== */

/* ---- Loader ---- */
#loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #000;
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(139, 30, 45, 0.3);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ---- Scroll Progress Bar ---- */
#scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: var(--accent-primary);
    width: 0%;
    z-index: 9998;
    transition: width 0.1s;
    box-shadow: 0 0 10px var(--accent-primary);
}

/* ---- Hero Zoom ---- */
@keyframes heroZoom {
    from {
        transform: translateY(calc(var(--hero-base-translate-y, 0px) + var(--hero-parallax-y, 0px))) scale(var(--hero-scale-start, 1.1));
        opacity: 0;
    }
    to {
        transform: translateY(calc(var(--hero-base-translate-y, 0px) + var(--hero-parallax-y, 0px))) scale(var(--hero-scale-end, 1));
        opacity: 1;
    }
}

/* ---- Nav Link Fade (Mobile) ---- */
@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* ---- Hamburger Toggle Animation ---- */
.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

/* ---- Simple Fade In ---- */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* ---- Staggered Fade Up (Grid Children) ---- */
.fade-up-element {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1),
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

/* ---- Reveal Text (Line Sweep) ---- */
.reveal-text {
    position: relative;
    overflow: hidden;
    display: block;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    animation: reveal 1.2s cubic-bezier(0.77, 0, 0.175, 1) forwards;
}

@keyframes reveal {
    0%   { width: 100%; }
    100% { width: 0; }
}

/* ---- Fade In General ---- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---- New Hero System ---- */
@keyframes heroEntrance {
    from {
        opacity: 0;
        transform: scale(1.05) translateX(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateX(0);
    }
}

@keyframes scanline {
    0% { top: 0%; }
    100% { top: 100%; }
}
