/* ==========================================================================
   CSS ANIMATIONS & TRANSITIONS
   Solvevare - Entrance and Micro-interaction Animations
   ========================================================================== */

/* Pre-animation states — GSAP controls all animated elements, NOT CSS transitions */
body.loading .loading-hidden {
    opacity: 1;
    visibility: visible;
}

/* Ensure header is never permanently hidden if JS animation fails */
.site-header.loading-hidden {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.3s ease;
}

/* Loader is intentionally disabled globally so pages render correctly when JS is off */
body.loading .page-loader {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
}

/* Word line clip container for GSAP yPercent reveals */
.word-line {
    display: block;
    overflow: hidden;
    line-height: inherit;
    padding-bottom: 0.05em;
}

/* reveal-line clip container — used on sub-pages */
.reveal-line {
    display: block;
    overflow: hidden;
    line-height: inherit;
    padding-bottom: 0.06em;
}

.reveal-line span,
.word-inner {
    display: block;
    will-change: transform;
    /* NO CSS transition — GSAP controls these exclusively */
}

/* Fallback: if JS fails entirely */
@keyframes fallback-reveal {
    to { opacity: 1; transform: none; }
}

.js-failed .loading-hidden {
    animation: fallback-reveal 0.5s ease forwards;
}
