/* Mobile Enhancements - Black & White Theme */

/* Webkit keyframes for mobile animation compatibility */
@-webkit-keyframes grid-pulse {
    0%, 100% { 
        opacity: 0.4;
    }
    50% { 
        opacity: 0.7;
    }
}

@keyframes grid-pulse {
    0%, 100% { 
        opacity: 0.4;
    }
    50% { 
        opacity: 0.7;
    }
}

@-webkit-keyframes float {
    0%, 100% { 
        -webkit-transform: translate(0, 0) rotate(0deg);
        transform: translate(0, 0) rotate(0deg);
    }
    25% { 
        -webkit-transform: translate(-20px, -20px) rotate(90deg);
        transform: translate(-20px, -20px) rotate(90deg);
    }
    50% { 
        -webkit-transform: translate(20px, -10px) rotate(180deg);
        transform: translate(20px, -10px) rotate(180deg);
    }
    75% { 
        -webkit-transform: translate(-10px, 20px) rotate(270deg);
        transform: translate(-10px, 20px) rotate(270deg);
    }
}

/* Mobile Logo */
.mobile-logo {
    display: none;
    position: fixed;
    top: 20px;
    left: 16px;
    font-size: 22px;
    color: #FFFFFF;
    z-index: 9999;
    font-weight: 500;
    line-height: 1;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Hamburger Menu */
.hamburger {
    display: none;
    position: fixed;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1003;
    margin-left: auto;
    top: 20px;
    right: 16px;
}

.hamburger span {
    display: block !important;
    width: 22px;
    height: 2px;
    background: #FFFFFF;
    margin: 4px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 2px;
    position: relative;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.98);
    backdrop-filter: blur(30px) saturate(0%);
    -webkit-backdrop-filter: blur(30px) saturate(0%);
    z-index: 9998;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 20px;
    box-sizing: border-box;
}

.mobile-menu-overlay.active {
    display: flex;
    opacity: 1;
    align-items: center;
    justify-content: center;
}

.mobile-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    text-align: center;
}

.mobile-nav li {
    margin: 1.5rem 0;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.mobile-menu-overlay.active .mobile-nav li {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-overlay.active .mobile-nav li:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu-overlay.active .mobile-nav li:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu-overlay.active .mobile-nav li:nth-child(3) { transition-delay: 0.2s; }
.mobile-menu-overlay.active .mobile-nav li:nth-child(4) { transition-delay: 0.25s; }
.mobile-menu-overlay.active .mobile-nav li:nth-child(5) { transition-delay: 0.3s; }
.mobile-menu-overlay.active .mobile-nav li:nth-child(6) { transition-delay: 0.35s; }

.mobile-nav a {
    color: #FFFFFF;
    font-size: 1.35rem;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 2px;
    padding: 1rem 2.5rem;
    display: block;
    position: relative;
    transition: all 0.3s ease;
    text-align: center;
    width: 100%;
    position: relative;
}

.mobile-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20%;
    right: 20%;
    height: 2px;
    background: #FFFFFF;
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.mobile-nav a:active::after {
    transform: scaleX(1);
}

.mobile-nav a:hover {
    transform: scale(1.1);
    text-shadow: 0 0 30px rgba(255, 255, 255, 0.5);
}

/* Desktop - hide mobile menu */
@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* Mobile Navigation Overlay - Enhanced visibility */
@media (max-width: 768px) {
    
    .mobile-logo {
        display: flex !important;
    }
    
    .hamburger {
        display: flex !important;
        align-items: center;
        justify-content: center;
        flex-direction: column;
        position: fixed !important;
        top: 20px !important;
        right: 16px !important;
        z-index: 9999 !important;
        background: transparent;
        padding: 10px;
        width: 42px;
        height: 42px;
    }
    
    .hamburger.active span {
        background: #000000;
    }
    
    .logo {
        display: none !important; /* Hide logo on mobile */
    }
    
    .navbar {
        display: none; /* Hide entire navbar on mobile */
    }
    
    /* Ensure hamburger is visible even when navbar is hidden */
    body > .hamburger {
        display: flex !important;
    }
    
    .nav-menu {
        display: none !important; /* Hide desktop nav menu on mobile */
    }
    
    /* Remove all desktop nav menu styles on mobile */
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Mobile Hero Section - Optimized for maximum readability */
@media (max-width: 768px) {
    /* Enhanced visible mobile grid animation */
    .hero::before {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: 
            repeating-linear-gradient(
                90deg,
                transparent,
                transparent 50px,
                rgba(0, 0, 0, 0.1) 50px,
                rgba(0, 0, 0, 0.06) 52px
            ),
            repeating-linear-gradient(
                0deg,
                transparent,
                transparent 50px,
                rgba(0, 0, 0, 0.06) 50px,
                rgba(0, 0, 0, 0.06) 52px
            ) !important;
        background-size: 52px 52px !important;
        z-index: 1 !important;
        pointer-events: none !important;
        opacity: 1 !important;
        animation: mobileGridPulse 4s ease-in-out infinite !important;
        -webkit-animation: mobileGridPulse 4s ease-in-out infinite !important;
    }
    
    /* More visible pulsing animation */
    @keyframes mobileGridPulse {
        0%, 100% { 
            opacity: 0.45;
            transform: scale(1);
        }
        50% { 
            opacity: 0.75;
            transform: scale(1);
        }
    }
    
    @-webkit-keyframes mobileGridPulse {
        0%, 100% { 
            opacity: 0.7;
            -webkit-transform: scale(1);
        }
        50% { 
            opacity: 1;
            -webkit-transform: scale(1.01);
        }
    }
    
    /* Add subtle moving accent lines */
    .hero::after {
        content: '' !important;
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        background: 
            linear-gradient(
                90deg,
                transparent 0%,
                rgba(0, 0, 0, 0.1) 10%,
                transparent 20%
            ) !important;
        background-size: 200% 100% !important;
        z-index: 1 !important;
        pointer-events: none !important;
        opacity: 1 !important;
        animation: mobileAccentMove 8s linear infinite !important;
        -webkit-animation: mobileAccentMove 8s linear infinite !important;
        mix-blend-mode: multiply;
    }
    
    @keyframes mobileAccentMove {
        0% {
            background-position: -200% 0;
        }
        100% {
            background-position: 200% 0;
        }
    }
    
    @-webkit-keyframes mobileAccentMove {
        0% {
            background-position: -200% 0;
        }
        100% {
            background-position: 200% 0;
        }
    }
    
    
    .hero {
        padding: 100px 16px 20px 16px !important;
        min-height: auto !important;
        height: auto !important;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        position: relative;
        background-color: #FFFFFF !important;
        overflow: hidden !important;
    }
    
    .hero .container {
        width: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        max-width: 100%;
        position: relative;
        z-index: 2;
    }
    
    .hero h1 {
        font-size: clamp(2.25rem, 8vw, 3.5rem);
        line-height: 1.1;
        margin-bottom: 20px;
        letter-spacing: -0.03em;
        text-align: center;
        padding: 0 10px;
        width: 100%;
        font-weight: 900;
        color: #000000;
        word-wrap: break-word;
        hyphens: manual;
    }
    
    .hero p {
        font-size: clamp(1.25rem, 4vw, 1.75rem);
        margin-bottom: 32px;
        padding: 0 15px;
        line-height: 1.4;
        opacity: 0.9;
        text-align: center;
        max-width: 100%;
        width: 100%;
        font-weight: 400;
        color: #000000;
        letter-spacing: -0.01em;
    }
    
    .cta-button {
        padding: 18px 40px;
        font-size: 1rem;
        width: auto;
        min-width: 220px;
        max-width: 90%;
        /* Re-enable animations - removed animation: none */
        animation: fadeInUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both !important;
        margin: 0 auto;
        display: block;
        font-weight: 600;
        letter-spacing: 1.5px;
        border: 1.5px solid rgba(0, 0, 0, 0.2);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
        position: relative;
        z-index: 2;
    }
    
    .hero .scroll-indicator {
        display: block;
        position: absolute;
        bottom: 40px;
        left: 50%;
        transform: translateX(-50%);
        width: 30px;
        height: 45px;
        opacity: 0.7;
        z-index: 100;
        pointer-events: none;
        animation: bounce 2.5s ease-in-out infinite;
    }
    
    .hero .scroll-indicator::after {
        border-left-width: 8px;
        border-right-width: 8px;
        border-top-width: 12px;
    }
    
    /* Hide scroll indicator when scrolled */
    body.scrolled .hero .scroll-indicator {
        opacity: 0;
        transition: opacity 0.3s ease-out;
    }
}

/* Mobile Cards - Premium design with optimal spacing */
@media (max-width: 768px) {
    .services-section {
        padding: 50px 16px 40px 16px;
        margin-top: -20px;
        position: relative;
        z-index: 50;
        background: #FFFFFF;
    }
    
    .services-section .container {
        padding: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .services-grid {
        gap: 20px;
        margin: 0;
        padding: 0;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    
    .service-card {
        padding: 28px 24px;
        min-height: auto;
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        border-radius: 16px;
        background: rgba(255, 255, 255, 0.98);
        margin: 0;
        width: 100%;
        box-sizing: border-box;
        text-align: left;
        position: relative;
        gap: 16px;
        border: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }
    
    .service-card:active {
        transform: scale(0.98);
        transition: transform 0.1s ease;
    }
    
    .card-number {
        font-size: 3rem;
        top: 20px;
        right: 20px;
        opacity: 0.03;
    }
    
    .service-card h3 {
        font-size: 1.35rem;
        margin-bottom: 10px;
        line-height: 1.2;
        text-align: left;
        font-weight: 800;
        letter-spacing: -0.02em;
        color: #000000;
    }
    
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.65;
        margin-bottom: 16px;
        text-align: left;
        opacity: 0.85;
        font-weight: 400;
        color: #000000;
        letter-spacing: 0.01em;
    }
    
    .card-link {
        font-size: 0.85rem;
        padding: 10px 0;
        text-align: left;
        margin: 0;
        font-weight: 600;
        letter-spacing: 1px;
        text-transform: uppercase;
        color: #000000;
        opacity: 0.9;
    }
}

/* Touch-friendly improvements */
@media (max-width: 768px) {
    /* Larger touch targets */
    a, button {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Better spacing for fingers */
    .service-card {
        margin-bottom: 0;
    }
    
    /* Smooth scrolling */
    html {
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        scroll-padding-top: 60px;
    }
    
    /* Remove hover effects on touch devices */
    @media (hover: none) {
        .service-card:hover {
            transform: none;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
        }
        
        .nav-menu a:hover::after {
            width: 0;
        }
    }
}

/* Ensure consistent spacing for all sections */
@media (max-width: 768px) {
    main {
        padding: 0;
        width: 100%;
    }
    
    section {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Small phones - Optimized for readability */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .hero {
        padding: 60px 12px 30px;
        min-height: 100vh;
    }
    
    .hero .container {
        padding-top: 0;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 9vw, 2.75rem);
        letter-spacing: -0.03em;
        margin-bottom: 18px;
        padding: 0 5px;
        line-height: 1.1;
    }
    
    .hero p {
        font-size: clamp(1.125rem, 4.5vw, 1.5rem);
        padding: 0 8px;
        margin-bottom: 28px;
        line-height: 1.35;
    }
    
    .cta-button {
        width: 100%;
        max-width: 300px;
        padding: 16px 32px;
        font-size: 0.95rem;
        letter-spacing: 1.2px;
    }
    
    .services-section {
        padding: 30px 16px 20px 16px;
    }
    
    .services-grid {
        gap: 12px;
    }
    
    .service-card {
        padding: 24px 20px;
        gap: 14px;
        border-radius: 14px;
    }
    
    .service-card h3 {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    
    .service-card p {
        font-size: 0.9rem;
        margin-bottom: 14px;
        line-height: 1.6;
    }
    
    .card-link {
        font-size: 0.8rem;
        letter-spacing: 0.8px;
    }
    
    .mobile-nav a {
        font-size: 1.2rem;
    }
}

/* iPhone X and newer - Safe areas */
@supports (padding: max(0px)) {
    .navbar {
        padding-top: max(2rem, env(safe-area-inset-top));
    }
    
    .nav-menu {
        padding-top: max(2rem, env(safe-area-inset-top));
        padding-bottom: max(2rem, env(safe-area-inset-bottom));
    }
    
    footer {
        padding-bottom: max(4rem, env(safe-area-inset-bottom));
    }
}

/* Landscape orientation fixes - Optimize for wide screens */
@media (max-width: 896px) and (orientation: landscape) {
    .hero {
        min-height: 100vh;
        padding: 40px 40px 30px;
    }
    
    .hero .container {
        padding-top: 0;
        max-width: 600px;
    }
    
    .hero h1 {
        font-size: 2.25rem;
        margin-bottom: 16px;
        line-height: 1.1;
    }
    
    .hero p {
        font-size: 1.25rem;
        margin-bottom: 24px;
        line-height: 1.4;
    }
    
    .cta-button {
        padding: 14px 36px;
        font-size: 0.95rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .service-card {
        padding: 18px;
        min-height: auto;
    }
    
    .service-card h3 {
        font-size: 1rem;
    }
    
    .service-card p {
        font-size: 0.75rem;
    }
    
    /* Legal disclaimer landscape optimization */
    .legal-disclaimer {
        padding: 1.5rem 2rem;
        margin-top: 2rem;
    }
    
    .legal-disclaimer h3 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .legal-disclaimer p {
        font-size: 0.875rem;
        line-height: 1.6;
        margin-bottom: 0.875rem;
    }
}

/* Ensure background animations are visible on all mobile */
@media screen and (max-width: 768px) {
    .hero {
        /* Ensure 3D context for children */
        -webkit-transform-style: preserve-3d;
        transform-style: preserve-3d;
        /* Force GPU acceleration */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
    
    .hero::before,
    .hero::after {
        /* Force visibility */
        content: '' !important;
        display: block !important;
        visibility: visible !important;
        
        /* Position absolutely */
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        
        /* Ensure animations run */
        -webkit-animation-play-state: running !important;
        animation-play-state: running !important;
        
        /* Add fill mode */
        -webkit-animation-fill-mode: both !important;
        animation-fill-mode: both !important;
        
        /* Hardware acceleration */
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: visible !important;
        backface-visibility: visible !important;
        
        /* Performance optimization */
        will-change: transform, opacity;
        
        /* Ensure pointer events don't interfere */
        pointer-events: none !important;
    }
    
    /* Grid animation specific - Static grid with pulse effect */
    .hero::before {
        background: 
            repeating-linear-gradient(
                90deg,
                transparent,
                transparent 100px,
                rgba(0, 0, 0, 0.06) 100px,
                rgba(0, 0, 0, 0.06) 101px
            ),
            repeating-linear-gradient(
                0deg,
                transparent,
                transparent 100px,
                rgba(0, 0, 0, 0.06) 100px,
                rgba(0, 0, 0, 0.06) 101px
            ) !important;
        
        /* Apply pulse animation instead of movement */
        -webkit-animation: grid-pulse 4s ease-in-out infinite !important;
        animation: grid-pulse 4s ease-in-out infinite !important;
        
        /* Ensure correct stacking */
        z-index: 0 !important;
        opacity: 0.5 !important;
        
        /* No transform needed - static position */
        -webkit-transform: none !important;
        transform: none !important;
    }
    
    /* Float animation specific */
    .hero::after {
        background-image: 
            radial-gradient(circle at 20% 40%, rgba(0, 0, 0, 0.08) 1px, transparent 1px),
            radial-gradient(circle at 80% 20%, rgba(0, 0, 0, 0.06) 1.5px, transparent 1.5px),
            radial-gradient(circle at 50% 60%, rgba(0, 0, 0, 0.04) 2px, transparent 2px) !important;
        background-size: 400px 400px, 350px 350px, 300px 300px !important;
        
        /* Apply animation with webkit prefix */
        -webkit-animation: float 35s ease-in-out infinite !important;
        animation: float 35s ease-in-out infinite !important;
        
        /* Ensure correct stacking */
        z-index: 1 !important;
        opacity: 1 !important;
    }
    
    /* Ensure content stays above animations */
    .hero .container,
    .hero > * {
        position: relative;
        z-index: 2;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Chrome and Android browsers */
    .hero::before {
        /* Static grid - no transform needed */
        transform: none;
        will-change: opacity;
    }
    
    .hero::after {
        /* Ensure layer promotion for floating animation */
        transform: translateZ(0);
        will-change: transform;
    }
    
    /* Optimize shadows and effects */
    .service-card {
        box-shadow: 0 6px 25px rgba(0, 0, 0, 0.06);
        transition: transform 0.2s ease, box-shadow 0.2s ease;
    }
    
    .service-card:active {
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    }
    
    /* Optimize backdrop filters */
    .navbar {
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
    }
    
    /* Add touch feedback */
    .cta-button:active {
        transform: scale(0.97);
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    }
}

/* Accessibility for mobile */
@media (max-width: 768px) {
    /* Focus visible styles */
    *:focus-visible {
        outline: none;
    }
    
    .nav-menu a:focus-visible {
        outline: none;
    }
    
    /* Better contrast for small text */
    .card-number {
        display: none;
    }
}

/* Loading optimization */
@media (max-width: 768px) {
    .preloader-text {
        font-size: 2rem;
    }
}

/* Ensure hamburger visibility - fallback styles */
@media screen and (max-width: 768px) {
    .hamburger {
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
    }
}

/* Footer mobile optimization */
@media (max-width: 768px) {
    footer {
        padding: 3rem 20px 2rem;
        text-align: center;
        background: #000000;
        color: #FFFFFF;
    }
    
    footer .container {
        padding: 0;
        text-align: center;
    }
    
    footer > .container > p:first-child {
        font-size: 0.8rem;
        text-align: center;
        margin: 0 auto 2rem;
        opacity: 0.8;
        letter-spacing: 1px;
    }
    
    /* Legal Disclaimer Mobile Styles - Premium Design with Enhancements */
    .legal-disclaimer {
        margin-top: 2.5rem;
        padding: 2rem 1.5rem;
        border-radius: 0;
        border-width: 1px;
        background: linear-gradient(135deg, 
            rgba(255, 255, 255, 0.05) 0%, 
            rgba(255, 255, 255, 0.02) 100%);
        backdrop-filter: blur(20px) saturate(110%);
        -webkit-backdrop-filter: blur(20px) saturate(110%);
        box-shadow: 
            0 20px 50px rgba(255, 255, 255, 0.03),
            0 8px 20px rgba(255, 255, 255, 0.02),
            inset 0 1px 0 rgba(255, 255, 255, 0.06);
        max-width: calc(100% - 40px);
        margin-left: auto;
        margin-right: auto;
        animation: none !important;
    }
    
    .legal-disclaimer h3 {
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
        padding-bottom: 1.25rem;
        letter-spacing: 2.5px;
        line-height: 1.2;
        text-align: center;
        font-weight: 900;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    /* Mobile icon adjustments */
    .legal-disclaimer h3::before {
        width: 1.75rem;
        height: 1.75rem;
        animation: iconFloat 6s ease-in-out infinite !important;
    }
    
    .legal-disclaimer h3::after {
        display: none;
    }
    
    .legal-disclaimer p {
        font-size: 0.95rem;
        line-height: 1.8;
        margin-bottom: 1.25rem;
        opacity: 0.9;
        letter-spacing: 0.3px;
        text-align: left;
        color: rgba(255, 255, 255, 0.92);
        padding-left: 1.75rem;
    }
    
    /* Mobile bullet adjustments */
    .legal-disclaimer p::before {
        width: 0.35rem;
        height: 0.35rem;
        top: 0.65em;
        left: 0;
    }
    
    /* Mobile separator adjustments */
    .legal-disclaimer p:not(:last-child)::after {
        width: 50px;
        bottom: -0.625rem;
    }
    
    .legal-disclaimer p:first-of-type {
        font-size: 1.05rem;
        font-weight: 500;
        opacity: 0.95;
    }
    
    /* Disable complex animations on mobile */
    .legal-disclaimer * {
        animation-duration: 2s !important;
    }
}

/* Tablet specific legal disclaimer styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .legal-disclaimer {
        padding: 3rem 2.5rem;
        margin-top: 3.5rem;
        max-width: 90%;
    }
    
    .legal-disclaimer h3 {
        font-size: 2.25rem;
        margin-bottom: 2.5rem;
        letter-spacing: 3px;
    }
    
    .legal-disclaimer p {
        font-size: 1.125rem;
        line-height: 1.95;
        margin-bottom: 2rem;
        letter-spacing: 0.4px;
    }
    
    .legal-disclaimer p:first-of-type {
        font-size: 1.25rem;
    }
}

/* Small phones specific legal disclaimer */
@media (max-width: 480px) {
    .legal-disclaimer {
        padding: 1.75rem 1.25rem;
        margin-top: 2rem;
        border: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .legal-disclaimer h3 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
        padding-bottom: 1rem;
        letter-spacing: 2px;
    }
    
    .legal-disclaimer h3::after {
        display: none;
    }
    
    .legal-disclaimer p {
        font-size: 0.875rem;
        line-height: 1.75;
        margin-bottom: 1rem;
        letter-spacing: 0.2px;
    }
    
    .legal-disclaimer p:first-of-type {
        font-size: 0.95rem;
    }
}

/* Extra small phones (iPhone SE, etc) - Maximum text size */
@media (max-width: 375px) {
    .hero {
        padding: 50px 12px 30px;
        min-height: 100vh;
    }
    
    .hero .container {
        padding-top: 0;
        justify-content: center;
    }
    
    .hero h1 {
        font-size: 2rem;
        margin-bottom: 16px;
        padding: 0;
        font-weight: 900;
        line-height: 1.05;
    }
    
    .hero p {
        font-size: 1.125rem;
        margin-bottom: 24px;
        padding: 0 5px;
        line-height: 1.35;
    }
    
    .cta-button {
        padding: 15px 28px;
        font-size: 0.9rem;
        letter-spacing: 1px;
        min-width: 200px;
    }
    
    .service-card {
        padding: 22px 18px;
        border-radius: 12px;
    }
    
    .service-card h3 {
        font-size: 1.125rem;
        font-weight: 800;
    }
    
    .service-card p {
        font-size: 0.85rem;
        line-height: 1.55;
    }
    
    .card-link {
        font-size: 0.75rem;
    }
}

/* Additional mobile optimizations for text clarity */
@media (max-width: 768px) {
    /* Enhanced text rendering */
    body {
        text-rendering: optimizeLegibility;
        -webkit-text-size-adjust: 100%;
        font-variant-ligatures: none;
    }
    
    /* Improved contrast for better readability */
    .hero h1 {
        text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        font-feature-settings: 'kern' 1, 'liga' 0;
    }
    
    .hero p {
        text-shadow: 0 1px 1px rgba(0, 0, 0, 0.03);
    }
    
    /* Better tap targets */
    .cta-button {
        touch-action: manipulation;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    /* Fallback for browsers that don't support complex gradients */
    .hero::before {
        /* Fallback background - static grid */
        background-image: 
            linear-gradient(90deg, transparent 99%, rgba(0, 0, 0, 0.05) 99%),
            linear-gradient(0deg, transparent 99%, rgba(0, 0, 0, 0.05) 99%) !important;
        background-size: 101px 101px !important;
    }
    
    /* Adjust animation timings for mobile */
    .hero h1 {
        animation-duration: 0.8s;
        animation-timing-function: cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .hero p {
        animation-duration: 0.8s;
        animation-delay: 0.15s;
    }
    
    .cta-button {
        animation-duration: 0.8s;
        animation-delay: 0.3s;
    }
}

/* Dynamic font scaling for various mobile sizes */
@media (min-width: 360px) and (max-width: 414px) {
    .hero h1 {
        font-size: 2.375rem;
    }
    
    .hero p {
        font-size: 1.375rem;
    }
}

@media (min-width: 414px) and (max-width: 768px) {
    .hero h1 {
        font-size: clamp(2.5rem, 9vw, 3.25rem);
    }
    
    .hero p {
        font-size: clamp(1.375rem, 4.5vw, 1.625rem);
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .service-card p {
        font-size: 1rem;
    }
}

/* iOS Safari specific fixes */
@supports (-webkit-touch-callout: none) {
    .hero::before {
        /* Static grid - no transform */
        -webkit-transform: none;
        transform: none;
    }
    
    .hero::after {
        /* Use 3D transform for better performance on float animation */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }
    
    /* Redefine animations for iOS Safari - pulse only */
    @-webkit-keyframes grid-pulse {
        0%, 100% { 
            opacity: 0.4;
        }
        50% { 
            opacity: 0.7;
        }
    }
    
    @keyframes grid-pulse {
        0%, 100% { 
            opacity: 0.4;
        }
        50% { 
            opacity: 0.7;
        }
    }
    
    @-webkit-keyframes float {
        0%, 100% { 
            -webkit-transform: translate3d(0, 0, 0) rotate(0deg);
        }
        25% { 
            -webkit-transform: translate3d(-20px, -20px, 0) rotate(90deg);
        }
        50% { 
            -webkit-transform: translate3d(20px, -10px, 0) rotate(180deg);
        }
        75% { 
            -webkit-transform: translate3d(-10px, 20px, 0) rotate(270deg);
        }
    }
}

/* Performance optimizations for low-end devices */
@media (max-width: 768px) and (max-resolution: 2dppx) {
    /* Simplify animations for low DPI screens */
    .hero::before {
        animation-duration: 5s !important;
    }
    
    .hero::after {
        animation-duration: 50s !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero::after {
        animation: none !important;
        -webkit-animation: none !important;
    }
}

/* ================================ */
/* Market Research Mobile Styles    */
/* ================================ */

@media (max-width: 768px) {
    /* Ensure Inter font on mobile */
    * {
        font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    }
    
    /* Dark theme mobile overrides */
    body.dark-theme {
        background: #000000 !important;
        color: #FFFFFF !important;
    }
    
    /* Mobile hamburger - always white on dark pages */
    body.dark-theme .hamburger span,
    .dark-theme .hamburger span {
        background: #FFFFFF !important;
    }
    
    /* Mobile navigation overlay */
    body.dark-theme .mobile-menu-overlay,
    .dark-theme .mobile-menu-overlay {
        background: #000000 !important;
    }
    
    body.dark-theme .mobile-nav a,
    .dark-theme .mobile-nav a {
        color: #FFFFFF !important;
    }
    
    /* Glass morphism on mobile */
    .glass-card,
    .service-card {
        background: rgba(255, 255, 255, 0.03) !important;
        backdrop-filter: blur(20px) !important;
        -webkit-backdrop-filter: blur(20px) !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
        border-radius: 16px !important;
        padding: 1.5rem !important;
    }
    
    /* Mobile gradient text */
    .gradient-text,
    h1.gradient-text,
    .hero h1.gradient-text {
        background: linear-gradient(135deg, #ffffff 0%, #666666 100%) !important;
        -webkit-background-clip: text !important;
        -webkit-text-fill-color: transparent !important;
        background-clip: text !important;
    }
    
    /* Mobile buttons */
    .btn-glass,
    .cta-button {
        padding: 12px 24px !important;
        font-size: 14px !important;
        border-radius: 8px !important;
        font-weight: 500 !important;
        backdrop-filter: blur(10px) !important;
        -webkit-backdrop-filter: blur(10px) !important;
    }
    
    /* Mobile table scrolling */
    .table-wrapper {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .data-table,
    .broker-table {
        min-width: 1000px !important;
    }
    
    /* Mobile typography scale */
    h1 {
        font-size: 2.5rem !important;
        font-weight: 700 !important;
        line-height: 1.1 !important;
    }
    
    h2 {
        font-size: 2rem !important;
        font-weight: 600 !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
        font-weight: 600 !important;
    }
    
    p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
    
    /* Mobile spacing */
    .container {
        padding: 0 20px !important;
    }
    
    section {
        padding: 60px 0 !important;
    }
    
    /* Mobile card hover - reduced for performance */
    .service-card:hover,
    .glass-card:hover {
        transform: translateY(-2px) !important;
    }
}

