@font-face {
    font-family: "GothicWar";
    src: url("gothic-war.otf") format("opentype");
    font-weight: normal;
    font-style: normal;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 120%;
}

html,
body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #050505;
    color: #8a8a8a;
    font-family: "GothicWar", "Times New Roman", serif;
    cursor: crosshair;
}

/* ── grain + scanlines overlay ── */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 9000;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.15) 2px,
        rgba(0, 0, 0, 0.15) 4px
    );
    opacity: 0.35;
}

body::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 8999;
    pointer-events: none;
    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.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.08'/%3E%3C/svg%3E");
    opacity: 0.6;
}

/* ── vignette ── */
#vignette {
    position: fixed;
    inset: 0;
    z-index: 8000;
    pointer-events: none;
    background: radial-gradient(
        ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.85) 100%
    );
}

/* ── background gif ── */
#videoContainer {
    position: fixed;
    inset: 0;
    z-index: 1;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1.8s ease, visibility 1.8s ease;
}

#videoContainer.active {
    opacity: 1;
    visibility: visible;
}

#bgGif {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(40%) contrast(1.15) brightness(0.55) saturate(0.6);
}

#videoContainer::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(20, 0, 30, 0.45);
    mix-blend-mode: multiply;
    pointer-events: none;
}

/* ── enter screen (backdrop only) ── */
#enterScreen {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: #030303;
    transition: opacity 1.2s ease, visibility 1.2s ease;
}

#enterScreen.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* ── fixed brand anchor — poizn.me pinned, ui layered around it ── */
#brandAnchor {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10001;
    width: 0;
    height: 0;
    pointer-events: none;
}

#brandAnchor #enterBtn {
    pointer-events: auto;
}

.cross {
    position: absolute;
    left: 50%;
    top: calc(50% - 5.5rem);
    transform: translateX(-50%);
    display: block;
    font-size: 1.4rem;
    color: #a85868;
    margin: 0;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 1.1s ease;
}

#siteName {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    font-family: "GothicWar", serif;
    font-size: 1.8rem;
    font-weight: normal;
    letter-spacing: 0.25em;
    text-transform: lowercase;
    color: #e8c4cc;
    margin: 0;
    white-space: nowrap;
    text-shadow:
        0 0 8px rgba(200, 80, 100, 0.8),
        0 0 24px rgba(160, 40, 60, 0.5),
        0 1px 2px rgba(0, 0, 0, 0.9);
    animation: flicker 5s infinite;
}

.tag {
    position: absolute;
    left: 50%;
    top: calc(50% + 5.5rem);
    transform: translateX(-50%);
    display: block;
    font-size: 0.65rem;
    letter-spacing: 0.45em;
    text-transform: lowercase;
    color: #9a7080;
    margin: 0;
    white-space: nowrap;
    opacity: 0.8;
    transition: opacity 1.1s ease;
}

#brandAnchor.transitioning .cross,
#brandAnchor.transitioning #enterBtn {
    opacity: 0;
    pointer-events: none;
}

#brandAnchor.ui-gone .cross,
#brandAnchor.ui-gone #enterBtn {
    display: none;
}

#brandAnchor.transitioning #siteName {
    animation: pulseName 1.2s ease-in-out infinite;
}

#brandAnchor.revealed #siteName {
    animation: flicker 5s infinite;
}

#enterBtn {
    position: absolute;
    left: 50%;
    top: calc(50% + 3.2rem);
    transform: translateX(-50%);
    font-family: "GothicWar", serif;
    font-size: 1.1rem;
    letter-spacing: 0.35em;
    text-transform: lowercase;
    color: #d87888;
    background: transparent;
    border: 1px solid #8a4050;
    padding: 0.9rem 2.8rem;
    cursor: pointer;
    overflow: hidden;
    opacity: 1;
    white-space: nowrap;
    transition: opacity 1.1s ease, color 0.3s, border-color 0.3s, box-shadow 0.3s;
    text-shadow:
        0 0 10px rgba(200, 80, 100, 0.6),
        0 1px 2px rgba(0, 0, 0, 0.8);
}

#enterBtn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        transparent 40%,
        rgba(80, 10, 30, 0.15) 50%,
        transparent 60%
    );
    transform: translateX(-100%);
    transition: transform 0.6s;
}

#enterBtn:hover:not(:disabled) {
    color: #f0a8b8;
    border-color: #b06070;
    box-shadow: 0 0 20px rgba(180, 60, 80, 0.35),
                inset 0 0 20px rgba(60, 10, 25, 0.1);
}

#enterBtn:hover:not(:disabled)::before {
    transform: translateX(100%);
}

#enterBtn:disabled {
    cursor: default;
}

/* ── corner decorations ── */
.corner {
    position: fixed;
    z-index: 9500;
    pointer-events: none;
    font-size: 0.65rem;
    letter-spacing: 0.2em;
    color: #8a6870;
    opacity: 0.9;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}

.corner-tl { top: 1.2rem; left: 1.4rem; }
.corner-tr { top: 1.2rem; right: 1.4rem; }
.corner-bl { bottom: 1.2rem; left: 1.4rem; }
.corner-br { bottom: 1.2rem; right: 1.4rem; }

/* ── animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

@keyframes flicker {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.82; }
    52% { opacity: 0.95; }
    54% { opacity: 0.78; }
    56% { opacity: 0.9; }
}

@keyframes pulseName {
    0%, 100% {
        opacity: 1;
        text-shadow:
            0 0 8px rgba(200, 80, 100, 0.8),
            0 0 24px rgba(160, 40, 60, 0.5),
            0 1px 2px rgba(0, 0, 0, 0.9);
    }
    50% {
        opacity: 0.88;
        text-shadow:
            0 0 16px rgba(220, 100, 120, 0.95),
            0 0 36px rgba(160, 40, 60, 0.7),
            0 1px 2px rgba(0, 0, 0, 0.9);
    }
}
