/**
 * EDEN01 2026 Upgrade: Splash Screen
 * 2-Act Reveal with Light Sweep
 * Date: 2026-01-14
 * 
 * QA Checklist:
 * ✅ Contrast: White text on dark bg = AAA compliant
 * ✅ Spacing: Comfortable breathing room, no cramping
 * ✅ Hover states: Button glow visible and smooth
 * ✅ Motion: Respects prefers-reduced-motion
 * ✅ Performance: GPU-accelerated (translate3d)
 */

/* ========================================
   ACT 1: Environment Reveal (0–1.2s)
   Real Jungle Photography Background
   ======================================== */

.splash__background {
    /* Full screen positioning - override base styles */
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    /* Real jungle photo background */
    background-image: url('../images/Splash_Background.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;

    /* Cinematic reveal animation */
    opacity: 0;
    transform: scale(1.05);
    animation: splashBackgroundReveal 2s var(--ease-luxury) 0.1s forwards;
}

.splash__background::after {
    content: '';
    position: absolute;
    inset: 0;
    /* Subtle vignette for cinematic depth */
    background: radial-gradient(
        ellipse 80% 80% at 50% 50%,
        transparent 0%,
        rgba(10, 14, 13, 0.3) 70%,
        rgba(10, 14, 13, 0.6) 100%
    );
    pointer-events: none;
}

@keyframes splashBackgroundReveal {
    0% {
        opacity: 0;
        transform: scale(1.08);
        filter: brightness(0.2) blur(5px);
    }
    60% {
        opacity: 0.6;
        filter: brightness(0.5) blur(0px);
    }
    100% {
        opacity: 0.5;
        transform: scale(1);
        filter: brightness(0.6) blur(0px);
    }
}

/* Grid: Ultra-subtle with real photo background */
.splash__grid {
    animation: splashGridPulse 12s ease-in-out infinite;
    filter: blur(1px);
    /* Sehr dezent - das echte Foto dominiert */
    opacity: 0.02 !important;
}

@keyframes splashGridPulse {
    0%, 100% { opacity: 0.015; }
    50% { opacity: 0.03; }
}

/* ========================================
   ACT 1: Rhino Light Sweep
   Museum-quality reveal
   ======================================== */

.splash__rhino {
    /* Override default animation */
    opacity: 1 !important;
    animation: none !important;
    position: relative;
}

.splash__rhino-img {
    /* Cinematic reveal - emerges from the jungle darkness */
    opacity: 0;
    animation: splashRhinoReveal 1.8s var(--ease-luxury) 0.6s forwards,
               splashRhinoFloat 12s ease-in-out 2.5s infinite;
}

@keyframes splashRhinoReveal {
    0% {
        opacity: 0;
        filter: brightness(0.2) contrast(0.8) saturate(0.5);
        transform: scale(0.96) translateY(10px);
    }
    50% {
        opacity: 0.8;
        filter: brightness(0.85) contrast(1) saturate(1);
    }
    100% {
        opacity: 1;
        filter: brightness(0.95) contrast(1.05) saturate(1);
        transform: scale(1) translateY(0);
    }
}

@keyframes splashRhinoFloat {
    0%, 100% { 
        transform: translate3d(0, 0, 0) scale(1); 
    }
    50% { 
        transform: translate3d(0, -4px, 0) scale(1); 
    }
}

/* Ambient Glow - Minimal, nur dezente Lichtreflexion
   Mit echtem Dschungel-Foto brauchen wir weniger künstlichen Glow */
.splash__rhino::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    transform: translate(-50%, -50%);
    /* Sehr dezenter, kaum sichtbarer Glow */
    background: radial-gradient(
        ellipse 40% 40% at 50% 55%,
        rgba(201, 169, 97, 0.03) 0%,
        transparent 60%
    );
    filter: blur(40px);
    opacity: 0;
    animation: splashAmbientGlow 2.5s var(--ease-luxury) 1s forwards;
    pointer-events: none;
    z-index: -1;
}

@keyframes splashAmbientGlow {
    0% {
        opacity: 0;
    }
    100% {
        /* Sehr subtil - fast unsichtbar */
        opacity: 0.5;
    }
}

/* ========================================
   ACT 2: Brand Identity (1.2–2.2s)
   Letter-by-letter with tracking settle
   ======================================== */

.splash__welcome {
    /* Letter-spacing settle effect */
    animation: splashWelcomeIn 1s var(--ease-luxury) 1.2s forwards !important;
}

@keyframes splashWelcomeIn {
    0% {
        opacity: 0;
        letter-spacing: 0.3em;  /* Wide tracking */
        transform: translateY(15px);
    }
    100% {
        opacity: 1;
        letter-spacing: 0.08em;  /* Settle to normal */
        transform: translateY(0);
    }
}

/* Brand Detail: Staggered entrance */
.splash__brand-line {
    animation: splashBrandLineIn 0.8s var(--ease-luxury) forwards !important;
    opacity: 0;
}

.splash__brand-line:nth-child(1) { animation-delay: 1.4s !important; }
.splash__brand-line:nth-child(2) { animation-delay: 1.6s !important; }
.splash__brand-line:nth-child(3) { animation-delay: 1.8s !important; }

@keyframes splashBrandLineIn {
    0% {
        opacity: 0;
        letter-spacing: 0.25em;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        letter-spacing: 0.15em;
        transform: translateY(0);
    }
}

/* ========================================
   Enter Button: Crystallize Effect
   ======================================== */

.splash__skip {
    /* Start as outline only */
    background: transparent !important;
    border: 1.5px solid rgba(201, 169, 97, 0.3) !important;
    backdrop-filter: blur(0px) !important;
    
    animation: splashButtonCrystallize 1.2s var(--ease-luxury) 2s forwards !important;
}

@keyframes splashButtonCrystallize {
    0% {
        background: transparent;
        border-color: rgba(201, 169, 97, 0.3);
        backdrop-filter: blur(0px);
        transform: scale(0.95);
        opacity: 0;
    }
    50% {
        opacity: 1;
        transform: scale(1.02);
    }
    100% {
        background: rgba(201, 169, 97, 0.05);
        border-color: rgba(201, 169, 97, 0.6);
        backdrop-filter: blur(12px);
        transform: scale(1);
        opacity: 1;
    }
}

.splash__skip:hover {
    background: rgba(201, 169, 97, 0.2) !important;
    border-color: var(--color-accent-gold) !important;
    backdrop-filter: blur(16px) !important;
    box-shadow: 
        0 0 30px rgba(201, 169, 97, 0.4),
        inset 0 0 20px rgba(201, 169, 97, 0.1) !important;
    transform: translateY(-2px) scale(1.02) !important;
    transition: all var(--motion-base) var(--ease-luxury) !important;
}

/* ========================================
   Film Grain Overlay - Subtil mit echtem Foto
   ======================================== */

.splash::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    /* Reduziert - echtes Foto hat bereits Textur */
    opacity: 0.02;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    animation: splashGrainShift 0.8s steps(8) infinite;
}

@keyframes splashGrainShift {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-1%, -1%); }
    20% { transform: translate(1%, 1%); }
    30% { transform: translate(-1%, 1%); }
    40% { transform: translate(1%, -1%); }
    50% { transform: translate(-0.5%, 0.5%); }
    60% { transform: translate(0.5%, -0.5%); }
    70% { transform: translate(-1%, -0.5%); }
    80% { transform: translate(0.5%, 1%); }
    90% { transform: translate(1%, 0.5%); }
}

/* ========================================
   Reduced Motion Support
   ======================================== */

@media (prefers-reduced-motion: reduce) {
    .splash__rhino-img,
    .splash__welcome,
    .splash__brand-line,
    .splash__skip {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
        letter-spacing: 0.08em !important;
    }

    .splash__rhino::after {
        animation: none !important;
        opacity: 0.5 !important;
    }

    .splash::before {
        animation: none !important;
    }

    .splash__background,
    .splash__grid {
        animation: none !important;
    }
}
