/* =============================================
   diplomatic.bar -- Cartographic War Room
   ============================================= */

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    background-color: #B8A88A;
    color: #1B2A1E;
    font-family: 'IBM Plex Serif', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    overflow-x: hidden;
    position: relative;
}

/* --- Grid Overlay --- */
#grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    transition: opacity 800ms ease;
    background-image:
        linear-gradient(to right, #3A5F7C 1px, transparent 1px),
        linear-gradient(to bottom, #3A5F7C 1px, transparent 1px);
    background-size: 120px 120px;
}

#grid-overlay.visible {
    opacity: 0.08;
}

/* --- Contour Parallax Layer --- */
#contour-parallax-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 2;
    will-change: transform;
}

#contour-bg-lines {
    width: 100%;
    height: 300%;
    position: absolute;
    top: -50%;
    left: 0;
}

/* --- Central Contour Border --- */
#contour-border {
    position: fixed;
    top: 0;
    left: 55%;
    width: 60px;
    height: 100%;
    transform: translateX(-50%);
    z-index: 5;
    pointer-events: none;
}

#contour-border-path {
    stroke-dasharray: 5000;
    stroke-dashoffset: 5000;
    transition: none;
}

#contour-border-path.drawn {
    stroke-dashoffset: 0;
    transition: stroke-dashoffset 2200ms ease-in-out;
}

/* --- Navigation Bar --- */
#nav-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 48px;
    background-color: #1B2A1E;
    color: #3A5F7C;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 12px;
    z-index: 100;
    transform: translateY(-100%);
    transition: transform 300ms ease-out;
}

#nav-bar.visible {
    transform: translateY(0);
}

.nav-domain {
    font-family: 'Saira Extra Condensed', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 0.2em;
    color: #EDE6D6;
    text-transform: uppercase;
}

.nav-separator {
    color: #4A4A4A;
}

.nav-classification {
    color: #C13B3B;
    opacity: 0.8;
}

.nav-grid-ref {
    margin-left: auto;
    color: #3A5F7C;
}

#nav-coord {
    color: #EDE6D6;
}

/* --- Main Split Layout --- */
#main-content {
    display: flex;
    min-height: 100vh;
    padding-top: 48px;
    position: relative;
    z-index: 10;
}

#western-bloc {
    width: 58%;
    padding: 80px 60px 120px 40px;
    position: relative;
}

#eastern-bloc {
    width: 42%;
    background-color: #EDE6D6;
    padding: 80px 40px 120px 50px;
    position: relative;
}

/* --- Elevation gradient bands for Western Bloc --- */
.west-section:nth-child(odd) {
    background: linear-gradient(180deg, rgba(184,168,138,0) 0%, rgba(184,168,138,0.3) 50%, rgba(184,168,138,0) 100%);
}

.west-section:nth-child(even) {
    background: linear-gradient(180deg, rgba(172,156,126,0) 0%, rgba(172,156,126,0.15) 50%, rgba(172,156,126,0) 100%);
}

/* --- Sections --- */
.west-section {
    margin-bottom: 20px;
    padding: 40px 0;
}

.east-section {
    margin-bottom: 60px;
    padding: 20px 0;
}

.section-content {
    max-width: 38ch;
    position: relative;
    overflow: hidden;
}

/* --- Typography --- */
.section-header {
    font-family: 'Saira Extra Condensed', sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 5rem);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #1B2A1E;
    line-height: 0.95;
    margin-bottom: 24px;
}

.east-header {
    font-size: clamp(1.6rem, 3.5vw, 3rem);
    color: #1B2A1E;
    margin-bottom: 16px;
}

.briefing-text {
    font-family: 'IBM Plex Serif', serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    line-height: 1.72;
    color: #1B2A1E;
    max-width: 38ch;
    margin-bottom: 16px;
}

.meta-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    opacity: 0.6;
    color: #3A5F7C;
    margin-bottom: 32px;
}

.intercept-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.8rem;
    letter-spacing: 0.03em;
    line-height: 1.6;
    max-width: 50ch;
}

/* --- Grid Separators --- */
.grid-separator {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 8px 0;
    padding: 4px 0;
}

.grid-line {
    flex: 1;
    display: block;
    height: 0.5px;
    background-color: #4A4A4A;
    opacity: 0.4;
}

.coord-label {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #3A5F7C;
    opacity: 0.6;
    min-width: 3ch;
}

/* --- Declassification Animation --- */
.declassify {
    position: relative;
    overflow: hidden;
}

.redaction-bar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1B2A1E;
    z-index: 20;
    transform: translateX(0);
    transition: transform 400ms ease-out;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.12'/%3E%3C/svg%3E");
}

.declassify.revealed .redaction-bar {
    transform: translateX(-105%);
}

/* --- Intercept Blocks --- */
.intercept-block {
    position: relative;
    overflow: hidden;
    padding: 16px 0;
    margin-bottom: 20px;
    border-left: 2px solid #8B3A2A;
    padding-left: 16px;
}

.intercept-block .redaction-bar {
    background-color: #8B3A2A;
}

/* --- Classification Stamps --- */
.classification-stamp {
    position: absolute;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #C13B3B;
    opacity: 0.4;
    transform: rotate(-12deg);
    border: 2px double #C13B3B;
    padding: 4px 12px;
    pointer-events: none;
    z-index: 15;
    white-space: nowrap;
}

.stamp-declassified {
    display: inline-block;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.75rem;
    letter-spacing: 0.08em;
    color: #C13B3B;
    opacity: 0.4;
    transform: rotate(-12deg);
    border: 2px double #C13B3B;
    padding: 4px 12px;
    margin-top: 24px;
}

/* --- Dossier Cards --- */
.dossier-card {
    border: 1px solid #4A4A4A;
    padding: 20px;
    margin-bottom: 24px;
    position: relative;
    transition: border-color 300ms ease;
    background-color: transparent;
}

.dossier-card:hover {
    border-color: #3A5F7C;
}

.dossier-card .dossier-status {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #3A5F7C;
    position: absolute;
    top: 8px;
    right: 12px;
    opacity: 0;
    transition: opacity 200ms ease;
    white-space: nowrap;
}

.dossier-card:hover .dossier-status {
    opacity: 1;
}

.dossier-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.dossier-codename {
    font-family: 'Saira', sans-serif;
    font-weight: 600;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1B2A1E;
}

.dossier-meta {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #4A4A4A;
    opacity: 0.7;
    margin-bottom: 12px;
    flex-wrap: wrap;
    gap: 8px;
}

.dossier-body {
    font-family: 'IBM Plex Serif', serif;
    font-weight: 400;
    font-size: clamp(0.85rem, 1.5vw, 1rem);
    line-height: 1.72;
    color: #1B2A1E;
    margin-bottom: 16px;
}

.dossier-body p {
    max-width: 38ch;
}

.dossier-footer {
    display: flex;
    justify-content: space-between;
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.65rem;
    letter-spacing: 0.08em;
    color: #3A5F7C;
    opacity: 0.6;
    border-top: 0.5px solid #4A4A4A;
    padding-top: 8px;
}

/* --- Redacted Text --- */
.redacted {
    background-color: #1B2A1E;
    color: #1B2A1E;
    padding: 0 6px;
    cursor: default;
    user-select: none;
    position: relative;
}

.redacted::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
}

/* --- Footer --- */
#site-footer {
    position: relative;
    z-index: 10;
    padding: 40px 24px;
    background-color: #1B2A1E;
}

.footer-grid-line {
    width: 100%;
    height: 0.5px;
    background-color: #3A5F7C;
    opacity: 0.3;
    margin-bottom: 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-text {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #3A5F7C;
    opacity: 0.6;
}

.footer-coord {
    font-family: 'Share Tech Mono', monospace;
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: #EDE6D6;
    opacity: 0.4;
}

/* --- Responsive: Mobile --- */
@media (max-width: 768px) {
    #main-content {
        flex-direction: column;
    }

    #western-bloc {
        width: 100%;
        padding: 60px 24px 40px;
    }

    #eastern-bloc {
        width: 100%;
        padding: 40px 24px 80px;
        border-top: 2px solid #8B3A2A;
    }

    #contour-border {
        display: none;
    }

    .section-header {
        font-size: clamp(1.8rem, 8vw, 3rem);
    }

    .dossier-meta {
        flex-direction: column;
        gap: 4px;
    }

    .nav-classification,
    .nav-separator:nth-child(2) {
        display: none;
    }

    .classification-stamp {
        display: none;
    }
}
