:root {
    --neon-orange: #ff7b00;
    --neon-blue: #00f3ff;
    --bg-dark: #0a0a0a;
    --glass-border: rgba(255, 255, 255, 0.1);
    --safe-area-bottom: env(safe-area-inset-bottom);
}

* { box-sizing: border-box; }

/* --- CRITICAL SCROLL FIX --- */
html, body {
    height: auto !important;
    min-height: 100% !important;
    overflow-y: auto !important; /* Forces vertical scroll */
    overflow-x: hidden; /* Prevents side scroll */
    position: static !important; /* Prevents body from being pinned */
}

body {
    margin: 0; padding: 0; background-color: var(--bg-dark); color: #fff;
    font-family: 'Inter', sans-serif;
    padding-bottom: 120px;
    cursor: crosshair;
    width: 100%;
}

#bgCanvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }

.promo-banner {
    background: var(--neon-orange); color: #000; width: 100%; padding: 12px 0;
    font-family: 'JetBrains Mono'; font-weight: 800; text-transform: uppercase;
    position: fixed; top: 0; left: 0; z-index: 1000; text-align: center; font-size: 14px;
    letter-spacing: 1px; height: 40px; 
}

.hero-viewport {
    width: 100%; 
    min-height: 100vh; /* Allows growing beyond screen size */
    height: auto; /* Ensures it doesn't get stuck at screen height */
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; position: relative; z-index: 1; text-align: center;
    padding: 100px 20px 80px 20px; 
}

/* DECK VIEWPORT STYLES */
.engine-window-pocket.index-deck {
    width: 100%;
    max-width: 900px;
    height: 400px;
    margin-bottom: 30px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    background: #050505;
    border: 2px solid rgba(0, 243, 255, 0.3);
    box-shadow: inset 0 0 50px rgba(0,0,0,1), 0 0 30px rgba(0, 243, 255, 0.1);
    z-index: 2;
}

.hero-logo {
    max-width: 220px;
    height: auto;
    display: block;
    margin: 0 auto 15px auto;
    mix-blend-mode: screen; 
    opacity: 0.5; 
    filter: drop-shadow(0 0 15px rgba(0, 243, 255, 0.4));
    border-radius: 10px;
}

.deck-overlay-content {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 5;
    pointer-events: none;
    background: radial-gradient(circle, rgba(10,10,10,0.5) 0%, transparent 70%);
}

.hero-subtitle {
    font-family: 'JetBrains Mono'; font-size: 16px; margin-top: 15px;
    color: var(--neon-blue); letter-spacing: 4px;
}

.window-terminal-view {
    padding: 60px 20px 20px 20px;
    height: 100%;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    z-index: 20;
    mask-image: linear-gradient(to bottom, transparent, black 80px);
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 80px);
}

.window-scanline {
    width: 100%; height: 100px;
    background: linear-gradient(to bottom, transparent, rgba(0, 243, 255, 0.03), transparent);
    position: absolute; top: -100px; left: 0; z-index: 4;
    animation: scanline 8s linear infinite;
}

@keyframes scanline { 0% { top: -100px; } 100% { top: 100%; } }

.window-frame-glare {
    position: absolute; inset: 0; pointer-events: none;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 40%, transparent 60%, rgba(255,255,255,0.02) 100%);
    z-index: 5;
}

.window-label {
    position: absolute; top: 15px; left: 20px;
    font-family: 'Share Tech Mono'; font-size: 11px; color: var(--neon-blue);
    z-index: 11; text-transform: uppercase; letter-spacing: 2px;
    background: rgba(0,0,0,0.8); padding: 3px 10px;
    border: 1px solid rgba(0, 243, 255, 0.2);
}

.main-btn {
    padding: 22px 60px; background: #fff; color: #000; text-decoration: none;
    font-weight: 900; letter-spacing: 2px; display: inline-block; font-family: 'JetBrains Mono';
    margin-top: 20px; transition: 0.3s; text-transform: uppercase; border: none; cursor: pointer;
    z-index: 5;
}

.main-btn:hover { background: var(--neon-blue); transform: scale(1.05); }

/* --- MODAL STYLES --- */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 200000; 
    opacity: 0; pointer-events: none; transition: 0.3s;
    display: flex; align-items: center; justify-content: center;
}

.modal-overlay.active { opacity: 1; pointer-events: auto; }

.modal-content {
    background: #000;
    border: 1px solid var(--neon-blue);
    padding: 30px;
    max-width: 500px;
    width: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 243, 255, 0.2);
}

.modal-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.1);
    padding-bottom: 10px;
}

.modal-title { font-family: 'Chakra Petch'; font-weight: 700; color: var(--neon-orange); }
.modal-close { background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; }
.modal-body p { font-size: 13px; line-height: 1.6; color: #ccc; }
.modal-body h4 { color: var(--neon-blue); margin: 15px 0 5px 0; font-family: 'JetBrains Mono'; }

/* --- FEATURES GRID --- */
.features-grid { width: 100%; max-width: 1200px; margin-top: 60px; }
.feature-card { background: rgba(255,255,255,0.02); border: 1px solid var(--glass-border); padding: 40px; }
.feature-columns { display: grid; grid-template-columns: repeat(4, 1fr); gap: 30px; text-align: left; }
.cat-title { font-family: 'JetBrains Mono'; color: var(--neon-blue); font-weight: 800; margin-bottom: 15px; font-size: 12px; }
.f-list { list-style: none; padding: 0; margin: 0; }
.f-list li { font-size: 11px; color: #888; margin-bottom: 8px; font-family: 'JetBrains Mono'; }

/* --- NAVIGATION (5-COLUMN LAYOUT) --- */
.bottom-nav {
    position: fixed; bottom: 0; left: 0; width: 100%; height: 90px;
    background: rgba(0,0,0,0.98); backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255,255,255,0.1);
    display: grid; 
    grid-template-columns: 1fr 1fr 80px 1fr 1fr;
    align-items: center; justify-items: center;
    z-index: 9999; padding-bottom: env(safe-area-inset-bottom);
}

.nav-group {
    width: 100%; height: 100%; display: flex; 
    align-items: center; justify-content: center; position: relative;
}

.nav-trigger {
    background: none; border: none; color: #666; font-size: 20px;
    display: flex; flex-direction: column; align-items: center; gap: 6px;
    cursor: pointer; transition: 0.3s; width: 100%;
}

.nav-trigger:hover, .nav-trigger.active {
    color: #ff7b00; text-shadow: 0 0 15px rgba(255, 123, 0, 0.4);
}

.nav-label {
    font-size: 9px; font-weight: 800; font-family: 'Chakra Petch'; 
    text-transform: uppercase; letter-spacing: 0.5px;
}

/* CENTER SEARCH BUTTON */
.center-btn-wrapper {
    position: relative; width: 60px; height: 60px; 
    display: flex; align-items: center; justify-content: center;
    top: -15px;
}

.center-master-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background: #ff7b00; border: 3px solid #000; color: #000;
    font-size: 20px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 0 20px rgba(255, 123, 0, 0.4);
    transition: 0.3s;
}

.center-master-btn:hover { transform: scale(1.05); box-shadow: 0 0 30px rgba(255, 123, 0, 0.6); }

/* POP-UP STACKS */
.nav-stack {
    position: absolute; bottom: 85px; left: 50%; transform: translateX(-50%) translateY(20px);
    width: 160px; background: rgba(10, 10, 10, 0.95);
    border: 1px solid rgba(255,255,255,0.1); border-radius: 8px;
    display: flex; flex-direction: column; opacity: 0; pointer-events: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 -10px 30px rgba(0,0,0,0.8); z-index: 10000; padding: 5px 0;
}

.nav-stack.active { opacity: 1; pointer-events: auto; transform: translateX(-50%) translateY(0); border-color: #ff7b00; }

.nav-stack a {
    text-decoration: none; color: #ccc; font-family: 'JetBrains Mono';
    font-size: 10px; padding: 12px 15px; text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05); transition: 0.2s;
    text-transform: uppercase; letter-spacing: 1px; display: block;
}
.nav-stack a:hover { background: rgba(255, 123, 0, 0.1); color: #fff; }
.nav-stack a:last-child { border-bottom: none; }

/* SEARCH OVERLAY */
.search-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); backdrop-filter: blur(10px);
    z-index: 20000; display: none; flex-direction: column; align-items: center; justify-content: center;
}
.search-overlay.active { display: flex; animation: fadeIn 0.2s; }

.search-box {
    display: flex; border-bottom: 2px solid #ff7b00; width: 80%; max-width: 600px; margin-top: 20px;
}
.search-box input {
    flex: 1; background: none; border: none; color: #fff; font-family: 'Chakra Petch';
    font-size: 24px; padding: 10px; outline: none; text-transform: uppercase;
}
.search-box button { background: none; border: none; color: #ff7b00; font-size: 24px; cursor: pointer; }
.close-search-btn {
    background: none; border: 1px solid #333; color: #666; 
    width: 40px; height: 40px; border-radius: 50%; font-size: 20px;
    cursor: pointer; transition: 0.2s; display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
}
.close-search-btn:hover { border-color: #fff; color: #fff; transform: scale(1.1); }
@keyframes fadeIn { from { opacity:0; } to { opacity:1; } }

.legal-footer { margin-top: 60px; display: flex; gap: 20px; opacity: 0.5; }
.legal-link { color: #666; font-family: 'JetBrains Mono'; font-size: 10px; text-decoration: none; cursor: pointer; transition: 0.3s; }
.legal-link:hover { color: var(--neon-blue); }

/* --- PRICING CARD STYLES (IMPORTED) --- */
.tier-card {
    background: rgba(10, 10, 10, 0.9); border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 50px 40px; width: 100%; max-width: 450px; 
    position: relative; backdrop-filter: blur(15px);
    transition: 0.4s ease; display: flex; flex-direction: column;
    box-sizing: border-box;
    text-align: left;
}

.tier-card.god { 
    border: 1px solid var(--neon-orange); box-shadow: 0 0 50px rgba(255, 123, 0, 0.1); 
    transform: scale(1.05); z-index: 10; margin: 40px 0;
}
.tier-card.god:hover { transform: scale(1.05); box-shadow: 0 0 60px rgba(255, 123, 0, 0.3); }
.tier-card.god .tier-name, .tier-card.god .tier-price {
    color: #ffffff !important; text-shadow: 0 0 10px rgba(255, 255, 255, 0.4); letter-spacing: 1px;
}
.tier-card.god::before {
    content: "FAST TRACK DEPLOYMENT"; position: absolute; top: -15px; left: 50%; transform: translateX(-50%);
    background: var(--neon-orange); color: #000; font-family: 'JetBrains Mono'; font-weight: 800;
    padding: 4px 15px; font-size: 10px; white-space: nowrap;
}

.tier-label { font-family: 'JetBrains Mono'; color: var(--neon-blue); font-size: 12px; letter-spacing: 3px; margin-bottom: 10px; display: block; }
.tier-name { font-family: 'Chakra Petch'; font-size: 2.5rem; font-weight: 800; color: #fff; margin: 0 0 20px 0; text-transform: uppercase; }
.tier-price { font-family: 'Inter'; font-weight: 900; font-size: 3rem; color: #fff; margin-bottom: 5px; }
.tier-price span { font-size: 1rem; color: #666; font-weight: 400; text-shadow: none !important; }
.tier-desc { font-family: 'Inter'; color: #aaa; font-size: 14px; line-height: 1.6; margin-bottom: 30px; min-height: 80px; }

.feature-list { list-style: none; padding: 0; margin: 0 0 40px 0; display: flex; flex-direction: column; gap: 15px; text-align: left; }
.feature-item { font-family: 'JetBrains Mono'; font-size: 13px; color: #ddd; display: flex; align-items: center; gap: 10px; height: 20px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.feature-item i { color: var(--neon-orange); width: 15px; text-align: center; flex-shrink: 0; }

.btn-stack {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.buy-btn { width: 100%; padding: 20px; text-align: center; font-family: 'JetBrains Mono'; font-weight: 800; text-transform: uppercase; cursor: pointer; border: none; text-decoration: none; display: block; transition: 0.3s; box-sizing: border-box;}

.god .buy-btn { background: var(--neon-orange); color: #fff; }
.god .buy-btn:hover { box-shadow: 0 0 30px var(--neon-orange); }

.god .buy-btn.outline {
    background: transparent;
    border: 1px solid var(--neon-orange);
    color: var(--neon-orange);
    box-shadow: none;
}
.god .buy-btn.outline:hover {
    background: rgba(255, 123, 0, 0.1);
    box-shadow: 0 0 15px rgba(255, 123, 0, 0.2);
    color: #fff;
}

.slot-tracker { margin-top: 25px; font-family: 'JetBrains Mono'; font-size: 11px; color: var(--neon-orange); text-align: center; }
.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { opacity: 1; } 50% { opacity: 0.5; } 100% { opacity: 1; } }

/* --- MOBILE & RESPONSIVE FIXES --- */
@media screen and (max-width: 768px) {
    .feature-columns { grid-template-columns: 1fr; }
    .feature-card { padding: 20px; }

    .bottom-nav { grid-template-columns: 1fr 1fr 60px 1fr 1fr; }
    .nav-label { font-size: 8px; }
    
    #stack-home {
        left: 5px; transform: translateY(20px);
        border-radius: 12px 12px 12px 0;
    }
    #stack-home.active { transform: translateY(0); }

    #stack-crm {
        left: auto; right: 5px; transform: translateY(20px);
        border-radius: 12px 12px 0 12px;
    }
    #stack-crm.active { transform: translateY(0); }
    
    #stack-comms { width: 140px; }

    .center-master-btn { width: 45px; height: 45px; font-size: 18px; }

    .tier-card {
        padding: 40px 25px;
        max-width: 100%;
        transform: none !important; 
    }

    .tier-card.god {
        transform: scale(1) !important;
        border-width: 2px;
        margin: 20px 0;
    }

    .tier-name { font-size: 2rem; }
    .tier-price { font-size: 2.5rem; }
    .feature-item {
        font-size: 11px;
        white-space: normal;
        height: auto;
        line-height: 1.4;
        overflow: visible;
        text-overflow: clip;
    }
}