html,
body {
    margin: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: black;
    font-family: "Courier New", monospace;
}

/* ============================= */
/* HOME PAGE */
/* ============================= */

.hero {
    width: 100vw;
    height: 100vh;

    background-image: url("main_placeholder.JPG");
    background-size: 88%;
    background-position: center 15%;
    background-repeat: no-repeat;

    position: relative;
    overflow: hidden;

    filter:
        brightness(1.15)
        contrast(1.45)
        saturate(0.8);

    animation:
        slowZoom 24s ease-in-out infinite alternate;
}

/* ============================= */
/* GLOBAL BLOOD NUMBER COUNTER */
/* ============================= */

.blood-counter {
    position: fixed;
    top: 24px;
    left: 28px;

    z-index: 60;

    color: #3a0000;

    font-family: "Courier New", monospace;
    font-size: 58px;
    font-weight: bold;
    letter-spacing: -5px;

    line-height: 1;

    user-select: none;
    pointer-events: none;

    text-shadow:
        1px 1px 0 #140000,
        2px 2px 0 #080000,
        0 0 6px rgba(120, 0, 0, 0.95),
        0 0 18px rgba(75, 0, 0, 0.85),
        0 0 34px rgba(35, 0, 0, 1);

    filter:
        contrast(1.5)
        saturate(1.35);
}

.blood-counter::after {
    content: "";

    position: absolute;
    left: 10px;
    top: 48px;

    width: 8px;
    height: 28px;

    background:
        linear-gradient(
            to bottom,
            rgba(85, 0, 0, 0.95),
            rgba(18, 0, 0, 0)
        );

    border-radius: 999px;

    box-shadow:
        16px -8px 0 rgba(70, 0, 0, 0.72),
        34px 3px 0 rgba(45, 0, 0, 0.58);

    pointer-events: none;
}

.blood-pop {
    animation: bloodPop 0.22s steps(2);
}

/* ============================= */
/* FLOATING MENU */
/* ============================= */

.reef-menu {
    position: absolute;
    right: 38px;
    top: 50%;

    transform: translateY(-50%);

    z-index: 30;

    display: flex;
    flex-direction: column;
    gap: 12px;

    padding: 18px 16px;

    background: rgba(0, 0, 0, 0.32);

    border: 1px solid rgba(255, 255, 255, 0.45);

    box-shadow:
        0 0 16px rgba(255, 255, 255, 0.18),
        inset 0 0 18px rgba(255, 255, 255, 0.08);

    backdrop-filter: blur(3px);

    animation:
        menuFloat 4s ease-in-out infinite,
        menuGlow 2.8s ease-in-out infinite;
}

.reef-menu a {
    color: white;

    font-family: "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: lowercase;

    text-decoration: none;

    opacity: 0.72;

    text-shadow:
        0 0 6px rgba(255,255,255,0.85),
        0 0 14px rgba(255,255,255,0.35);

    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        letter-spacing 0.2s ease,
        text-shadow 0.2s ease;
}

.reef-menu a::before {
    content: "✦ ";
    opacity: 0.55;
}

.reef-menu a:hover {
    opacity: 1;

    transform: translateX(-6px);

    letter-spacing: 3px;

    text-shadow:
        0 0 8px white,
        0 0 18px white,
        0 0 32px rgba(255,255,255,0.8);
}

/* ============================= */
/* SHARED TEXTURES */
/* ============================= */

.halftone {
    position: absolute;

    width: 100%;
    height: 100%;

    z-index: 3;
    pointer-events: none;

    opacity: 0.24;

    background-image:
        radial-gradient(
            circle,
            rgba(0,0,0,0.8) 1px,
            transparent 1.6px
        );

    background-size: 6px 6px;

    mix-blend-mode: multiply;
}

.grain {
    position: absolute;

    top: -50%;
    left: -50%;

    width: 200%;
    height: 200%;

    z-index: 4;
    pointer-events: none;

    opacity: 0.10;

    background-image:
        radial-gradient(
            circle,
            rgba(255,255,255,0.25) 1px,
            transparent 1px
        );

    background-size: 2px 2px;

    mix-blend-mode: screen;

    animation: none;
}

.scanlines {
    position: absolute;

    width: 100%;
    height: 100%;

    z-index: 5;
    pointer-events: none;

    opacity: 0.10;

    background-image:
        linear-gradient(
            to bottom,
            transparent 50%,
            rgba(255,255,255,0.06) 50%
        );

    background-size: 100% 3px;

    animation: none;
}

.hero::after,
.video-page::after {
    content: "";

    position: fixed;
    inset: 0;

    background:
        radial-gradient(
            circle,
            transparent 35%,
            rgba(0,0,0,0.65) 100%
        );

    pointer-events: none;
    z-index: 6;
}

/* ============================= */
/* VIDEO PAGE */
/* ============================= */

.video-page {
    margin: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    background: black;

    font-family: "Courier New", monospace;
}

.page-video {
    position: fixed;
    inset: 0;

    width: 100%;
    height: 100%;

    object-fit: cover;

    z-index: 1;

    filter:
        brightness(1.08)
        contrast(1.25)
        saturate(0.82);
}

.video-overlay {
    position: fixed;
    inset: 0;

    z-index: 2;

    pointer-events: none;
}

/* ============================= */
/* RETRO HEADPHONES SOUND TOGGLE */
/* ============================= */

.music-button {
    position: fixed;
    left: 50%;
    bottom: 8%;

    transform: translateX(-50%);

    z-index: 20;

    width: 74px;
    height: 74px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: transparent;
    border: none;
    outline: none;

    color: white;

    cursor: pointer;

    transition:
        color 0.15s steps(1),
        filter 0.15s steps(1),
        transform 0.15s steps(1);
}

.headphones-icon {
    width: 62px;
    height: 62px;

    fill: none;
    stroke: currentColor;
    stroke-width: 3.2;
    stroke-linecap: square;
    stroke-linejoin: miter;

    filter:
        drop-shadow(2px 0 0 black)
        drop-shadow(-2px 0 0 black)
        drop-shadow(0 2px 0 black)
        drop-shadow(0 -2px 0 black);
}

.music-button:hover {
    transform:
        translateX(-50%)
        translateY(-2px);

    filter: brightness(1.25);
}

/* OFF FRAME */
.music-button.muted {
    color: rgb(255, 55, 55);
}

.music-button.muted .headphones-icon {
    opacity: 0.78;
}

/* ON FRAME */
.music-button.unmuted {
    color: rgb(65, 255, 105);
}

.music-button.unmuted .headphones-icon {
    opacity: 1;

    filter:
        drop-shadow(2px 0 0 black)
        drop-shadow(-2px 0 0 black)
        drop-shadow(0 2px 0 black)
        drop-shadow(0 -2px 0 black)
        drop-shadow(0 0 6px currentColor);
}

/* ============================= */
/* BACK LINK */
/* ============================= */

.back-link {
    position: fixed;
    top: 28px;
    left: 28px;

    z-index: 20;

    color: white;
    text-decoration: none;

    font-size: 15px;
    letter-spacing: 1px;

    opacity: 0.65;

    text-shadow:
        0 0 8px rgba(255,255,255,0.75),
        0 0 18px rgba(255,255,255,0.35);

    transition:
        opacity 0.25s ease,
        letter-spacing 0.25s ease;
}

.back-link:hover {
    opacity: 1;
    letter-spacing: 2px;
}

/* ============================= */
/* GALLERY PAGE */
/* ============================= */

.gallery-page {
    margin: 0;

    width: 100vw;
    height: 100vh;

    overflow: hidden;

    background:
        radial-gradient(
            circle,
            rgba(34, 34, 34, 1) 0%,
            rgba(0, 0, 0, 1) 72%
        );

    font-family: "Courier New", monospace;
}

.gallery-frame {
    position: fixed;
    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    width: min(76vw, 980px);
    height: min(72vh, 680px);

    overflow: hidden;

    background: black;

    border: 1px solid rgba(255, 255, 255, 0.55);

    box-shadow:
        4px 4px 0 rgba(255,255,255,0.25),
        0 0 22px rgba(255, 255, 255, 0.16),
        inset 0 0 40px rgba(0, 0, 0, 0.85);
}

.gallery-still {
    width: 100%;
    height: 100%;

    object-fit: contain;

    opacity: 0;

    filter:
        brightness(1.08)
        contrast(1.25)
        saturate(0.85);

    transition:
        opacity 0.35s ease;
}

.gallery-still.loaded {
    opacity: 1;
}

.gallery-frame::after {
    content: "";

    position: absolute;
    inset: 0;

    pointer-events: none;

    background:
        radial-gradient(
            circle,
            transparent 38%,
            rgba(0, 0, 0, 0.72) 100%
        );

    z-index: 6;
}

.gallery-halftone {
    position: absolute;
    inset: 0;

    z-index: 3;
    pointer-events: none;

    opacity: 0.22;

    background-image:
        radial-gradient(
            circle,
            rgba(0,0,0,0.85) 1px,
            transparent 1.6px
        );

    background-size: 6px 6px;

    mix-blend-mode: multiply;
}

.gallery-grain {
    position: absolute;

    top: -50%;
    left: -50%;

    width: 200%;
    height: 200%;

    z-index: 4;
    pointer-events: none;

    opacity: 0.10;

    background-image:
        radial-gradient(
            circle,
            rgba(255,255,255,0.25) 1px,
            transparent 1px
        );

    background-size: 2px 2px;

    mix-blend-mode: screen;

    animation: none;
}

.gallery-scanlines {
    position: absolute;
    inset: 0;

    z-index: 5;
    pointer-events: none;

    opacity: 0.10;

    background-image:
        linear-gradient(
            to bottom,
            transparent 50%,
            rgba(255,255,255,0.06) 50%
        );

    background-size: 100% 3px;

    animation: none;
}

.image-error {
    position: absolute;
    left: 50%;
    top: 50%;

    transform: translate(-50%, -50%);

    z-index: 20;

    display: none;

    color: red;
    background: black;

    border: 1px solid red;

    padding: 10px 14px;

    font-family: "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: lowercase;
}

.new-still-button {
    position: fixed;
    left: 50%;
    bottom: 7%;

    transform: translateX(-50%);

    z-index: 20;

    padding: 10px 18px;

    background: black;
    color: white;

    border: 1px solid white;

    font-family: "Courier New", monospace;
    font-size: 14px;
    letter-spacing: 2px;
    text-transform: lowercase;

    cursor: pointer;

    box-shadow:
        3px 3px 0 rgba(255,255,255,0.35);

    transition:
        transform 0.08s steps(1),
        box-shadow 0.08s steps(1),
        background 0.08s steps(1),
        color 0.08s steps(1);
}

.new-still-button:hover {
    background: white;
    color: black;
}

.new-still-button:active {
    transform:
        translateX(-50%)
        translate(3px, 3px);

    box-shadow:
        0 0 0 rgba(255,255,255,0.35);
}

/* ============================= */
/* ANIMATIONS */
/* ============================= */

@keyframes slowZoom {
    from {
        background-size: 88%;
    }

    to {
        background-size: 96%;
    }
}

@keyframes bloodPop {
    0% {
        transform: scale(1);
        filter: contrast(1.5) saturate(1.35);
    }

    45% {
        transform: scale(1.18) rotate(-2deg);
        filter: contrast(1.85) saturate(1.6);
    }

    100% {
        transform: scale(1);
        filter: contrast(1.5) saturate(1.35);
    }
}

@keyframes menuFloat {
    0% {
        transform: translateY(-50%);
    }

    50% {
        transform: translateY(-53%);
    }

    100% {
        transform: translateY(-50%);
    }
}

@keyframes menuGlow {
    0% {
        box-shadow:
            0 0 16px rgba(255, 255, 255, 0.18),
            inset 0 0 18px rgba(255, 255, 255, 0.08);
    }

    50% {
        box-shadow:
            0 0 26px rgba(255, 255, 255, 0.34),
            inset 0 0 22px rgba(255, 255, 255, 0.12);
    }

    100% {
        box-shadow:
            0 0 16px rgba(255, 255, 255, 0.18),
            inset 0 0 18px rgba(255, 255, 255, 0.08);
    }
}

/* ============================= */
/* MOBILE */
/* ============================= */

@media (max-width: 700px) {
    .hero {
        background-size: 125%;
        background-position: center center;
    }

    .blood-counter {
        top: 20px;
        left: 22px;

        font-size: 42px;
        letter-spacing: -3px;
    }

    .blood-counter::after {
        top: 34px;
        height: 20px;
    }

    .reef-menu {
        right: auto;
        left: 50%;
        top: auto;
        bottom: 28px;

        transform: translateX(-50%);

        flex-direction: row;
        gap: 14px;

        padding: 12px 14px;
    }

    .reef-menu a {
        font-size: 12px;
        letter-spacing: 1px;
    }

    .reef-menu a:hover {
        transform: translateY(-4px);
    }

    .music-button {
        bottom: 7%;
        width: 62px;
        height: 62px;
    }

    .headphones-icon {
        width: 54px;
        height: 54px;
    }

    .back-link {
        top: 22px;
        left: 22px;
        font-size: 14px;
    }

    .gallery-frame {
        width: 88vw;
        height: 62vh;
    }

    .new-still-button {
        bottom: 8%;
        font-size: 12px;
        padding: 9px 15px;
    }

    @keyframes slowZoom {
        from {
            background-size: 125%;
        }

        to {
            background-size: 138%;
        }
    }

    @keyframes menuFloat {
        0% {
            transform: translateX(-50%);
        }

        50% {
            transform: translateX(-50%) translateY(-5px);
        }

        100% {
            transform: translateX(-50%);
        }
    }
}
/* ============================= */
/* 1/100 JUMPSCARE */
/* ============================= */

.jumpscare-image {
    position: fixed;
    left: 50%;
    top: 50%;

    width: min(72vw, 760px);
    max-height: 82vh;

    object-fit: contain;

    transform:
        translate(-50%, -50%)
        scale(0.15)
        rotate(-4deg);

    opacity: 0;

    z-index: 99999;

    pointer-events: none;

    filter:
        contrast(1.35)
        saturate(0.75)
        brightness(0.95)
        drop-shadow(0 0 22px rgba(120, 0, 0, 0.95))
        drop-shadow(0 0 60px rgba(0, 0, 0, 1));

    transition:
        opacity 0.045s steps(1),
        transform 0.08s steps(2);
}

.jumpscare-image.show {
    opacity: 1;

    transform:
        translate(-50%, -50%)
        scale(1.08)
        rotate(1deg);

    animation: jumpscareShake 0.18s steps(2) infinite;
}

@keyframes jumpscareShake {
    0% {
        transform:
            translate(-50%, -50%)
            scale(1.08)
            rotate(1deg);
    }

    50% {
        transform:
            translate(calc(-50% + 14px), calc(-50% - 10px))
            scale(1.13)
            rotate(-2deg);
    }

    100% {
        transform:
            translate(calc(-50% - 10px), calc(-50% + 8px))
            scale(1.1)
            rotate(2deg);
    }
}