/* --- ROOT VARIABLES --- */
:root {
    --brand-primary: #7c3aed;
    --brand-gradient: linear-gradient(135deg, #7c3aed 0%, #3b82f6 100%);
    --bg-dark: #020617;
    --text-light: #f8fafc;
    --text-dim: #94a3b8;
    --accent-green: #10b981;
}

/* --- BASE STYLES --- */
* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

/* Fix: Prevent horizontal overflow at the root level */
html, body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 7%;
    width: 100%; /* Fix: Ensure container stays within viewport */
}

/* --- NAVIGATION --- */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 25px;
    border-radius: 50px;
    z-index: 2000;
}

.nav-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand-logo { 
    font-size: 1.3rem; 
    font-weight: 800; 
    text-decoration: none; 
    color: white; 
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    gap: 0;
}

.brand-logo span { 
    color: var(--brand-primary); 
    margin-left: 0px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.3s;
}

.nav-logo-img {
    height: 40px;
    width: auto;
    display: block;
    object-fit: contain;
}

.logo-separator {
    display: inline-block;
    width: 1.5px;
    height: 24px;
    background: rgba(255, 255, 255, 0.2);
    margin: 0 15px;
    border-radius: 10px;
}

/* Hamburger Styles */
.menu-toggle { display: none; cursor: pointer; }
.bar { display: block; width: 25px; height: 3px; margin: 5px auto; background-color: white; transition: 0.3s; }

/* --- HERO SECTION --- */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 80px;
    position: relative;
    width: 100%;
}

.hero-inner h1 {
    font-size: clamp(2rem, 8vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero-inner h1 span {
    background: var(--brand-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-inner p {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-dim);
    max-width: 600px;
    margin-bottom: 40px;
}

/* --- TYPEWRITER --- */
.typewriter-container {
    color: #ffffff;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 15px;
    min-height: 1.5rem;
    display: flex;
    align-items: center;
}

.cursor {
    display: inline-block;
    width: 2px;
    background-color: var(--brand-primary);
    margin-left: 5px;
    animation: blink 0.8s infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* --- EXPERTISE (SERVICES) --- */
.section-padding { padding: 100px 0; }

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.badge {
    background: rgba(124, 58, 237, 0.1);
    color: var(--brand-primary);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 15px;
    display: inline-block;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 50px;
}

.feature-card {
    background: rgba(255,255,255,0.03);
    padding: 30px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.05);
    transition: 0.3s ease;
}

.feature-card:hover {
    background: rgba(255,255,255,0.05);
    border-color: rgba(255,255,255,0.1);
}

.icon-box {
    width: 50px;
    height: 50px;
    background: var(--brand-gradient);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
}

.icon-box i { color: white; font-size: 1.2rem; }

/* --- WORKFLOW (PROCESS) --- */
.workflow-section { padding: 100px 0; position: relative; }

.timeline {
    position: relative;
    max-width: 800px;
    margin: 50px auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background: var(--brand-primary);
    top: 0; bottom: 0; left: 50%;
    margin-left: -1px;
    opacity: 0.3;
}

.step-container {
    padding: 10px 40px;
    position: relative;
    width: 50%;
}

.step-container::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--bg-dark);
    border: 4px solid var(--brand-primary);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.left { left: 0; text-align: right; }
.right { left: 50%; }
.right::after { left: -10px; }

/* --- TESTIMONIALS --- */
.testimonial-section { 
    padding: 100px 0; 
    background: rgba(124, 58, 237, 0.02); 
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: minmax(200px, auto);
    gap: 20px;
    margin-top: 50px;
}

.bento-item {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 30px;
    position: relative;
    overflow: hidden;
    transition: 0.4s ease;
}

.bento-item:hover {
    border-color: var(--brand-primary);
    transform: translateY(-5px);
}

.quote-text { 
    font-size: 1.1rem; 
    font-weight: 500; 
    margin-bottom: 20px; 
    font-style: italic; 
}

.client-info { display: flex; align-items: center; gap: 15px; }
.client-img { 
    width: 45px; height: 45px; border-radius: 50%; background: #333; 
}

.media-overlay {
    position: absolute; inset: 0;
    padding: 20px;
    display: flex; flex-direction: column; justify-content: flex-end;
    z-index: 2;
}

.span-2 { grid-column: span 2; }
.row-2 { grid-row: span 2; }

/* --- FOOTER --- */
.main-footer {
    background: #01040a;
    padding: 80px 0 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 50px;
}

.footer-links h4 { margin-bottom: 20px; font-size: 1.1rem; }
.footer-links ul { list-style: none; }
.footer-links ul li { margin-bottom: 12px; }
.footer-links ul li a { color: var(--text-dim); text-decoration: none; transition: 0.3s; }
.footer-links ul li a:hover { color: var(--brand-primary); }

/* --- MOBILE RESPONSIVENESS (OPTIMIZED) --- */
@media (max-width: 992px) {
    .hero-inner { text-align: center; }
    .hero-inner p { margin: 0 auto 40px; }
    .typewriter-container { justify-content: center; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .glass-nav { width: 95%; top: 10px; padding: 10px 20px; }
    .menu-toggle { display: block; z-index: 2001; }
    .nav-logo-img { height: 32px; }
    
    .nav-links {
        position: fixed;
        top: -110vh; /* Fix: Hide completely when inactive */
        left: 0;
        flex-direction: column;
        background: var(--bg-dark);
        width: 100%;
        height: 100vh;
        justify-content: center;
        transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        gap: 35px;
    }

    .nav-links.active { top: 0; }
    .nav-links a { font-size: 1.2rem; }
    
    /* Timeline Mobile Fix */
    .timeline::after { left: 20px; }
    .step-container { 
        width: 100%; 
        padding-left: 50px; 
        padding-right: 15px; 
        text-align: left !important; 
        margin-bottom: 30px;
    }
    .step-container::after { 
        left: 10px !important; 
        right: auto !important; 
    }
    .right { left: 0%; }
    
    /* Hero Buttons Fixed */
    .hero-actions { 
        display: flex; 
        flex-direction: column; 
        align-items: center;
        gap: 12px; 
        width: 100%;
        margin-top: 30px;
    }

    .btn-glow, .btn-ghost {
        width: 100%;
        max-width: 280px;
        margin: 0 !important; 
        text-align: center;
        padding: 14px 24px;
    }

    .hero-section {
        min-height: auto;
        padding-top: 140px;
        padding-bottom: 60px;
    }

    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

@media (max-width: 600px) {
    .section-padding { padding: 60px 0; }
    
    .bento-grid { 
        grid-template-columns: 1fr; 
        grid-auto-rows: auto; 
    }
    .span-2, .row-2 { grid-column: span 1; grid-row: span 1; }
    
    .footer-grid { 
        grid-template-columns: 1fr; 
        gap: 30px; 
        text-align: center; 
    }
    
    .container { padding: 0 5%; }
    .hero-inner h1 { font-size: 2.5rem; }
    .section-header h2 { font-size: 2rem; }
}

@media (max-width: 380px) {
    .brand-logo { font-size: 1.1rem; }
    .hero-inner h1 { font-size: 2.2rem; }
}

/* --- UTILITY CLASSES --- */
.btn-glow {
    padding: 16px 32px;
    background: var(--brand-gradient);
    color: white;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    display: inline-block;
    transition: 0.3s;
}

.btn-glow:hover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(124, 58, 237, 0.3); }

.btn-ghost {
    padding: 16px 32px;
    color: white;
    text-decoration: none;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 12px;
    margin-left: 10px;
    display: inline-block;
}

.cta-card {
    border: 2px dashed var(--brand-primary) !important;
    background: rgba(124, 58, 237, 0.05) !important;
}

.cta-pill {
    background: var(--brand-primary);
    padding: 10px 25px !important;
    border-radius: 50px;
    color: white !important;
}

.text-link {
    display: inline-block;
    margin-top: 15px;
    color: var(--brand-primary);
    text-decoration: none;
    font-weight: 700;
}