/* ===================================================================
   SENTINEL COMMAND — Public Safety Integrated Platform
   Color Scheme: White + Deep Navy (#0C1F3F)
   =================================================================== */

:root {
    --navy: #0C1F3F;
    --navy-light: #142d54;
    --navy-mid: #1a3a6b;
    --blue-accent: #2563EB;
    --blue-soft: #3B82F6;
    --slate-50: #f8fafc;
    --slate-100: #f1f5f9;
    --slate-200: #e2e8f0;
    --slate-300: #cbd5e1;
    --slate-400: #94a3b8;
    --slate-500: #64748b;
    --slate-600: #475569;
    --slate-700: #334155;
    --white: #ffffff;
    --green: #16a34a;
    --amber: #d97706;
    --red: #dc2626;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    color: var(--navy);
    background: var(--white);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ─── Top Bar ─── */
.top-bar {
    background: var(--navy);
    color: var(--white);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 2px solid var(--blue-accent);
}

.top-bar-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 8px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gov-badge {
    display: flex;
    align-items: center;
    gap: 8px;
}

.gov-crest {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

.gov-text { opacity: 0.7; font-weight: 500; }

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.sys-time {
    font-family: 'DM Sans', monospace;
    opacity: 0.6;
    font-variant-numeric: tabular-nums;
}

.status-badge {
    background: var(--green);
    color: var(--white);
    padding: 2px 10px;
    border-radius: 2px;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.1em;
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.4); }
    50% { box-shadow: 0 0 8px 2px rgba(22, 163, 74, 0.2); }
}

/* ─── Navigation ─── */
.main-nav {
    background: var(--white);
    border-bottom: 1px solid var(--slate-200);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255, 255, 255, 0.95);
}

.nav-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 64px;
}

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

.brand-shield {
    width: 36px;
    height: 36px;
    background: var(--navy);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.brand-shield svg { width: 20px; height: 20px; }

.brand-text { display: flex; flex-direction: column; }

.brand-name {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--navy);
    line-height: 1.2;
}

.brand-sub {
    font-size: 11px;
    color: var(--slate-500);
    letter-spacing: 0.02em;
}

.nav-links { display: flex; gap: 4px; }

.nav-link {
    text-decoration: none;
    color: var(--slate-500);
    font-size: 13px;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 4px;
    transition: all 0.15s ease;
    letter-spacing: 0.02em;
}

.nav-link:hover { color: var(--navy); background: var(--slate-100); }
.nav-link.active { color: var(--navy); background: var(--slate-100); font-weight: 600; }

/* ─── Hero ─── */
.hero {
    position: relative;
    background: var(--navy);
    color: var(--white);
    overflow: hidden;
}

.hero-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 32px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 64px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-overline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-soft);
    margin-bottom: 16px;
}

.hero-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 52px;
    font-weight: 400;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-title em {
    font-style: italic;
    color: var(--blue-soft);
}

.hero-desc {
    font-size: 16px;
    line-height: 1.7;
    color: var(--slate-300);
    max-width: 520px;
    margin-bottom: 32px;
}

.hero-actions { display: flex; gap: 12px; }

.btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 28px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 4px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background: var(--blue-accent);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-soft);
    transform: translateY(-1px);
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.btn-ghost {
    background: transparent;
    color: var(--slate-300);
    border: 1px solid var(--slate-600);
}

.btn-ghost:hover {
    border-color: var(--slate-400);
    color: var(--white);
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.stat-card {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 20px 24px;
    backdrop-filter: blur(8px);
    transition: all 0.3s ease;
}

.stat-card:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateX(4px);
}

.stat-number {
    font-size: 36px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 4px;
    font-variant-numeric: tabular-nums;
}

.stat-label {
    font-size: 13px;
    color: var(--slate-400);
    font-weight: 500;
}

.stat-trend {
    font-size: 11px;
    margin-top: 6px;
    font-weight: 500;
}

.stat-trend.up { color: var(--green); }
.stat-trend.neutral { color: var(--slate-400); }

/* Hero Background Pattern */
.hero-bg-pattern {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 80% 20%, rgba(37, 99, 235, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 20% 80%, rgba(37, 99, 235, 0.06) 0%, transparent 50%);
    pointer-events: none;
}

.hero-bg-pattern::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 48px 48px;
}

/* ─── Section Styles ─── */
.section-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 80px 32px;
}

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

.section-overline {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--blue-accent);
    margin-bottom: 8px;
}

.section-title {
    font-family: 'Instrument Serif', Georgia, serif;
    font-size: 36px;
    font-weight: 400;
    color: var(--navy);
    line-height: 1.2;
}

.section-desc {
    font-size: 15px;
    color: var(--slate-500);
    margin-top: 12px;
    max-width: 600px;
    line-height: 1.7;
}

/* ─── Agencies Grid ─── */
.agencies { background: var(--slate-50); }

.agency-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.agency-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 28px;
    transition: all 0.25s ease;
}

.agency-card:hover {
    border-color: var(--slate-300);
    box-shadow: 0 4px 24px rgba(12, 31, 63, 0.06);
    transform: translateY(-2px);
}

.agency-icon {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
}

.agency-icon svg { width: 22px; height: 22px; }

.agency-icon.police { background: #EFF6FF; color: #1d4ed8; }
.agency-icon.fire { background: #FEF2F2; color: #dc2626; }
.agency-icon.border { background: #F0FDF4; color: #16a34a; }
.agency-icon.prison { background: #FDF4FF; color: #9333ea; }
.agency-icon.narcotics { background: #FFFBEB; color: #d97706; }

.agency-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--navy);
}

.agency-card p {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.6;
    margin-bottom: 16px;
}

.agency-stats {
    display: flex;
    gap: 16px;
    margin-bottom: 12px;
}

.agency-stat {
    font-size: 12px;
    color: var(--slate-500);
}

.agency-stat strong {
    color: var(--navy);
    font-weight: 600;
}

.agency-status {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.agency-status.online { color: var(--green); }

.agency-status.online::before {
    content: '';
    width: 6px;
    height: 6px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

/* ─── Operations ─── */
.ops-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    grid-template-rows: auto auto;
    gap: 20px;
}

.ops-panel {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 24px;
}

.ops-panel-header {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--slate-500);
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--slate-100);
}

/* Threat Level */
.threat-display { text-align: center; padding: 16px 0; }

.threat-indicator {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin-bottom: 12px;
}

.threat-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    animation: pulse-glow 2s ease-in-out infinite;
}

.threat-indicator.moderate { color: var(--amber); }
.threat-indicator.moderate .threat-dot { background: var(--amber); }

.threat-desc {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.6;
}

/* Activity Feed */
.recent-activity { grid-row: 1 / 3; grid-column: 2; }

.activity-feed { display: flex; flex-direction: column; gap: 2px; }

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--slate-100);
    font-size: 13px;
}

.activity-item:last-child { border-bottom: none; }

.activity-time {
    font-variant-numeric: tabular-nums;
    color: var(--slate-400);
    font-size: 12px;
    font-weight: 500;
    width: 40px;
    flex-shrink: 0;
}

.activity-badge {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 2px 8px;
    border-radius: 2px;
    flex-shrink: 0;
}

.activity-badge.police { background: #EFF6FF; color: #1d4ed8; }
.activity-badge.fire { background: #FEF2F2; color: #dc2626; }
.activity-badge.border { background: #F0FDF4; color: #16a34a; }
.activity-badge.prison { background: #FDF4FF; color: #9333ea; }
.activity-badge.narcotics { background: #FFFBEB; color: #d97706; }

.activity-text { color: var(--slate-600); }

/* Response Metrics */
.metrics-grid { display: flex; flex-direction: column; gap: 20px; }

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 4px;
}

.metric-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-400);
}

.metric-label {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 8px;
}

.metric-bar {
    height: 4px;
    background: var(--slate-100);
    border-radius: 2px;
    overflow: hidden;
}

.metric-fill {
    height: 100%;
    background: var(--blue-accent);
    border-radius: 2px;
    transition: width 1.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ─── Intelligence ─── */
.intelligence { background: var(--slate-50); }

.intel-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}

.intel-card {
    background: var(--white);
    border: 1px solid var(--slate-200);
    border-radius: 8px;
    padding: 32px;
    transition: all 0.25s ease;
}

.intel-card:hover {
    border-color: var(--blue-accent);
    box-shadow: 0 4px 24px rgba(37, 99, 235, 0.08);
    transform: translateY(-2px);
}

.intel-icon {
    width: 48px;
    height: 48px;
    background: var(--navy);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-bottom: 20px;
}

.intel-icon svg { width: 24px; height: 24px; }

.intel-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.intel-card p {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.7;
}

.intel-cta {
    text-align: center;
    font-size: 14px;
    color: var(--slate-500);
    padding: 20px;
    background: var(--white);
    border: 1px dashed var(--slate-300);
    border-radius: 8px;
}

/* ─── Footer ─── */
.footer {
    background: var(--navy);
    color: var(--slate-400);
    font-size: 12px;
}

.footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    align-items: center;
    text-align: center;
}

.footer-name {
    font-weight: 700;
    color: var(--white);
    letter-spacing: 0.1em;
    font-size: 13px;
}

.footer-gov {
    display: block;
    margin-top: 4px;
    opacity: 0.5;
    font-size: 11px;
}

.footer-links {
    display: flex;
    gap: 24px;
}

.footer-links a {
    color: var(--slate-400);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover { color: var(--white); }

.footer-copy { opacity: 0.4; font-size: 11px; }

/* ─── Animations ─── */
.fade-target {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-target.visible {
    opacity: 1;
    transform: translateY(0);
}

.agency-card:nth-child(2) .fade-target { transition-delay: 0.1s; }
.agency-card:nth-child(3) .fade-target { transition-delay: 0.2s; }
.agency-card:nth-child(4) .fade-target { transition-delay: 0.3s; }
.agency-card:nth-child(5) .fade-target { transition-delay: 0.4s; }

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .hero-inner { grid-template-columns: 1fr; padding: 48px 20px; }
    .hero-title { font-size: 36px; }
    .ops-grid { grid-template-columns: 1fr; }
    .recent-activity { grid-row: auto; grid-column: auto; }
    .intel-features { grid-template-columns: 1fr; }
    .nav-links { display: none; }
    .agency-grid { grid-template-columns: 1fr; }
}
