:root {
    --bg-page: #f1f5f9; /* Outer canvas background */
    --bg-canvas: #ffffff;
    
    --text-dark: #0f172a;
    --text-muted: #64748b;
    
    --brand-blue: #2563eb;
    --brand-dark: #0f172a;
    
    /* Tech agency fonts */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Plus Jakarta Sans', sans-serif;
    
    --shadow-card: 0 10px 30px rgba(0,0,0,0.03);
}

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

body {
    font-family: var(--font-body);
    background-color: var(--bg-page);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, .logo-mark { font-family: var(--font-heading); font-weight: 700; color: var(--text-dark); letter-spacing: -0.02em;}

.work-card:hover img { transform: scale(1.05); }
.work-card:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.08); }

/* Presentation Header */
.presentation-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2.5rem;
}
.brand-logo { display: flex; align-items: center; gap: 0.8rem; }
.logo-mark { background: var(--text-dark); color: #fff; font-size: 1.4rem; padding: 0.4rem 0.8rem; border-radius: 8px;}
.brand-logo span { font-weight: 700; font-size: 1.2rem;}

.nav-links { display: flex; gap: 2.5rem; background: #f8fafc; padding: 0.6rem 2rem; border-radius: 100px; border: 1px solid #e2e8f0;}
.nav-links a { font-size: 0.9rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: 0.2s; text-decoration: none;}
.nav-links a.active { color: var(--text-dark); }
.nav-links a:hover { color: var(--brand-blue); }

.tab-content { display: none; opacity: 0; transform: translateY(10px); transition: 0.4s ease-out; }
.tab-content.active { display: block; opacity: 1; transform: translateY(0); }

.btn-primary {
    background: var(--brand-blue); color: #fff;
    padding: 0.8rem 1.5rem; border-radius: 100px; border: none;
    font-family: var(--font-body); font-size: 0.9rem;
    font-weight: 700; cursor: pointer; transition: 0.3s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(37, 99, 235, 0.2); }

/* Rigid Tech Agency Bento Grid */
.agency-bento {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 350px 300px;
    gap: 1.5rem;
    flex: 1;
}

/* Base Card Style */
.bento-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    padding: 2.5rem;
    display: flex; flex-direction: column;
    transition: transform 0.3s;
}
.bento-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card); }

.tag-pill { display: inline-block; background: #e2e8f0; color: var(--text-dark); padding: 0.4rem 1rem; border-radius: 100px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 1.5rem; width: max-content;}
.card-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 2rem;}
.card-head h3 { font-size: 1.6rem; }
.card-head span { font-family: var(--font-heading); font-size: 1rem; color: var(--text-muted); font-weight: 700;}

/* 1. Hero Card */
.hero-card { grid-column: 1 / 3; grid-row: 1 / 2; justify-content: center; background: #f8fafc; position: relative; overflow: hidden;}
.hero-card h1 { font-size: 3.5rem; line-height: 1.1; margin-bottom: 1.5rem;}
.accent-text { color: var(--brand-blue); position: relative;}
.accent-text::after { content: ''; position: absolute; bottom: 4px; left: 0; width: 100%; height: 8px; background: rgba(37, 99, 235, 0.2); z-index: -1;}
.hero-card p { font-size: 1.1rem; color: var(--text-muted); max-width: 600px; line-height: 1.6; margin-bottom: 2.5rem; font-weight: 500;}

.client-logos { display: flex; align-items: center; gap: 2rem;}
.client-logos span { font-size: 0.8rem; color: var(--text-muted); font-weight: 600; text-transform: uppercase;}
.client-logos b { font-family: var(--font-heading); font-size: 1.1rem; color: #cbd5e1; letter-spacing: 0.1em;}

/* 2. Services Card */
.services-card { grid-column: 3 / 4; grid-row: 1 / 3; background: #fff;}
.service-list { display: flex; flex-direction: column; gap: 1rem; flex: 1; justify-content: center;}
.s-item { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem; border: 1px solid #e2e8f0; border-radius: 16px; cursor: pointer; transition: 0.3s;}
.s-item:hover { border-color: var(--brand-blue); background: #eff6ff;}
.s-item h4 { font-size: 1.1rem; margin-bottom: 0.3rem;}
.s-item p { font-size: 0.85rem; color: var(--text-muted); font-weight: 500;}
.s-arrow { font-family: var(--font-heading); font-size: 1.5rem; color: var(--text-muted); font-weight: 700; transition: 0.3s;}
.s-item:hover .s-arrow { color: var(--brand-blue); transform: translate(4px, -4px);}

/* 3. Metrics Card */
.dark-card { background: var(--brand-dark); color: #fff;}
.dark-card h3, .dark-card h2 { color: #fff;}
.dark-card .card-head span { color: #475569;}
.metrics-card { grid-column: 1 / 2; grid-row: 2 / 3; justify-content: center;}
.m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem;}
.m-box h2 { font-size: 2.5rem; margin-bottom: 0.2rem; color: #fff;}
.m-box span { font-size: 0.8rem; color: #94a3b8; font-weight: 600;}

/* 4. Image Card */
.image-card { grid-column: 2 / 3; grid-row: 2 / 3; padding: 0; position: relative; overflow: hidden; border: none;}
.image-card img { width: 100%; height: 100%; object-fit: cover; transition: 0.5s;}
.image-card:hover img { transform: scale(1.05);}
.img-overlay { position: absolute; inset: 0; padding: 2rem; background: linear-gradient(to top, rgba(0,0,0,0.8), transparent 60%); display: flex; flex-direction: column; justify-content: flex-end;}
.img-overlay h3 { color: #fff; font-size: 1.5rem;}
.tag-pill.white { background: rgba(255,255,255,0.2); backdrop-filter: blur(5px); color: #fff; margin-bottom: 0.5rem;}

/* --- SAFE MOBILE RESPONSIVE FIX --- */
@media (max-width: 768px) {
    body, html {
        overflow-x: hidden !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    * { box-sizing: border-box !important; }

    /* The Main Canvas */
    .presentation-canvas, .app-container {
        width: 100% !important;
        height: auto !important;
        min-height: 100vh !important;
        padding: 1.5rem !important;
        border-radius: 0 !important;
    }

    /* Headers */
    .presentation-header, header {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 1.5rem !important;
        height: auto !important;
    }
    
    .nav-links {
        flex-wrap: wrap !important;
        gap: 1rem !important;
    }

    /* Known Grid Containers */
    .corporate-bento, .agency-bento, .dashboard-layout, .features-grid, .m-grid, 
    .bento-grid, .grid-container, .stats-grid, .project-grid {
        display: flex !important;
        flex-direction: column !important;
        height: auto !important;
        gap: 1.5rem !important;
    }

    /* Floating & Overlapping UI Elements */
    .floating-showcase {
        display: flex !important;
        flex-direction: column !important;
        gap: 2rem !important;
    }
    
    .mockup-window, .glass-panel, .floating-card {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        top: auto !important; left: auto !important; right: auto !important; bottom: auto !important;
        transform: none !important;
        margin: 0 !important;
    }

    /* Fonts & Media */
    h1 { font-size: 2.2rem !important; line-height: 1.2 !important; white-space: normal !important; word-break: break-word !important; }
    h2 { font-size: 1.8rem !important; line-height: 1.3 !important; white-space: normal !important; word-break: break-word !important;}
    h3 { font-size: 1.5rem !important; }
    p { font-size: 1rem !important; white-space: normal !important; word-break: break-word !important; }

    img, video, canvas {
        max-width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
        border-radius: 12px !important;
    }

    /* Background Orbs */
    .glow-orb { display: none !important; }
    
    /* Global Card Sizing */
    .corp-card, .bento-card, .stat-card, .feature-card {
        width: 100% !important;
        height: auto !important;
        padding: 1.5rem !important;
    }
}
/* --- END SAFE FIX --- */
