/* ─── OPENDISTRICTS V4 — v4-splash.css ───────────────────────────────────────────────
   Branding Splash Screen from entry.html
   Constraints: High z-index, unskippable, 1s fade-out transition.
─────────────────────────────────────────────────────────────────────────────────── */

:root {
    --splash-black: #000000;
    --splash-white: #FFFFFF;
}

#splash-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--splash-black);
    z-index: 10000; /* Extremely high to cover everything including Leaflet and hierarchy selector */
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 1s ease-out; /* 1 second fade as requested */
    pointer-events: all; /* Block interactions */
    font-family: 'Space Grotesk', sans-serif;
    overflow: hidden;
}

#splash-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

/* Ported Styles from entry.html */

/* Brutalist grid background */
.splash-grid-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        repeating-linear-gradient(0deg, transparent, transparent 99px, rgba(255, 255, 255, 0.05) 99px, rgba(255, 255, 255, 0.05) 100px),
        repeating-linear-gradient(90deg, transparent, transparent 99px, rgba(255, 255, 255, 0.05) 99px, rgba(255, 255, 255, 0.05) 100px);
    opacity: 0;
    animation: splashGridFade 0.8s ease-out 0.3s forwards;
}

@keyframes splashGridFade {
    to { opacity: 1; }
}

.splash-logo-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
}

.splash-main-text {
    position: relative;
}

.splash-text-line {
    display: block;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 140px;
    letter-spacing: 0.05em;
    line-height: 0.85;
    color: var(--splash-white);
    text-transform: uppercase;
    text-align: center;
    position: relative;
}

/* Geometric character blocks */
.splash-char {
    display: inline-block;
    position: relative;
    opacity: 0;
    transform: translateY(0);
}

@keyframes splashCharAssemble {
    0% {
        opacity: 0;
        transform: translateY(100px) scaleY(0.5);
        filter: blur(10px);
    }
    40% {
        opacity: 0;
        transform: translateY(80px) scaleY(0.5);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scaleY(1.1);
        filter: blur(0);
    }
    80% {
        transform: translateY(5px) scaleY(0.95);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scaleY(1);
        filter: blur(0);
    }
}

.splash-char::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 40%);
    opacity: 0;
    animation: splashEdgeGlow 0.3s ease-out 2.5s forwards;
}

@keyframes splashEdgeGlow {
    to { opacity: 1; }
}

.splash-version-container {
    margin-top: 60px;
    position: relative;
    opacity: 0;
    transform: scaleX(0);
    animation: splashVersionReveal 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 2.2s forwards;
}

@keyframes splashVersionReveal {
    0% { opacity: 0; transform: scaleX(0); }
    100% { opacity: 1; transform: scaleX(1); }
}

.splash-version-block {
    background: var(--splash-white);
    color: var(--splash-black);
    padding: 20px 80px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    font-size: 72px;
    letter-spacing: 0.2em;
    text-align: center;
    border: 4px solid var(--splash-white);
    box-shadow:
        0 0 0 8px var(--splash-black),
        0 0 0 12px var(--splash-white);
    position: relative;
}

.splash-corner-accent {
    position: absolute;
    width: 40px;
    height: 40px;
    border: 3px solid var(--splash-white);
}

.splash-corner-accent.tl { top: -20px; left: -20px; border-right: none; border-bottom: none; }
.splash-corner-accent.tr { top: -20px; right: -20px; border-left: none; border-bottom: none; }
.splash-corner-accent.bl { bottom: -20px; left: -20px; border-right: none; border-top: none; }
.splash-corner-accent.br { bottom: -20px; right: -20px; border-left: none; border-top: none; }

.splash-underline-bar {
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 80%;
    height: 6px;
    background: var(--splash-white);
    animation: splashBarExpand 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 2s forwards;
}

@keyframes splashBarExpand {
    to { transform: translateX(-50%) scaleX(1); }
}

.splash-scanline {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--splash-white);
    opacity: 0.6;
    animation: splashScan 2s linear 0.5s 1;
    pointer-events: none;
}

@keyframes splashScan {
    0% { transform: translateY(0); opacity: 0.8; }
    100% { transform: translateY(100vh); opacity: 0; }
}
