/* ==========================================================================
   GSAP Animations & Custom Interactions CSS
   ========================================================================== */

/* 1. Custom Magnetic Cursor */
body {
    cursor: none; /* Hide default cursor */
}

a, button, input, textarea, select {
    cursor: none !important;
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 20px;
    height: 20px;
    background-color: white;
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
    transform: translate(-50%, -50%);
    transition: width 0.3s cubic-bezier(0.19, 1, 0.22, 1), height 0.3s cubic-bezier(0.19, 1, 0.22, 1);
    /* GSAP will handle position via transform */
}

.custom-cursor.is-hovering {
    width: 60px;
    height: 60px;
}

/* 2. Page Transition Overlay */
.page-transition-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #0a0a0a;
    z-index: 10000;
    pointer-events: none;
    display: flex;
    justify-content: center;
    align-items: center;
}

.page-transition-overlay::after {
    content: '';
    width: 0%;
    height: 2px;
    background-color: #fcfcfc;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.page-transition-overlay.is-loading::after {
    opacity: 1;
    animation: transition-loading 2s infinite ease-in-out;
}

@keyframes transition-loading {
    0% { width: 0%; left: 0; transform: translate(0, -50%); }
    50% { width: 100%; left: 0; transform: translate(0, -50%); }
    100% { width: 0%; left: 100%; transform: translate(-100%, -50%); }
}

/* 3. Text Reveal Prep (Avoid FOUC) */
.gsap-reveal-wrapper {
    overflow: hidden;
    display: inline-block;
    vertical-align: top;
}

.gsap-reveal {
    /* Initially hidden via JS immediately, but this helps before JS runs */
    opacity: 0;
}

/* 4. Image Unveil Prep */
.gsap-unveil-wrapper {
    position: relative;
    overflow: hidden;
    display: block;
}

.gsap-unveil-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #18181b; /* gray-900 */
    z-index: 20;
}

.gsap-unveil-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Scale down slightly initially */
    transform: scale(1.1);
}

/* Make sure html/body works with Lenis */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-scrolling iframe {
    pointer-events: none;
}
