/* --- 1. CORE ARCHITECTURE --- */
:root {
    --bg: #050608;
    --card: #0f111a;
    --accent: #00f2ff;
    --accent-glow: rgba(0, 242, 255, 0.15);
    --text: #ffffff;
    --dim: #9ca3af; /* Slightly lighter for better contrast */
    --nav-h: 80px;
    --grad: linear-gradient(135deg, #00f2ff 0%, #006ae0 100%);
    --easing: cubic-bezier(0.4, 0, 0.2, 1);
}

/* FIX: Moved transition off '*' to improve render performance */
* { 
    box-sizing: border-box; 
}

body { 
    background: var(--bg); 
    color: var(--text); 
    font-family: 'Inter', -apple-system, sans-serif; 
    margin: 0; 
    padding-top: var(--nav-h); 
    overflow-x: hidden; 
    -webkit-font-smoothing: antialiased;
    line-height: 1.6; /* Better general readability */
}

/* IMPROVED: Responsive gutters */
.container { 
    width: min(100%, 1240px); 
    margin-inline: auto; 
    padding-inline: max(20px, 4vw); 
}

/* --- 2. PRESENTATION-RICH HEADER --- */
.nav { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    height: var(--nav-h); 
    background: rgba(5, 6, 8, 0.85); 
    backdrop-filter: blur(20px); 
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); 
    z-index: 9999; 
    display: flex; 
    align-items: center; 
}

/* FIX: Added max-width to nav interior so it aligns with page content */
.nav-flex { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: min(100%, 1240px);
    margin-inline: auto;
    padding-inline: max(20px, 4vw);
}

.brand { 
    font-family: 'Inter', sans-serif; 
    font-size: 1.6rem; 
    font-weight: 900; 
    color: #fff; 
    text-decoration: none; 
    letter-spacing: -1px;
    transition: opacity 0.3s var(--easing);
}
.brand span { 
    color: var(--accent); 
    text-shadow: 0 0 15px var(--accent-glow); 
}
.brand:hover { opacity: 0.8; }

.nav-links { display: flex; gap: 32px; } /* Increased gap for clarity */
.nav-links a { 
    color: var(--dim); 
    text-decoration: none; 
    font-size: 13px; /* Slightly larger */
    font-weight: 600; 
    letter-spacing: 1px; 
    text-transform: uppercase;
    transition: color 0.3s var(--easing);
}
.nav-links a:hover { color: var(--accent); }

/* --- 3. CINEMATIC HERO --- */
.hero { 
    padding: clamp(80px, 15vh, 160px) 0; 
    text-align: center; 
    max-width: 900px;
    margin-inline: auto;
}
.hero h1 { 
    font-size: clamp(2.5rem, 6vw, 5rem); 
    font-weight: 900; 
    margin: 0 0 1.5rem 0; /* Consistent bottom spacing */
    line-height: 1.1; /* Prevent ascenders overlapping */
    letter-spacing: -0.04em;
    background: linear-gradient(to bottom, #fff 40%, var(--accent));
    -webkit-background-clip: text; 
    -webkit-text-fill-color: transparent; 
}
.hero p { 
    color: var(--dim); 
    font-size: clamp(1.1rem, 2vw, 1.25rem); 
    max-width: 600px; 
    margin: 0 auto 2rem auto; 
    line-height: 1.6;
}

.tag-accent { 
    display: inline-flex;
    align-items: center;
    padding: 8px 18px; 
    border-radius: 50px; 
    background: rgba(0, 242, 255, 0.08); 
    color: var(--accent); 
    font-size: 11px; 
    font-weight: 700; 
    letter-spacing: 2px; 
    border: 1px solid rgba(0, 242, 255, 0.2);
    margin-bottom: 2rem;
    text-transform: uppercase;
}

/* --- 4. INTELLIGENCE DASHBOARD (HOME) --- */
.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); /* Better wrapping logic */
    gap: 32px; /* Standardized spacing */
    padding-bottom: 120px; 
}

.f-card { 
    background: var(--card); 
    border: 1px solid rgba(255, 255, 255, 0.08); 
    border-radius: 24px; 
    padding: 40px; 
    text-decoration: none; 
    color: inherit; 
    display: flex; 
    flex-direction: column; 
    position: relative; 
    overflow: hidden;
    height: 100%; /* Ensures all cards in a row match height */
    transition: transform 0.3s var(--easing), box-shadow 0.3s var(--easing), border-color 0.3s var(--easing);
}

.f-card:hover { 
    transform: translateY(-8px); 
    border-color: var(--accent); 
    box-shadow: 0 20px 40px -10px rgba(0, 242, 255, 0.15); 
}

.card-tag { 
    font-size: 10px; 
    font-weight: 800; 
    color: var(--accent); 
    letter-spacing: 1.5px; 
    margin-bottom: 1rem; 
    text-transform: uppercase;
    opacity: 0.9;
}
.card-title { 
    font-size: 1.5rem; 
    font-weight: 700; 
    margin-bottom: 1rem; 
    color: #fff; 
    line-height: 1.3; 
}
/* IMPROVED: Pushes footer to bottom even with short text */
.card-footer { 
    margin-top: auto; 
    padding-top: 25px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    color: var(--accent); 
    font-weight: 800; 
    font-size: 11px; 
    letter-spacing: 1px;
}

/* --- 5. STYLISH FAQ & STATIC PANELS --- */
.glass-panel { 
    background: var(--card); 
    border: 1px solid rgba(255, 255, 255, 0.05); 
    border-radius: 32px; 
    padding: clamp(30px, 5vw, 60px); 
    margin-bottom: 60px; 
}

.faq-box { 
    background: rgba(255,255,255,0.02); 
    border: 1px solid rgba(255,255,255,0.05); 
    border-radius: 16px; 
    margin-bottom: 16px; 
    cursor: pointer; 
    transition: all 0.3s var(--easing);
}
.faq-box:hover { 
    border-color: rgba(0, 242, 255, 0.4); 
    background: rgba(0, 242, 255, 0.02); 
}
.faq-q { 
    padding: 24px 30px; 
    font-weight: 600; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    color: #fff; 
    font-size: 1.1rem;
}
.faq-icon { 
    color: var(--accent); 
    font-size: 1.2rem; 
    transition: transform 0.3s var(--easing);
}

.faq-a { 
    max-height: 0; 
    overflow: hidden; 
    padding: 0 30px; 
    color: var(--dim); 
    line-height: 1.7; 
    transition: max-height 0.4s var(--easing), padding 0.4s var(--easing); 
}
.faq-box.active .faq-a { 
    max-height: 500px; 
    padding-bottom: 30px; 
}
.faq-box.active .faq-icon { transform: rotate(45deg); }

/* --- 6. FORENSIC READER (ARTICLES) --- */
.article-wrap { 
    width: 100%;
    max-width: 68ch; /* Optimized for reading width */
    margin: 80px auto; 
    color: #d1d5db; 
    font-size: 1.125rem; 
    line-height: 1.8; 
}
.article-wrap h1 { 
    color: #fff; 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    line-height: 1.1;
    margin-bottom: 2rem; 
    letter-spacing: -0.02em;
}
.article-wrap h2 { 
    color: var(--text); 
    font-size: 1.8rem;
    margin-top: 3rem; 
    margin-bottom: 1.5rem;
    border-left: 3px solid var(--accent);
    padding-left: 20px;
}
.article-wrap p { margin-bottom: 1.5rem; }

.sge-snippet { 
    background: rgba(0, 242, 255, 0.03); 
    border: 1px solid rgba(0, 242, 255, 0.1);
    border-left: 4px solid var(--accent); 
    padding: 30px; 
    border-radius: 12px; 
    margin: 40px 0; 
    color: #fff; 
    font-size: 1rem;
}

/* --- 7. PRODUCTION FOOTER --- */
.footer-core { 
    background: #020203; 
    border-top: 1px solid rgba(255, 255, 255, 0.08); 
    padding: 80px 0 40px 0; 
    margin-top: 120px; 
}
.footer-grid { 
    display: grid; 
    grid-template-columns: 2fr 1fr 1fr 1fr; 
    gap: 60px; 
    margin-bottom: 80px; 
}

.footer-nav-col h6 { 
    color: #fff; 
    font-size: 12px; 
    font-weight: 800; 
    letter-spacing: 2px; 
    margin-bottom: 30px; 
    text-transform: uppercase;
}
.footer-nav-col a { 
    display: block; 
    color: var(--dim); 
    text-decoration: none; 
    font-size: 14px; 
    margin-bottom: 16px; 
    transition: color 0.2s, transform 0.2s;
}
.footer-nav-col a:hover { 
    color: var(--accent); 
    transform: translateX(5px); 
}

.system-status { 
    font-size: 11px; 
    font-weight: 700; 
    color: var(--dim); 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    background: rgba(255,255,255,0.05);
    display: inline-flex;
    padding: 8px 16px;
    border-radius: 50px;
}
.status-pulse { 
    width: 8px; 
    height: 8px; 
    background: var(--accent); 
    border-radius: 50%; 
    box-shadow: 0 0 10px var(--accent); 
    animation: pulse 2s infinite; 
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

.footer-bottom { 
    padding-top: 30px; 
    border-top: 1px solid rgba(255,255,255,0.05); 
    display: flex; 
    justify-content: space-between; 
    align-items: center;
    font-size: 11px; 
    color: rgba(255,255,255,0.3); 
}

/* --- 8. MOBILE FIRST OVERRIDES --- */
@media (max-width: 992px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 50px; }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .hero { padding: 40px 0; text-align: left; } /* Align left on mobile is usually better */
    .hero h1 { font-size: 3rem; }
    
    .footer-grid { grid-template-columns: 1fr; gap: 40px; }
    .footer-bottom { flex-direction: column; gap: 20px; text-align: center; }
}