/* This is the magic fix for Samsung/Android scaling issues */
.main-wrapper {
    width: 100%;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Force everything inside to respect the 100% width barrier */
* {
    max-width: 100vw;
    box-sizing: border-box;
}
/* 1. VARIABLES & RESET */
:root {
    --accent: #f5245f;
    --dark: #000000;
    --light: #ffffff;
    --bg-soft: #f8f8f8;
    --manrope: 'Manrope', sans-serif;
    --inter: 'Inter', sans-serif;
    --transition-smooth: 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body { 
    background: var(--light); 
    color: var(--dark); 
    font-family: var(--inter); 
    padding-top: 140px; 
    overflow-x: hidden; 
    line-height: 1.6;
}

/* --- Scroll Progress Bar --- */
#scrollIndicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--accent);
    width: 0%;
    z-index: 2000;
    transition: width 0.1s ease;
}

/* 2. NAVIGATION */
.navbar { 
    background: #fff !important; 
    border-bottom: 1px solid rgba(0,0,0,0.05); 
    z-index: 1050; 
}

.nav-logo-img {
    height: 40px;
    width: auto;
    transition: transform 0.3s ease;
}
.navbar-brand:hover .nav-logo-img { transform: scale(1.05); }

.nav-links a {
    font-family: var(--manrope); 
    font-size: clamp(2.5rem, 8vw, 4rem);
    font-weight: 800; 
    color: var(--dark); 
    text-decoration: none; 
    text-transform: uppercase;
}
.nav-links a:hover { color: var(--accent); }

/* 3. HERO & SWIPER (Performance Optimized) */
.mySwiper { 
    position: relative;
    width: 100%;
    min-height: 70vh;
    background: #fff;
    overflow: hidden;
}

.hero-title {
    font-family: var(--manrope);
    font-size: clamp(3.5rem, 12vw, 9.5rem);
    font-weight: 800;
    line-height: 0.85;
    color: var(--dark);
    margin: 0;
    opacity: 0;
    transform: translateY(30px);
    /* Faster transition than the slide fade itself */
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.accent-text { color: var(--accent); display: block; }

/* Cleaned Slide Transitions - Removed redundant !important */
.swiper-slide {
    visibility: hidden;
    z-index: 1;
    /* Visibility transition synced with fade effect */
    transition: visibility 0.8s;
}

.swiper-slide-active {
    visibility: visible;
    z-index: 10;
}

/* 2. Remove the dependency on the .swiper-slide-active class 
      We are now controlling this via JS for instant response */
.swiper-slide .hero-title {
    transition-delay: 0.1s; /* Tiny delay to let the background fade start first */
}

/* 3. Ensure the active slide title stays visible */
.swiper-slide-active .hero-title {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

.slide-content {
    position: relative;
    z-index: 20;
    width: 100%;
    padding-top: 40px;
}

/* 4. BENTO GRID */
.bento-container { 
    display: grid; 
    grid-template-columns: repeat(3, 1fr); 
    gap: 24px; 
    margin: 120px 0;
}

.bento-item { 
    background: var(--bg-soft); 
    padding: 50px; 
    border-radius: 40px; 
    border: 1px solid rgba(0,0,0,0.03); 
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.bento-item:hover { 
    transform: translateY(-8px); 
    box-shadow: 0 30px 60px rgba(0,0,0,0.08); 
}

.bento-main { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
.bento-shop { background: var(--dark); color: var(--light); }

.section-label { 
    color: var(--accent); 
    font-weight: 800; 
    text-transform: uppercase; 
    font-size: 0.8rem; 
    letter-spacing: 3px; 
    display: block; 
    margin-bottom: 20px; 
}

.tech-badge { 
    display: inline-block; 
    padding: 10px 22px; 
    background: #fff; 
    border-radius: 50px; 
    font-weight: 700; 
    font-size: 0.85rem; 
    margin: 5px; 
    border: 1px solid rgba(0,0,0,0.08); 
    transition: 0.3s;
}
.tech-badge:hover { border-color: var(--accent); color: var(--accent); }

/* 5. CLIENT LOGOS */
.client-logo-row { padding: 80px 0; border-top: 1px solid rgba(0,0,0,0.05); }
.logo-grid { display: flex; justify-content: space-around; align-items: center; flex-wrap: wrap; gap: 40px; }

.client-logo-item img {
    height: 50px; 
    filter: grayscale(100%);
    opacity: 0.4;
    transition: 0.4s;
}
.client-logo-item img:hover { filter: grayscale(0%); opacity: 1; transform: scale(1.1); }

/* 6. REVEAL ANIMATIONS */
.reveal { 
    opacity: 0; 
    transform: translateY(30px); 
    transition: var(--transition-smooth); 
}
.reveal.active { opacity: 1; transform: translateY(0); }

/* 7. FOOTER */
.main-footer { 
    background: var(--bg-soft); 
    padding: 120px 0 60px; 
    border-radius: 60px 60px 0 0; 
}

.btn-talk-footer { 
    background: var(--dark); 
    color: var(--light) !important; 
    padding: 22px 60px; 
    border-radius: 100px; 
    font-weight: 800; 
    text-decoration: none; 
    display: inline-block; 
    transition: 0.4s; 
}
.btn-talk-footer:hover { background: var(--accent); transform: scale(1.05); }

.footer-socials { display: flex; justify-content: center; align-items: center; gap: 15px; }
.social-link {
    font-family: var(--manrope);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
    color: var(--dark);
    text-decoration: none;
    transition: color 0.3s ease;
}
.social-link:hover { color: var(--accent); }

/* 8. RESPONSIVE */
@media (max-width: 991px) {
    .bento-container { grid-template-columns: 1fr; }
    .bento-main { grid-column: span 1; }
    .hero-title { line-height: 0.9; }
    .bento-item { padding: 30px; border-radius: 30px; }
}

/* --- MOBILE OPTIMIZATION (Samsung A04s / 360px) --- */

/* --- CRITICAL MOBILE FIX FOR 360px (Samsung A04s) --- */
@media (max-width: 576px) {
    /* 1. Reset Global Scaling */
    html, body {
        overflow-x: hidden;
        width: 100%;
        -webkit-text-size-adjust: 100%; /* Prevents font shrinking */
    }
    /* Tighten the top padding which might be pushed by the mobile browser UI */
    body {
        padding-top: 60px !important; 
    }
    
    
    .swiper-container, .mySwiper {
        width: 100vw !important;
        margin: 0 !important;
    }

    .mySwiper.hero-section {
        min-height: 45vh !important; /* Force a shorter height on mobile */
        height: auto !important;
    }
    /* 2. Reposition the content within the slide */
    .slide-content {
        padding-top: 20px !important; /* Move the title closer to the logo */
        text-align: left;
    }

    .hero-title {
        font-size: 3.2rem !important; /* Scale title for 360px width */
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 1.1rem !important;
        line-height: 1.4;
        max-width: 100%;
    }

    /* 3. Pull the Bento Container up to be visible */
    .bento-container {
        margin-top: -20px !important; /* Reduces the gap between slider and bio */
        gap: 16px !important;
    }

    .bento-item {
        padding: 25px 20px !important;
    }

    /* 4. Fix Client Logos from overflowing */
    .logo-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr); /* 2 per row instead of forcing all */
        gap: 20px;
    }

    .client-logo-item img {
        height: 30px;
        width: auto;
    }

    /* 4. Footer Compression */
    .main-footer {
        padding: 60px 0 40px;
        border-radius: 40px 40px 0 0;
    }
}