/* =========================================
   1. GLOBAL RESET & VARIABLES
   ========================================= */
:root {
    --bg: #050505;          
    --surface: #0f0f0f;     
    --text: #e0e0e0;        
    /* CHANGED: Lightened to #888888 for better contrast/accessibility (SEO) */
    --text-dim: #888888;    
    --accent: #00ff41;      /* Hacker Green */
    --border: #333333;      
}

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

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Courier New', Courier, monospace; 
    line-height: 1.5;
    padding-bottom: 50px;
    overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }

/* =========================================
   2. CRT & SCANLINE OVERLAY
   ========================================= */
.crt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(
        to bottom,
        rgba(255, 255, 255, 0),
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.2) 50%,
        rgba(0, 0, 0, 0.2)
    );
    background-size: 100% 4px;
    z-index: 9999;
    pointer-events: none;
    animation: flicker 0.15s infinite;
    opacity: 1;
    transition: opacity 1s ease-out;
}

.crt-overlay.off { 
    opacity: 0;
    animation: none; 
}

@keyframes flicker {
    0% { transform: translateY(0.5px); opacity: 0.9; }
    50% { transform: translateY(-0.5px); opacity: 1; }
    100% { transform: translateY(0.5px); opacity: 0.9; }
}

/* Typing Cursor */
.cursor-block {
    display: inline-block;
    color: var(--accent);
    background-color: var(--accent);
    width: 0.6em;
    height: 1em;
    vertical-align: middle;
    animation: blink-block 0.1s infinite;
}

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

/* =========================================
   3. NAVIGATION
   ========================================= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center; /* Ensures button aligns with text */
    padding: 20px 40px;
    border-bottom: 1px solid var(--border);
    background: rgba(5, 5, 5, 0.95);
    position: sticky;
    top: 0;
    z-index: 100;
    min-height: 70px; 
}

.logo { font-weight: bold; letter-spacing: 1px; color: var(--accent); }
.nav-links { display: flex; gap: 30px; align-items: center; }
.nav-links a { color: var(--text-dim); font-size: 0.9rem; }
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

/* NEW: THE HIRE BUTTON STYLE */
.nav-cta {
    border: 1px solid var(--accent);
    padding: 8px 16px;
    color: var(--accent) !important;
    font-weight: bold;
    letter-spacing: 1px;
    transition: all 0.2s;
}

.nav-cta:hover {
    background: var(--accent);
    color: #000 !important;
    box-shadow: 0 0 15px var(--accent);
}

/* =========================================
   4. LAYOUT UTILITIES
   ========================================= */
.container { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }
.center-vertical { min-height: 80vh; display: flex; flex-direction: column; justify-content: center; }

h1 { font-size: 3rem; margin-bottom: 10px; line-height: 1.1; text-transform: uppercase; min-height: 3.3rem; }
h2 { font-size: 1.5rem; margin-bottom: 20px; color: var(--accent); }
p { margin-bottom: 10px; }
.lead { font-size: 1.2rem; color: var(--text-dim); max-width: 600px; margin-bottom: 50px; min-height: 1.2rem; }

/* Status Indicator */
.status-indicator { margin-bottom: 20px; font-size: 0.9rem; color: var(--text-dim); display: flex; align-items: center; }
.dot { height: 10px; width: 10px; border-radius: 50%; display: inline-block; margin-right: 5px; }
.highlight { color: var(--accent); margin-left: 5px;}

/* Slow Pulse Animation */
@keyframes slow-pulse {
    0% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
    50% { opacity: 0.2; box-shadow: 0 0 1px var(--accent); }
    100% { opacity: 1; box-shadow: 0 0 8px var(--accent); }
}

.dot.green { 
    background: var(--accent); 
    box-shadow: 0 0 8px var(--accent); 
    animation: slow-pulse 4s infinite ease-in-out; 
}

.page-header { margin-bottom: 50px; border-bottom: 1px solid var(--border); padding-bottom: 20px; }
.page-header p { color: var(--text-dim); font-size: 0.9rem; }

/* =========================================
   5. HOME PAGE CARDS (The ".card" class)
   ========================================= */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.card-link { display: block; height: 100%; }

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

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 30px;
    height: 100%;
    min-height: 150px;
    opacity: 1; 
    transition: opacity 0.3s ease, border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.card h3 { transition: color 0.2s; font-size: 1.2rem; margin-bottom: 10px; }
.card h3 .arrow { display: inline-block; margin-right: 5px; transition: color 0.2s; }

/* Active & Hover States */
.card.active, .card:hover {
    border-color: var(--accent);
    background: #080808;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1);
    cursor: pointer;
}

.card.active h3, .card:hover h3 { color: var(--accent); }

.card.active h3 .arrow, .card:hover h3 .arrow {
    color: var(--accent);
    animation: arrow-blink 0.8s infinite;
}

/* =========================================
   6. SERVICES PAGE (The ".module-card" class)
   ========================================= */
.service-group { margin-bottom: 60px; }
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }

.module-card {
    background: #111;
    border: 1px solid #222;
    padding: 30px;
    transition: all 0.1s ease-in-out;
    cursor: pointer;
    position: relative;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.module-card h3 { color: #555; font-size: 1.2rem; margin-bottom: 10px; transition: color 0.1s; }
.module-card .specs { color: #333; font-size: 0.75rem; letter-spacing: 1px; text-transform: uppercase; font-weight: bold; transition: color 0.1s; }
.module-card .desc { color: #444; font-size: 0.9rem; transition: color 0.1s; }
.module-card .meta { margin-top: 20px; padding-top: 15px; border-top: 1px solid #222; color: #333; font-size: 0.8rem; transition: all 0.1s; }

.module-card:hover, .module-card.active {
    border-color: var(--accent);
    background: #080808;
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
    z-index: 10;
}
.module-card:hover h3, .module-card.active h3 { color: var(--accent); }
.module-card:hover .specs, .module-card.active .specs { color: #fff; }
.module-card:hover .desc, .module-card.active .desc { color: #ccc; }
.module-card:hover .meta, .module-card.active .meta { color: var(--accent); border-top-color: var(--accent); }

.module-card.active::after {
    content: "< ACTIVE >";
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--bg);
    color: var(--accent);
    border: 1px solid var(--accent);
    font-size: 0.7rem;
    padding: 0 8px;
}

/* =========================================
   7. PROTOCOL PAGE ELEMENTS
   ========================================= */
.split-layout { display: grid; grid-template-columns: 1.5fr 1fr; gap: 50px; }
.timeline li { margin-bottom: 30px; padding-left: 20px; border-left: 2px solid var(--border); }
.timeline strong { color: var(--text); display: block; margin-bottom: 5px; }

.pricing-panel { border: 1px solid var(--accent); padding: 30px; background: rgba(0, 255, 65, 0.03); }
.price-display { font-size: 3rem; font-weight: bold; margin: 10px 0; }
.currency { font-size: 1.5rem; vertical-align: super; }
.period { font-size: 1rem; color: var(--text-dim); font-weight: normal; }
.specs-list li { margin-bottom: 10px; color: #ccc; }
.note { font-size: 0.8rem; text-align: center; margin-top: 15px; color: var(--text-dim); }

.btn { 
    display: block; padding: 15px; text-align: center; 
    background: var(--accent); color: #000; font-weight: bold; margin-top: 20px; 
    text-transform: uppercase;
}
.btn:hover { background: #fff; box-shadow: 0 0 15px var(--accent); }
.full-width { width: 100%; }

/* =========================================
   8. RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-links { display: none; } 
    .grid-2, .grid-3, .split-layout { grid-template-columns: 1fr; }
    h1 { font-size: 2rem; }
}
/* =========================================
   9. SERVICE MODAL (SYSTEM POPUP)
   ========================================= */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(2px);
    z-index: 2000; /* Above nav and CRT scanlines */
    display: none;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-overlay.open {
    display: flex;
    opacity: 1;
}

.modal-window {
    background: var(--bg);
    border: 1px solid var(--accent);
    color: var(--text);
    width: 90%;
    max-width: 600px;
    padding: 2px; /* Inner border effect */
    box-shadow: 0 0 30px rgba(0, 255, 65, 0.15);
    position: relative;
    transform: scale(0.95);
    transition: transform 0.2s ease;
}

.modal-overlay.open .modal-window {
    transform: scale(1);
}

.modal-inner {
    border: 1px dashed rgba(0, 255, 65, 0.3); /* Inner aesthetic border */
    padding: 2rem;
    height: 100%;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
}

.modal-title {
    font-size: 1.5rem;
    color: var(--accent);
    text-transform: uppercase;
    margin: 0;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.5);
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-dim);
    font-family: inherit;
    font-size: 1.2rem;
    cursor: pointer;
    transition: 0.2s;
}

.modal-close:hover {
    color: var(--accent);
    text-shadow: 0 0 8px var(--accent);
}

.modal-body p {
    color: var(--text);
    margin-bottom: 20px;
    font-size: 1rem;
    line-height: 1.6;
}

.modal-specs-badge {
    display: inline-block;
    background: rgba(0, 255, 65, 0.1);
    color: var(--accent);
    padding: 4px 8px;
    font-size: 0.8rem;
    margin-bottom: 20px;
    border: 1px solid rgba(0, 255, 65, 0.2);
}

.modal-price-box {
    margin: 30px 0;
    padding: 15px;
    border-left: 4px solid var(--accent);
    background: rgba(255, 255, 255, 0.03);
}

.modal-price-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-dim);
    margin-bottom: 5px;
}

.modal-price-value {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}

/* Modal Action Button */
.modal-cta-btn {
    display: block;
    width: 100%;
    padding: 15px;
    text-align: center;
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    transition: all 0.2s;
    cursor: pointer;
}

.modal-cta-btn:hover {
    background: var(--accent);
    color: #000;
    box-shadow: 0 0 20px var(--accent);
}