/* -----------------------------------------------------------
   PROJECT $SLASH - PRIMARY STYLE PROTOCOL (Finalized & Independent)
   Aesthetic: Heavy Dark-Mode / 80s Urban Decay / Analog Glitch
   
   CONTINGENCY NOTE: This file is fully independent. 
   Section 2 (Artifacts) and Section 5 (Lore) use pure CSS/SVG-data 
   generation. No external graphical textures are required.
   ----------------------------------------------------------- */

/* 1. Global Variables & Reset */
:root {
    --pitch-black: #0a0a0a;
    --deep-charcoal: #1a1a1a;
    --grime-gray: #333333;
    --toxic-lime: #32CD32;    
    --lime-glow: #00FF00;     
    --industrial-cyan: #00FFFF; 
    --vapor-yellow: #FFD700;   
    --font-main: 'Courier New', Courier, monospace; 
    --font-heading: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif; 
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body, html {
    height: 100%; width: 100%;
    font-family: var(--font-main);
    background-color: var(--pitch-black);
    color: #cccccc;
    overflow-x: hidden; 
}

/* =========================================================
   2. Global Analog Artifacts (Dynamic Decay Implementation)
   Code-generated global noise, tracking distortion, and lightning.
   =========================================================
*/

/* STATIC NOISE: applied globally over all sections */
.vhs-static-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: var(--pitch-black);
    background-image: url('data:image/svg+xml,%3Csvg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"%3E%3Cfilter id="n"%3E%3CfeTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="3" stitchTiles="stitch"/%3E%3C/filter%3E%3Crect width="100" height="100" filter="url(%23n)" opacity="0.1"/%3E%3C/svg%3E');
    opacity: 0.05; 
    pointer-events: none;
    z-index: 1000; /* Must sit above everything else */
    transform: translate3d(0, 0, 0); 
}

/* TRACKING DISTORTION: applied *behind* main content, *above* static */
.vhs-distortion-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    
    /* Highly repetitive horizontal line noise (VHS scan lines) */
    background-image: repeating-linear-gradient(
        0deg,
        rgba(255,255,255,0.05) 0px,
        rgba(255,255,255,0.05) 1px,
        transparent 1px,
        transparent 3px
    );
    
    opacity: 0.03;
    pointer-events: none;
    z-index: 999; /* Sits just below static, above content for global effect */
    
    /* Apply horizontal shifting and slight opacity change (simulated bad signal) */
    animation: vhs-tracking 10s steps(100) infinite, lightning-flash 15s infinite;
}

.grime-layer {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at center, transparent 30%, var(--pitch-black) 90%),
                linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
                repeating-linear-gradient(transparent, transparent 2px, rgba(0,0,0,0.1) 2px, rgba(0,0,0,0.1) 4px);
    z-index: 1;
}

/* 3. Global Layout Components */
.container {
    max-width: 1200px; width: 100%;
    position: relative; z-index: 2; 
}

.mascot-display { flex: 1; display: flex; justify-content: center; align-items: center; }
.branding-display { flex: 1; text-align: left; }


/* =========================================================
   SECTION 1: THE LAIR (Hero Header)
   Your operational Hero styles are defined here.
   ========================================================= */
.slasher-lair {
    position: relative;
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 40px;
}

.hero-layout {
    display: flex; align-items: center; justify-content: space-between;
    gap: 60px;
}

.slasher-image {
    max-width: 100%; height: auto;
    filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)) drop-shadow(0 0 30px rgba(50, 205, 50, 0.1));
    /* The mascot mask glow intensifies randomly, synced to lightning pulses */
    animation: lightning-flash 15s infinite;
}

/* Ticker (Operational CSS - No complex changes needed) */
.ticker {
    font-family: var(--font-heading);
    font-size: 5rem;
    color: var(--lime-glow);
    text-transform: uppercase;
    letter-spacing: -1px;
    line-height: 1;
    margin-bottom: 10px;
    text-shadow: 0 0 3px rgba(50, 205, 50, 0.9), 0 0 7px rgba(50, 205, 50, 0.7), 0 0 10px var(--lime-glow);
    position: relative;
    user-select: none;
}

.token-name {
    font-size: 2rem; color: var(--industrial-cyan);
    font-family: var(--font-main); text-transform: uppercase;
    letter-spacing: 5px; opacity: 0.8; margin-bottom: 40px; padding-left: 5px;
}

.tagline {
    font-size: 1.5rem; font-style: italic; color: var(--vapor-yellow);
    max-width: 400px; border-left: 2px solid var(--toxic-lime);
    padding-left: 20px; margin-bottom: 60px; line-height: 1.4; opacity: 0.9;
}

.cta-container { margin-bottom: 50px; }

.cult-prompt {
    font-size: 0.9rem; color: #999;
    margin-bottom: 15px; text-transform: uppercase; letter-spacing: 2px;
}

.join-cult-link {
    display: inline-block; background-color: var(--toxic-lime); color: var(--pitch-black);
    padding: 15px 40px; text-decoration: none; font-weight: bold;
    text-transform: uppercase; letter-spacing: 1px; border: 2px solid transparent;
    transition: all 0.3s ease; cursor: pointer; font-size: 1.1rem;
    box-shadow: 0 0 20px rgba(50, 205, 50, 0.5);
}

.join-cult-link:hover {
    background-color: var(--pitch-black); color: var(--lime-glow);
    border-color: var(--lime-glow); box-shadow: 0 0 30px var(--lime-glow);
}

.meta-links { font-size: 0.85rem; color: #666; }
.vhs-link { text-decoration: none; color: #999; transition: color 0.3s ease; }
.vhs-link:hover { color: var(--industrial-cyan); text-shadow: 0 0 5px var(--industrial-cyan); }
.spacer { margin: 0 10px; }


/* =========================================================
   PROJECT $SLASH - EXPANSION STYLES (Phase 1B)
   Aesthetic: Cyan, Lime, Yellow (Blueprint 3)
   ========================================================= */

/* GLOBAL: Section Headings (Glitch Effect enforced) */
.section-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: var(--lime-glow);
    text-transform: uppercase;
    letter-spacing: -1px;
    margin-bottom: 30px;
    position: relative;
    user-select: none;
    text-shadow: 0 0 5px rgba(50, 205, 50, 0.8);
}

/* Specific Industrial Cyan Glitch variation for Lore */
.text-glitch-cyan { color: var(--industrial-cyan); text-shadow: 0 0 5px rgba(0, 255, 255, 0.8); }


/* SECTION 2: THE LEGEND (Lore) */
.slasher-legend {
    position: relative;
    min-height: 80vh; 
    padding: 100px 40px;
    border-top: 2px solid var(--grime-gray);
    border-bottom: 2px solid var(--grime-gray);
    display: flex; align-items: center;
    background-color: #050505; /* Pitch black core */
}

/* =========================================================
   CONTINGENCY UPDATE: PURE CSS LIGHT LEAK
   (Removes requirement for '../images/tattered_background.png')
   =========================================================
*/
.legend-content-container {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    
    background-image: 
        /* Standard darkness overlay */
        linear-gradient(to right, rgba(0,0,0,1) 40%, rgba(0,0,0,0.5) 100%),
        /* Simulated Neon Fissure Leak (Bottom Right) */
        radial-gradient(circle at 90% 90%, rgba(0, 255, 0, 0.15) 0%, transparent 60%);

    background-size: cover;
    background-position: center;
    opacity: 1.0; 
    z-index: 1; /* Below text overlay sits within .text-block container */
}

/* LEGEND Text Overlay sits on top of the simulated leak */
.slasher-legend .text-block {
    position: relative;
    z-index: 3; /* Must sit above simulated background layer */
    max-width: 600px;
    margin-left: 100px; /* Offset to align with hero content */
}

.legend-body {
    font-family: var(--font-main); /* Courier New */
    font-size: 1.1rem;
    color: #aaaaaa;
    line-height: 1.8;
}

.legend-body p {
    margin-bottom: 25px;
}

.legend-callout {
    font-size: 1.3rem;
    font-style: italic;
    color: var(--vapor-yellow);
    margin-top: 50px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}


/* SECTION 3: THE PACT (Supply Philosophy) */
.slasher-pact {
    min-height: 70vh;
    padding: 100px 40px;
    display: flex;
    align-items: center;
    background-color: var(--deep-charcoal); 
}

.pact-layout {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 60px;
}

.pact-visual { flex: 1; display: flex; justify-content: center; }

/* Gritty stylized visualizer for scarcity (zero utility) */
.scarcity-block {
    border: 3px solid var(--toxic-lime);
    padding: 50px;
    text-align: center;
    background-color: var(--pitch-black);
    box-shadow: 0 0 30px rgba(50, 205, 50, 0.3);
    position: relative;
}

.lock-icon {
    display: block;
    font-family: var(--font-heading);
    font-size: 8rem;
    color: var(--toxic-lime);
    margin-bottom: 30px;
    line-height: 1;
}

.data-point {
    font-family: var(--font-main);
    font-size: 0.9rem;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}


/* =========================================================
   7. Responsiveness
   Updates for expanded sections and consolidated semantics.
   ========================================================= */

@media (max-width: 992px) {
    .ticker { font-size: 6rem; }
    .hero-layout { gap: 30px; }
    .section-title { font-size: 2.5rem; }
    
    /* Adapt legend background for smaller screens */
    .legend-content-container { background-position: left; opacity: 0.15; }
    .slasher-legend .text-block { margin-left: 40px; }
    
    /* Pact adaptive layout */
    .pact-layout { flex-direction: column; text-align: center; }
    .pact-visual { width: 100%; max-width: 400px; margin-top: 50px; }
    .branding-display { text-align: center; } /* Ensure text centers in column layout */
}

@media (max-width: 768px) {
    .hero-layout {
        flex-direction: column-reverse; /* Mascot last on mobile */
        text-align: center;
        padding-top: 50px;
    }
    
    .ticker { font-size: 5rem; }
    .meta-links, .branding-display, .slasher-legend .text-block { text-align: center; }
    
    .tagline {
        margin: 0 auto 50px auto;
        border-left: none; border-bottom: 2px solid var(--toxic-lime);
        padding-left: 0; padding-bottom: 15px;
    }
    
    /* Legend adaptive layout */
    .slasher-legend .text-block { margin-left: 0; text-align: center; padding-top: 20px; }
    .section-title { font-size: 2rem; }
}

/* DESKTOP LEGISLATION OPTIMIZATION (min-width: 769px)
   Addresses the "too thick" issues. Verified operational. */
@media (min-width: 769px) {
    .ticker {
        font-family: 'Arial Narrow Bold', Impact, sans-serif;
        font-size: 7rem; 
        letter-spacing: 0px; 
        text-shadow: 0 0 2px rgba(50, 205, 50, 1), 0 0 5px rgba(50, 205, 50, 0.6);
        margin-bottom: 5px;
    }
}


/* =========================================================
   ANIMATION Keyframes & Atmoshere Enforcement
   Strict visual aesthetic implementation (Blueprint 3)
   ========================================================= */

@keyframes text-glitch {
    0% { text-shadow: 0.5px 0 0 var(--toxic-lime), -0.5px 0 0 var(--industrial-cyan), 0 0 5px rgba(50, 205, 50, 0.8); }
    25% { text-shadow: 2px 0 0 var(--industrial-cyan), -2px 0 0 var(--toxic-lime), 0 0 10px rgba(50, 205, 50, 1); transform: translate(1px, 1px); }
    75% { text-shadow: -2px 0 0 var(--industrial-cyan), 2px 0 0 var(--toxic-lime), 0 0 10px rgba(50, 205, 50, 1); transform: translate(-1px, -1px); }
    100% { text-shadow: 0.5px 0 0 var(--toxic-lime), -0.5px 0 0 var(--industrial-cyan), 0 0 5px rgba(50, 205, 50, 0.8); transform: translate(0, 0); }
}

/* Simulated bad tracking by rapid horizontal jitter and opacity flutter */
@keyframes vhs-tracking {
    0% { transform: translate3d(0,0,0); opacity: 0.03; }
    1% { transform: translate3d(2px, 0.5px, 0); opacity: 0.05; }
    2% { transform: translate3d(-1px, 0, 0); opacity: 0.03; }
    3% { transform: translate3d(0,0,0); opacity: 0.03; }
    98% { transform: translate3d(0,0,0); opacity: 0.03; }
    99% { transform: translate3d(-3px, -0.5px, 0); opacity: 0.05; }
    100% { transform: translate3d(0,0,0); opacity: 0.03; }
}

/* Standard randomized visual 'pulse' or lighting flash pattern */
@keyframes lightning-flash {
    0% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)); opacity: 1; }
    /* Long stable dark period (simulating tension) */
    89% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)); opacity: 1; }
    /* The Flash Sequence */
    90% { filter: drop-shadow(0 0 40px rgba(0, 255, 255, 1)) drop-shadow(0 0 80px rgba(50, 205, 50, 0.8)); opacity: 0.3; }
    91% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)); opacity: 1; }
    92% { filter: drop-shadow(0 0 40px rgba(0, 255, 255, 1)) drop-shadow(0 0 80px rgba(50, 205, 50, 0.8)); opacity: 0.3; }
    93% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)); opacity: 1; }
    100% { filter: drop-shadow(0 0 15px rgba(0, 255, 255, 0.2)); opacity: 1; }
}

.glitch-text {
    position: relative;
    user-select: none; /* Required for glitch stability */
}