/* ============================================================
   VFX-EXTREME.CSS — INSANE VISUAL LAYER
   An additional dark horror dimension overlay
   ============================================================ */

/* ===== 1. CHROMATIC ABERRATION ON SCROLL ===== */
body.scrolling {
    animation: chromaticPulse 0.3s ease;
}
@keyframes chromaticPulse {
    0% { filter: none; }
    50% { filter: drop-shadow(2px 0 0 rgba(255,0,0,0.15)) drop-shadow(-2px 0 0 rgba(0,100,255,0.15)); }
    100% { filter: none; }
}

/* ===== 2. BLOOD DRIP EFFECT AT TOP OF PAGE ===== */
#blood-drips {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 9990;
    pointer-events: none;
    overflow: hidden;
}
.blood-drip {
    position: absolute;
    top: 0;
    width: 3px;
    background: linear-gradient(to bottom, rgba(139,26,26,0.6), rgba(139,26,26,0.1), transparent);
    border-radius: 0 0 2px 2px;
    animation: drip var(--drip-duration) ease-in var(--drip-delay) infinite;
}
@keyframes drip {
    0% { height: 0; opacity: 0; }
    10% { opacity: 0.7; }
    70% { height: var(--drip-height); opacity: 0.5; }
    100% { height: var(--drip-height); opacity: 0; }
}

/* ===== 3. NOISE TEXTURE OVERLAY ===== */
#noise-overlay {
    position: fixed;
    inset: 0;
    z-index: 9991;
    pointer-events: none;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    mix-blend-mode: overlay;
    animation: noiseShift 0.1s steps(3) infinite;
}
@keyframes noiseShift {
    0% { transform: translate(0, 0); }
    33% { transform: translate(-5px, -3px); }
    66% { transform: translate(3px, 5px); }
    100% { transform: translate(-2px, -5px); }
}

/* ===== 4. HEARTBEAT BORDER ON SECTIONS ===== */
.jimmy-apparition {
    box-shadow: inset 0 0 0 1px rgba(139,26,26,0);
    animation: heartbeatBorder 3s ease-in-out infinite;
}
@keyframes heartbeatBorder {
    0%, 100% { box-shadow: inset 0 0 0 1px rgba(139,26,26,0); }
    15% { box-shadow: inset 0 0 30px rgba(139,26,26,0.15); }
    20% { box-shadow: inset 0 0 0 1px rgba(139,26,26,0); }
    30% { box-shadow: inset 0 0 20px rgba(139,26,26,0.1); }
    35% { box-shadow: inset 0 0 0 1px rgba(139,26,26,0); }
}

/* ===== 5. FLOATING RUNES/SYMBOLS ===== */
.floating-rune {
    position: fixed;
    font-size: 14px;
    color: rgba(139,26,26,0.08);
    pointer-events: none;
    z-index: 3;
    font-family: serif;
    animation: runeFloat var(--rune-duration) linear infinite;
    text-shadow: 0 0 5px rgba(139,26,26,0.1);
}
@keyframes runeFloat {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 0.08; }
    90% { opacity: 0.08; }
    100% { transform: translateY(-20vh) rotate(360deg); opacity: 0; }
}

/* ===== 6. TEXT SHADOW BREATHING ON ALL TITLES ===== */
.chapter-title, .hero-title, .home-title {
    animation: titleShadowBreath 5s ease-in-out infinite;
}
@keyframes titleShadowBreath {
    0%, 100% { text-shadow: 0 0 20px rgba(139,26,26,0.3), 0 4px 30px rgba(0,0,0,0.7); }
    50% { text-shadow: 0 0 40px rgba(139,26,26,0.5), 0 0 80px rgba(139,26,26,0.2), 0 4px 30px rgba(0,0,0,0.7); }
}

/* ===== 7. DRAMATIC TEXT GLOW PULSE ===== */
.dramatic {
    animation: dramaticGlow 4s ease-in-out infinite;
}
@keyframes dramaticGlow {
    0%, 100% { text-shadow: 0 0 15px rgba(139,26,26,0.15); }
    50% { text-shadow: 0 0 30px rgba(139,26,26,0.3), 0 0 60px rgba(139,26,26,0.1); }
}

/* ===== 8. INVOCATION WORD INTENSE FLICKER ===== */
.invocation-word {
    animation: invocationFlicker 0.1s steps(2) infinite, invocationBreath 4s ease-in-out infinite;
}
@keyframes invocationFlicker {
    0% { opacity: 1; }
    50% { opacity: 0.92; }
}
@keyframes invocationBreath {
    0%, 100% { text-shadow: 0 0 8px rgba(139,26,26,0.2); }
    50% { text-shadow: 0 0 20px rgba(139,26,26,0.4), 0 0 40px rgba(139,26,26,0.15); }
}

/* ===== 9. MOUSE LIGHT EFFECT ===== */
#mouse-light {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(139,26,26,0.04) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 4;
    transition: left 0.1s, top 0.1s;
    mix-blend-mode: screen;
}
