/* ==========================================================================
   diplomacy.boo — Recovered Transmission Archive
   Muji-inspired minimalism fused with sci-fi HUD telemetry overlays.
   Typeface references from DESIGN.md: Roboto Slab" (Google Fonts, Source Serif 4" (Google Fonts,
   IBM Plex Mono" (Google Fonts. Interaction reference: IntersectionObserver` to detect when content
   blocks enter the viewport; setInterval` updating a single DOM element every second.
   ========================================================================== */

/* ---- CSS @property registrations (graceful degradation) ---- */
@property --mesh-x1 { syntax: '<percentage>'; inherits: false; initial-value: 18%; }
@property --mesh-y1 { syntax: '<percentage>'; inherits: false; initial-value: 28%; }
@property --mesh-x2 { syntax: '<percentage>'; inherits: false; initial-value: 78%; }
@property --mesh-y2 { syntax: '<percentage>'; inherits: false; initial-value: 20%; }
@property --mesh-x3 { syntax: '<percentage>'; inherits: false; initial-value: 62%; }
@property --mesh-y3 { syntax: '<percentage>'; inherits: false; initial-value: 78%; }
@property --mesh-x4 { syntax: '<percentage>'; inherits: false; initial-value: 30%; }
@property --mesh-y4 { syntax: '<percentage>'; inherits: false; initial-value: 72%; }
@property --mesh-hue { syntax: '<number>'; inherits: false; initial-value: 0; }
@property --signal-count { syntax: '<integer>'; inherits: false; initial-value: 0; }

/* ---- Tokens ---- */
:root {
    --c-bg-deep:        #1a1611;
    --c-bg-primary:     #f4ede0;
    --c-surface:        #ebe3d1;
    --c-text-primary:   #4a3b2a;
    --c-text-display:   #3d2e1f;
    --c-hud-accent:     #b8a07a;
    --c-hud-glow:       #d4c49a;
    --c-active:         #c45d3e;
    --c-mesh-start:     #e8d5b5;
    --c-mesh-end:       #c9a86c;
    --c-brass-muted:    #8a7a5f;
    --c-pale-brass:     #c8b89a;

    --font-display: "Roboto Slab", "Source Serif 4", Georgia, serif;
    --font-body:    "Source Serif 4", "Roboto Slab", Georgia, serif;
    --font-mono:    "IBM Plex Mono", "Menlo", "Consolas", monospace;

    /* Fibonacci spacing */
    --sp-1: 8px;
    --sp-2: 13px;
    --sp-3: 21px;
    --sp-4: 34px;
    --sp-5: 55px;
    --sp-6: 89px;
    --sp-7: 144px;

    --hud-chrome-h: 32px;
}

/* ---- Reset / base ---- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    background: var(--c-bg-primary);
    color: var(--c-text-primary);
    font-family: var(--font-body);
    font-size: 17px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

body {
    min-height: 100vh;
    position: relative;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201,168,108,0.14), transparent 55%),
        radial-gradient(ellipse at 50% 100%, rgba(26,22,17,0.20), transparent 55%),
        var(--c-bg-primary);
}

main { display: block; position: relative; z-index: 2; }

p { margin: 0 0 var(--sp-3); }

/* ---- Ambient overlays (grain + scanlines) ---- */
.grain-overlay {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 200;
    opacity: 0.25;
    mix-blend-mode: multiply;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(74,59,42,0.35) 0.5px, transparent 1px),
        radial-gradient(circle at 70% 20%, rgba(74,59,42,0.25) 0.5px, transparent 1px),
        radial-gradient(circle at 40% 80%, rgba(74,59,42,0.30) 0.5px, transparent 1px),
        radial-gradient(circle at 85% 65%, rgba(74,59,42,0.20) 0.5px, transparent 1px);
    background-size: 3px 3px, 5px 5px, 7px 7px, 11px 11px;
}

.scanline-overlay {
    position: fixed; inset: 0;
    pointer-events: none;
    z-index: 201;
    opacity: 0.08;
    background-image: repeating-linear-gradient(
        0deg,
        rgba(61,46,31,0.0) 0px,
        rgba(61,46,31,0.0) 2px,
        rgba(61,46,31,0.6) 3px,
        rgba(61,46,31,0.0) 4px
    );
    mix-blend-mode: multiply;
}

/* ---- Persistent HUD chrome ---- */
.hud-chrome {
    position: fixed;
    left: 0; right: 0;
    height: var(--hud-chrome-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--sp-4);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    background: linear-gradient(180deg, rgba(244,237,224,0.88), rgba(244,237,224,0.55));
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(184,160,122,0.35);
    border-style: solid;
    border-width: 0;
    z-index: 100;
}
.hud-top    { top: 0;    border-bottom-width: 1px; }
.hud-bottom { bottom: 0; border-top-width: 1px;
    background: linear-gradient(0deg, rgba(244,237,224,0.88), rgba(244,237,224,0.55));
}
.hud-cluster { display: inline-flex; align-items: center; gap: var(--sp-2); }
.hud-label {
    color: var(--c-brass-muted);
    opacity: 0.75;
}
.hud-value {
    color: var(--c-text-display);
    font-weight: 500;
    letter-spacing: 0.08em;
}
.hud-center { justify-content: center; }
.hud-top .hud-center::before,
.hud-top .hud-center::after {
    content: "";
    display: inline-block;
    width: var(--sp-4);
    height: 1px;
    background: rgba(184,160,122,0.55);
}

/* Signal bars in bottom chrome */
.signal-bars {
    display: inline-flex;
    align-items: flex-end;
    gap: 3px;
    height: 16px;
}
.signal-bars i {
    display: block;
    width: 3px;
    background: var(--c-hud-accent);
    opacity: 0.35;
    transition: opacity 0.6s ease, background 0.6s ease;
}
.signal-bars i:nth-child(1) { height: 4px; }
.signal-bars i:nth-child(2) { height: 7px; }
.signal-bars i:nth-child(3) { height: 10px; }
.signal-bars i:nth-child(4) { height: 13px; }
.signal-bars i:nth-child(5) { height: 16px; }
.signal-bars i.is-lit { opacity: 1; background: var(--c-active); }

/* ---- Sections ---- */
.section {
    position: relative;
    padding: calc(var(--hud-chrome-h) + var(--sp-5)) var(--sp-5) var(--sp-6);
    overflow: hidden;
    isolation: isolate;
}

/* ---- Gradient mesh backgrounds ---- */
.mesh-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    will-change: background;
}

.mesh-bg--warm {
    background:
        radial-gradient(circle at var(--mesh-x1) var(--mesh-y1), rgba(232,213,181,0.70), transparent 45%),
        radial-gradient(circle at var(--mesh-x2) var(--mesh-y2), rgba(212,196,154,0.55), transparent 50%),
        radial-gradient(circle at var(--mesh-x3) var(--mesh-y3), rgba(201,168,108,0.35), transparent 55%),
        radial-gradient(circle at var(--mesh-x4) var(--mesh-y4), rgba(244,237,224,0.85), transparent 50%),
        linear-gradient(160deg, #f4ede0 0%, #ebe3d1 40%, #d4c49a 100%);
    animation:
        mesh-drift-1 22s ease-in-out infinite alternate,
        mesh-drift-2 31s linear infinite alternate,
        mesh-drift-3 27s ease infinite alternate,
        mesh-drift-4 19s ease-in-out infinite alternate;
}

.mesh-bg--vellum {
    background:
        radial-gradient(circle at var(--mesh-x1) var(--mesh-y1), rgba(244,237,224,0.95), transparent 55%),
        radial-gradient(circle at var(--mesh-x2) var(--mesh-y2), rgba(232,213,181,0.55), transparent 50%),
        radial-gradient(circle at var(--mesh-x3) var(--mesh-y3), rgba(212,196,154,0.35), transparent 55%),
        radial-gradient(circle at var(--mesh-x4) var(--mesh-y4), rgba(184,160,122,0.20), transparent 50%),
        linear-gradient(180deg, #f4ede0 0%, #ebe3d1 50%, #e8d5b5 100%);
    animation:
        mesh-drift-1 28s ease-in-out infinite alternate,
        mesh-drift-2 35s linear infinite alternate,
        mesh-drift-3 23s ease infinite alternate,
        mesh-drift-4 25s ease-in-out infinite alternate;
}

.mesh-bg--amber {
    background:
        radial-gradient(circle at var(--mesh-x1) var(--mesh-y1), rgba(232,213,181,0.70), transparent 55%),
        radial-gradient(circle at var(--mesh-x2) var(--mesh-y2), rgba(201,168,108,0.45), transparent 50%),
        radial-gradient(circle at var(--mesh-x3) var(--mesh-y3), rgba(212,196,154,0.40), transparent 55%),
        radial-gradient(circle at var(--mesh-x4) var(--mesh-y4), rgba(138,122,95,0.18), transparent 55%),
        linear-gradient(200deg, #e8d5b5 0%, #d4c49a 50%, #c9a86c 100%);
    animation:
        mesh-drift-1 20s ease-in-out infinite alternate,
        mesh-drift-2 29s linear infinite alternate,
        mesh-drift-3 33s ease infinite alternate,
        mesh-drift-4 24s ease-in-out infinite alternate;
}

.mesh-bg--dusk {
    background:
        radial-gradient(circle at var(--mesh-x1) var(--mesh-y1), rgba(201,168,108,0.30), transparent 55%),
        radial-gradient(circle at var(--mesh-x2) var(--mesh-y2), rgba(138,122,95,0.25), transparent 60%),
        radial-gradient(circle at var(--mesh-x3) var(--mesh-y3), rgba(74,59,42,0.55), transparent 55%),
        radial-gradient(circle at var(--mesh-x4) var(--mesh-y4), rgba(26,22,17,0.85), transparent 55%),
        linear-gradient(200deg, #4a3b2a 0%, #2d241a 55%, #1a1611 100%);
    animation:
        mesh-drift-1 30s ease-in-out infinite alternate,
        mesh-drift-2 41s linear infinite alternate,
        mesh-drift-3 37s ease infinite alternate,
        mesh-drift-4 26s ease-in-out infinite alternate;
}

@keyframes mesh-drift-1 {
    0%   { --mesh-x1: 18%; --mesh-y1: 28%; }
    50%  { --mesh-x1: 34%; --mesh-y1: 14%; }
    100% { --mesh-x1: 12%; --mesh-y1: 42%; }
}
@keyframes mesh-drift-2 {
    0%   { --mesh-x2: 78%; --mesh-y2: 20%; }
    50%  { --mesh-x2: 62%; --mesh-y2: 36%; }
    100% { --mesh-x2: 88%; --mesh-y2: 12%; }
}
@keyframes mesh-drift-3 {
    0%   { --mesh-x3: 62%; --mesh-y3: 78%; }
    50%  { --mesh-x3: 78%; --mesh-y3: 62%; }
    100% { --mesh-x3: 48%; --mesh-y3: 88%; }
}
@keyframes mesh-drift-4 {
    0%   { --mesh-x4: 30%; --mesh-y4: 72%; }
    50%  { --mesh-x4: 16%; --mesh-y4: 58%; }
    100% { --mesh-x4: 42%; --mesh-y4: 86%; }
}

/* ==========================================================================
   Section 1 — Transmission Header
   ========================================================================== */

.section-header {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding-top: calc(var(--hud-chrome-h) + var(--sp-6));
    padding-bottom: calc(var(--hud-chrome-h) + var(--sp-5));
}

.reticle-stage {
    position: relative;
    width: min(88vw, 640px);
    aspect-ratio: 1 / 1;
    display: grid;
    place-items: center;
    margin-inline: auto;
    transform: translate3d(-3%, 2%, 0);
    animation: orbital-drift 24s ease-in-out infinite;
}
@keyframes orbital-drift {
    0%   { transform: translate3d(-3%,  2%, 0); }
    33%  { transform: translate3d( 2%, -2%, 0); }
    66%  { transform: translate3d(-1%, -4%, 0); }
    100% { transform: translate3d(-3%,  2%, 0); }
}

.reticle {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: visible;
}

.reticle-ring {
    fill: none;
    stroke: var(--c-hud-accent);
    stroke-opacity: 0.42;
    stroke-width: 1;
    transform-origin: 50% 50%;
    transform-box: fill-box;
}

.reticle-ring--outer {
    stroke-dasharray: 2 12;
    animation:
        reticle-draw-outer 8s ease-out 0.4s both,
        reticle-spin-cw 60s linear infinite 0.4s;
}
.reticle-ring--middle {
    stroke-dasharray: 20 10;
    animation:
        reticle-draw-middle 8s ease-out 0.2s both,
        reticle-spin-ccw 45s linear infinite 0.2s;
}
.reticle-ring--inner {
    stroke-dasharray: 8 4;
    animation:
        reticle-draw-inner 8s ease-out both,
        reticle-spin-cw 30s linear infinite;
}

@keyframes reticle-draw-outer {
    from { stroke-dashoffset: 1450; opacity: 0; }
    to   { stroke-dashoffset: 0;   opacity: 1; }
}
@keyframes reticle-draw-middle {
    from { stroke-dashoffset: 1010; opacity: 0; }
    to   { stroke-dashoffset: 0;   opacity: 1; }
}
@keyframes reticle-draw-inner {
    from { stroke-dashoffset: 630; opacity: 0; }
    to   { stroke-dashoffset: 0;  opacity: 1; }
}
@keyframes reticle-spin-cw  { to { transform: rotate(360deg); } }
@keyframes reticle-spin-ccw { to { transform: rotate(-360deg); } }

.reticle-crosshair line,
.reticle-ticks line {
    stroke: var(--c-hud-accent);
    stroke-width: 1;
    stroke-opacity: 0.5;
}
.reticle-ticks line { stroke-opacity: 0.35; }

.reticle-node {
    fill: var(--c-active);
    fill-opacity: 0.85;
    stroke: var(--c-hud-glow);
    stroke-opacity: 0.6;
    stroke-width: 1;
    animation: node-pulse 4s ease-in-out infinite;
}
.reticle-node--alt {
    animation-delay: 2s;
    fill: var(--c-hud-accent);
}
@keyframes node-pulse {
    0%, 100% { transform: scale(1);    opacity: 0.85; }
    50%      { transform: scale(1.35); opacity: 1;    }
}

.title-core {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-3);
    padding: var(--sp-3) var(--sp-4);
}

.title-eyebrow {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.28em;
    color: var(--c-brass-muted);
    text-transform: uppercase;
    opacity: 0;
    animation: fade-up 1.4s ease-out 0.6s forwards;
}

.site-title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.5rem, 6vw, 5rem);
    letter-spacing: 0.12em;
    line-height: 1.05;
    color: var(--c-text-display);
    margin: 0;
    display: inline-flex;
    gap: 0.02em;
}
.site-title span {
    display: inline-block;
    opacity: 0;
    transform: translateY(12px);
    animation: title-emit 0.9s ease-out forwards;
}
.site-title span:nth-child(1)  { animation-delay: 0.10s; }
.site-title span:nth-child(2)  { animation-delay: 0.18s; }
.site-title span:nth-child(3)  { animation-delay: 0.26s; }
.site-title span:nth-child(4)  { animation-delay: 0.34s; }
.site-title span:nth-child(5)  { animation-delay: 0.42s; }
.site-title span:nth-child(6)  { animation-delay: 0.50s; }
.site-title span:nth-child(7)  { animation-delay: 0.58s; }
.site-title span:nth-child(8)  { animation-delay: 0.66s; }
.site-title span:nth-child(9)  { animation-delay: 0.74s; }
.site-title span:nth-child(10) { animation-delay: 0.82s; color: var(--c-active); }
.site-title span:nth-child(11) { animation-delay: 0.90s; }
.site-title span:nth-child(12) { animation-delay: 0.98s; }
.site-title span:nth-child(13) { animation-delay: 1.06s; }
@keyframes title-emit {
    from { opacity: 0; transform: translateY(12px); filter: blur(2px); }
    to   { opacity: 1; transform: translateY(0);   filter: blur(0);   }
}

.title-subline {
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.95rem, 1.8vw, 1.15rem);
    color: var(--c-text-primary);
    letter-spacing: 0.04em;
    opacity: 0;
    animation: fade-up 1.4s ease-out 2s forwards;
    max-width: 40ch;
    margin: 0 auto;
}

.epigraph {
    position: relative;
    z-index: 2;
    margin-top: var(--sp-6);
    max-width: 52ch;
    font-family: var(--font-display);
    font-weight: 300;
    font-style: italic;
    font-size: clamp(0.95rem, 1.6vw, 1.1rem);
    color: var(--c-text-primary);
    line-height: 1.6;
    opacity: 0;
    animation: fade-up 1.4s ease-out 2.6s forwards;
}
.epigraph-attr {
    display: block;
    margin-top: var(--sp-2);
    font-family: var(--font-mono);
    font-style: normal;
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
}

.scroll-cue {
    position: absolute;
    bottom: calc(var(--hud-chrome-h) + var(--sp-3));
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-1);
    opacity: 0;
    animation: fade-up 1.2s ease-out 3.2s forwards;
}
.scroll-cue-label {
    font-family: var(--font-mono);
    font-size: 9.5px;
    letter-spacing: 0.3em;
    color: var(--c-brass-muted);
    text-transform: uppercase;
}
.scroll-cue-line {
    width: 1px;
    height: 42px;
    background: linear-gradient(180deg, transparent 0%, var(--c-hud-accent) 50%, transparent 100%);
    animation: cue-bob 3s ease-in-out infinite;
}
@keyframes cue-bob {
    0%, 100% { transform: translateY(-4px); opacity: 0.4; }
    50%      { transform: translateY(4px);  opacity: 1;   }
}

@keyframes fade-up {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ==========================================================================
   Section 2 — Negotiation Corridor
   ========================================================================== */

.section-corridor {
    min-height: 200vh;
    padding: var(--sp-6) var(--sp-4) var(--sp-6);
    position: relative;
}

.corridor-intro {
    max-width: 640px;
    margin: var(--sp-4) auto var(--sp-6);
    padding-left: 8%;
    text-align: left;
}

.kicker {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.26em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    margin-bottom: var(--sp-3);
    padding: 4px 8px;
    border: 1px solid rgba(184,160,122,0.4);
}

.section-title {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.5rem, 3vw, 2.5rem);
    letter-spacing: 0.04em;
    line-height: 1.25;
    color: var(--c-text-display);
    margin: 0 0 var(--sp-3);
    max-width: 20ch;
}

.section-lede {
    max-width: 42em;
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text-primary);
}

/* The curved path SVG drawn under the dispatches */
.corridor-path {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}
.corridor-path-line {
    fill: none;
    stroke: var(--c-hud-accent);
    stroke-opacity: 0.22;
    stroke-width: 1;
    stroke-dasharray: 4 8;
    animation: path-flow 18s linear infinite;
}
.corridor-path-echo {
    fill: none;
    stroke: var(--c-active);
    stroke-opacity: 0.12;
    stroke-width: 1;
}
@keyframes path-flow {
    from { stroke-dashoffset: 0;   }
    to   { stroke-dashoffset: -120;}
}

.dispatches {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--sp-6);
    padding-top: var(--sp-4);
}

.dispatch {
    position: relative;
    max-width: 640px;
    width: 88%;
    display: grid;
    grid-template-columns: 72px 1fr;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-4) var(--sp-4) var(--sp-3);
    background: rgba(244,237,224,0.55);
    border: 1px solid rgba(184,160,122,0.32);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);

    opacity: 0;
    transition: opacity 0.9s ease-out, transform 0.9s ease-out;
}
.dispatch.is-visible { opacity: 1; transform: translateX(0) !important; }

.dispatch--left {
    margin-left: 15%;
    transform: translateX(-30px);
}
.dispatch--right {
    margin-left: auto;
    margin-right: 15%;
    transform: translateX(30px);
}

.dispatch::before {
    content: "";
    position: absolute;
    top: var(--sp-4);
    left: -12px;
    width: 6px;
    height: 6px;
    background: var(--c-active);
    border: 1px solid var(--c-hud-accent);
    border-radius: 50%;
    opacity: 0.85;
}
.dispatch::after {
    content: "";
    position: absolute;
    top: calc(var(--sp-4) + 3px);
    left: -6px;
    width: 40px;
    height: 1px;
    background: var(--c-hud-accent);
    opacity: 0.35;
}
.dispatch--right::before { left: auto; right: -12px; }
.dispatch--right::after  { left: auto; right: -6px; background: var(--c-hud-accent); }

.dispatch-margin {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
    padding-top: 2px;
    position: relative;
    min-height: 140px;
}
.dispatch-id {
    font-family: var(--font-mono);
    font-size: 10px;
    letter-spacing: 0.14em;
    color: var(--c-brass-muted);
    text-transform: uppercase;
}
.dispatch-num {
    font-style: normal;
    color: var(--c-text-display);
    font-weight: 500;
}
.dispatch-stamp {
    writing-mode: vertical-rl;
    transform: rotate(180deg);
    font-family: var(--font-mono);
    font-size: 9px;
    letter-spacing: 0.32em;
    text-transform: uppercase;
    color: var(--c-text-display);
    opacity: 0.22;
    margin-top: var(--sp-2);
    padding: 2px 3px;
    border-left: 1px solid rgba(184,160,122,0.4);
}
.dispatch-signal {
    display: inline-flex;
    align-items: flex-end;
    gap: 2px;
    height: 14px;
    margin-top: auto;
}
.dispatch-signal i {
    display: block;
    width: 2.5px;
    background: var(--c-hud-accent);
    opacity: 0.4;
}
.dispatch-signal i:nth-child(1) { height: 3px; }
.dispatch-signal i:nth-child(2) { height: 5px; }
.dispatch-signal i:nth-child(3) { height: 8px; }
.dispatch-signal i:nth-child(4) { height: 11px; }
.dispatch-signal i:nth-child(5) { height: 14px; }
.is-visible .dispatch-signal i {
    animation: signal-light 2.4s ease-in-out infinite;
}
.is-visible .dispatch-signal i:nth-child(1) { animation-delay: 0.0s; }
.is-visible .dispatch-signal i:nth-child(2) { animation-delay: 0.2s; }
.is-visible .dispatch-signal i:nth-child(3) { animation-delay: 0.4s; }
.is-visible .dispatch-signal i:nth-child(4) { animation-delay: 0.6s; }
.is-visible .dispatch-signal i:nth-child(5) { animation-delay: 0.8s; }

@keyframes signal-light {
    0%, 100% { opacity: 0.4; background: var(--c-hud-accent); }
    50%      { opacity: 1;   background: var(--c-active);     }
}

.dispatch-body { min-width: 0; }

.dispatch-header { margin-bottom: var(--sp-3); }
.dispatch-meta {
    display: block;
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    margin-bottom: var(--sp-1);
}
.dispatch-header h3 {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.2rem, 2vw, 1.55rem);
    letter-spacing: 0.03em;
    line-height: 1.3;
    color: var(--c-text-display);
    margin: 0;
}

.dispatch-body p {
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 17px;
    line-height: 1.7;
    color: var(--c-text-primary);
    max-width: 42em;
}

.dispatch-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    margin-top: var(--sp-3) !important;
    padding-top: var(--sp-2);
    border-top: 1px dashed rgba(184,160,122,0.35);
}

/* ==========================================================================
   Section 3 — Archive Chamber
   ========================================================================== */

.section-archive {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    align-items: center;
    gap: var(--sp-5);
    padding: var(--sp-6) var(--sp-5);
}

.archive-text {
    max-width: 520px;
    justify-self: end;
    padding-right: var(--sp-4);
    color: var(--c-text-display);
}
.archive-text .section-title { color: var(--c-text-display); }

.archive-legend {
    list-style: none;
    padding: 0;
    margin: var(--sp-4) 0 0;
    display: grid;
    gap: var(--sp-1);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
}
.archive-legend li {
    display: flex;
    align-items: center;
    gap: var(--sp-2);
}
.legend-swatch {
    display: inline-block;
    width: 12px;
    height: 12px;
}
.legend-swatch--node {
    background: var(--c-active);
    opacity: 0.75;
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--c-hud-accent);
}
.legend-swatch--edge {
    height: 1px;
    background: var(--c-hud-accent);
    opacity: 0.6;
}
.legend-swatch--pulse {
    background: var(--c-hud-glow);
    opacity: 0.7;
    border-radius: 50%;
    animation: node-pulse 3.5s ease-in-out infinite;
}

.constellation-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    max-width: 640px;
    justify-self: start;
}
.constellation {
    width: 100%;
    height: 100%;
    overflow: visible;
}
.constellation-edges line {
    stroke: var(--c-hud-accent);
    stroke-opacity: 0;
    stroke-width: 1;
    stroke-dasharray: 600;
    stroke-dashoffset: 600;
}
.constellation-nodes circle {
    fill: var(--c-active);
    fill-opacity: 0;
    stroke: var(--c-hud-glow);
    stroke-opacity: 0.8;
    stroke-width: 1;
}

.is-revealed .constellation-edges line {
    animation: edge-draw 1.6s ease-out forwards;
}
.is-revealed .constellation-nodes circle {
    animation:
        node-appear 0.7s ease-out forwards,
        node-pulse-slow 4s ease-in-out infinite;
}
@keyframes edge-draw {
    0%   { stroke-opacity: 0;    stroke-dashoffset: 600; }
    100% { stroke-opacity: 0.18; stroke-dashoffset: 0;   }
}
@keyframes node-appear {
    0%   { fill-opacity: 0;   transform: scale(0.4); }
    70%  { fill-opacity: 0.8; transform: scale(1.3); }
    100% { fill-opacity: 0.6; transform: scale(1);   }
}
@keyframes node-pulse-slow {
    0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0 rgba(196,93,62,0)); }
    50%      { transform: scale(1.15); filter: drop-shadow(0 0 3px rgba(196,93,62,0.55)); }
}
.constellation-nodes circle { transform-origin: center; transform-box: fill-box; }

.constellation-readout {
    position: absolute;
    bottom: -44px;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: baseline;
    gap: var(--sp-2);
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    padding: 6px 14px;
    border: 1px solid rgba(184,160,122,0.4);
    background: rgba(244,237,224,0.55);
}
.constellation-readout .hud-value {
    color: var(--c-text-display);
    font-weight: 500;
}

/* ==========================================================================
   Section 4 — Signal Terminus
   ========================================================================== */

.section-terminus {
    min-height: 70vh;
    display: grid;
    place-items: center;
    padding: var(--sp-6) var(--sp-4);
    color: var(--c-hud-glow);
}

.terminus-stage {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--sp-4);
    text-align: center;
    max-width: 640px;
}

.terminus-reticle {
    width: 180px;
    height: 180px;
    overflow: visible;
}
.terminus-ring {
    stroke: var(--c-hud-glow);
    stroke-opacity: 0.55;
    stroke-dasharray: 6 10;
    animation: reticle-spin-cw 40s linear infinite;
}
.terminus-ring--slow {
    stroke-opacity: 0.35;
    stroke-dasharray: 2 8;
    animation: reticle-spin-ccw 70s linear infinite;
}

.terminus-message {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: clamp(1.2rem, 2.4vw, 1.8rem);
    letter-spacing: 0.08em;
    line-height: 1.5;
    color: var(--c-pale-brass);
    margin: 0;
    min-height: 2.4em;
}
.terminus-message .char {
    display: inline-block;
    transition: opacity 0.4s ease, transform 0.4s ease, filter 0.4s ease;
}
.terminus-message .char.is-gone {
    opacity: 0;
    transform: translateY(-4px);
    filter: blur(2px);
}

.terminus-tag {
    font-family: var(--font-mono);
    font-size: 10.5px;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--c-brass-muted);
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1024px) {
    .section-archive {
        grid-template-columns: 1fr;
    }
    .archive-text { justify-self: start; padding-right: 0; }
    .constellation-wrap { justify-self: center; }
}

@media (max-width: 720px) {
    :root { --hud-chrome-h: 28px; }

    .hud-chrome { padding: 0 var(--sp-3); font-size: 9.5px; }
    .hud-top .hud-center::before,
    .hud-top .hud-center::after { display: none; }

    .section { padding: calc(var(--hud-chrome-h) + var(--sp-4)) var(--sp-3) var(--sp-5); }
    .section-header { min-height: 100svh; }

    .dispatch {
        grid-template-columns: 56px 1fr;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .corridor-intro { padding-left: 0; }
}

@media (max-width: 520px) {
    .site-title { letter-spacing: 0.08em; }
    .dispatch { grid-template-columns: 1fr; padding: var(--sp-3); }
    .dispatch-margin {
        flex-direction: row;
        align-items: center;
        min-height: auto;
        padding-top: 0;
        margin-bottom: var(--sp-2);
    }
    .dispatch-stamp {
        writing-mode: horizontal-tb;
        transform: none;
        border-left: none;
        border-top: 1px solid rgba(184,160,122,0.4);
        padding: 2px 4px;
    }
}
