/* ==========================================================================
   1. Base Reset & Typography
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #010307; /* Updated to match obsidian base layout colors */
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   2. Minimalist Header & Navigation (Integrated inside Hero)
   ========================================================================== */
header {
    background-color: transparent;
    border-bottom: none;
    position: relative;
    width: 100%;
    /* ========================================================================== */
    /* CRUCIAL FIX: Pushes the navigation block safely ABOVE the background scrim */
    /* ========================================================================== */
    z-index: 10 !important; 
}

/* Ensure controls explicitly process all mouse/pointer clicks */
.nav-controls-cluster,
.search-container,
.share-container,
.menu-container {
    position: relative;
    z-index: 20 !important;
    pointer-events: auto !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 135px; /* Synchronized to match intermediate logo layout planes */
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

/* Handles smooth, hardware-accelerated cross-fading of main background videos */
.bg-video {
    opacity: 0 !important;
}
.bg-video.active-video {
    opacity: 0.65 !important; /* Matches your desired opacity baseline */
}


.logo img {
    height: 60px; /* Synchronized sweet-spot scale size */
    width: auto;
    max-width: 100%;
    object-fit: contain;
    filter: drop-shadow(0px 2px 6px rgba(0,0,0,0.55));
}

.search-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.search-container .search-icon {
    transition: stroke 0.2s, filter 0.2s;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.5));
}

.cta-btn {
    background-color: #1a73e8;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.cta-btn:hover {
    background-color: #1557b0;
}

/* ==========================================================================
   3. Hero Section & High-Contrast Cinematic Video Background Engine
   ========================================================================== */
.hero {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 100vh;
    height: auto; /* Dynamic height management allows smooth growth based on copy */
    background-color: #010307;
    color: #cbd5e1;
    text-align: center;
    justify-content: space-between;
    margin: 0;
    padding-bottom: 50px !important; /* Safety grid padding separation shield */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Keeps the dark contrast color graded layer right above video but below controls */
    z-index: 2; 
}

.hero-content {
    position: relative;
    /* Forces the text animation layer and carousel slider above the video scrim too */
    z-index: 3 !important; 
}

.video-background-container {
    position: absolute;
    top: 38%; /* Shifted upward towards the top skyline workspace */
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 1;
    transform: translate(-50%, -50%);
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    background: linear-gradient(180deg, #010307 0%, rgba(2, 6, 15, 0.35) 50%, #010307 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    margin: 40px auto auto auto;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    justify-content: center;
    transform: translateY(-40px);
}

.hero-cta {
    display: inline-block;
    text-decoration: none;
    margin-top: 15px;
    box-shadow: 0 4px 14px rgba(26, 115, 232, 0.4);
}
/* ==========================================================================
   4. Section Layouts & Responsive Grids (Services & Portfolio)
   ========================================================================== */
.section {
    padding: 90px 0;
    background-color: #fff;
    position: relative;
    z-index: 10; /* Ensures content cleanly scrolls over absolute hero layers */
}

.section:nth-child(even) {
    background-color: #f8fafc;
}

.section-title {
    text-align: center;
    font-size: 32px;
    margin-bottom: 50px;
    color: #0f172a;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.card {
    padding: 40px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
}

.card h3 {
    margin-bottom: 15px;
    color: #0f172a;
    font-size: 1.3rem;
}

.card p {
    color: #475569;
    font-size: 0.98rem;
}

/* ==========================================================================
   5. About Section Layout Split
   ========================================================================== */
.about-content {
    display: flex;
    gap: 50px;
    align-items: center;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 15px;
    color: #475569;
    font-size: 1.05rem;
}

/* ==========================================================================
   6. Contact Forms
   ========================================================================== */
.form-wrapper {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

.form-subtext {
    margin-bottom: 30px;
    color: #5f6368;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.contact-form input, 
.contact-form textarea {
    padding: 12px;
    border: 1px solid #eaeaea;
    border-radius: 4px;
    font-family: inherit;
    width: 100%;
}

.submit-btn {
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 14px;
}

/* ==========================================================================
   7. Footer
   ========================================================================== */
footer {
    background-color: #0f172a;
    color: #94a3b8;
    padding: 50px 0;
    text-align: center;
    font-size: 14px;
    border-top: 1px solid #1e293b;
    position: relative;
    z-index: 10;
}

footer .copyright {
    margin-bottom: 15px;
}

footer a {
    color: #38bdf8;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   8. Responsive Adaptations & Media Break Rules
   ========================================================================== */
@media (max-width: 900px) {
    .about-content {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0 80px;
    }

    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 26px;
        margin-bottom: 30px;
    }

    .card {
        padding: 25px 20px;
    }

    .card h3 {
        font-size: 1.15rem;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .about-content {
        gap: 25px;
    }
}

/* ==========================================================================
   9. UNIFIED INTERACTIVE MODAL OVERLAY SHEET DESIGN ENGINE 
   ========================================================================== */
.glossy-modal {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999999 !important; /* Pushes the pane to the absolute maximum peak layout plane */
    background: rgba(2, 6, 16, 0.88) !important;
    backdrop-filter: blur(20px) cubic-bezier(0.25, 1, 0.5, 1) !important;
    -webkit-backdrop-filter: blur(20px) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    pointer-events: none !important;
    transition: opacity 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

/* Wakes up modal focus frames natively across tracking nodes */
.glossy-modal.modal-active {
    opacity: 1 !important;
    pointer-events: auto !important;
}

.modal-box-frame {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.95) 0%, rgba(2, 6, 15, 0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.95) !important;
    border-radius: 16px !important;
    padding: 40px !important;
    width: 90% !important;
    max-width: 500px !important;
    position: relative !important;
    transform: scale(0.95) !important;
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

.glossy-modal.modal-active .modal-box-frame {
    transform: scale(1) !important;
}

.modal-close-x {
    position: absolute !important;
    top: 20px !important;
    right: 20px !important;
    cursor: pointer !important;
    color: #94a3b8 !important;
    font-size: 26px !important;
    line-height: 1 !important;
    transition: color 0.2s !important;
    z-index: 100 !important;
}
.modal-close-x:hover { color: #fff !important; }

.modal-search-input {
    width: 100% !important;
    padding: 16px !important;
    background: rgba(2, 6, 15, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 8px !important;
    color: #fff !important;
    font-size: 16px !important;
    outline: none !important;
    margin-top: 20px !important;
    transition: border-color 0.2s !important;
}
.modal-search-input:focus { border-color: #1a73e8 !important; }

.share-grid-layout { display: grid !important; grid-template-columns: repeat(3, 1fr) !important; gap: 12px !important; margin-top: 20px !important; }
.share-platform-btn { background: rgba(255, 255, 255, 0.05) !important; border: 1px solid rgba(255, 255, 255, 0.08) !important; padding: 14px !important; border-radius: 6px !important; color: #cbd5e1 !important; text-decoration: none !important; font-size: 14px !important; font-weight: 600 !important; text-align: center !important; transition: background 0.2s, border-color 0.2s !important; }
.share-platform-btn:hover { background: rgba(255, 255, 255, 0.15) !important; border-color: #fff !important; color: #fff !important; }

.menu-links-list { display: flex !important; flex-direction: column !important; gap: 16px !important; margin-top: 20px !important; list-style: none !important; text-align: left !important; }
.menu-links-list a { color: #e2e8f0 !important; font-size: 20px !important; font-weight: 800 !important; text-transform: uppercase !important; text-decoration: none !important; transition: color 0.2s !important; }
.menu-links-list a:hover { color: #38bdf8 !important; }
