/**
 * Lushanth Design System — Modern Custom Cursor & 144Hz Smooth Scroll Styles
 */

/* ==========================================================================
   1. LENIS 144Hz SMOOTH SCROLL INTEGRATION
   ========================================================================== */
html.lenis, html.lenis body {
    height: auto;
}

.lenis.lenis-smooth {
    scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
    overscroll-behavior: contain;
}

.lenis.lenis-stopped {
    overflow: hidden;
}

.lenis.lenis-smooth iframe {
    pointer-events: none;
}

/* ==========================================================================
   2. MODERN HIGH-TECH CUSTOM CURSOR
   ========================================================================== */

/* Hide native cursor when custom cursor is active on pointer devices */
@media (hover: hover) and (pointer: fine) {
    body.custom-cursor-enabled,
    body.custom-cursor-enabled a,
    body.custom-cursor-enabled button,
    body.custom-cursor-enabled input[type="button"],
    body.custom-cursor-enabled input[type="submit"],
    body.custom-cursor-enabled select,
    body.custom-cursor-enabled [role="button"],
    body.custom-cursor-enabled .faq-question,
    body.custom-cursor-enabled .social-icon-btn,
    body.custom-cursor-enabled .social-side-link,
    body.custom-cursor-enabled .wide-product-card,
    body.custom-cursor-enabled .back-to-top {
        cursor: none !important;
    }

    body.custom-cursor-enabled input[type="text"],
    body.custom-cursor-enabled input[type="email"],
    body.custom-cursor-enabled input[type="tel"],
    body.custom-cursor-enabled input[type="password"],
    body.custom-cursor-enabled textarea {
        cursor: text;
    }
}

/* Primary Cursor Dot (Ultra-precise immediate tracking) */
.custom-cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: radial-gradient(circle, #ff2a4b 0%, #e31837 100%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999999;
    box-shadow: 0 0 10px rgba(227, 24, 55, 0.75), 0 0 20px rgba(227, 24, 55, 0.4);
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    transition: width 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.22s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-radius 0.22s ease,
                background 0.22s ease,
                opacity 0.25s ease,
                transform 0.05s linear;
    will-change: transform;
    opacity: 0;
}

/* Trailing Follower Ring (Silky 144Hz Lerp Spring) */
.custom-cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    width: 38px;
    height: 38px;
    border: 1.5px solid rgba(227, 24, 55, 0.55);
    background: radial-gradient(circle, rgba(227, 24, 55, 0.08) 0%, rgba(227, 24, 55, 0) 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 999998;
    box-shadow: 0 0 14px rgba(227, 24, 55, 0.15);
    transform: translate3d(-100px, -100px, 0) translate(-50%, -50%);
    transition: width 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                height 0.28s cubic-bezier(0.2, 0.8, 0.2, 1),
                border-color 0.25s ease,
                background 0.25s ease,
                box-shadow 0.25s ease,
                opacity 0.25s ease;
    will-change: transform;
    opacity: 0;
}

/* Visible State */
.custom-cursor-dot.is-visible,
.custom-cursor-ring.is-visible {
    opacity: 1;
}

/* Hovering Interactive Elements State */
.custom-cursor-ring.is-hover {
    width: 58px;
    height: 58px;
    border-color: rgba(227, 24, 55, 0.85);
    background: radial-gradient(circle, rgba(227, 24, 55, 0.18) 0%, rgba(227, 24, 55, 0.02) 75%);
    box-shadow: 0 0 25px rgba(227, 24, 55, 0.4), inset 0 0 12px rgba(227, 24, 55, 0.15);
}

.custom-cursor-dot.is-hover {
    width: 6px;
    height: 6px;
    background: #ffffff;
    box-shadow: 0 0 12px #ff2a4b, 0 0 20px rgba(227, 24, 55, 0.9);
}

/* Click / Active State */
.custom-cursor-ring.is-active {
    width: 28px;
    height: 28px;
    border-color: #ff2a4b;
    background: rgba(227, 24, 55, 0.25);
    box-shadow: 0 0 20px rgba(227, 24, 55, 0.6);
}

.custom-cursor-dot.is-active {
    width: 4px;
    height: 4px;
    background: #ff2a4b;
}

/* Text Input Field State */
.custom-cursor-ring.is-text {
    width: 20px;
    height: 28px;
    border-radius: 4px;
    border-color: rgba(227, 24, 55, 0.3);
    background: transparent;
    box-shadow: none;
    opacity: 0.35;
}

.custom-cursor-dot.is-text {
    width: 2.5px;
    height: 18px;
    border-radius: 2px;
    background: #e31837;
    box-shadow: 0 0 8px rgba(227, 24, 55, 0.6);
}

/* Disable Custom Cursor on Mobile/Touch Devices */
@media (hover: none) or (pointer: coarse), (max-width: 1024px) {
    .custom-cursor-dot,
    .custom-cursor-ring {
        display: none !important;
    }
}
