/* ============================================
   ENTREL — Splash
   Das Emblem animiert sich (Lottie), die Wortmarke zieht nach,
   der Fortschritt läuft auf 100, dann ein Wipe-Abgang.
   ============================================ */
.splash {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 44px;
    background: var(--bg-primary);
    --progress: 0%;
    transition: opacity var(--splash-exit-duration) cubic-bezier(0.4, 0, 0.2, 1),
                transform var(--splash-exit-duration) cubic-bezier(0.4, 0, 0.2, 1);
}

/* Sanfter Lichtkegel hinter dem Logo */
.splash::before {
    content: '';
    position: absolute;
    top: 42%; left: 50%;
    width: min(900px, 120vw);
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    background: radial-gradient(circle, rgba(200, 180, 138, 0.09) 0%, transparent 62%);
    pointer-events: none;
}

/* Emblem (Lottie) über der Wortmarke */
.splash-mark {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(20px, 3.4vh, 34px);
}

.splash-wordmark {
    position: relative;
    width: min(260px, 46vw);
    aspect-ratio: 1151 / 522;
}

.splash-lottie { width: 100%; height: 100%; }
.splash-lottie svg { width: 100%; height: 100%; }

/* Fallback: Lottie nicht verfügbar → statisches Emblem einblenden */
.splash-fallback {
    position: absolute;
    inset: 0;
    width: 100%; height: 100%;
    object-fit: contain;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.splash-wordmark.lottie-failed .splash-fallback { opacity: 1; }

/* Wortmarke zieht nach, sobald das Emblem steht */
.splash-lettering {
    width: min(230px, 42vw);
    height: auto;
    opacity: 0;
    transform: translateY(8px);
    animation: splashLettering 900ms cubic-bezier(0.4, 0, 0.2, 1) 900ms forwards;
}

@keyframes splashLettering {
    to { opacity: 1; transform: none; }
}

.splash.no-motion .splash-lettering {
    animation: none;
    opacity: 1;
    transform: none;
}

/* Falls die Animation nie lief (gedrosselter Tab), spätestens beim Abgang zeigen */
.splash--finalizing .splash-lettering,
.splash--exiting .splash-lettering {
    opacity: 1;
    transform: none;
}

.splash-progress {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: min(260px, 60vw);
}

.splash-progress-track {
    position: relative;
    width: 100%;
    height: 1px;
    background: rgba(245, 242, 232, 0.12);
    overflow: hidden;
}

.splash-progress-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--progress);
    background: var(--gold-accent);
    transition: width 0.14s linear;
}

.splash-progress-text {
    display: flex;
    align-items: baseline;
    gap: 3px;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.2em;
    color: var(--text-faint);
    transition: color 0.2s ease, transform 0.2s ease;
}

.splash-progress-text.is-ticking {
    color: var(--gold-accent);
    transform: translateY(-1px);
}

.splash--finalizing .splash-mark { animation: splashPulse 280ms ease-out; }

@keyframes splashPulse {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.028); }
    100% { transform: scale(1); }
}

.splash--exiting {
    opacity: 0;
    transform: scale(1.06);
    pointer-events: none;
}

.splash.no-motion { transition: opacity 0.3s ease; }
.splash.no-motion.splash--exiting { transform: none; }
