/* ==========================================================================
   THE BLOODWEB SACRIFICE - VISCERAL RED & BLACK THEME (ULTRA PREMIUM)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Crimson+Pro:ital,wght@0,300;0,700;1,400&family=Teko:wght@500;700&family=Nosifer&display=swap');

:root {
    /* The Carnage Palette - Enhanced for Maximum Depth & Legibility */
    --pitch-black: #000000;
    --void-black: #050303;
    --coagulated-blood: #170000;
    --dried-blood: #3a0000;
    --fresh-blood: #8a0000;
    --pulsing-red: #c70000;
    --arterial-spray: #ff0505;
    
    /* Text Colors - High Contrast for Readability */
    --flesh-pale: #e8d0d0;
    --bone-white: #ffffff;
    --muted-bone: #b8a5a5;
    
    /* Typography */
    --font-title: 'Nosifer', display;
    --font-ui: 'Teko', sans-serif;
    --font-journal: 'Crimson Pro', serif;

    /* Premium Easing */
    --smooth-curve: cubic-bezier(0.25, 1, 0.3, 1);
}

/* ==========================================================================
   GLOBAL RESET & THE VOID
   ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    cursor: crosshair;
}

::selection {
    background: var(--arterial-spray);
    color: var(--pitch-black);
    text-shadow: none;
}

::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--pitch-black);
}
::-webkit-scrollbar-thumb {
    background: var(--dried-blood);
    border-radius: 3px;
    transition: background 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--pulsing-red);
}

body, html {
    width: 100%;
    max-width: 100vw; /* Prevents horizontal scroll */
    min-height: 100%;
    background-color: transparent; 
    color: var(--bone-white);
    overflow-x: hidden;
    font-family: var(--font-journal);
    scroll-behavior: smooth;
}

/* The Blood Pool Overlay - Deep, Symmetrical Vignette */
body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 150vw;
    height: 150vh;
    background: radial-gradient(
        ellipse at center, 
        transparent 10%, 
        var(--void-black) 60%,
        var(--pitch-black) 100%
    );
    pointer-events: none;
    z-index: 1;
    box-shadow: inset 0 0 150px rgba(138, 0, 0, 0.15);
    animation: ambientVignettePulse 6s infinite ease-in-out;
}

/* Premium Asylum Wall Texture - Extremely Subtle */
body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        repeating-linear-gradient(
            45deg, 
            rgba(58, 0, 0, 0.05) 0px, 
            transparent 1px, 
            transparent 4px
        );
    opacity: 0.6;
    pointer-events: none;
    z-index: 0;
}

.content-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    /* Fluid padding that adjusts to screen size */
    padding: 0 clamp(15px, 4vw, 20px) 100px;
    width: 100%;
}

/* ==========================================================================
   NAVIGATION - FLUID, WRAPPING, AND STICKY (NO OVERLAP)
   ========================================================================== */
.navbar {
    width: 100%;
    min-height: 70px;
    height: auto; /* Allows the navbar to grow if links wrap */
    padding: 10px 15px;
    
    /* MAGIC FIX: Sticky keeps it pinned to the top, but it pushes content down automatically! */
    position: sticky; 
    top: 0;
    left: 0;
    
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.98) 0%, rgba(15, 0, 0, 0.90) 100%);
    border-bottom: 2px solid var(--dried-blood);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    animation: organicHeartbeatBorder 4s infinite var(--smooth-curve);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
}

.nav-links {
    display: flex;
    /* Tighter gap on mobile to fit more items, stretches on desktop */
    gap: clamp(10px, 2vw, 40px); 
    
    /* MAGIC FIX: Allows items to wrap to a new line on small screens */
    flex-wrap: wrap; 
    
    list-style: none;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    padding: 0;
    width: 100%;
}

.navbar li a {
    font-family: var(--font-ui);
    font-size: clamp(0.9rem, 2.5vw, 1.5rem); /* Scales down on mobile to fit */
    font-weight: 700;
    letter-spacing: clamp(1px, 1.5vw, 3px);
    color: var(--muted-bone);
    text-decoration: none;
    text-transform: uppercase;
    position: relative;
    padding: clamp(5px, 1vw, 8px) clamp(8px, 1.5vw, 15px);
    transition: all 0.3s var(--smooth-curve);
    white-space: nowrap;
}

/* Elegant Blood Slash on Hover */
.navbar li a::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--arterial-spray);
    transform: translate(-50%, -50%) rotate(-3deg);
    transition: width 0.4s var(--smooth-curve);
    box-shadow: 0 0 10px var(--arterial-spray);
    z-index: 2;
    opacity: 0;
}

.navbar li a:hover {
    color: var(--bone-white);
    text-shadow: 0 0 15px rgba(255, 5, 5, 0.7);
}

.navbar li a:hover::before {
    width: 100%;
    opacity: 1;
}

/* ==========================================================================
   THE SACRIFICIAL ALTAR (HERO SECTION)
   ========================================================================== */
h1 {
    font-family: var(--font-title);
    font-size: clamp(2.8rem, 8vw, 6rem);
    text-align: center;
    /* Since navbar is now sticky, we need less margin-top to separate it */
    margin-top: clamp(40px, 10vh, 120px); 
    margin-bottom: 10px;
    color: var(--arterial-spray);
    text-transform: uppercase;
    letter-spacing: clamp(2px, 2vw, 6px);
    line-height: 1.2;
    width: 100%;
    
    /* Visceral Depth without blinding the user */
    text-shadow: 
        0px 2px 4px var(--pitch-black),
        0px 8px 15px var(--dried-blood),
        0px 20px 35px rgba(138, 0, 0, 0.5);
        
    animation: ominousDrift 6s infinite alternate ease-in-out;
}

.tagline {
    font-family: var(--font-ui);
    font-size: clamp(1.2rem, 3.5vw, 2.5rem);
    color: var(--pulsing-red);
    text-align: center;
    text-transform: uppercase;
    letter-spacing: clamp(4px, 3vw, 12px);
    margin-top: 0;
    margin-bottom: clamp(40px, 8vw, 80px);
    opacity: 0.8;
    width: 100%;
    text-shadow: 2px 2px 4px var(--pitch-black), 0 0 15px rgba(200, 0, 0, 0.4);
}

/* Premium Survivor's Journal Entries */
p {
    font-family: var(--font-journal);
    font-size: clamp(1.1rem, 2.5vw, 1.4rem);
    line-height: 1.8;
    color: var(--bone-white);
    max-width: 800px;
    width: 100%;
    margin: clamp(20px, 4vw, 40px) auto;
    padding: clamp(25px, 6vw, 40px) clamp(25px, 6vw, 50px);
    background: rgba(10, 0, 0, 0.6);
    border: 1px solid rgba(58, 0, 0, 0.5);
    border-left: 4px solid var(--dried-blood);
    border-radius: 2px;
    position: relative;
    box-shadow: inset 0 0 30px rgba(0,0,0,0.8), 0 10px 30px rgba(0,0,0,0.9);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Organic Heartbeat on the Left Border */
    animation: organicHeartbeatBorderLeft 4s infinite var(--smooth-curve);
    text-align: center;
}

p::before {
    content: '“';
    position: absolute;
    top: -15px;
    left: clamp(10px, 3vw, 20px);
    font-family: var(--font-title);
    font-size: clamp(3rem, 6vw, 4rem);
    color: var(--fresh-blood);
    opacity: 0.15;
    line-height: 1;
}

/* ==========================================================================
   BLOODWEB NODES (INFO CARDS) - RESPONSIVE AUTO-GRID
   ========================================================================== */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr));
    gap: clamp(30px, 5vw, 50px);
    max-width: 1200px;
    width: 100%;
    margin: clamp(40px, 8vw, 60px) auto;
    position: relative;
    justify-content: center;
}

.info-card {
    background: linear-gradient(145deg, rgba(15, 0, 0, 0.9) 0%, rgba(5, 0, 0, 0.95) 100%);
    border: 1px solid var(--dried-blood);
    border-radius: 4px;
    padding: clamp(35px, 6vw, 50px) clamp(25px, 5vw, 40px);
    position: relative;
    transition: all 0.4s var(--smooth-curve);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    
    /* Subtle heartbeat applied to the whole card border */
    animation: organicHeartbeatCard 4s infinite var(--smooth-curve);
}

.info-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(138, 0, 0, 0.05) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.info-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--arterial-spray);
    box-shadow: 
        0 25px 50px rgba(0, 0, 0, 0.9),
        0 0 30px rgba(200, 0, 0, 0.15),
        inset 0 0 20px rgba(200, 0, 0, 0.1);
    animation: none; /* Stops blinking on focus/hover */
    z-index: 5;
}

.info-card:hover::before {
    opacity: 1;
}

.info-card h2 {
    font-family: var(--font-ui);
    font-size: clamp(2rem, 5vw, 2.5rem);
    color: var(--arterial-spray);
    letter-spacing: 4px;
    text-transform: uppercase;
    margin-bottom: 25px;
    position: relative;
    width: 100%;
    text-shadow: 0 2px 10px rgba(255, 5, 5, 0.3);
}

/* Premium Underline for Card Titles */
.info-card h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 2px;
    background: var(--pulsing-red);
    transition: width 0.4s var(--smooth-curve);
}

.info-card:hover h2::after {
    width: 80%;
    background: var(--arterial-spray);
    box-shadow: 0 0 10px var(--arterial-spray);
}

.info-card p {
    font-family: var(--font-journal);
    font-size: clamp(1.1rem, 2.5vw, 1.25rem);
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    margin: 0;
    color: var(--muted-bone);
    text-align: center;
    animation: none;
}

.info-card p strong {
    color: var(--bone-white);
    font-weight: 700;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.4);
}

/* ==========================================================================
   THE ENDGAME COLLAPSE (FOOTER / DISCLAIMER)
   ========================================================================== */
.entity-quote {
    text-align: center;
    margin: clamp(60px, 10vw, 100px) auto clamp(30px, 5vw, 40px);
    border-top: 1px solid var(--dried-blood);
    border-bottom: 1px solid var(--dried-blood);
    padding: clamp(40px, 8vw, 60px) clamp(15px, 4vw, 30px);
    width: 100%;
    max-width: 800px;
    background: linear-gradient(
        to right,
        transparent 0%,
        rgba(23, 0, 0, 0.4) 50%,
        transparent 100%
    );
    animation: organicHeartbeatQuote 4s infinite var(--smooth-curve);
}

.entity-quote p {
    font-family: var(--font-title);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--pulsing-red);
    border: none;
    background: none;
    box-shadow: none;
    margin: 0;
    padding: 0;
    text-shadow: 0 0 15px rgba(200, 0, 0, 0.4);
    letter-spacing: 2px;
}

.disclaimer p {
    font-family: var(--font-ui);
    color: var(--bone-white); /* Changed to bright white for visibility */
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    font-weight: bold;
    text-align: center;
    border: none;
    background: transparent;
    box-shadow: none;
    letter-spacing: 2px;
    text-transform: uppercase;
    animation: none;
    
    /* Highly visible shiny neon glow to pierce through dark background gifs */
    text-shadow: 
        0 0 5px var(--arterial-spray), 
        0 0 15px var(--arterial-spray), 
        0 0 25px var(--pulsing-red);
}

/* ==========================================================================
   BACKGROUND MEDIA
   ========================================================================== */
.bg-gif {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    z-index: -1;
    pointer-events: none;
}

/* ==========================================================================
   ORGANIC HEARTBEAT KEYFRAMES (LUB-DUB... PAUSE)
   (Untouched - Retaining original timing and aesthetic)
   ========================================================================== */

@keyframes organicHeartbeatBorder {
    0%, 100% { border-bottom-color: var(--dried-blood); box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
    10% { border-bottom-color: var(--arterial-spray); box-shadow: 0 8px 30px rgba(255, 5, 5, 0.4); }
    20% { border-bottom-color: var(--dried-blood); box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
    30% { border-bottom-color: var(--pulsing-red); box-shadow: 0 8px 28px rgba(200, 0, 0, 0.3); }
    40%, 95% { border-bottom-color: var(--dried-blood); box-shadow: 0 8px 25px rgba(0,0,0,0.5); }
}

@keyframes organicHeartbeatBorderLeft {
    0%, 100% { border-left-color: var(--dried-blood); }
    10% { border-left-color: var(--arterial-spray); box-shadow: inset 20px 0 30px -20px rgba(255, 5, 5, 0.3); }
    20% { border-left-color: var(--dried-blood); box-shadow: none; }
    30% { border-left-color: var(--pulsing-red); box-shadow: inset 15px 0 25px -15px rgba(200, 0, 0, 0.2); }
    40%, 95% { border-left-color: var(--dried-blood); box-shadow: none; }
}

@keyframes organicHeartbeatCard {
    0%, 100% { border-color: var(--dried-blood); box-shadow: 0 15px 35px rgba(0,0,0,0.8); }
    10% { border-color: var(--arterial-spray); box-shadow: 0 15px 40px rgba(200, 0, 0, 0.3), inset 0 0 10px rgba(200, 0, 0, 0.1); }
    20% { border-color: var(--dried-blood); box-shadow: 0 15px 35px rgba(0,0,0,0.8); }
    30% { border-color: var(--pulsing-red); box-shadow: 0 15px 38px rgba(150, 0, 0, 0.2); }
    40%, 95% { border-color: var(--dried-blood); box-shadow: 0 15px 35px rgba(0,0,0,0.8); }
}

@keyframes organicHeartbeatQuote {
    0%, 100% { border-top-color: var(--dried-blood); border-bottom-color: var(--dried-blood); }
    10% { border-top-color: var(--arterial-spray); border-bottom-color: var(--arterial-spray); }
    20% { border-top-color: var(--dried-blood); border-bottom-color: var(--dried-blood); }
    30% { border-top-color: var(--pulsing-red); border-bottom-color: var(--pulsing-red); }
    40%, 95% { border-top-color: var(--dried-blood); border-bottom-color: var(--dried-blood); }
}

@keyframes ambientVignettePulse {
    0%, 100% { box-shadow: inset 0 0 100px rgba(30, 0, 0, 0.8); }
    50% { box-shadow: inset 0 0 180px rgba(100, 0, 0, 0.3); }
}

@keyframes ominousDrift {
    0% { transform: translateY(0); text-shadow: 0px 2px 4px var(--pitch-black), 0px 8px 15px var(--dried-blood), 0px 20px 35px rgba(138, 0, 0, 0.5); }
    100% { transform: translateY(3px); text-shadow: 0px -2px 4px var(--pitch-black), 0px 12px 20px var(--dried-blood), 0px 30px 45px rgba(180, 0, 0, 0.6); }
}