:root {
    --cream: #f5f0e6;
    --putty: #e8e0d2;
    --charcoal: #2d2a26;
    --teal: #5b9a8b;
    --amber: #d4943a;
    --coral: #c75c3a;
    --slate: #3a3632;
    --blue: #6fa3c7;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Space Mono', monospace;
    background-color: var(--cream);
    color: var(--charcoal);
    overflow-x: hidden;
}

/* ===== STATUS BAR ===== */
#status-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 20px;
    background-color: var(--slate);
    color: var(--putty);
    font-family: 'Space Mono', monospace;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.status-label {
    color: var(--teal);
}

#status-section {
    color: var(--amber);
}

.status-divider {
    color: var(--teal);
    opacity: 0.4;
}

#status-clock {
    color: var(--putty);
}

#menu-toggle {
    margin-left: auto;
    background: none;
    border: 2px solid var(--teal);
    border-radius: 50%;
    width: 22px;
    height: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.power-icon {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--teal);
    box-shadow: 0 0 4px var(--teal);
}

/* ===== HERO SECTION ===== */
#hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 40px 40px;
    background-color: var(--cream);
}

.hero-bezel {
    position: relative;
    width: 100%;
    max-width: 1200px;
    height: 80vh;
    border: 3px solid var(--charcoal);
    border-radius: 12px;
    outline: 2px solid var(--putty);
    outline-offset: 6px;
    background-color: var(--cream);
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    padding: 60px;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-headline {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 7rem);
    letter-spacing: 0.03em;
    color: var(--charcoal);
    line-height: 1.05;
    text-align: left;
}

.cursor {
    display: inline-block;
    width: 0.5em;
    height: 1.05em;
    background-color: var(--amber);
    margin-left: 0.1em;
    vertical-align: text-bottom;
    animation: blink 1s step-end infinite;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-mission {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.875rem, 1.2vw, 1.1rem);
    line-height: 1.7;
    color: var(--charcoal);
    max-width: 600px;
    margin-top: 24px;
}

.hero-wave {
    position: absolute;
    bottom: 25%;
    left: 0;
    width: 200%;
    height: 100px;
    z-index: 1;
    animation: waveShift 8s linear infinite;
    will-change: transform;
}

@keyframes waveShift {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    z-index: 3;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 1px,
        rgba(0, 0, 0, 0.03) 1px,
        rgba(0, 0, 0, 0.03) 2px
    );
}

/* ===== SECTION TITLES ===== */
.section-title {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    letter-spacing: 0.03em;
    color: var(--charcoal);
    margin-bottom: 40px;
    text-align: left;
}

/* ===== DISPATCH GRID ===== */
#dispatch-grid {
    padding: 80px 40px;
    background-color: var(--cream);
}

.grid-container {
    display: grid;
    grid-template-columns: 1.618fr 1fr;
    gap: 24px;
    max-width: 1200px;
    margin: 0 auto;
}

/* ===== DISPATCH CARDS ===== */
.dispatch-card {
    perspective: 1000px;
    height: 280px;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    transform-style: preserve-3d;
}

.dispatch-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
}

.card-front {
    background-color: var(--putty);
    background-image: radial-gradient(circle, rgba(0,0,0,0.06) 1px, transparent 1px);
    background-size: 8px 8px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.06);
    overflow: hidden;
}

.card-back {
    background-color: var(--coral);
    color: var(--cream);
    transform: rotateY(180deg);
    justify-content: center;
    border-radius: 8px;
}

.dispatch-number {
    position: absolute;
    top: 10px;
    right: 15px;
    font-family: 'Righteous', cursive;
    font-size: clamp(4rem, 10vw, 6rem);
    color: var(--charcoal);
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
}

.card-wave {
    width: 100%;
    height: 30px;
    margin-top: auto;
    overflow: visible;
}

.card-wave-path {
    will-change: transform;
}

.cw-1 { animation: cardWave1 3s linear infinite; }
.cw-2 { animation: cardWave2 2.5s linear infinite; }
.cw-3 { animation: cardWave3 3.5s linear infinite; }
.cw-4 { animation: cardWave4 2.8s linear infinite; }
.cw-5 { animation: cardWave5 4s linear infinite; }
.cw-6 { animation: cardWave6 3.2s linear infinite; }

@keyframes cardWave1 { 0% { transform: translateX(0); } 100% { transform: translateX(-75px); } }
@keyframes cardWave2 { 0% { transform: translateX(0); } 100% { transform: translateX(-60px); } }
@keyframes cardWave3 { 0% { transform: translateX(0); } 100% { transform: translateX(-90px); } }
@keyframes cardWave4 { 0% { transform: translateX(0); } 100% { transform: translateX(-45px); } }
@keyframes cardWave5 { 0% { transform: translateX(0); } 100% { transform: translateX(-105px); } }
@keyframes cardWave6 { 0% { transform: translateX(0); } 100% { transform: translateX(-66px); } }

.card-gauge {
    width: 50px;
    height: 50px;
    margin-bottom: 12px;
}

.card-label {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--charcoal);
    margin-bottom: 4px;
}

.card-meta {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.6875rem;
    letter-spacing: 0.08em;
    color: var(--teal);
    text-transform: uppercase;
}

.card-back-label {
    font-family: 'Righteous', cursive;
    font-size: 1.2rem;
    letter-spacing: 0.03em;
    margin-bottom: 16px;
    color: var(--cream);
}

.card-back-text {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--cream);
    margin-bottom: 16px;
}

.card-back-status {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--amber);
    margin-top: auto;
}

/* ===== SIGNAL INTERLUDE ===== */
#signal-interlude {
    height: 100vh;
    background-color: var(--slate);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.signal-waves {
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
}

.sw-1 {
    animation: signalWave1 8s linear infinite;
    will-change: transform;
}

.sw-2 {
    animation: signalWave2 6s linear infinite;
    will-change: transform;
}

.sw-3 {
    animation: signalWave3 10s linear infinite;
    will-change: transform;
}

@keyframes signalWave1 { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes signalWave2 { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }
@keyframes signalWave3 { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

.signal-text {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(1.5rem, 4vw, 3rem);
    letter-spacing: 0.08em;
    color: var(--cream);
    position: relative;
    z-index: 2;
    text-align: center;
}

/* ===== ARCHIVE ===== */
#archive {
    padding: 80px 40px;
    background-color: var(--cream);
}

.archive-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    gap: 40px;
}

.archive-entries {
    flex: 1;
}

.archive-entry {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
}

.archive-date {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: 0.6875rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--teal);
    white-space: nowrap;
    min-width: 100px;
}

.archive-line {
    flex: 0 0 60px;
    height: 1px;
    background-color: var(--teal);
}

.archive-message {
    font-family: 'Space Mono', monospace;
    font-weight: 400;
    font-size: clamp(0.875rem, 1.2vw, 1rem);
    line-height: 1.7;
    color: var(--charcoal);
}

.archive-bars {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    width: 100px;
    height: 300px;
    flex-shrink: 0;
}

.archive-bars .bar {
    flex: 1;
    background-color: var(--teal);
    opacity: 0.3;
    border-radius: 2px 2px 0 0;
}

/* ===== SIGN-OFF ===== */
#sign-off {
    height: 100vh;
    background-color: var(--slate);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.sign-off-content {
    text-align: center;
    position: relative;
    z-index: 2;
}

.sign-off-headline {
    font-family: 'Righteous', cursive;
    font-weight: 400;
    font-size: clamp(2rem, 6vw, 5rem);
    letter-spacing: 0.03em;
    color: var(--cream);
    margin-bottom: 24px;
}

.sign-off-clock {
    font-family: 'Space Mono', monospace;
    font-weight: 700;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--amber);
    margin-bottom: 40px;
}

.sign-off-wave {
    position: absolute;
    bottom: 20%;
    left: 0;
    width: 200%;
    height: 100px;
    z-index: 1;
    animation: waveShift 8s linear infinite;
    will-change: transform;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-bezel {
        padding: 30px;
        height: 85vh;
    }

    .grid-container {
        grid-template-columns: 1fr;
    }

    .dispatch-card {
        height: 240px;
    }

    .scanlines {
        display: none;
    }

    .archive-container {
        flex-direction: column;
    }

    .archive-bars {
        width: 100%;
        height: 80px;
        flex-direction: row;
    }

    .archive-entry {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .archive-line {
        width: 40px;
    }

    #dispatch-grid,
    #archive {
        padding: 60px 20px;
    }

    #hero {
        padding: 50px 20px 20px;
    }
}