/*
 * Context-aware VibeHub-style cursor for the public website.
 * The native cursor is hidden only after JavaScript confirms a mouse/fine
 * pointer and that the visitor has not requested reduced motion.
 */

@media (hover: hover) and (pointer: fine) {
    html.site-morph-cursor-enabled,
    html.site-morph-cursor-enabled body,
    html.site-morph-cursor-enabled body * {
        cursor: none !important;
    }

    #site-morphing-cursor {
        position: fixed;
        top: 0;
        left: 0;
        width: 0;
        height: 0;
        z-index: 99999;
        pointer-events: none;
        opacity: 0;
        visibility: hidden;
        overflow: visible;
        will-change: transform;
        transition:
            opacity 250ms cubic-bezier(.33, 1, .68, 1),
            visibility 0s linear 250ms;
    }

    #site-morphing-cursor.is-visible {
        opacity: 1;
        visibility: visible;
        transition:
            opacity 250ms cubic-bezier(.33, 1, .68, 1),
            visibility 0s linear 0s;
    }

    #site-morphing-cursor .site-cursor-part {
        position: absolute;
        top: 0;
        left: 0;
        display: block;
        pointer-events: none;
        transform-origin: center;
        transition:
            width 200ms cubic-bezier(.33, 1, .68, 1),
            height 200ms cubic-bezier(.33, 1, .68, 1),
            opacity 200ms cubic-bezier(.33, 1, .68, 1),
            background-color 200ms cubic-bezier(.33, 1, .68, 1),
            border-color 200ms cubic-bezier(.33, 1, .68, 1),
            border-radius 200ms cubic-bezier(.33, 1, .68, 1),
            transform 200ms cubic-bezier(.33, 1, .68, 1);
    }

    #site-morphing-cursor .site-cursor-arrow {
        width: 22px;
        height: 22px;
        opacity: 1;
        transform: translate(-4px, -3px) scale(1);
        transform-origin: 4px 3px;
        filter: drop-shadow(0 1px 2px rgba(15, 23, 42, .25));
    }

    #site-morphing-cursor .site-cursor-arrow path {
        fill: var(--site-cursor-blue, #3559d8);
        stroke: #fff;
        stroke-width: 2.2;
        stroke-linejoin: round;
        paint-order: stroke;
    }

    #site-morphing-cursor .site-cursor-ring {
        width: 22px;
        height: 22px;
        border: 1.5px solid var(--site-cursor-blue, #3559d8);
        border-radius: 50%;
        background: rgba(53, 89, 216, .12);
        box-shadow: none;
        opacity: 0;
        transform: translate(-50%, -50%) scale(.45);
    }

    #site-morphing-cursor .site-cursor-ibeam {
        width: 2px;
        height: 20px;
        border-radius: 2px;
        background: var(--site-cursor-blue, #3559d8);
        box-shadow: 0 1px 5px rgba(15, 23, 42, .22);
        opacity: 0;
        transform: translate(-50%, -50%) scaleY(.45);
    }

    #site-morphing-cursor[data-state="interactive"] .site-cursor-arrow,
    #site-morphing-cursor[data-state="text"] .site-cursor-arrow {
        opacity: 0;
        transform: translate(-4px, -3px) scale(.5);
    }

    #site-morphing-cursor[data-state="interactive"] .site-cursor-ring {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    #site-morphing-cursor[data-state="text"] .site-cursor-ibeam {
        opacity: 1;
        transform: translate(-50%, -50%) scaleY(1);
    }

    #site-morphing-cursor.is-pressed[data-state="arrow"] .site-cursor-arrow {
        transform: translate(-4px, -3px) scale(.88);
    }

    #site-morphing-cursor.is-pressed[data-state="interactive"] .site-cursor-ring {
        transform: translate(-50%, -50%) scale(.82);
    }
}

@media (hover: none), (pointer: coarse), (prefers-reduced-motion: reduce) {
    #site-morphing-cursor {
        display: none !important;
    }
}
