/* Root Variables & Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --dark: #0f172a;
    --light: #f8fafc;
    --body-color: #f1f5f9;
    --gradient-hero: linear-gradient(135deg, rgba(15,23,42,0.85) 0%, rgba(30,41,59,0.85) 100%);
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background: var(--body-color);
    max-width: 100%;
    overflow-x: hidden;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    overflow-x: hidden;
}

/* Loader */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    transition: opacity 0.6s ease, visibility 0.6s;
}

.loader.hide {
    opacity: 0;
    visibility: hidden;
}

.loader .logo img {
    max-width: 160px;
    animation: gentlePulse 1.4s infinite ease-in-out;
}

@keyframes gentlePulse {
    0% { opacity: 0.5; transform: scale(0.96); }
    100% { opacity: 1; transform: scale(1.04); }
}

/* Modern Navbar - Mobile First */
.navbar {
    padding: 0.7rem 0;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    background-color: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 2px rgba(0,0,0,0.02), 0 4px 12px rgba(0,0,0,0.03);
}

.navbar.sticky {
    padding: 0.4rem 0;
    background-color: rgba(255,255,255,0.98);
    box-shadow: 0 8px 28px rgba(0,0,0,0.08);
}

.navbar-brand img {
    height: 50px;
    transition: 0.2s;
}

.nav-link {
    font-weight: 600;
    color: #1e293b !important;
    margin: 0.3rem 0.5rem;
    transition: 0.2s;
    position: relative;
    text-align: center;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.navbar.fixed-top {
    width: 100%;
    max-width: 100vw;
}

/* Hero Section - Mobile First */
.hero-section {
    position: relative;
    padding: 120px 0 80px;
    margin-top: 0;
    background: #0a0f1c;
    overflow: hidden;
}

.moving-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('https://images.unsplash.com/photo-1517245386807-bb43f82c33c4?q=80&w=2070&auto=format');
    background-size: cover;
    background-position: center 30%;
    filter: brightness(0.45) contrast(1.05);
    animation: slowZoomPan 24s infinite alternate ease-in-out;
    transform: scale(1.05);
}

@keyframes slowZoomPan {
    0% {
        transform: scale(1.05) translateX(0%);
    }
    100% {
        transform: scale(1.18) translateX(-2%);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 70% 20%, rgba(99,102,241,0.25) 0%, rgba(15,23,42,0.88) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-title {
    font-size: 2.2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

/* Buttons */
.btn-primary-custom {
    background: var(--primary);
    border: none;
    padding: 10px 24px;
    border-radius: 60px;
    font-weight: 700;
    transition: all 0.25s;
    box-shadow: 0 15px 25px -10px rgba(99,102,241,0.5);
    font-size: 0.95rem;
}

.btn-primary-custom:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 22px 28px -12px rgba(79,70,229,0.55);
}

.btn-outline-light-custom {
    border: 1.5px solid rgba(255,255,255,0.5);
    border-radius: 60px;
    padding: 10px 20px;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: 0.2s;
    font-size: 0.9rem;
}

.btn-outline-light-custom:hover {
    background: white;
    color: #0f172a;
    border-color: white;
    transform: translateY(-2px);
}

/* Cards & modern design - Mobile First */
.card-feature {
    border: none;
    border-radius: 1.5rem;
    transition: all 0.35s ease;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(0px);
    box-shadow: 0 20px 35px -12px rgba(0,0,0,0.05);
    padding: 1.5rem !important;
}

.card-feature:hover {
    transform: translateY(-8px);
    box-shadow: 0 28px 40px -14px rgba(0,0,0,0.12);
}

.icon-bg {
    width: 60px;
    height: 60px;
    background: rgba(99,102,241,0.12);
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
}

.icon-bg i {
    font-size: 2rem;
    color: var(--primary);
}

/* Portfolio Glass morphism - Mobile First */
.portfolio-card {
    border-radius: 1.2rem;
    overflow: hidden;
    transition: all 0.35s;
    background: white;
    box-shadow: 0 12px 28px -8px rgba(0,0,0,0.08);
}

.portfolio-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 24px 40px -16px rgba(0,0,0,0.2);
}

.portfolio-card img {
    height: 260px;
    object-fit: cover;
    width: 100%;
    transition: transform 0.5s ease;
}

.portfolio-card:hover img {
    transform: scale(1.05);
}

.badge-web {
    background: var(--primary);
    color: white;
    padding: 4px 12px;
    border-radius: 40px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Stats cards - Mobile First */
.stats-card {
    background: white;
    border-radius: 1.2rem;
    padding: 1.2rem 0.5rem;
    transition: 0.2s;
    box-shadow: 0 6px 14px rgba(0,0,0,0.02);
    border: 1px solid rgba(0,0,0,0.02);
}

.stats-card:hover {
    transform: translateY(-5px);
    background: white;
    box-shadow: 0 22px 32px -16px rgba(0,0,0,0.08);
}

.stats-card h2 {
    font-size: 1.8rem;
}

/* Testimonial section */
.testimonial-card {
    background: white;
    border-radius: 1.5rem;
    padding: 1.5rem;
    margin: 0.5rem;
    box-shadow: 0 18px 36px -18px rgba(0,0,0,0.08);
    transition: 0.2s;
}

.testimonial-card i {
    font-size: 1.8rem;
    color: var(--primary);
    opacity: 0.5;
}

/* Footer */
.footer {
    background: #0f172a;
    padding-top: 40px;
    color: #cbd5e1;
}

.footer a {
    color: #cbd5e1;
    text-decoration: none;
    transition: 0.2s;
}

.footer a:hover {
    color: white;
    padding-left: 2px;
}

.social-icons a {
    background: rgba(255,255,255,0.1);
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-right: 8px;
    transition: 0.2s;
}

.social-icons a:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

/* Blog / insight mini section */
.insight-card {
    background: white;
    border-radius: 1.2rem;
    overflow: hidden;
    transition: 0.3s;
}

.insight-card:hover {
    transform: translateY(-5px);
}

/* Typography Mobile Adjustments */
.section-title-custom {
    margin-bottom: 1.5rem;
}

.bg-soft-primary {
    background: rgba(99,102,241,0.12);
}

.rounded-pill-custom {
    border-radius: 60px;
}

h2.display-6 {
    font-size: 1.8rem;
}

.lead {
    font-size: 1rem;
}

/* CTA Section Mobile */
.bg-primary.rounded-4 {
    border-radius: 1.5rem !important;
    padding: 2rem 1rem !important;
}

/* Spacing Adjustments */
section {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* Tablet & Desktop Responsive */
@media (min-width: 768px) {
    .hero-section {
        padding: 170px 0 140px;
    }
    
    .hero-content {
        text-align: left;
    }
    
    .hero-title {
        font-size: 3.4rem;
    }
    
    .navbar-brand img {
        height: 44px;
    }
    
    .loader .logo img {
        max-width: 200px;
    }
    
    .navbar {
        padding: 0.9rem 0;
    }
    
    .nav-link {
        margin: 0 0.5rem;
    }
    
    .btn-primary-custom {
        padding: 12px 32px;
        font-size: 1rem;
    }
    
    .btn-outline-light-custom {
        padding: 12px 28px;
        font-size: 1rem;
    }
    
    .card-feature {
        border-radius: 2rem;
        padding: 2rem !important;
    }
    
    .icon-bg {
        width: 72px;
        height: 72px;
        border-radius: 28px;
        margin-bottom: 1.4rem;
    }
    
    .icon-bg i {
        font-size: 2.5rem;
    }
    
    .portfolio-card {
        border-radius: 1.8rem;
    }
    
    .portfolio-card img {
        height: 260px;
    }
    
    .badge-web {
        padding: 5px 14px;
        font-size: 0.7rem;
    }
    
    .stats-card {
        border-radius: 1.8rem;
        padding: 1.6rem 0.8rem;
    }
    
    .stats-card h2 {
        font-size: 2rem;
    }
    
    .testimonial-card {
        border-radius: 2rem;
        padding: 2rem;
    }
    
    .testimonial-card i {
        font-size: 2.2rem;
    }
    
    .footer {
        padding-top: 60px;
    }
    
    .social-icons a {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
    
    .insight-card {
        border-radius: 1.5rem;
    }
    
    .section-title-custom {
        margin-bottom: 2rem;
    }
    
    h2.display-6 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.25rem;
    }
    
    .bg-primary.rounded-4 {
        border-radius: 2rem !important;
        padding: 3rem 2rem !important;
    }
    
    section {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}