/* meltdown.quest — Progressive Degradation Brutalist Design */

:root {
    --clean-white: #FAFAFA;
    --text-dark: #333333;
    --text-gray: #999999;
    --meltdown-red: #CC0000;
    --also-red: #cc0000;
    --status-green: #00CC44;
    --status-cyan: #00CCCC;
    --void-dark: #221111;
    --pure-black: #000000;
    --deep-red-dark: #1a0a0a;
    --blood-dark: #2a0000;
    --medium-gray: #888888;
    --warm-parchment: #e8e0d8;
    --alert-orange: #ff8800;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background: var(--clean-white);
    color: var(--text-dark);
    font-family: 'Source Sans 3', sans-serif;
    font-weight: 400;
    font-size: clamp(0.95rem, 1.1vw, 1.08rem);
    line-height: 1.8;
    overflow-x: hidden;
}

/* The Crack SVG */
.crack-svg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 100;
}

/* Noise overlay */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 99;
    opacity: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.15'/%3E%3C/svg%3E");
    background-size: 200px 200px;
    transition: opacity 0.5s;
}

/* ====================== SECTION BASE ====================== */
.section-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ====================== NORMAL OPERATIONS (Hero) ====================== */
.section-normal {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--clean-white);
    text-align: center;
}

.hero-title {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(3rem, 8vw, 6rem);
    color: var(--text-dark);
    letter-spacing: 0.05em;
    margin-bottom: 16px;
}

.hero-status {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--status-green);
    letter-spacing: 0.15em;
    margin-bottom: 30px;
}

.status-row {
    display: flex;
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-gray);
    letter-spacing: 0.08em;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-dot.green {
    background: var(--status-green);
    box-shadow: 0 0 4px var(--status-green);
}

.status-dot.amber {
    background: #ffaa22;
    box-shadow: 0 0 4px #ffaa22;
    animation: blink-amber 1.5s ease-in-out infinite;
}

.status-dot.red {
    background: var(--meltdown-red);
    box-shadow: 0 0 6px var(--meltdown-red);
    animation: blink-red 0.8s ease-in-out infinite;
}

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

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

/* ====================== FIRST WARNING ====================== */
.section-warning {
    padding: 120px 20px;
    background: var(--clean-white);
}

.section-heading {
    font-family: 'Bebas Neue', sans-serif;
    font-weight: 400;
    font-size: clamp(2rem, 4vw, 3.5rem);
    color: var(--text-dark);
    letter-spacing: 0.05em;
    margin-bottom: 20px;
    text-align: center;
}

.warning-bar {
    background: rgba(204, 0, 0, 0.08);
    border-left: 3px solid var(--meltdown-red);
    padding: 12px 16px;
    margin-bottom: 30px;
}

.warning-text {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.75rem;
    color: var(--meltdown-red);
    letter-spacing: 0.1em;
}

.body-text {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
    line-height: 1.9;
    margin-bottom: 20px;
}

.warn-status {
    margin-top: 30px;
}

/* ====================== ESCALATION ====================== */
.section-escalation {
    padding: 100px 20px;
    background: #f5f0f0;
}

.content-compressed {
    max-width: 650px;
}

.heading-glitch {
    color: var(--meltdown-red);
    text-shadow: 2px 0 var(--text-dark);
}

.text-dense {
    line-height: 1.6;
    font-size: 0.95rem;
}

.critical-status {
    margin-top: 30px;
}

/* ====================== CRITICAL MASS ====================== */
.section-critical {
    padding: 80px 20px;
    background: var(--void-dark);
    position: relative;
}

.content-crushed {
    max-width: 580px;
}

.heading-fractured {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--meltdown-red);
    text-align: center;
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.frac-char {
    display: inline-block;
    transition: transform 0.3s ease;
}

.text-crushed {
    color: var(--text-gray);
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Meltdown counter */
.meltdown-counter {
    text-align: center;
    margin-top: 40px;
}

.counter-label {
    display: block;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.65rem;
    color: var(--text-gray);
    letter-spacing: 0.12em;
    margin-bottom: 8px;
}

.counter-value {
    font-family: 'Bebas Neue', sans-serif;
    font-size: clamp(2rem, 5vw, 4rem);
    color: var(--meltdown-red);
    letter-spacing: 0.1em;
    text-shadow: 0 0 20px rgba(204, 0, 0, 0.5);
    animation: counter-pulse 1s ease-in-out infinite;
}

@keyframes counter-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ====================== AFTERMATH ====================== */
.section-aftermath {
    padding: 120px 20px;
    background: var(--clean-white);
}

.content-sparse {
    max-width: 700px;
}

.heading-faded {
    color: var(--text-gray);
    opacity: 0.5;
}

.text-aftermath {
    color: var(--text-gray);
    line-height: 2;
}

.aftermath-list {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.aftermath-entry {
    display: flex;
    gap: 20px;
    align-items: baseline;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(153, 153, 153, 0.2);
}

.aftermath-year {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.8rem;
    color: var(--meltdown-red);
    flex-shrink: 0;
}

.aftermath-name {
    font-family: 'Source Sans 3', sans-serif;
    font-size: 1rem;
    color: var(--text-dark);
}

/* ====================== FOOTER ====================== */
.site-footer {
    padding: 40px 20px;
    background: var(--void-dark);
    text-align: center;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-domain {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 1.2rem;
    color: var(--text-gray);
    letter-spacing: 0.08em;
}

.footer-note {
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-gray);
    opacity: 0.5;
}

/* ====================== RESPONSIVE ====================== */
@media (max-width: 600px) {
    .status-row {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }

    .heading-fractured {
        font-size: 2rem;
    }
}
