/*------------------------------------------------------------------*\
    Custom Cursor
\*------------------------------------------------------------------*/

/* Hide default cursor globally when custom cursor is active */
html.has-custom-cursor,
html.has-custom-cursor * {
    cursor: none !important;
}

.miv-cursor {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 99999999999;
    pointer-events: none;
}

.miv-cursor.is-hidden {
    opacity: 0;
}

/* ── Dot (center, follows instantly) ── */

.miv-cursor__dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 6px;
    height: 6px;
    margin: -3px 0 0 -3px;
    border-radius: 50%;
    background-color: var(--color-accent);
    transition: opacity 0.2s ease, transform 0.15s ease;
}

.miv-cursor.is-active .miv-cursor__dot {
    opacity: 0;
}

/* ── Ring (outer, follows with easing) ── */

.miv-cursor__ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    margin: -20px 0 0 -20px;
    border-radius: 50%;
    border: 1px solid var(--color-accent);
    transition: width 0.3s ease, height 0.3s ease, margin 0.3s ease,
                background-color 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

.miv-cursor.is-active .miv-cursor__ring {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
    background-color: rgba(255, 185, 81, 0.1);
    border-color: var(--color-accent);
}

.miv-cursor.is-pressed .miv-cursor__ring {
    width: 50px;
    height: 50px;
    margin: -25px 0 0 -25px;
    background-color: rgba(255, 185, 81, 0.15);
}

.miv-cursor.is-hidden .miv-cursor__dot,
.miv-cursor.is-hidden .miv-cursor__ring,
.miv-cursor.is-hidden .miv-cursor__label {
    opacity: 0;
}

/* ── Label (contextual text) ── */

.miv-cursor__label {
    position: fixed;
    top: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    opacity: 0;
    font-family: var(--font-secondary);
    font-size: 11px;
    font-weight: var(--font-medium);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-accent);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.miv-cursor.has-label .miv-cursor__ring {
    width: 80px;
    height: 80px;
    margin: -40px 0 0 -40px;
    background-color: rgba(255, 185, 81, 0.08);
}

.miv-cursor.has-label .miv-cursor__label {
    opacity: 1;
    /* Center label inside ring — offset by half ring size */
    margin: -6px 0 0 0;
    transform: translate(-50%, -50%);
}

/* ── Touch devices — never show ── */

@media (pointer: coarse) {
    .miv-cursor {
        display: none !important;
    }
}
