/* Global Gamified UX Styles */

/* 1. Custom Mouse Follower - HIDDEN */
#custom-cursor,
#custom-cursor-dot {
    display: none !important;
}

/* Custom Red Cursor */
@media (min-width: 1024px) {

    body,
    a,
    button,
    [role="button"],
    .cursor-pointer {
        cursor: url('../assets/cursor-red.svg') 5 3, auto !important;
    }
}

/* Custom Gamer Scrollbar */
/* For Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: #DC2626 #050505;
}

/* For WebKit (Chrome, Safari, Edge) */
::-webkit-scrollbar {
    width: 16px;
    /* Slightly wider to be more visible */
    background: #050505;
}

::-webkit-scrollbar-track {
    background-image: linear-gradient(0deg, transparent 24%, rgba(220, 38, 38, 0.1) 25%, rgba(220, 38, 38, 0.1) 26%, transparent 27%, transparent 74%, rgba(220, 38, 38, 0.1) 75%, rgba(220, 38, 38, 0.1) 76%, transparent 77%, transparent);
    background-size: 100% 20px;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    background-color: #050505;
    /* Fallback */
}

::-webkit-scrollbar-thumb {
    background: #DC2626;
    border: 3px solid #050505;
    border-radius: 99px;
    box-shadow: inset 0 0 6px rgba(255, 255, 255, 0.5);
    /* Inner shine */
    min-height: 50px;
    /* Ensure thumb is always clickable */
}

::-webkit-scrollbar-thumb:hover {
    background: #ff4d4d;
    box-shadow: 0 0 20px #DC2626, inset 0 0 10px rgba(255, 255, 255, 0.8);
}

body {
    overflow-y: scroll;
    -webkit-tap-highlight-color: transparent;
}

/* Improve mobile button response */
@media (max-width: 1024px) {

    a,
    button {
        touch-action: manipulation;
    }

    .mobile-nav-link:active,
    .service-card:active {
        transform: scale(0.98);
        background: rgba(220, 38, 38, 0.1) !important;
    }

    /* Reduce Service card height on mobile */
    .service-card {
        min-height: 22rem !important;
    }
}

/* 2. Experience Bar (Scroll Progress) */
#exp-bar-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(31, 31, 31, 0.5);
    z-index: 10001;
}

#exp-bar-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #DC2626, #FF4D4D);
    box-shadow: 0 0 10px #DC2626;
    transition: width 0.1s ease-out;
}

/* Slogan Image Utility */
.slogan-img {
    height: 2.5rem;
    width: auto;
    display: inline-block;
    vertical-align: middle;
    filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.2));
}

.cta-slogan-img {
    height: 3.5rem;
    margin: 0 auto 2rem;
    display: block;
}

@media (max-width: 768px) {
    .slogan-img {
        height: 1.75rem;
    }

    .cta-slogan-img {
        height: 2.25rem;
    }

    /* Mobile Header Shrink */
    header#header nav {
        padding-top: 0.75rem !important;
        padding-bottom: 0.75rem !important;
    }

    header#header img {
        height: 2.5rem !important;
        /* ~h-10 */
    }

    /* Hero Title Scaling for small devices */
    #hero h1 {
        font-size: 2.25rem !important;
        /* Balanced scale for mobile */
        line-height: 1.1 !important;
    }

    /* Improve ghost button legibility on mobile */
    #hero a.border-2 {
        border-color: rgba(255, 255, 255, 0.4);
        background: rgba(255, 255, 255, 0.05);
    }

    #hero p {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }

    /* Hero Chevron Adjustment */
    #hero .animate-bounce {
        bottom: 2rem !important;
        /* Move it lower on mobile */
    }

    /* Mobile Menu Polish */
    #mobile-menu {
        padding-top: 5rem !important;
    }

    .mobile-nav-link {
        padding: 0.75rem 1rem !important;
        background: rgba(255, 255, 255, 0.03);
        border-radius: 0.75rem;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .mobile-nav-link i {
        font-size: 1.25rem;
    }
}

/* 3. Glitch Effect */
.glitch-text {
    position: relative;
    display: inline-block;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip: rect(0, 0, 0, 0);
}

.glitch-text:hover::before {
    left: 2px;
    text-shadow: -2px 0 #ff00c1;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch-text:hover::after {
    left: -2px;
    text-shadow: -2px 0 #00fff9, 2px 2px #ff00c1;
    animation: glitch-anim2 1s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(31px, 9999px, 94px, 0);
        transform: skew(0.85deg);
    }

    5% {
        clip: rect(70px, 9999px, 71px, 0);
        transform: skew(0.85deg);
    }

    /* ... add more steps if needed ... */
    100% {
        clip: rect(67px, 9999px, 98px, 0);
        transform: skew(0.85deg);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(65px, 9999px, 100px, 0);
        transform: skew(0.15deg);
    }

    100% {
        clip: rect(10px, 9999px, 40px, 0);
        transform: skew(0.15deg);
    }
}

/* 4. Neon Pulse for Cards/Buttons */
.neon-pulse:hover {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.4), inset 0 0 5px rgba(220, 38, 38, 0.2);
    border-color: rgba(220, 38, 38, 0.8) !important;
}

/* 5. 3D Tilt Wrapper */
.tilt-card {
    transition: transform 0.1s ease-out;
    transform-style: preserve-3d;
}

/* Static mesh background for Hero */
.hero-mesh {
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 2px 2px, rgba(220, 38, 38, 0.05) 1px, transparent 0);
    background-size: 40px 40px;
    pointer-events: none;
    z-index: 1;
}

/* Hero Staggered Entrance Animations */
@keyframes heroFadeUp {
    0% {
        opacity: 0;
        transform: translateY(24px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate {
    opacity: 0;
    animation: heroFadeUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.hero-slogan {
    animation-delay: 0s;
}

.hero-headline {
    animation-delay: 0.18s;
}

.hero-subtitle {
    animation-delay: 0.34s;
}

.hero-ctas {
    animation-delay: 0.48s;
}

/* Hero Headline Glow Effect */
.hero-headline-glow {
    text-shadow:
        0 0 20px rgba(220, 38, 38, 0.25),
        0 0 50px rgba(220, 38, 38, 0.1);
}

.hero-headline-glow-accent {
    text-shadow:
        0 0 15px rgba(220, 38, 38, 0.4),
        0 0 40px rgba(220, 38, 38, 0.2),
        0 2px 8px rgba(0, 0, 0, 0.3);
}

/* Hero Slogan — Depth/Embedded Treatment (inverted from glow) */
.hero-slogan-img {
    display: block;
    margin: 0 auto;
    filter: brightness(0.78) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
    opacity: 0.85;
    transition: filter 0.4s ease, opacity 0.4s ease, transform 0.3s ease;
}

.hero-slogan-img:hover {
    filter: brightness(0.88) drop-shadow(0 3px 6px rgba(0, 0, 0, 0.5));
    opacity: 0.95;
}

/* 6. Vertical Sidebar Sidebar */
@media (min-width: 1024px) {
    #header {
        width: 90px;
        height: 100vh;
        border-bottom: none;
        display: flex;
        flex-direction: column;
        padding: 2rem 0;
        z-index: 50;
        /* Neon Cyber-Rail Style */
        background-color: #050505;
        background-image: linear-gradient(0deg, transparent 24%, rgba(220, 38, 38, 0.05) 25%, rgba(220, 38, 38, 0.05) 26%, transparent 27%, transparent 74%, rgba(220, 38, 38, 0.05) 75%, rgba(220, 38, 38, 0.05) 76%, transparent 77%, transparent);
        background-size: 100% 20px;
        border-right: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 5px 0 15px rgba(0, 0, 0, 0.5);
    }

    #header nav {
        flex-direction: column;
        height: 100%;
        padding: 0;
        justify-content: center;
    }

    #header .nav-links {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 2rem;
    }

    #header .nav-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 60px;
        transition: all 0.3s ease;
        color: #6B7280;
        position: relative;
        /* Muted gray */
    }

    #header .nav-item:hover {
        color: #DC2626;
    }

    #header .nav-item span {
        display: block;
        font-size: 0.65rem;
        margin-top: 0.2rem;
        font-weight: 500;
        text-align: center;
        line-height: 1.1;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-5px);
        }

        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    #header .nav-item i {
        font-size: 1.4rem;
    }

    /* Adjust index content for sidebar */
    body {
        padding-left: 90px;
    }

    /* Pop-out Dropdown for Services */
    .nav-dropdown {
        position: fixed;
        left: 90px;
        top: 50%;
        transform: translateY(-50%) translateX(20px);
        background: rgba(31, 31, 31, 0.98);
        backdrop-filter: blur(15px);
        border: 1px solid rgba(220, 38, 38, 0.4);
        border-radius: 1.25rem;
        padding: 1.25rem;
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        min-width: 320px;
        z-index: 1000;
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.9), 0 0 20px rgba(220, 38, 38, 0.1);
    }

    /* Container for the nav item + its dropdown */
    .nav-item-wrapper {
        position: relative;
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .nav-item-wrapper:hover .nav-dropdown {
        opacity: 1;
        visibility: visible;
        transform: translateY(-50%) translateX(10px);
    }

    /* Indicators for items with menus */
    .nav-indicator-dot {
        position: absolute;
        bottom: 8px;
        right: 8px;
        width: 6px;
        height: 6px;
        background: #DC2626;
        border-radius: 50%;
        box-shadow: 0 0 8px #DC2626;
        opacity: 0.8;
    }

    .nav-item-chevron {
        position: absolute;
        top: 50%;
        right: -8px;
        transform: translateY(-50%);
        font-size: 8px;
        color: #DC2626;
        opacity: 0.5;
        transition: opacity 0.3s ease;
    }

    .nav-item-wrapper:hover .nav-item-chevron {
        opacity: 1;
    }

    .dropdown-item {
        display: flex;
        align-items: center;
        gap: 1.25rem;
        padding: 1rem 1.25rem;
        border-radius: 0.75rem;
        transition: all 0.3s ease;
        color: #9CA3AF;
        text-decoration: none;
        margin-bottom: 0.5rem;
    }

    .dropdown-item:last-child {
        margin-bottom: 0;
    }

    .dropdown-item:hover {
        background: rgba(220, 38, 38, 0.15);
        color: #DC2626;
        transform: translateX(8px);
    }

    .dropdown-item i {
        font-size: 1.3rem;
        width: 28px;
        text-align: center;
        color: #DC2626;
        filter: drop-shadow(0 0 8px rgba(220, 38, 38, 0.3));
    }

    .dropdown-label {
        font-family: 'Orbitron', sans-serif;
        font-weight: 700;
        font-size: 0.9rem;
        letter-spacing: 0.05em;
        text-transform: uppercase;
        line-height: 1.2;
    }

    .dropdown-desc {
        display: block;
        font-size: 0.75rem;
        color: #6B7280;
        margin-top: 2px;
        font-family: 'Inter', sans-serif;
        font-weight: 400;
        text-transform: none;
        letter-spacing: normal;
    }

    /* Active State (Ultra-Minimalist Illumination Design) */
    .nav-item.active-nav,
    .active-service-link {
        color: #DC2626 !important;
        /* Subtle centered illumination glow */
        background: radial-gradient(circle at center, rgba(220, 38, 38, 0.12) 0%, transparent 70%) !important;
        border: none !important;
        animation: none !important;
        position: relative;
        z-index: 10;
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Remove the edge marker line entirely */
    .nav-item.active-nav::before,
    .active-service-link::before {
        display: none !important;
    }

    /* Ensure old capsule/after logic reindexs hidden */
    .nav-item.active-nav::after,
    .active-service-link::after {
        display: none !important;
    }

    .nav-item.active-nav i,
    .active-service-link i {
        filter: drop-shadow(0 0 12px rgba(220, 38, 38, 0.5));
        transform: scale(1.1);
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }



    /* B2B Visual Hierarchy Optimizations */
    /* Sidebar Specific Consult Button */
    .sidebar-consult-btn {
        width: 85% !important;
        height: auto !important;
        display: block !important;
        margin: 1.5rem auto 0 !important;
        background: #DC2626 !important;
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5) !important;
        border: 1px solid rgba(255, 255, 255, 0.3) !important;
        border-radius: 6px !important;
        transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
        padding: 0.9rem 0.2rem !important;
        text-transform: uppercase !important;
        font-weight: 800 !important;
        font-size: 11px !important;
        letter-spacing: 0.08em !important;
        line-height: 1 !important;
        animation: subtle-glow 3s infinite ease-in-out !important;
    }

    /* Reusable B2B Hero Glow (No layout overrides) */
    .b2b-cta-highlight {
        box-shadow: 0 0 20px rgba(220, 38, 38, 0.5) !important;
        animation: subtle-glow 3s infinite ease-in-out !important;
        transition: all 0.3s ease !important;
    }

    .b2b-cta-highlight:hover {
        box-shadow: 0 0 30px rgba(220, 38, 38, 0.7) !important;
        transform: scale(1.05);
    }

    @keyframes subtle-glow {

        0%,
        100% {
            box-shadow: 0 0 15px rgba(220, 38, 38, 0.6);
        }

        50% {
            box-shadow: 0 0 25px rgba(220, 38, 38, 0.8), 0 0 40px rgba(220, 38, 38, 0.4);
        }
    }

    .sidebar-consult-btn span {
        display: block !important;
    }

    .sidebar-consult-btn:hover {
        box-shadow: 0 0 25px rgba(220, 38, 38, 0.6), 0 0 50px rgba(220, 38, 38, 0.3) !important;
        transform: scale(1.05);
    }

    .section-title-refined {
        letter-spacing: -0.02em;
        line-height: 1.1;
        background: linear-gradient(to bottom, #ffffff 0%, #a1a1aa 100%);
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }

    .trust-bar {
        background: rgba(31, 31, 31, 0.4);
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
        border-top: 1px solid rgba(220, 38, 38, 0.2);
        border-bottom: 1px solid rgba(220, 38, 38, 0.1);
    }
}

/* 7. Slow Spin Animation for Cyber Circles */
@keyframes spin-slow {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin-slow {
    animation: spin-slow 10s linear infinite;
}

/* 8. Success Message Animations */
.success-reveal {
    animation: success-reveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards !important;
    opacity: 0;
    transform: translateY(20px) scale(0.9);
}

@keyframes success-reveal {
    0% {
        opacity: 0;
        transform: translateY(20px) scale(0.9);
    }

    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-icon-bounce {
    animation: icon-bounce 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes icon-bounce {
    0% {
        transform: scale(0);
    }

    50% {
        transform: scale(1.2);
    }

    100% {
        transform: scale(1);
    }
}

/* 9. Specialized Form UI Elements */
.telegram-indicator {
    background: rgba(220, 38, 38, 0.15);
    /* esb-red with transparency */
    border: 1px solid rgba(220, 38, 38, 0.3);
    color: #DC2626;
    text-shadow: 0 0 10px rgba(220, 38, 38, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-family: 'Orbitron', sans-serif;
    transition: all 0.3s ease;
}

.telegram-indicator.active {
    box-shadow: 0 0 15px rgba(220, 38, 38, 0.2);
    background: rgba(220, 38, 38, 0.25);
}

/* 10. Premium Phone Mockup */
.phone-mockup-container {
    perspective: 1000px;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.phone-mockup {
    position: relative;
    width: 220px;
    height: 440px;
    background: #0a0a0a;
    border: 10px solid #1a1a1a;
    border-radius: 36px;
    box-shadow: 
        0 20px 40px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(255, 255, 255, 0.05),
        inset 0 0 10px rgba(0, 0, 0, 0.8);
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.phone-mockup::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 20px;
    background: #1a1a1a;
    border-bottom-left-radius: 12px;
    border-bottom-right-radius: 12px;
    z-index: 10;
}

.phone-screen {
    position: absolute;
    inset: 0;
    background: #000;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.phone-screen img,
.phone-screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.9;
}

.phone-mockup:hover {
    transform: rotateY(-5deg) rotateX(5deg) scale(1.02);
}

.phone-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: 5;
}

/* Horizontal Solution Card Adjustments */
.solution-card-horizontal {
    background: linear-gradient(135deg, rgba(31, 31, 31, 0.6) 0%, rgba(15, 15, 15, 0.8) 100%);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.solution-card-horizontal:hover {
    border-color: rgba(220, 38, 38, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4), 0 0 20px rgba(220, 38, 38, 0.1);
}

@media (max-width: 768px) {
    .phone-mockup {
        width: 160px;
        height: 320px;
        border-width: 6px;
        border-radius: 24px;
    }
    
    .phone-mockup::before {
        width: 60px;
        height: 15px;
    }
}
/* Browser / Tablet Mockup */
.browser-mockup {
    position: relative;
    width: 100%;
    max-width: 420px;
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255,255,255,0.05);
    overflow: hidden;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.browser-mockup:hover {
    transform: translateY(-5px) scale(1.02);
}

.browser-header {
    height: 32px;
    background: #1a1a1a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.browser-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.browser-dot.close { background: #ff5f56; }
.browser-dot.min { background: #ffbd2e; }
.browser-dot.max { background: #27c93f; }

.browser-screen {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #000;
    overflow: hidden;
}

.browser-screen img,
.browser-screen video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: opacity 0.3s ease;
}

.browser-mockup:hover .browser-screen img {
    opacity: 1;
}

.browser-reflection {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08) 0%, transparent 40%);
    pointer-events: none;
    z-index: 5;
}
