/* 
 * STATE OF PROTOCOL - FOUNDATION STYLESHEET v1.2.5
 * Authority: S.O.P Foundation
 * Optimization: Hybrid Analytics | Acquisition Grid | Neural UI | Glow Directive
 */

:root {
    /* Institutional Color Palette */
    --bg: #050505;
    --card: #0a0a0a;
    --accent: #00ff41;    /* S.O.P Green */
    --white: #ffffff;
    --text: #f0f0f0;
    --dim: #666;
    --border: rgba(255, 255, 255, 0.08);
    --hover-bg: rgba(0, 255, 65, 0.03);
    --error: #ff4444;
}

/* Reset & Base Foundation */
* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

html, body {
    width: 100%;
    overflow-x: hidden;
    scroll-behavior: smooth;
    background-color: var(--bg);
}

body {
    color: var(--text);
    font-family: ui-monospace, 'SF Mono', 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, monospace;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography Utility */
.dim { color: var(--dim); }
.white { color: var(--white); }
.label { 
    font-size: 9px; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    color: var(--dim); 
    margin-bottom: 15px; 
    display: block;
}

/* Navigation */
.navbar {
    padding: clamp(15px, 3vh, 25px) 5%;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.8);
    backdrop-filter: blur(15px);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 11px;
}

.dot {
    width: 6px; height: 6px;
    background: var(--accent);
    box-shadow: 0 0 10px var(--accent);
    border-radius: 50%;
}

/* Main Container */
.container { 
    width: 90%;
    max-width: 1100px; 
    margin: 0 auto; 
}

/* Hero Section */
.hero {
    padding: clamp(60px, 15vh, 120px) 0 40px;
}

.hero h1 {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    line-height: 0.9;
    letter-spacing: -0.04em;
    margin-bottom: 20px;
    color: var(--white);
}

.subtitle { 
    color: var(--dim); 
    max-width: 550px; 
    font-size: clamp(13px, 2vw, 15px);
    margin-bottom: 40px;
}

/* ==========================================
   DIRECTIVE: TERMINAL ALERT (GREEN GLOW)
   ========================================== */

.terminal-alert {
    background: rgba(0, 255, 65, 0.03); /* Latar belakang hijau sangat pudar */
    border-left: 3px solid var(--accent); /* Sempadan hijau terang S.O.P */
    padding: 25px;
    margin: 40px 0;
    font-family: ui-monospace, 'SF Mono', monospace;
    
    /* Efek Soft Glow Shadow (Kritikal untuk rupa 'high-grade') */
    box-shadow: 0 0 15px rgba(0, 255, 65, 0.1), 
                inset 0 0 10px rgba(0, 255, 65, 0.05);
    
    border-radius: 4px; /* Sedikit bucu bulat */
    position: relative;
    overflow: hidden;
}

/* Menambah efek kilauan halus (scanline effect) di belakang teks */
.terminal-alert::after {
    content: "";
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 255, 65, 0.02) 51%);
    background-size: 100% 4px;
    pointer-events: none;
}

/* Terminal Input Box */
.search-box {
    display: flex;
    gap: 10px;
    background: var(--card);
    border: 1px solid var(--border);
    padding: 8px;
    border-radius: 4px;
    transition: 0.3s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.1);
}

input {
    flex: 2;
    background: transparent;
    border: none;
    padding: 15px 20px;
    color: var(--accent);
    font-family: inherit;
    font-size: 16px;
    outline: none;
    width: 100%;
}

button {
    background: var(--white);
    color: #000;
    border: none;
    padding: 0 30px;
    font-weight: 800;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.2s;
    border-radius: 2px;
}

button:hover {
    background: var(--accent);
}

button:disabled {
    background: #222;
    color: #444;
    cursor: not-allowed;
}

/* Results & Analytics Grid */
.results-grid {
    display: none; /* Controlled by JS */
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 60px;
}

.card {
    background: var(--card);
    border: 1px solid var(--border);
    padding: 30px;
    border-radius: 4px;
    transition: 0.3s ease;
}

.card.wide { grid-column: 1 / -1; }

.val {
    font-size: 32px;
    font-weight: 800;
    color: var(--white);
    margin: 10px 0;
}

.unit { font-size: 14px; color: var(--dim); margin-left: 5px; }

/* Progress Bar (Trends) */
.progress-bg {
    width: 100%;
    height: 4px;
    background: #1a1a1a;
    margin-top: 15px;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--accent);
    width: 0%;
    transition: width 1.5s cubic-bezier(0.1, 0, 0.3, 1);
}

/* Heatmap Grid */
.heatmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 30px;
    margin-top: 10px;
}

/* Acquisition (Sales) Section */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.acquisition-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease;
}

.acquisition-card:hover {
    transform: translateY(-5px);
}

.btn-acquire {
    display: block;
    width: 100%;
    padding: 15px;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text);
    text-decoration: none;
    text-align: center;
    font-size: 10px;
    font-weight: bold;
    letter-spacing: 2px;
    margin-top: 25px;
    transition: 0.3s;
}

.btn-acquire:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--hover-bg);
}

/* Modal System */
.modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.9);
    backdrop-filter: blur(10px);
    display: none; /* Flex via JS */
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
}

.modal.open { display: flex; }

.spinner {
    width: 30px; height: 30px;
    border: 2px solid rgba(0, 255, 65, 0.1);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin { 100% { transform: rotate(360deg); } }

/* Animations & Reveal States */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .search-box { flex-direction: column; padding: 15px; }
    button { padding: 15px; width: 100%; }
    .hero h1 { font-size: 3rem; }
    .results-grid { grid-template-columns: 1fr; }
}

/* ==========================================
    NEW ADDITIONS: IDENTITY CARD & DYNAMIC UI
   ========================================== */

#domStatus {
    position: relative;
    overflow: hidden;
    border-left: 3px solid var(--accent); 
}

#domStatus span {
    font-family: ui-monospace, 'Cascadia Code', monospace;
    text-shadow: 0 0 5px rgba(0, 255, 65, 0.2);
}

.results-grid.grid-active {
    display: grid !important;
    animation: fadeIn 0.5s ease-in forwards;
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
        transform: translateY(10px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
