/* Custom Styles for Garg Threads - Industrial Luxury Theme */

/* Glassmorphism Effect for Navbar */
.navbar-glass {
    background: rgba(212, 212, 212, 0.9);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Bento Grid Layout - Handled by Tailwind Grid Classes now */

/* The blinking cursor animation */
.cursor {
    display: inline-block;
    /* Saffron Color handled by class bg-saffron */
    animation: blink 1s infinite;
}

@keyframes blink {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }
}

/* Stats Marquee Animation */
.stats-marquee {
    overflow: hidden;
    position: relative;
}

.marquee-content {
    display: flex;
    animation: marquee 20s linear infinite;
    width: fit-content;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Pause animation on hover */
.stats-marquee:hover .marquee-content {
    animation-play-state: paused;
}

/* Live Ticker Marquee Animation */
.live-ticker-marquee {
    overflow: hidden;
    position: relative;
    width: 100%;
}

.live-ticker-content {
    display: flex;
    width: fit-content;
}

/* Pause animation on hover (works with Tailwind animate-scroll) */
.live-ticker-marquee:hover .live-ticker-content {
    animation-play-state: paused;
}

/* Star Product Card Image Hover Effect */
.product-image {
    transition: transform 0.3s ease;
}

/* Hero Text Animation Container */
.hero-text-container {
    position: relative;
    z-index: 10;
}

.hero-line-1,
.hero-line-2,
.hero-line-3 {
    overflow: hidden;
}

/* Compliance Badge Hover Effects */
.badge-placeholder {
    cursor: pointer;
    transition: all 0.3s ease;
}

.badge-placeholder:hover {
    box-shadow: 0 10px 25px -5px rgba(249, 115, 22, 0.3);
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f8fafc;
}

::-webkit-scrollbar-thumb {
    background: #d97706;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b45309;
}

/* Additional Glassmorphism Utilities */
.backdrop-blur-md {
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

/* Ensure text is readable on light background */
body {
    color: #0f172a;
    background-color: #fdfbf7;
}

/* Focus states for accessibility */
button:focus,
a:focus {
    outline: 2px solid #d97706;
    outline-offset: 2px;
}

/* Loading state for animations */
.hero-line-1,
.hero-line-2,
.hero-line-3 {
    opacity: 0;
}

/* Hide Scrollbar for Horizontal Scroll */
.hide-scrollbar {
    -ms-overflow-style: none;
    /* IE and Edge */
    scrollbar-width: none;
    /* Firefox */
}

.hide-scrollbar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Magnetic Particle Animation */
.floating-part {
    transform-origin: center center;
}

.center-image {
    transform-origin: center center;
    will-change: transform;
    transform: translateZ(0);
}

/* Story Points Initial State */
.story-point {
    opacity: 0;
    transform: translateY(20px) translateZ(0);
    will-change: transform, opacity;
}

/* Particle GPU Acceleration */
.particle-1,
.particle-2,
.particle-3,
.particle-4 {
    will-change: transform, opacity;
    transform: translateZ(0);
}

/* Mobile Optimizations for Product Orbit */
/* Mobile Optimizations for Product Orbit */
@media (max-width: 1024px) {

    /* Allow sticky behavior on mobile, but maybe adjust top/height if needed */
    #product-orbit .sticky {
        /* position: relative !important;  <-- REMOVED to allow sticky */
        /* height: auto !important;       <-- REMOVED */
        /* top: 0 !important; */
    }

    #ambient-bg-stack {
        display: none !important;
        /* Keep bg stack hidden if too heavy, but show images */
    }

    /* SHOW IMAGES */
    .lens-img-1,
    .lens-img-2,
    .lens-img-3,
    .lens-img-4,
    .lens-img-5,
    .lens-img-6,
    .lens-img-7 {
        display: block !important;
    }

    /* Adjust layout for mobile */
    #product-orbit {
        background: #0c0a09;
        /* padding-top: 4rem; */
        padding-bottom: 4rem;
    }

    .product-node {
        min-height: 80vh !important;
        /* Ensure enough scroll space */
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        text-align: center !important;
        border: none !important;
        /* Add background to text for readability over image */
        pointer-events: none;
        /* Let clicks pass through if needed, or... */
    }

    .product-node>div {
        width: 100% !important;
        text-align: center !important;
        padding: 1.5rem !important;
        border: none !important;
        background: rgba(0, 0, 0, 0.6);
        /* Semi-transparent bg for readability */
        backdrop-filter: blur(4px);
        border-radius: 12px;
        pointer-events: auto;
    }

    .product-node h3 {
        font-size: 2rem !important;
        margin-bottom: 0.5rem;
    }
}

/* Mobile Industries Grid Optimization */
@media (max-width: 768px) {
    .mobile-h-screen {
        height: 80vh;
        /* Fit in one view */
    }

    /* Hide the detailed hover content on mobile to save space, or style it simpler */
    .group:hover h3 {
        font-size: 1.5rem !important;
        /* Smaller text */
    }

    .group:hover p {
        display: none;
        /* Hide description on mobile to fit */
    }

    .group:hover button {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }

    .group:hover .p-12 {
        padding: 1rem !important;
        /* Reduce padding */
    }


    /* =========================================
   Client Marquee Optimization
   ========================================= */

    /* Rail Container: Overflow hidden, no gap on parent loop */
    .marquee-rail {
        display: flex;
        overflow: hidden;
        width: 100%;
        user-select: none;
        /* ensure no gap here, gap is inside track padding */
    }

    /* Track: Moves continuously */
    .marquee-track {
        display: flex;
        flex-shrink: 0;
        gap: 1.5rem;
        /* gap-6 equivalent */
        padding-right: 1.5rem;
        /* CRITICAL: Adds spacing at the end so it matches the start of the next track */
        min-width: 100%;
    }

    /* Base Tag Style */
    .client-tag {
        flex-shrink: 0;
        padding: 0.75rem 2rem;
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 2px;
        color: #a8a29e;
        /* Stone-400 */
        font-family: 'Oswald', sans-serif;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        white-space: nowrap;
        transition: all 0.3s ease;
        cursor: default;
    }

    /* Hover Effect: Glow Saffron */
    .client-tag:hover {
        border-color: #ea580c;
        color: white;
        background: rgba(234, 88, 12, 0.1);
        box-shadow: 0 0 15px rgba(234, 88, 12, 0.3);
    }

    /* Outline Tag Style */
    .client-tag-outline {
        flex-shrink: 0;
        padding: 0.75rem 2rem;
        border: 1px dashed rgba(255, 255, 255, 0.15);
        border-radius: 2px;
        color: #57534e;
        /* Stone-600 */
        font-family: 'Oswald', sans-serif;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.1em;
        white-space: nowrap;
        transition: all 0.3s ease;
    }

    .client-tag-outline:hover {
        border-style: solid;
        border-color: white;
        color: white;
    }

    /* Animations */
    @keyframes scroll-left {
        0% {
            transform: translateX(0);
        }

        100% {
            transform: translateX(-100%);
        }
    }

    @keyframes scroll-right {
        0% {
            transform: translateX(-100%);
        }

        100% {
            transform: translateX(0);
        }
    }

    .animate-scroll-left {
        animation: scroll-left 40s linear infinite;
    }

    .animate-scroll-right {
        animation: scroll-right 40s linear infinite;
    }

    .group:hover .marquee-track {
        animation-play-state: paused;
    }
}