/* CODEREBEL LABS // INDUSTRIAL THEME v2.5 // RESPONSIVE */

/* --- 1. CORE VARIABLES & RESET --- */
:root {
    /* Color Palette */
    --bg-void: #050505;       /* Deepest Black */
    --bg-panel: #0f1014;      /* Card Background */
    --border: #333333;        /* Structural Lines */
    --border-active: #555555; /* Hover Lines */
    
    /* Signals */
    --cyan: #00F0FF;          /* Primary Action / Status */
    --cyan-dim: rgba(0, 240, 255, 0.15);
    --alert: #FF3333;         /* Warnings / Denials */
    
    /* Typography Colors */
    --text-main: #FFFFFF;
    --text-muted: #888899;
    
    /* Fonts */
    --font-corp: 'Inter', sans-serif;         /* Body Copy */
    --font-tech: 'JetBrains Mono', monospace; /* Data & Labels */
    --font-head: 'Orbitron', sans-serif;      /* Headlines */
}

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

html, body {
    width: 100%;
    overflow-x: hidden; /* Prevents side-scrolling on mobile */
}

body {
    background-color: var(--bg-void);
    color: var(--text-main);
    font-family: var(--font-corp);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* --- 2. VISUAL FX LAYERS --- */
.noise-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: url('data:image/svg+xml,%3Csvg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"%3E%3Cfilter id="noiseFilter"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.65" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100%25" height="100%25" filter="url(%23noiseFilter)" opacity="0.05"/%3E%3C/svg%3E');
    pointer-events: none; z-index: 0; opacity: 0.4;
}

.grid-background {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.08; pointer-events: none; z-index: 1;
}

/* --- 3. NAVIGATION (HUD STYLE) --- */
.hud-nav {
    position: fixed; top: 0; width: 100%; z-index: 100;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 40px; height: 80px;
    background: rgba(5, 5, 5, 0.9); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
    transition: 0.3s all;
}

.nav-brand { display: flex; align-items: center; gap: 15px; }

.fox-insignia {
    width: 30px; height: 30px; background: var(--cyan);
    clip-path: polygon(50% 0%, 100% 38%, 82% 100%, 18% 100%, 0% 38%);
    flex-shrink: 0; /* Prevents logo from squishing */
}

.brand-text .name { 
    display: block; font-family: var(--font-head); font-weight: 700; 
    letter-spacing: 2px; line-height: 1; white-space: nowrap; 
}

.brand-text .sub { 
    font-family: var(--font-tech); font-size: 0.6rem; color: var(--text-muted); 
    letter-spacing: 1px; display: block; margin-top: 3px;
}

.nav-controls { display: flex; align-items: center; }

.nav-link {
    font-family: var(--font-tech); color: var(--text-muted); text-decoration: none;
    font-size: 0.8rem; margin-right: 30px; transition: 0.3s;
}

.nav-link:hover { color: var(--cyan); text-shadow: 0 0 8px var(--cyan-dim); }

.btn-terminal {
    background: transparent; border: 1px solid var(--border); color: var(--cyan);
    padding: 10px 20px; font-family: var(--font-tech); font-size: 0.8rem; 
    cursor: pointer; transition: 0.3s; white-space: nowrap;
}

.btn-terminal:hover { background: var(--cyan-dim); border-color: var(--cyan); }
.btn-terminal.active { background: var(--cyan); color: #000; font-weight: bold; }

/* --- 4. HERO SECTION --- */
.hero-section {
    padding-top: 180px; padding-bottom: 100px;
    position: relative; z-index: 2; width: 100%;
}

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

/* Decorative Markers */
.marker { position: absolute; width: 20px; height: 20px; border: 2px solid var(--cyan); opacity: 0.5; }
.top-left { top: -20px; left: 0; border-right: none; border-bottom: none; }
.bottom-right { bottom: -20px; right: 0; border-left: none; border-top: none; }

.system-status {
    font-family: var(--font-tech); color: var(--cyan); font-size: 0.8rem; margin-bottom: 30px;
    display: flex; align-items: center; gap: 10px;
}

.blinking-light { width: 8px; height: 8px; background: var(--cyan); border-radius: 50%; animation: blink 2s infinite; }

h1 {
    font-family: var(--font-head); font-size: 5rem; line-height: 0.95; color: var(--text-main);
    text-transform: uppercase; margin-bottom: 40px; letter-spacing: -2px;
}

.hero-briefing {
    font-size: 1.2rem; color: var(--text-muted); max-width: 650px; margin-bottom: 50px;
    border-left: 2px solid var(--border); padding-left: 20px;
}

.highlight { 
    display: block; margin-top: 15px; color: var(--text-main); 
    font-weight: 600; font-family: var(--font-tech); 
}

.command-row { display: flex; gap: 20px; flex-wrap: wrap; }

/* Buttons */
.btn-primary {
    background: var(--cyan); color: #000; border: none;
    padding: 20px 40px; font-family: var(--font-corp); font-weight: 800; cursor: pointer;
    font-size: 1rem; position: relative; 
    clip-path: polygon(0 0, 100% 0, 100% 85%, 95% 100%, 0 100%);
    transition: 0.2s;
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 0 20px var(--cyan-dim); }

.btn-tag { 
    display: block; font-size: 0.6rem; font-family: var(--font-tech); 
    margin-top: 4px; opacity: 0.7; 
}

.btn-secondary {
    background: transparent; border: 1px solid var(--border); color: var(--text-main);
    padding: 20px 40px; text-decoration: none; font-weight: 600; font-size: 0.9rem;
    display: flex; align-items: center; transition: 0.2s;
}

.btn-secondary:hover { border-color: var(--text-main); background: rgba(255,255,255,0.05); }

/* --- 5. CAPABILITIES (MODULES) --- */
.modules-section { 
    padding: 100px 0; background: var(--bg-void); 
    border-top: 1px solid var(--border); position: relative; z-index: 2; 
}

.section-header { margin-bottom: 60px; }

.mono-label { 
    font-family: var(--font-tech); color: var(--cyan); font-size: 0.8rem; 
    display: block; margin-bottom: 10px; 
}

h2 { font-family: var(--font-head); font-size: 2.5rem; letter-spacing: -1px; }

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

.module-card {
    background: var(--bg-panel); border: 1px solid var(--border); padding: 40px;
    transition: 0.3s; position: relative; height: 100%;
}

.module-card:hover { border-color: var(--cyan); box-shadow: 0 10px 30px -10px rgba(0,0,0,0.5); }

.card-top { 
    display: flex; justify-content: space-between; margin-bottom: 25px; 
    border-bottom: 1px solid var(--border); padding-bottom: 15px; 
}

.id-number { font-family: var(--font-tech); color: var(--text-muted); font-size: 0.7rem; }
.icon-box { font-size: 1.5rem; }

.module-card h3 { 
    font-size: 1.4rem; font-weight: 600; margin-bottom: 15px; 
    color: var(--text-main); 
}

.module-card p { color: var(--text-muted); font-size: 0.95rem; }

/* --- 6. FOOTER --- */
.telemetry-bar {
    background: #000; border-top: 1px solid var(--border);
    display: flex; padding: 20px 40px; 
    font-family: var(--font-tech); font-size: 0.7rem;
    flex-wrap: wrap; gap: 20px;
}

.t-col { display: flex; flex-direction: column; margin-right: 60px; }
.t-col.right { margin-left: auto; margin-right: 0; justify-content: flex-end; color: var(--text-muted); }
.t-label { color: #444; margin-bottom: 4px; }
.t-val { color: var(--text-muted); }
.text-cyan { color: var(--cyan); }

/* --- 7. MODALS --- */
.modal-backdrop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000; display: none;
    align-items: center; justify-content: center; backdrop-filter: blur(5px);
}
.modal-backdrop.active { display: flex; }

.modal-panel {
    width: 400px; max-width: 90%; 
    background: var(--bg-panel); border: 1px solid var(--cyan);
    padding: 0; box-shadow: 0 0 50px rgba(0, 240, 255, 0.1);
}
.modal-panel.warning-mode { border-color: var(--alert); box-shadow: 0 0 50px rgba(255, 51, 51, 0.1); }

.modal-header {
    background: rgba(0, 240, 255, 0.1); padding: 15px 20px; font-family: var(--font-tech);
    color: var(--cyan); font-size: 0.8rem; display: flex; justify-content: space-between;
}
.warning-mode .modal-header { background: rgba(255, 51, 51, 0.1); color: var(--alert); }

.close-modal { cursor: pointer; font-weight: bold; }
.modal-body { padding: 30px; display: flex; flex-direction: column; }

label { font-family: var(--font-tech); font-size: 0.7rem; color: var(--text-muted); margin-bottom: 8px; margin-top: 15px; }
input { background: #050505; border: 1px solid var(--border); padding: 12px; color: white; font-family: var(--font-tech); outline: none; }
input:focus { border-color: var(--cyan); }

.btn-execute {
    margin-top: 25px; padding: 15px; background: var(--cyan); border: none; font-weight: bold; cursor: pointer;
}
.btn-execute.red { background: var(--alert); color: white; }

/* --- 8. ANIMATIONS --- */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.3; } }


/* --- 9. MOBILE RESPONSIVE SYSTEM (THE FIX) --- */

/* Tablet & Smaller (Max width 1024px) */
@media (max-width: 1024px) {
    h1 { font-size: 4rem; }
    .nav-link { margin-right: 15px; }
    .hud-nav { padding: 0 20px; }
}

/* Mobile Devices (Max width 768px) */
@media (max-width: 768px) {
    
    /* NAV HEADER FIXES */
    .hud-nav {
        padding: 10px 20px;
        height: 70px;
    }

    .brand-text .name { 
        font-size: 1rem; /* Smaller branding */
    }

    /* Hide subtext to prevent collision */
    .brand-text .sub { 
        display: none; 
    }

    /* Hide text menu links, keep only Login */
    .nav-controls .nav-link {
        display: none; 
    }

    .btn-terminal {
        padding: 8px 12px;
        font-size: 0.7rem;
    }

    /* HERO SECTION FIXES */
    .hero-section {
        padding-top: 120px;
        padding-bottom: 60px;
    }

    h1 { 
        font-size: 2.5rem; /* Massive text reduction for mobile */
        margin-bottom: 25px;
        letter-spacing: -1px;
    }
    
    .hero-briefing {
        font-size: 1rem;
        padding-left: 15px;
        margin-bottom: 35px;
    }

    /* Stack the Command Buttons */
    .command-row { 
        flex-direction: column; 
        width: 100%;
        gap: 15px;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%; 
        text-align: center;
        justify-content: center;
        padding: 15px;
    }

    /* MODULES */
    .modules-section {
        padding: 60px 0;
    }
    
    .module-card {
        padding: 25px;
    }

    /* FOOTER FIXES */
    .telemetry-bar { 
        flex-direction: column; 
        gap: 15px; 
        text-align: center;
        padding: 30px 20px;
    }
    
    .t-col { margin-right: 0; align-items: center; }
    .t-col.right { margin-left: 0; justify-content: center; margin-top: 10px; }
}
