/* --- 100x Premium CSS Additions --- */
        
/* Cinematic Preloader */
#preloader {
    position: fixed;
    inset: 0;
    background-color: #050505;
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), visibility 0.8s;
}
#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

/* Optimized iOS Glassmorphism */
.glass-card {
    background: rgba(20, 20, 20, 0.4) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5) !important;
    transform: translateZ(0); /* Force hardware acceleration */
    will-change: transform;
}

/* 9:16 Aspect Ratio and Grayscale utilities */
.image-9-16-container {
    width: 100%;
    aspect-ratio: 9 / 16;
    overflow: hidden;
    position: relative;
}
.image-9-16 {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: grayscale(100%) contrast(1.1);
    transition: filter 0.5s ease, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.group:hover .image-9-16,
.tilt-card:hover .image-9-16 {
    filter: grayscale(0%) contrast(1.1);
    transform: scale(1.05);
}

/* --- Global Hover & Cascade Effects --- */

/* Nav Link Hover */
.nav-link-hover {
    position: relative;
    display: inline-block;
}
.nav-link-hover::after {
    content: '';
    position: absolute;
    width: 0;
    height: 1px;
    bottom: -4px;
    left: 0;
    background-color: var(--color-brand-accent, #ff1f1f);
    transition: width 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.nav-link-hover:hover::after {
    width: 100%;
}

/* Button Hover Glow */
.btn-hover-glow {
    transition: all 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.btn-hover-glow:hover {
    box-shadow: 0 0 20px rgba(120, 255, 77, 0.4);
    transform: translateY(-2px);
}

/* Card Hover Glow */
.card-hover-glow {
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.card-hover-glow:hover {
    box-shadow: 0 10px 30px rgba(120, 255, 77, 0.15) !important;
    border-color: rgba(120, 255, 77, 0.5) !important;
    transform: translateY(-4px) scale(1.01);
    z-index: 10;
}

/* Cascade Delays for Scroll Reveal */
.cascade-1 { transition-delay: 100ms !important; }
.cascade-2 { transition-delay: 200ms !important; }
.cascade-3 { transition-delay: 300ms !important; }
.cascade-4 { transition-delay: 400ms !important; }
.cascade-5 { transition-delay: 500ms !important; }

/* Image Hover Zoom (Performance optimized) */
.img-hover-zoom {
    transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform;
}
.group:hover .img-hover-zoom {
    transform: scale(1.08);
}

@keyframes spin { 100% { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes spin-reverse { 100% { transform: rotate(-360deg); } }
.animate-\[spin_1\.5s_linear_reverse_infinite\] { animation: spin-reverse 1.5s linear infinite; }
.animate-\[spin_2s_linear_infinite\] { animation: spin 2s linear infinite; }


/* =========================================================================
   MOBILE ELEGANCE REFINEMENT (Strictly max-width: 767px)
   This block prevents the "bulky/childish" look on phones by shrinking
   fonts, paddings, gaps, and buttons to look professional and sharp.
   ========================================================================= */
@media (max-width: 767px) {
    /* 1. Sleeker Typography */
    .text-display-xl, .text-display-lg, .text-display-lg-mobile {
        font-size: 32px !important;
        line-height: 38px !important;
        letter-spacing: -0.02em !important;
    }
    .text-headline-lg, .text-headline-lg-mobile {
        font-size: 24px !important;
        line-height: 30px !important;
    }
    .text-headline-md {
        font-size: 20px !important;
        line-height: 28px !important;
    }
    .text-body-lg {
        font-size: 15px !important;
        line-height: 24px !important;
    }
    .text-body-md {
        font-size: 14px !important;
        line-height: 22px !important;
    }
    
    /* 2. Sleeker Buttons */
    /* Target large buttons (px-8 py-4) and make them px-5 py-3 */
    .px-8.py-4 {
        padding-top: 12px !important;
        padding-bottom: 12px !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
        font-size: 13px !important;
    }
    /* Target smaller buttons */
    .px-6.py-3 {
        padding-top: 10px !important;
        padding-bottom: 10px !important;
        padding-left: 16px !important;
        padding-right: 16px !important;
        font-size: 12px !important;
    }

    /* 3. Reduce Bulky Card Paddings */
    .p-16 { padding: 24px !important; }
    .p-12 { padding: 20px !important; }
    .p-8 { padding: 16px !important; }
    .px-24 { padding-left: 24px !important; padding-right: 24px !important; }
    .px-12 { padding-left: 16px !important; padding-right: 16px !important; }
    .py-24 { padding-top: 40px !important; padding-bottom: 40px !important; }
    .py-16 { padding-top: 32px !important; padding-bottom: 32px !important; }

    /* 4. Tighter Vertical Spacing and Gaps */
    .mb-24 { margin-bottom: 40px !important; }
    .mb-16 { margin-bottom: 32px !important; }
    .mb-12 { margin-bottom: 24px !important; }
    .gap-16 { gap: 32px !important; }
    .gap-12 { gap: 24px !important; }
    .gap-8 { gap: 16px !important; }

    /* 5. Scale Down Logos and Profile Pics */
    .w-32.h-32 {
        width: 80px !important;
        height: 80px !important;
    }
    
    /* Ensure icons aren't massive */
    .material-symbols-outlined {
        font-size: 20px !important;
    }
}


/* Global Logo Scanner Animation (0.5s duration, fill bottom to top) */
.logo-scanner {
  clip-path: inset(100% 0 0 0);
  animation: scanLogo 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes scanLogo {
  0% {
    clip-path: inset(100% 0 0 0);
  }
  100% {
    clip-path: inset(0 0 0 0);
  }
}

.custom-scrollbar::-webkit-scrollbar { width: 4px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(120, 255, 77, 0.5); border-radius: 4px; }
.custom-scrollbar::-webkit-scrollbar-thumb:hover { background: rgba(120, 255, 77, 1); }

/* Mobile PC-like Layout Overrides */
html.is-mobile-device #desktopNav { display: none !important; }
html.is-mobile-device header .md\:block { display: none !important; } /* Join btn */
html.is-mobile-device #mobileMenuBtn { display: block !important; }
html.is-mobile-device #mobileMenuDrawer { display: flex !important; }

/* Increase text size for readability on 1280px zoomed viewport */
html.is-mobile-device body { font-size: 24px; }
html.is-mobile-device p, 
html.is-mobile-device span, 
html.is-mobile-device a, 
html.is-mobile-device button, 
html.is-mobile-device td, 
html.is-mobile-device th {
    font-size: 1.25em !important;
}
html.is-mobile-device h1, 
html.is-mobile-device h2, 
html.is-mobile-device h3 {
    font-size: 1.5em !important;
}
html.is-mobile-device .material-symbols-outlined { font-size: 2em !important; }

/* Enlarge hamburger icon specifically */
html.is-mobile-device #mobileMenuBtn .material-symbols-outlined { font-size: 3em !important; }
html.is-mobile-device #closeMenuBtn .material-symbols-outlined { font-size: 3em !important; }
