/* =========================================================
   ABOLFAZL SITE — CINEMATIC PREMIUM CURSOR
   ---------------------------------------------------------
   Existing hooks preserved:
   .cursor-dot
   .cursor-glow
   body.cursor-active
   body.cursor-hover
   body.cursor-click
   .cursor-spotlight
   html[data-theme="dark"]
   html[data-theme="light"]
   ========================================================= */


/* =========================================================
   GLOBAL CURSOR
   ========================================================= */

@media (pointer: fine) {

    body {
        cursor: none;
    }

    a,
    button,
    input,
    textarea,
    select,
    [role="button"] {
        cursor: none;
    }


    /* =====================================================
       CORE DOT
       ===================================================== */

    .cursor-dot {
        position: fixed;

        width: 7px;
        height: 7px;

        left: 0;
        top: 0;

        pointer-events: none;

        z-index: 2147483647;

        border-radius: 50%;

        background:
            radial-gradient(
                circle,
                rgba(255,255,255,1) 0%,
                rgba(255,255,255,.96) 35%,
                rgba(255,255,255,.4) 70%,
                transparent 100%
            );

        box-shadow:
            0 0 4px rgba(255,255,255,.95),
            0 0 12px rgba(255,255,255,.65),
            0 0 25px rgba(255,255,255,.3);

        transform:
            translate3d(-50%, -50%, 0)
            scale(1);

        will-change: transform;

        transition:
            width .25s cubic-bezier(.22,1,.36,1),
            height .25s cubic-bezier(.22,1,.36,1),
            opacity .25s ease,
            box-shadow .3s ease;
    }


    /* =====================================================
       OUTER GLOW
       ===================================================== */

    .cursor-glow {
        position: fixed;

        width: 95px;
        height: 95px;

        left: 0;
        top: 0;

        pointer-events: none;

        z-index: 2147483646;

        border-radius: 50%;

        transform:
            translate3d(-50%, -50%, 0)
            scale(1);

        will-change: transform;

        background:
            radial-gradient(
                circle,
                rgba(255,255,255,.16) 0%,
                rgba(255,255,255,.09) 20%,
                rgba(255,255,255,.045) 40%,
                rgba(255,255,255,.018) 60%,
                transparent 74%
            );

        filter: blur(5px);

        opacity: .65;

        mix-blend-mode: screen;

        transition:
            width .5s cubic-bezier(.22,1,.36,1),
            height .5s cubic-bezier(.22,1,.36,1),
            opacity .4s ease,
            filter .4s ease;
    }


    /* =====================================================
       SECONDARY AURA
       ===================================================== */

    .cursor-glow::before {
        content: "";

        position: absolute;

        inset: -25px;

        border-radius: inherit;

        background:
            radial-gradient(
                circle,
                rgba(255,255,255,.09),
                transparent 68%
            );

        filter: blur(15px);

        opacity: .7;

        animation:
            cursorAura 4s ease-in-out infinite;
    }


    /* =====================================================
       INNER HALO
       ===================================================== */

    .cursor-glow::after {
        content: "";

        position: absolute;

        inset: 25px;

        border-radius: 50%;

        border: 1px solid rgba(255,255,255,.12);

        box-shadow:
            inset 0 0 15px rgba(255,255,255,.04),
            0 0 15px rgba(255,255,255,.05);

        opacity: .8;
    }


    /* =====================================================
       ACTIVE CURSOR
       ===================================================== */

    body.cursor-active .cursor-dot {
        opacity: 1;
    }

    body.cursor-active .cursor-glow {
        opacity: .75;
    }


    /* =====================================================
       HOVER — PREMIUM EXPANSION
       ===================================================== */

    body.cursor-hover .cursor-dot {
        width: 12px;
        height: 12px;

        box-shadow:
            0 0 6px rgba(255,255,255,1),
            0 0 18px rgba(255,255,255,.8),
            0 0 35px rgba(255,255,255,.4);

        transform:
            translate3d(-50%, -50%, 0)
            scale(1.05);
    }


    body.cursor-hover .cursor-glow {
        width: 145px;
        height: 145px;

        opacity: .9;

        filter: blur(2px);
    }


    /* =====================================================
       CLICK — ENERGY PULSE
       ===================================================== */

    body.cursor-click .cursor-dot {
        width: 4px;
        height: 4px;

        box-shadow:
            0 0 8px rgba(255,255,255,1),
            0 0 25px rgba(255,255,255,.9),
            0 0 55px rgba(255,255,255,.6);
    }


    body.cursor-click .cursor-glow {
        width: 180px;
        height: 180px;

        opacity: 1;

        filter: blur(0);

        transition:
            width .12s ease,
            height .12s ease,
            opacity .12s ease;
    }


    /* =====================================================
       SPOTLIGHT
       ===================================================== */

    .cursor-spotlight {
        position: relative;

        isolation: isolate;

        overflow: hidden;
    }


    .cursor-spotlight::before {
        content: "";

        position: absolute;

        width: 280px;
        height: 280px;

        left: var(--mouse-x, 50%);
        top: var(--mouse-y, 50%);

        transform:
            translate(-50%, -50%);

        pointer-events: none;

        border-radius: 50%;

        background:
            radial-gradient(
                circle,
                rgba(255,255,255,.09) 0%,
                rgba(255,255,255,.035) 28%,
                transparent 70%
            );

        filter: blur(5px);

        opacity: 0;

        transition:
            opacity .4s ease;

        z-index: -1;
    }


    .cursor-spotlight:hover::before {
        opacity: 1;
    }


    /* =====================================================
       DARK MODE
       ===================================================== */

    html[data-theme="dark"] .cursor-dot {
        background:
            radial-gradient(
                circle,
                #ffffff 0%,
                rgba(255,255,255,.95) 35%,
                rgba(255,255,255,.35) 70%,
                transparent 100%
            );

        box-shadow:
            0 0 5px rgba(255,255,255,1),
            0 0 15px rgba(255,255,255,.75),
            0 0 35px rgba(255,255,255,.35);
    }


    html[data-theme="dark"] .cursor-glow {
        background:
            radial-gradient(
                circle,
                rgba(255,255,255,.15),
                rgba(255,255,255,.05) 35%,
                transparent 72%
            );

        mix-blend-mode: screen;
    }


    /* =====================================================
       LIGHT MODE
       ===================================================== */

    html[data-theme="light"] .cursor-dot {
        background:
            radial-gradient(
                circle,
                #111 0%,
                #222 45%,
                rgba(0,0,0,.3) 75%,
                transparent 100%
            );

        box-shadow:
            0 0 5px rgba(0,0,0,.6),
            0 0 15px rgba(0,0,0,.25);
    }


    html[data-theme="light"] .cursor-glow {
        background:
            radial-gradient(
                circle,
                rgba(0,0,0,.10),
                rgba(0,0,0,.035) 40%,
                transparent 72%
            );

        mix-blend-mode: multiply;
    }


    /* =====================================================
       MICRO MOTION
       ===================================================== */

    @keyframes cursorAura {

        0% {
            transform: scale(.92);
            opacity: .45;
        }

        50% {
            transform: scale(1.08);
            opacity: .8;
        }

        100% {
            transform: scale(.92);
            opacity: .45;
        }
    }


    /* =====================================================
       PERFORMANCE
       ===================================================== */

    .cursor-dot,
    .cursor-glow,
    .cursor-spotlight::before {
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;

        contain: layout style paint;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (pointer: coarse), (max-width: 768px) {

    .cursor-dot,
    .cursor-glow {
        display: none !important;
    }

    body,
    a,
    button,
    input,
    textarea,
    select {
        cursor: auto;
    }
}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

    .cursor-dot,
    .cursor-glow,
    .cursor-glow::before,
    .cursor-glow::after,
    .cursor-spotlight::before {
        animation: none !important;
        transition: none !important;
    }
}