/* css/cursor.css
   Shared custom cursor widget.
   Injected by js/cursor.js on every page — no HTML markup needed.
   Relies on the color variables already defined in each page's :root
   (--glow-blue, --accent-purple, --glow-pink, --primary-trust-blue, --clarity-white).
*/

/* ─── CUSTOM CURSOR STYLES ─── */
* {
    cursor: none !important;
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
    * {
        cursor: auto !important;
    }

    .custom-cursor,
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}

.custom-cursor {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 9999;
}

.cursor-dot {
    position: fixed;
    width: 12px;
    height: 12px;
    background: var(--glow-blue);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 10000;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: transform 0.15s ease, width 0.3s ease, height 0.3s ease;
    box-shadow:
        0 0 15px var(--glow-blue),
        0 0 30px var(--glow-blue),
        inset 0 0 10px rgba(255, 255, 255, 0.5);
    animation: cursorPulse 2s ease-in-out infinite alternate;
}

.cursor-ring {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--accent-purple);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    z-index: 9999;
    pointer-events: none;
    mix-blend-mode: difference;
    transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow:
        0 0 20px var(--accent-purple),
        0 0 40px rgba(177, 107, 224, 0.3);
    animation: cursorRotate 20s linear infinite;
}

.cursor-ring::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 1px solid var(--glow-pink);
    border-radius: 50%;
    animation: cursorRotateReverse 15s linear infinite;
    opacity: 0.7;
}

.cursor-ring::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid var(--primary-trust-blue);
    border-radius: 50%;
    animation: cursorRotate 25s linear infinite;
    opacity: 0.5;
}

/* Hover effects */
.cursor-hover .cursor-dot {
    width: 20px;
    height: 20px;
    background: var(--glow-pink);
    box-shadow:
        0 0 25px var(--glow-pink),
        0 0 50px var(--glow-pink);
}

.cursor-hover .cursor-ring {
    width: 60px;
    height: 60px;
    border-color: var(--glow-blue);
    box-shadow:
        0 0 30px var(--glow-blue),
        0 0 60px rgba(109, 213, 237, 0.4);
}

/* Click animation */
.cursor-click .cursor-dot {
    width: 8px;
    height: 8px;
    background: var(--clarity-white);
    box-shadow:
        0 0 20px var(--clarity-white),
        0 0 40px var(--clarity-white);
}

.cursor-click .cursor-ring {
    width: 50px;
    height: 50px;
    border-color: var(--clarity-white);
    opacity: 0.8;
}

/* Animations */
@keyframes cursorPulse {
    0% {
        box-shadow:
            0 0 15px var(--glow-blue),
            0 0 30px var(--glow-blue),
            inset 0 0 10px rgba(255, 255, 255, 0.5);
    }

    100% {
        box-shadow:
            0 0 25px var(--glow-blue),
            0 0 50px var(--glow-blue),
            inset 0 0 15px rgba(255, 255, 255, 0.7);
    }
}

@keyframes cursorRotate {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes cursorRotateReverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Special hover elements */
.hero-btn,
.nav-links a,
.category-card,
.social-link,
.newsletter-btn,
.feature-card,
.headline-option,
.skill-tag,
.value-tag {
    cursor: none !important;
}

/* Loading cursor */
body.loading * {
    cursor: wait !important;
}
