/* Sharp diamond cursor — active when body.pa-custom-cursor--on (transform/rotate from JS) */

#cursor-main,
#cursor-trail {
    position: fixed;
    left: 0;
    top: 0;
    pointer-events: none;
    visibility: hidden;
    opacity: 0;
    will-change: transform;
    mix-blend-mode: difference;
    box-sizing: border-box;
}

body.pa-custom-cursor--on #cursor-main {
    visibility: visible;
    opacity: 1;
}

body.pa-custom-cursor--on #cursor-trail {
    visibility: visible;
}

#cursor-main {
    width: 22px;
    height: 22px;
    z-index: 9999;

    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.9),
        rgba(255, 255, 255, 0.4)
    );

    border: 1.5px solid rgba(255, 255, 255, 0.9);

    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.6),
        0 0 25px rgba(255, 255, 255, 0.2);

    transition: box-shadow 0.2s ease-out, border-width 0.2s ease-out, border-color 0.2s ease-out;
}

#cursor-main::after {
    content: "";
    position: absolute;
    inset: 4px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.5);
    transform: rotate(45deg);
    transform-origin: center;
    opacity: 0.7;
    transition: opacity 0.2s ease-out, border-color 0.2s ease-out;
}

#cursor-trail {
    width: 40px;
    height: 40px;
    z-index: 9998;

    border: 1px dashed rgba(255, 255, 255, 0.3);
    opacity: 0.5;

    transition: border-color 0.2s ease-out, box-shadow 0.2s ease-out, opacity 0.2s ease-out, border-width 0.2s ease-out;
}

/* Neutral */
body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--neutral {
    box-shadow:
        0 0 10px rgba(255, 255, 255, 0.65),
        0 0 28px rgba(255, 255, 255, 0.25);
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor-theme--neutral {
    border-color: rgba(255, 255, 255, 0.38);
    box-shadow: 0 0 16px rgba(255, 255, 255, 0.1);
}

/* Infrastructure — amber, stronger edges */
body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--infra {
    border-width: 2px;
    border-color: rgba(255, 214, 150, 0.98);
    box-shadow:
        0 0 12px rgba(255, 190, 100, 0.85),
        0 0 32px rgba(245, 158, 11, 0.5);
}

body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--infra::after {
    border-color: rgba(255, 200, 120, 0.65);
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor-theme--infra {
    border-width: 1.5px;
    border-color: rgba(255, 190, 110, 0.55);
    box-shadow: 0 0 20px rgba(245, 158, 11, 0.28);
}

/* Consulting — teal, cleaner / slightly softer */
body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--consult {
    border-width: 1.5px;
    border-color: rgba(190, 255, 245, 0.88);
    box-shadow:
        0 0 12px rgba(100, 230, 210, 0.55),
        0 0 30px rgba(20, 184, 166, 0.38);
}

body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--consult::after {
    border-color: rgba(160, 240, 225, 0.45);
    opacity: 0.55;
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor-theme--consult {
    border-width: 1px;
    border-color: rgba(130, 220, 200, 0.48);
    box-shadow: 0 0 18px rgba(20, 184, 166, 0.22);
}

/* Hover — scale + rotation from JS; glow boost */
body.pa-custom-cursor--on #cursor-main.pa-cursor--hover {
    box-shadow:
        0 0 14px rgba(255, 255, 255, 0.9),
        0 0 38px rgba(255, 255, 255, 0.42);
}

body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--infra.pa-cursor--hover {
    box-shadow:
        0 0 18px rgba(255, 210, 130, 0.95),
        0 0 48px rgba(245, 158, 11, 0.58);
}

body.pa-custom-cursor--on #cursor-main.pa-cursor-theme--consult.pa-cursor--hover {
    box-shadow:
        0 0 16px rgba(140, 245, 228, 0.75),
        0 0 44px rgba(20, 184, 166, 0.48);
}

body.pa-custom-cursor--on #cursor-main.pa-cursor--hover::after {
    opacity: 0.95;
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor--hover {
    opacity: 0.72;
    border-color: rgba(255, 255, 255, 0.52);
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor-theme--infra.pa-cursor--hover {
    opacity: 0.8;
    box-shadow: 0 0 26px rgba(245, 158, 11, 0.38);
}

body.pa-custom-cursor--on #cursor-trail.pa-cursor-theme--consult.pa-cursor--hover {
    opacity: 0.76;
    box-shadow: 0 0 24px rgba(20, 184, 166, 0.32);
}

@media (max-width: 767px), (hover: none), (pointer: coarse) {
    body.pa-custom-cursor--on {
        cursor: auto !important;
    }

    body.pa-custom-cursor--on * {
        cursor: auto !important;
    }

    body.pa-custom-cursor--on #cursor-main,
    body.pa-custom-cursor--on #cursor-trail {
        display: none !important;
    }
}

@media (min-width: 768px) and (hover: hover) and (pointer: fine) {
    body.pa-custom-cursor--on,
    body.pa-custom-cursor--on * {
        cursor: none !important;
    }
}
