/* --- DESIGN TOKENS --- */
:root {
    --brand-red: #c61a24;
    --bg-main: #cbd5e1;
    --panel-slate: #f1f5f9;
    --border-cool: #94a3b8;
    --text-primary: #0f172a;
    --text-muted: #334155;
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, monospace;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-sans);
    line-height: 1.7;
    margin: 0; /*Ensures no gap at the very top */
    padding:0
}
/* Add a subtle "Grid" overlay to the background for tech-texture */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: radial-gradient(#ffffff05 1px, transparent 1px);
    background-size: 30px 30px; /* Creates a subtle HUD grid */
    pointer-events: none;
}

header {
    position: sticky;
    top: 0;
    z-index: 1000;
    
    /* FIX 1: Use a solid background color instead of transparency */
    background-color: var(--bg-main); 
    
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 60px;
    
    /* FIX 2: Refine the border to be more stable during scroll */
    border-bottom: 1px solid var(--border-cool);

    /* REMOVE ANY MARGIN-TOP HERE */
    margin-top: 0;
    
    /* FIX 3: Force GPU rendering to prevent flickering and dots */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
    
    /* FIX 4: Ensure no box-shadow is fighting with the border */
    box-shadow: none;
}

main { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }

/* --- CRISP COMPARISON GRID --- */
.comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    background: #e2e8f0;
    padding: 40px;
    border: 1px solid var(--border-cool);
    border-radius: 4px;
    margin: 40px 0;
}

.status-block h4 {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    margin-bottom: 15px;
}

/* --- TIGHTER ARCHITECTS GRID --- */
.team-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px; /* Diminished gap */
    margin-top: 20px;
}

.team-member {
    background: var(--panel-slate);
    border: 1px solid var(--border-cool);
    padding: 15px; /* Compact padding */
    border-radius: 4px;
}

/* --- CENTERED FOOTER --- */
.footer {
    margin-top: 80px;
    padding: 60px 0;
    border-top: 1px solid var(--border-cool);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.contact-links a {
    color: var(--brand-red);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 13px;
    font-weight: 700;
    display: block;
    margin-bottom: 10px;
}

.copyright {
    font-family: var(--font-mono);
    font-size: 10px;
    opacity: 0.5;
    margin-top: 40px;
}
/* ============================================================
   INTRO OVERLAY & ENTRANCE ANIMATIONS
   ============================================================ */

/* 1. The White Splash Screen */
#intro-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff; /* High-contrast white start */
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; /* Stays above the sticky header */
    animation: fadeOut 0.8s ease-in-out forwards;
    animation-delay: 2s; /* Shows "CNS DEFENSE" for 2 seconds */
}

/* 2. The Text on the Splash Screen */
.intro-content {
    font-family: var(--font-sans);
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 0.3em;
    color: #000000; /* High-contrast black text */
    text-align: center;
}

.intro-pipe {
    color: var(--brand-red); /* Branding red accent */
    margin: 0 10px;
}

/* 3. The Main Content Fade-In */
/* This hides the site initially so it can "build" after the splash */
main, header, footer {
    opacity: 0; 
    animation: fadeInPage 1.2s ease-out forwards;
    animation-delay: 2.5s; /* Starts after the splash screen begins to fade */
}

/* 4. Animation Keyframes */
@keyframes fadeOut {
    0% { opacity: 1; visibility: visible; }
    100% { opacity: 0; visibility: hidden; }
}

@keyframes fadeInPage {
    from { 
        opacity: 0; 
        transform: translateY(15px); /* Subtle upward slide effect */
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}
/* --- TYPEWRITER INTRO ANIMATION --- */

#intro-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeOverlay 0.8s ease-in-out forwards;
    animation-delay: 3.5s; /* Wait for typing (2s) + pause (0.7s) + text fade (0.8s) */
}

.intro-content {
    display: inline-block;
}

.typing-text {
    display: block;
    font-family: var(--font-mono); /* Mono looks best for typing */
    font-weight: 800;
    font-size: 28px;
    letter-spacing: 0.2em;
    color: #000000;
    white-space: nowrap;
    overflow: hidden;
    border-right: 3px solid var(--brand-red); /* The "cursor" */
    width: 0; /* Start at 0 width */
    
    /* Animation 1: Type the text | Animation 2: Blink cursor | Animation 3: Fade text out */
    animation: 
        typing 2s steps(25) forwards, 
        blink 0.7s step-end infinite,
        fadeText 0.5s ease-in-out forwards 3s;
}

/* 1. Typing effect */
@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

/* 2. Blinking cursor */
@keyframes blink {
    from, to { border-color: transparent; }
    50% { border-color: var(--brand-red); }
}

/* 3. Text Fading Out */
@keyframes fadeText {
    to { opacity: 0; transform: translateY(-10px); border-color: transparent; }
}

/* 4. Background Fading Out */
@keyframes fadeOverlay {
    to { opacity: 0; visibility: hidden; }
}

/* PAGE REVEAL */
main, header, footer {
    opacity: 0;
    animation: fadeInContent 1s ease-out forwards;
    animation-delay: 4s; /* Builds page after all intro animations finish */
}

@keyframes fadeInContent {
    to { opacity: 1; }
}
