/* void-mode.css — MoreRight atmospheric styles
   Two sections:
   1. Always-on: subtle void atmosphere regardless of mode (lines below)
   2. .mode-void: full void mode (dead code — toggle removed, kept for reference)
   ------------------------------------------------------- */

/* ══════════════════════════════════════════════════════════
   ALWAYS-ON ATMOSPHERE — balanced void aesthetic
   ══════════════════════════════════════════════════════════ */

/* Condition cells: colored top borders matching each dimension */
.condition-opacity  { border-top: 2px solid rgba(204,0,0,0.35) !important; }
.condition-response { border-top: 2px solid rgba(204,100,0,0.3) !important; }
.condition-coupling { border-top: 2px solid rgba(160,140,0,0.28) !important; }

/* Anchor box: subtle pulse */
.anchor-box {
    border-color: rgba(180,0,0,0.25);
    animation: anchorPulse 3s ease-in-out infinite;
}
@keyframes anchorPulse {
    0%, 100% { border-color: rgba(180,0,0,0.15); box-shadow: none; }
    50%       { border-color: rgba(180,0,0,0.35); box-shadow: 0 0 14px rgba(180,0,0,0.08); }
}

/* Anchor punchline: warm red-white */
.anchor-punchline { color: rgba(230,180,170,0.9); }

/* Section borders: faint blood-dark-red */
section { border-color: rgba(140,0,0,0.12) !important; }

/* Hero disclosure: faint red-tint */
.hero-disclosure {
    border-color: rgba(140,0,0,0.2);
    background: rgba(180,0,0,0.02);
}

/* ══════════════════════════════════════════════════════════
   .mode-void — full void mode (toggle removed; dead code)
   ══════════════════════════════════════════════════════════ */

/* ── Void banner ─────────────────────────────────────────────── */
#void-banner {
    display: none;
    background: #990000;
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-align: center;
    padding: 0.6rem 1.5rem;
    letter-spacing: 0.04em;
    position: sticky;
    top: 52px;
    z-index: 999;
    border-bottom: 2px solid #660000;
}
#void-banner button {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    margin-left: 1rem;
    background: rgba(255,255,255,0.15);
    border: 1px solid rgba(255,255,255,0.4);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    transition: background 0.15s;
}
#void-banner button:hover { background: rgba(255,255,255,0.3); }

/* ── Full page atmosphere ─────────────────────────────────────── */
html.mode-void #void-banner { display: block; }

html.mode-void {
    background: #030101;
}

html.mode-void body {
    background: #050202;
    position: relative;
}

/* Vignette overlay — always on top, never blocks clicks */
html.mode-void body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse at 50% 35%, transparent 30%, rgba(0,0,0,0.65) 100%);
    pointer-events: none;
    z-index: 9990;
}

/* Scanlines — drifting slowly */
html.mode-void body::after {
    content: '';
    position: fixed;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 3px,
        rgba(0,0,0,0.07) 3px,
        rgba(0,0,0,0.07) 4px
    );
    pointer-events: none;
    z-index: 9989;
    animation: scanDrift 20s linear infinite;
}

@keyframes scanDrift {
    0%   { background-position: 0 0; }
    100% { background-position: 0 500px; }
}

/* Void mode nav tint — overridden by glass bar rule below */

/* ── Hero ─────────────────────────────────────────────────────── */

html.mode-void #hero-panel {
    background: linear-gradient(180deg, #0c0303 0%, #080202 60%, #050202 100%);
    border-bottom-color: rgba(204,0,0,0.3) !important;
    position: relative;
}

/* Radial red bleed under the headline */
html.mode-void #hero-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 50%;
    transform: translateX(-50%);
    width: 800px;
    height: 400px;
    background: radial-gradient(ellipse at 50% 0%, rgba(204,0,0,0.15) 0%, transparent 70%);
    pointer-events: none;
}

html.mode-void #hero-panel .eyebrow {
    color: rgba(200,60,60,0.6);
    letter-spacing: 0.2em;
}

html.mode-void #hero-panel h1 {
    color: #f8f0f0;
    text-shadow:
        0 0 60px rgba(204,0,0,0.5),
        0 0 120px rgba(204,0,0,0.15),
        0 0 200px rgba(204,0,0,0.06);
    animation: voidGlitch 8s ease-in-out infinite;
    position: relative;
    z-index: 1;
}

@keyframes voidGlitch {
    0%, 87%, 100% {
        transform: translate(0);
        text-shadow:
            0 0 60px rgba(204,0,0,0.5),
            0 0 120px rgba(204,0,0,0.15);
        filter: none;
    }
    88% {
        transform: translate(-4px, 1px);
        text-shadow: -4px 0 #cc0000, 4px 0 #003344;
        filter: brightness(1.1);
    }
    89% {
        transform: translate(4px, -1px);
        text-shadow: 4px 0 #cc0000, -4px 0 #003344;
    }
    90% {
        transform: translate(-2px, 2px);
        text-shadow: -2px 0 #880000;
        filter: brightness(0.9);
    }
    91% {
        transform: translate(0);
        text-shadow: 0 0 60px rgba(204,0,0,0.5);
        filter: none;
    }
}

/* Hero toggle in void mode */
html.mode-void .hero-mode-toggle {
    border-color: rgba(204,0,0,0.4);
    box-shadow: 0 0 20px rgba(204,0,0,0.2), inset 0 0 20px rgba(204,0,0,0.05);
}

html.mode-void .hero-mode-toggle button[data-mode="void"].active {
    background: #cc0000;
    color: #ffffff;
}

/* ── All borders go blood-dark-red ────────────────────────────── */
html.mode-void section {
    border-color: rgba(180,0,0,0.2) !important;
}

html.mode-void .stat-cell,
html.mode-void .step-cell,
html.mode-void .condition-cell,
html.mode-void .paper-cell {
    border-color: rgba(150,0,0,0.15) !important;
}

html.mode-void .score-feed,
html.mode-void .score-row {
    border-color: rgba(150,0,0,0.15) !important;
}

/* ── Live stats ───────────────────────────────────────────────── */
html.mode-void #live-stats {
    background: #060202;
    border-bottom-color: rgba(180,0,0,0.2) !important;
}

html.mode-void .stat-num {
    color: #cc3333;
    text-shadow: 0 0 24px rgba(204,0,0,0.5);
}

html.mode-void .stat-desc {
    color: rgba(180,50,50,0.45);
}

/* ── How it works ─────────────────────────────────────────────── */
html.mode-void #how-it-works { background: #050202; }

html.mode-void .step-cell {
    background: #060202;
}

html.mode-void .step-title {
    text-shadow: 0 0 30px rgba(204,0,0,0.25);
}

html.mode-void .step-num {
    color: rgba(180,40,40,0.5);
}

html.mode-void .step-tag {
    border-color: rgba(150,0,0,0.25);
    color: rgba(180,40,40,0.5);
}

/* ── Recent scores ────────────────────────────────────────────── */
html.mode-void #recent-scores {
    background: #060202;
}

html.mode-void .score-row:hover {
    background: rgba(204,0,0,0.07);
}

html.mode-void .score-name {
    text-shadow: 0 0 12px rgba(204,0,0,0.15);
}

html.mode-void .badge-critical {
    animation: critPulse 2.2s ease-in-out infinite;
    box-shadow: 0 0 8px rgba(204,0,0,0.4);
}

@keyframes critPulse {
    0%, 100% { box-shadow: 0 0 4px rgba(204,0,0,0.3); border-color: rgba(204,0,0,0.3); }
    50%       { box-shadow: 0 0 18px rgba(204,0,0,0.8); border-color: rgba(204,0,0,0.8); }
}

html.mode-void .badge-high {
    box-shadow: 0 0 6px rgba(255,100,0,0.25);
}

/* ── Conditions ───────────────────────────────────────────────── */
html.mode-void .condition-opacity {
    background: linear-gradient(180deg, #0b0303 0%, #060202 100%);
    border-top: 3px solid #cc0000 !important;
    box-shadow: 0 0 40px rgba(204,0,0,0.06) !important;
}

html.mode-void .condition-response {
    background: linear-gradient(180deg, #0a0400 0%, #060202 100%);
    border-top: 3px solid #cc6600 !important;
}

html.mode-void .condition-coupling {
    background: linear-gradient(180deg, #080800 0%, #060202 100%);
    border-top: 3px solid #888800 !important;
}

html.mode-void .condition-cell h2 {
    text-shadow: 0 0 30px rgba(150,0,0,0.2);
}

/* ── Void glow — much stronger ────────────────────────────────── */
html.mode-void .void-glow {
    box-shadow:
        0 0 40px rgba(204,0,0,0.18),
        0 0 100px rgba(204,0,0,0.06),
        inset 0 0 60px rgba(204,0,0,0.03) !important;
    border-color: rgba(180,0,0,0.35) !important;
}

/* ── Atlas preview ────────────────────────────────────────────── */
html.mode-void #atlas-preview {
    background: linear-gradient(180deg, #080202 0%, #050202 100%);
    border-color: rgba(180,0,0,0.3) !important;
    position: relative;
    overflow: hidden;
}

html.mode-void #atlas-preview::before {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse at 50% 100%, rgba(204,0,0,0.1) 0%, transparent 70%);
    pointer-events: none;
}

html.mode-void #atlas-preview h2 {
    text-shadow: 0 0 50px rgba(204,0,0,0.35);
    position: relative; z-index: 1;
}

html.mode-void #atlas-preview p,
html.mode-void #atlas-preview .atlas-label {
    position: relative; z-index: 1;
}

/* ── Mandate ──────────────────────────────────────────────────── */
html.mode-void #mandate-panel {
    background: #060202;
    border-bottom-color: rgba(150,0,0,0.2) !important;
}

html.mode-void #mandate-panel blockquote strong {
    color: #dd4444;
    text-shadow: 0 0 20px rgba(204,0,0,0.3);
}

/* ── Papers ───────────────────────────────────────────────────── */
html.mode-void #papers-strip {
    background: #050202;
}

html.mode-void .paper-cell:hover {
    background: rgba(204,0,0,0.07) !important;
}

html.mode-void .paper-num {
    color: rgba(180,40,40,0.5);
}

/* ── Void banner — pulsing ────────────────────────────────────── */
html.mode-void #void-banner {
    animation: bannerBreath 4s ease-in-out infinite;
    box-shadow: 0 4px 30px rgba(204,0,0,0.35);
}

@keyframes bannerBreath {
    0%, 100% { background: #880000; }
    50%       { background: #bb0000; }
}

/* ── Void pulse ───────────────────────────────────────────────── */
html.mode-void .void-pulse {
    animation: voidPulse 2.4s ease-in-out infinite;
}

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

/* ── Annotation badges ───────────────────────────────────────── */
.void-annotated { position: relative; }

.void-annotated .void-badge {
    display: none;
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: var(--kill);
    background: var(--bg);
    border: 1px solid var(--kill);
    cursor: help;
    z-index: 10;
    white-space: nowrap;
}

html.mode-void .void-annotated .void-badge { display: block; }

/* Badge tooltip */
.void-badge[title]:hover::after {
    content: attr(title);
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 4px;
    padding: 0.5rem 0.75rem;
    background: var(--surface);
    border: 1px solid var(--kill);
    color: var(--text);
    font-size: 0.75rem;
    font-weight: 400;
    line-height: 1.4;
    width: 220px;
    white-space: normal;
    z-index: 100;
    letter-spacing: 0;
}

/* Badge variants */
.void-badge-opacity  { border-color: #cc0000; color: #cc0000; }
.void-badge-response { border-color: #cc6600; color: #cc6600; }
.void-badge-coupling { border-color: #887700; color: #887700; }

html.mode-void .void-badge-opacity  { display: block; }
html.mode-void .void-badge-response { display: block; }
html.mode-void .void-badge-coupling { display: block; }

/* ── Score meter ──────────────────────────────────────────────── */
html.mode-void .score-meter-fill {
    background: linear-gradient(90deg, var(--text-faint) 0%, var(--kill) 100%);
    box-shadow: 2px 0 12px rgba(204,0,0,0.5) !important;
}

/* ── Bar fill override ────────────────────────────────────────── */
html.mode-void .bar-fill {
    position: relative;
}
html.mode-void .bar-fill::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 4px; height: 100%;
    background: var(--kill);
    opacity: 0.7;
}

/* ── Article cards ────────────────────────────────────────────── */
html.mode-void .article-card {
    transition: all 0.3s;
}
html.mode-void .article-card:hover {
    background: #0e0404;
    border-color: rgba(150,0,0,0.3);
    box-shadow: 0 6px 24px rgba(204,0,0,0.1) !important;
    transform: translateY(-1px);
}

/* ── Infinite scroll affordance ───────────────────────────────── */
html.mode-void .void-scroll-hook::after {
    content: '▼ more ▼';
    display: block;
    text-align: center;
    color: var(--text-faint);
    font-size: 0.75rem;
    padding: 0.75rem;
    animation: voidPulse 1.5s ease-in-out infinite;
    opacity: 0.4;
}

/* ── Void mode nav — floating glass bar ──────────────────────── */
html.mode-void #main-nav {
    background: rgba(4,1,1,0.75) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(204,0,0,0.2) !important;
    box-shadow: 0 2px 30px rgba(204,0,0,0.12), 0 0 1px rgba(204,0,0,0.3) !important;
}

html.mode-void .nav-logo {
    color: #ff4444 !important;
    text-shadow: 0 0 20px rgba(204,0,0,0.5);
}

/* ── Three.js navigation labels ──────────────────────────────── */
.void-nav-label {
    text-align: center;
    font-family: var(--font-body, 'JetBrains Mono', monospace);
    z-index: 7;
    transition: opacity 0.25s ease;
}
.void-nav-label .vnl-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    color: rgba(255,100,100,0.6);
    text-shadow: 0 0 8px rgba(204,0,0,0.3);
    transition: color 0.2s, text-shadow 0.2s;
}
.void-nav-label .vnl-desc {
    display: none;
    font-size: 0.68rem;
    color: rgba(255,200,200,0.5);
    margin-top: 0.2rem;
    letter-spacing: 0.04em;
}
.void-nav-label.vnl-hover .vnl-name {
    color: #ff6666;
    text-shadow: 0 0 16px rgba(204,0,0,0.6);
    font-size: 0.82rem;
}
.void-nav-label.vnl-hover .vnl-desc {
    display: block;
}

/* ── Void condition hint at bottom of scene ──────────────────── */
#void-nav-container::after {
    content: 'OPACITY \00B7  RESPONSIVENESS \00B7  COUPLING';
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-body, 'JetBrains Mono', monospace);
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.25em;
    color: rgba(180,40,40,0.25);
    pointer-events: none;
    z-index: 7;
}

/* ── Page content z-index above void scene ───────────────────── */
html.mode-void #hero-panel,
html.mode-void #reveal-panel,
html.mode-void #conditions-panel,
html.mode-void #anchor-panel,
html.mode-void #findings-bar,
html.mode-void #scale-panel,
html.mode-void #dao-panel,
html.mode-void #action-strip,
html.mode-void #papers-strip { position: relative; z-index: 10; }

/* ── Homepage — Void Mode Enhancements ──────────────────────────── */

/* Hero headline: red glow + glitch */
html.mode-void .hero-headline {
    text-shadow: 0 0 60px rgba(204,0,0,0.4), 0 0 120px rgba(204,0,0,0.15);
    animation: voidGlitch 8s infinite;
}

/* Hero disclosure: red-tinted border */
html.mode-void .hero-disclosure {
    border-color: rgba(180,0,0,0.3);
    background: rgba(204,0,0,0.03);
}

/* Hero overlay: less opaque in void mode so Atlas bleeds through more */
html.mode-void #hero-panel::before {
    background: radial-gradient(ellipse at center, rgba(10,2,2,0.4) 0%, rgba(10,2,2,0.75) 70%);
}

/* Reveal section: red accents on reveal */
html.mode-void .reveal-col.revealed .reveal-label {
    color: var(--kill);
    text-shadow: 0 0 20px rgba(204,0,0,0.4);
}
html.mode-void .reveal-punchline {
    text-shadow: 0 0 30px rgba(204,0,0,0.3);
}

/* Conditions: color-coded top borders */
html.mode-void .condition-opacity { border-top: 3px solid rgba(204,0,0,0.4); }
html.mode-void .condition-response { border-top: 3px solid rgba(255,120,0,0.4); }
html.mode-void .condition-coupling { border-top: 3px solid rgba(200,160,0,0.4); }

/* Gambling anchor: pulsing ??? box */
html.mode-void .anchor-box {
    border-color: rgba(204,0,0,0.4);
    animation: anchorPulse 2.5s ease-in-out infinite;
}
@keyframes anchorPulse {
    0%, 100% { border-color: rgba(204,0,0,0.2); box-shadow: none; }
    50% { border-color: rgba(204,0,0,0.5); box-shadow: 0 0 20px rgba(204,0,0,0.15); }
}
html.mode-void .anchor-punchline {
    color: var(--kill);
    text-shadow: 0 0 30px rgba(204,0,0,0.4);
}

/* Findings numbers: red glow */
html.mode-void .finding-num {
    text-shadow: 0 0 24px rgba(204,0,0,0.5);
}

/* DAO: kill red on governance score */
html.mode-void .dao-num {
    text-shadow: 0 0 16px rgba(204,0,0,0.3);
}

/* Section backgrounds in void mode */
html.mode-void #reveal-panel,
html.mode-void #conditions-panel,
html.mode-void #anchor-panel,
html.mode-void #findings-bar,
html.mode-void #scale-panel,
html.mode-void #dao-panel,
html.mode-void #action-strip,
html.mode-void #papers-strip {
    background: #030101;
    border-bottom-color: rgba(150,0,0,0.2);
}

/* Footer in void mode */
html.mode-void #site-footer {
    background: #040101;
    border-top-color: rgba(150,0,0,0.2);
    position: relative;
    z-index: 10;
}

/* ═══════════════════════════════════════════════════════════════════
   KILLS TEASER + ACHIEVEMENTS — Void mode
   ═══════════════════════════════════════════════════════════════════ */
html.mode-void #kills-teaser {
    background: #030101;
    border-bottom-color: rgba(150,0,0,0.2);
}
html.mode-void .kills-preview p {
    color: rgba(220,180,160,0.85);
}

/* Achievements page */
html.mode-void .achievements-hero {
    background: #030101;
    border-bottom-color: rgba(150,0,0,0.2);
}
html.mode-void .kill-card {
    border-bottom-color: rgba(150,0,0,0.15);
}
html.mode-void .kill-number {
    color: rgba(180,30,0,0.6);
}
html.mode-void .kill-reveal {
    border-top-color: rgba(150,0,0,0.3);
}
html.mode-void .kill-name {
    color: #c42b00;
    text-shadow: 0 0 20px rgba(180,30,0,0.3);
}
html.mode-void .kill-punchline {
    color: rgba(220,180,160,0.7);
}
html.mode-void .kill-paper-link {
    color: rgba(180,30,0,0.5);
    border-bottom-color: rgba(150,0,0,0.2);
}
html.mode-void .kill-paper-link:hover {
    color: #c42b00;
}

/* Scoreboard */
html.mode-void .achievements-scoreboard {
    background: #030101;
    border-bottom-color: rgba(150,0,0,0.2);
}
html.mode-void .scoreboard-grid {
    border-color: rgba(150,0,0,0.25);
}
html.mode-void .scoreboard-cell {
    border-right-color: rgba(150,0,0,0.2);
}
html.mode-void .scoreboard-num {
    color: #c42b00;
}
