/* =========================================
   UI ENHANCEMENTS: Scroll Lock, Progress, Cursor
   ========================================= */

/* --- 1. SCROLL LOCK (Mobile Menu) --- */
body.no-scroll {
    overflow: hidden !important;
    height: 100vh;
    touch-action: none;
    /* Disables touch scroll on some devices */
}

/* --- 2. PROGRESS BAR --- */
#scroll-progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 6px;
    z-index: 9999;
    background: transparent;
    pointer-events: none;
}

#scroll-progress-bar {
    width: 0%;
    height: 100%;
    /* Theme Pink for high visibility against Yellow/White */
    background: #F06292;
    border-right: 2px solid #121212;
    transition: width 0.1s ease-out;
}

/* --- 3. CUSTOM CURSOR --- */
/* Hide default cursor on devices that support hover (mice) */
@media (hover: hover) and (pointer: fine) {

    body,
    a,
    button,
    input,
    textarea,
    select {
        cursor: none;
    }
}

.cursor-dot,
.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    z-index: 10000;
    pointer-events: none;
    display: none;
    /* Hidden by default until JS detection */
}

@media (hover: hover) and (pointer: fine) {

    .cursor-dot,
    .cursor-outline {
        display: block;
    }
}

/* The small inner dot */
.cursor-dot {
    width: 12px;
    height: 12px;
    background-color: white;
    /* Base is white for difference mode */
    mix-blend-mode: difference;
    /* Inverts colors: White on Black=White, White on White=Black */
}

/* The larger trailing outline */
.cursor-outline {
    width: 40px;
    height: 40px;
    border: 2px solid white;
    /* Base is white */
    mix-blend-mode: difference;
    transition: width 0.2s, height 0.2s, background-color 0.2s, transform 0.1s;
}

/* Hover state for links/buttons */
body.hovering .cursor-outline {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.2);
    /* Subtle fill */
    border-color: white;
}

body.hovering .cursor-dot {
    transform: translate(-50%, -50%) scale(0.5);
}

/* =========================================
   HOME PAGE EXCLUSIVE CURSOR ("Pop!" Vibe)
   ========================================= */
body.page-home .cursor-dot {
    /* Diamond shape center */
    border-radius: 0;
    transform: translate(-50%, -50%) rotate(45deg);
}

body.page-home .cursor-outline {
    /* Comic Burst / Star Shape */
    border-radius: 0;
    border: none;
    background-color: white;
    /* 8-point Star Clip Path */
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%,
            79% 91%, 50% 70%, 21% 91%, 32% 57%,
            2% 35%, 39% 35%);
    /* Make it spin slowly for extra "originality" */
    animation: cursorSpin 10s linear infinite;
}

body.page-home.hovering .cursor-outline {
    /* Spikes get sharper/larger on hover */
    width: 80px;
    height: 80px;
    background-color: white;
    animation: cursorSpin 2s linear infinite;
    /* Spin faster on hover */
}

@keyframes cursorSpin {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}