/* ======================================================
   Synapse IT - Premium Custom Cursor v3.0
   Soft glow cursor with smooth following ring
   ====================================================== */

/* Hide default cursor when custom cursor is active */
body.custom-cursor-active {
    cursor: none;
}

body.custom-cursor-active a,
body.custom-cursor-active button,
body.custom-cursor-active input,
body.custom-cursor-active textarea,
body.custom-cursor-active select,
body.custom-cursor-active [role="button"],
body.custom-cursor-active .clickable,
body.custom-cursor-active .bento-card,
body.custom-cursor-active .product-card,
body.custom-cursor-active .industry-card,
body.custom-cursor-active .agent-card {
    cursor: none;
}

/* ======================================================
   MAIN CURSOR DOT
   ====================================================== */
.custom-cursor {
    position: fixed;
    pointer-events: none;
    z-index: 99999;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.25);
    border: 1.5px solid rgba(37, 99, 235, 0.7);
    transform: translate(-50%, -50%);
    transition: width 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                height 0.2s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.2s ease,
                border-color 0.2s ease,
                box-shadow 0.2s ease;
    mix-blend-mode: normal;
    will-change: transform, width, height;
    box-shadow:
        0 0 12px rgba(37, 99, 235, 0.2),
        inset 0 0 8px rgba(37, 99, 235, 0.08);
}

/* ======================================================
   CURSOR OUTER RING
   ====================================================== */
.custom-cursor-ring {
    position: fixed;
    pointer-events: none;
    z-index: 99998;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: transparent;
    border: 1px solid rgba(37, 99, 235, 0.15);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease,
                height 0.3s ease,
                border-color 0.3s ease,
                opacity 0.3s ease,
                background 0.3s ease,
                box-shadow 0.3s ease;
    will-change: transform, width, height;
    box-shadow:
        0 0 16px rgba(37, 99, 235, 0.05),
        inset 0 0 16px rgba(37, 99, 235, 0.02);
}

/* ======================================================
   CURSOR TRAIL PARTICLES
   ====================================================== */
.custom-cursor-trail {
    position: fixed;
    pointer-events: none;
    z-index: 99997;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(37, 99, 235, 0.12);
    transform: translate(-50%, -50%);
    transition: opacity 0.4s ease, transform 0.4s ease;
    will-change: transform, opacity;
    box-shadow: 0 0 4px rgba(37, 99, 235, 0.08);
}

/* ======================================================
   HOVER STATES
   ====================================================== */

/* Links */
.custom-cursor.hover-link {
    width: 32px;
    height: 32px;
    background: rgba(37, 99, 235, 0.12);
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow:
        0 0 25px rgba(37, 99, 235, 0.25),
        0 0 50px rgba(37, 99, 235, 0.1),
        inset 0 0 15px rgba(37, 99, 235, 0.05);
}

.custom-cursor-ring.hover-link {
    width: 52px;
    height: 52px;
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(37, 99, 235, 0.03);
    box-shadow:
        0 0 30px rgba(37, 99, 235, 0.1),
        inset 0 0 20px rgba(37, 99, 235, 0.03);
}

/* Buttons & CTAs */
.custom-cursor.hover-button {
    width: 42px;
    height: 42px;
    background: rgba(124, 58, 237, 0.15);
    border-color: rgba(124, 58, 237, 0.8);
    box-shadow:
        0 0 30px rgba(124, 58, 237, 0.3),
        0 0 60px rgba(124, 58, 237, 0.12),
        inset 0 0 20px rgba(124, 58, 237, 0.05);
}

.custom-cursor-ring.hover-button {
    width: 60px;
    height: 60px;
    border-color: rgba(124, 58, 237, 0.35);
    background: rgba(124, 58, 237, 0.04);
    box-shadow:
        0 0 40px rgba(124, 58, 237, 0.12),
        inset 0 0 30px rgba(124, 58, 237, 0.03);
}

/* Input Fields */
.custom-cursor.hover-input {
    width: 24px;
    height: 24px;
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.7);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.15);
}

.custom-cursor-ring.hover-input {
    width: 44px;
    height: 44px;
    border-color: rgba(16, 185, 129, 0.2);
}

/* Cards (bento, product, agent, etc.) */
.custom-cursor.hover-card {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg,
        rgba(37, 99, 235, 0.12),
        rgba(124, 58, 237, 0.12),
        rgba(6, 182, 212, 0.12));
    border-color: rgba(37, 99, 235, 0.8);
    box-shadow:
        0 0 35px rgba(37, 99, 235, 0.25),
        0 0 60px rgba(124, 58, 237, 0.12);
}

.custom-cursor-ring.hover-card {
    width: 68px;
    height: 68px;
    border-color: rgba(37, 99, 235, 0.3);
    background: rgba(124, 58, 237, 0.03);
    box-shadow:
        0 0 40px rgba(37, 99, 235, 0.1),
        inset 0 0 30px rgba(124, 58, 237, 0.03);
}

/* ======================================================
   CLICK ANIMATION
   ====================================================== */
.custom-cursor.clicking {
    animation: cursorClick 0.3s ease forwards;
}

.custom-cursor-ring.clicking {
    animation: ringClick 0.3s ease forwards;
}

@keyframes cursorClick {
    0% {
        transform: translate(-50%, -50%) scale(1);
        background: rgba(37, 99, 235, 0.25);
    }
    50% {
        transform: translate(-50%, -50%) scale(0.6);
        background: rgba(37, 99, 235, 0.5);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        background: rgba(37, 99, 235, 0.25);
    }
}

@keyframes ringClick {
    0% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.3);
        opacity: 0.4;
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* ======================================================
   CLICK RIPPLE (added by JS)
   ====================================================== */
.cursor-ripple {
    position: fixed;
    pointer-events: none;
    z-index: 99996;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 99, 235, 0.4);
    transform: translate(-50%, -50%) scale(0);
    animation: rippleExpand 0.6s ease-out forwards;
    box-shadow: 0 0 20px rgba(37, 99, 235, 0.1);
}

@keyframes rippleExpand {
    to { transform: translate(-50%, -50%) scale(3); opacity: 0; }
}

/* ======================================================
   VISIBILITY STATES
   ====================================================== */
.custom-cursor.hidden,
.custom-cursor-ring.hidden {
    opacity: 0;
    width: 0;
    height: 0;
}

/* ======================================================
   TOUCH DEVICE FALLBACK
   ====================================================== */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor,
    .custom-cursor-ring,
    .custom-cursor-trail,
    .cursor-ripple {
        display: none !important;
    }

    body.custom-cursor-active {
        cursor: auto;
    }
}