/**
 * Hero Section Amazing Text Cursor & Interactive Spotlight Animation
 * SPCS Corporate Solutions
 */

/* 1. Custom Hero Cursor Container & Core Layers */
.spcs-cursor-wrap {
    pointer-events: none !important;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
    overflow: hidden;
    mix-blend-mode: normal;
    transition: opacity 0.3s ease;
}

/* Central Precision Dot */
.spcs-cursor-dot {
    position: absolute;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: #38bdf8;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 12px #38bdf8, 0 0 20px rgba(56, 189, 248, 0.8);
    transition: transform 0.08s ease-out, background-color 0.25s ease, width 0.25s ease, height 0.25s ease;
    will-change: transform, left, top;
}

/* Outer Magnetic Aura Ring */
.spcs-cursor-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 36px;
    height: 36px;
    border: 1.5px solid rgba(56, 189, 248, 0.6);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 15px rgba(37, 99, 235, 0.25);
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                border-color 0.25s ease,
                background-color 0.25s ease,
                transform 0.15s ease-out;
    will-change: transform, left, top, width, height;
}

/* Ambient Radial Glow Halo */
.spcs-cursor-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, rgba(37, 99, 235, 0.08) 45%, rgba(0, 0, 0, 0) 70%);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.7;
    filter: blur(10px);
    transition: opacity 0.3s ease, width 0.35s ease, height 0.35s ease;
    will-change: transform, left, top;
}

/* 2. Text Hovering State (Spotlight & Text Interaction) */
.spcs-cursor-wrap.hovering-text .spcs-cursor-dot {
    width: 14px;
    height: 14px;
    background: #60a5fa;
    box-shadow: 0 0 16px #60a5fa, 0 0 28px rgba(96, 165, 250, 0.9);
}

.spcs-cursor-wrap.hovering-text .spcs-cursor-ring {
    width: 64px;
    height: 64px;
    border-color: rgba(96, 165, 250, 0.9);
    background-color: rgba(56, 189, 248, 0.12);
    backdrop-filter: blur(2px);
}

.spcs-cursor-wrap.hovering-text .spcs-cursor-glow {
    width: 320px;
    height: 320px;
    opacity: 1;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.28) 0%, rgba(37, 99, 235, 0.14) 50%, rgba(0, 0, 0, 0) 75%);
}

/* Clickable / Button Hovering State */
.spcs-cursor-wrap.hovering-btn .spcs-cursor-dot {
    transform: translate(-50%, -50%) scale(0.4);
    opacity: 0.5;
}

.spcs-cursor-wrap.hovering-btn .spcs-cursor-ring {
    width: 50px;
    height: 50px;
    border-color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.18);
    box-shadow: 0 0 20px rgba(56, 189, 248, 0.4);
}

/* Active Click Pulse */
.spcs-cursor-wrap.cursor-clicking .spcs-cursor-ring {
    transform: translate(-50%, -50%) scale(0.85);
    border-color: #38bdf8;
    background-color: rgba(56, 189, 248, 0.3);
}

/* 3. Dynamic Text Blinking Cursor Indicator */
.hero-cursor-blink {
    display: inline-block;
    width: 3px;
    height: 1em;
    margin-left: 4px;
    vertical-align: -0.12em;
    background: linear-gradient(180deg, #38bdf8 0%, #2563eb 100%);
    border-radius: 2px;
    box-shadow: 0 0 8px rgba(56, 189, 248, 0.8);
    animation: heroCursorBlink 0.9s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes heroCursorBlink {
    0%, 100% {
        opacity: 1;
        transform: scaleY(1);
    }
    50% {
        opacity: 0.15;
        transform: scaleY(0.85);
    }
}

/* 4. Mobile & Touch Screen Interactive Ripple & Particle Trail */
.spcs-touch-ripple {
    position: fixed;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    z-index: 9998;
    border: 2px solid rgba(56, 189, 248, 0.8);
    background: radial-gradient(circle, rgba(56, 189, 248, 0.25) 0%, rgba(37, 99, 235, 0.05) 60%, transparent 75%);
    animation: spcsTouchRippleAnim 0.75s ease-out forwards;
}

@keyframes spcsTouchRippleAnim {
    0% {
        width: 10px;
        height: 10px;
        transform: translate(-50%, -50%) scale(0.2);
        opacity: 1;
    }
    100% {
        width: 130px;
        height: 130px;
        transform: translate(-50%, -50%) scale(1.6);
        opacity: 0;
    }
}

.spcs-touch-sparkle {
    position: fixed;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #38bdf8;
    box-shadow: 0 0 10px #38bdf8;
    pointer-events: none;
    z-index: 9998;
    animation: spcsSparkleFade 0.65s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

@keyframes spcsSparkleFade {
    0% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 1;
    }
    100% {
        transform: translate(calc(-50% + var(--spark-x, 0px)), calc(-50% + var(--spark-y, 0px))) scale(0);
        opacity: 0;
    }
}

/* 5. Hero Interactive Text Glow Highlight Hover */
.hero-glow-text {
    position: relative;
    display: inline;
    transition: text-shadow 0.3s ease, color 0.3s ease;
}

.hero-glow-text:hover {
    text-shadow: 0 0 16px rgba(56, 189, 248, 0.6), 0 0 30px rgba(37, 99, 235, 0.4);
}

/* 6. Hero Creative Overlay Effect (Desktop & Mobile) */
.hero-creative-overlay {
    position: absolute;
    inset: 0;
    z-index: 15;
    pointer-events: none;
    display: flex;
    align-items: center;
    background: linear-gradient(90deg, rgba(7, 16, 38, 0.88) 0%, rgba(10, 25, 47, 0.65) 45%, rgba(15, 23, 42, 0.15) 85%, transparent 100%);
}

.hero-creative-overlay-inner {
    pointer-events: auto;
    max-width: 680px;
    padding: 2rem 2.5rem;
    margin-left: 5%;
    background: rgba(10, 25, 47, 0.55);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(56, 189, 248, 0.2);
    border-radius: 1.25rem;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: heroOverlayFadeIn 0.8s ease-out forwards;
}

/* Mobile Hero Floating Overlay */
.mobile-hero-overlay {
    position: absolute;
    bottom: 1.5rem;
    left: 1rem;
    right: 1rem;
    z-index: 20;
    pointer-events: auto;
    background: rgba(10, 25, 47, 0.82);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(56, 189, 248, 0.25);
    border-radius: 1rem;
    padding: 1rem 1.25rem;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.45);
}

/* Typewriter Dynamic Highlighted Text */
.hero-typewriter-text {
    font-weight: 800;
    background: linear-gradient(135deg, #38bdf8 0%, #60a5fa 50%, #818cf8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.35);
    display: inline-block;
    min-height: 1.2em;
    vertical-align: bottom;
}

@keyframes heroOverlayFadeIn {
    0% {
        opacity: 0;
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced Motion Preference Accessibility */
@media (prefers-reduced-motion: reduce) {
    .spcs-cursor-wrap,
    .spcs-touch-ripple,
    .spcs-touch-sparkle {
        display: none !important;
    }
    .hero-cursor-blink {
        animation: none;
        opacity: 1;
    }
}
