/**
 * ============================================================================
 * SPLASHSCREEN - ULTIMES GRIOTS
 * ============================================================================
 * Modern video splashscreen with African-inspired design elements
 *
 * Features:
 * - Fullscreen video overlay
 * - Smooth fade animations
 * - Responsive design
 * - Accessible keyboard controls
 * - African-themed accents (gold/terracotta)
 *
 * @package Ultimes_Griots_Child
 * @version 1.0.0
 */

/* ============================================================================
   SPLASHSCREEN CONTAINER
   ============================================================================ */

.ug-splashscreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #000;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    animation: ugFadeIn 0.8s ease-in-out forwards;
    overflow: hidden;
}

/* Fade Out Animation (triggered by JS) */
.ug-splashscreen.ug-fade-out {
    animation: ugFadeOut 0.6s ease-in-out forwards;
}

/* Hide completely after animation */
.ug-splashscreen.ug-hidden {
    display: none;
}

/* ============================================================================
   VIDEO CONTAINER
   ============================================================================ */

.ug-splashscreen__video-wrapper {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
}

.ug-splashscreen__video-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(
        ellipse at center,
        transparent 0%,
        transparent 60%,
        rgba(0, 0, 0, 0.4) 100%
    );
    pointer-events: none;
    z-index: 2;
}

.ug-splashscreen__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* ============================================================================
   SKIP BUTTON
   ============================================================================ */

.ug-splashscreen__skip {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 10;
    padding: 12px 28px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 6px;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0;
    animation: ugSkipFadeIn 0.5s ease-in-out 1s forwards;
    text-transform: uppercase;
}

.ug-splashscreen__skip:hover,
.ug-splashscreen__skip:focus {
    background: rgba(212, 175, 55, 0.2);
    border-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.ug-splashscreen__skip:focus {
    outline: 2px solid rgba(212, 175, 55, 0.6);
    outline-offset: 4px;
}

.ug-splashscreen__skip:active {
    transform: translateY(0);
}

/* ============================================================================
   LOADING STATE
   ============================================================================ */

.ug-splashscreen__loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: rgba(212, 175, 55, 0.8);
    border-radius: 50%;
    animation: ugSpin 1s linear infinite;
    z-index: 1;
}

.ug-splashscreen__video-wrapper.loaded .ug-splashscreen__loader {
    display: none;
}

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

@keyframes ugFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ugFadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes ugSkipFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes ugSpin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* ============================================================================
   RESPONSIVE DESIGN
   ============================================================================ */

/* Tablets and smaller */
@media (max-width: 1024px) {
    .ug-splashscreen__video-wrapper {
        width: 85%;
        max-width: 900px;
    }

    .ug-splashscreen__skip {
        bottom: 30px;
        right: 30px;
        padding: 10px 24px;
        font-size: 13px;
    }
}

/* Mobile devices */
@media (max-width: 768px) {
    .ug-splashscreen__video-wrapper {
        width: 95%;
        border-radius: 6px;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    }

    .ug-splashscreen__skip {
        bottom: 20px;
        right: 20px;
        padding: 8px 20px;
        font-size: 12px;
    }
}

/* Very small mobile devices */
@media (max-width: 480px) {
    .ug-splashscreen__video-wrapper {
        width: 100%;
        border-radius: 0;
        max-width: 100%;
        aspect-ratio: auto;
        height: 100vh;
    }

    .ug-splashscreen__skip {
        bottom: 15px;
        right: 15px;
        left: 15px;
        width: auto;
        text-align: center;
    }
}

/* ============================================================================
   ACCESSIBILITY
   ============================================================================ */

/* Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .ug-splashscreen,
    .ug-splashscreen__skip,
    .ug-splashscreen__video-wrapper {
        animation: none !important;
        transition: none !important;
    }

    .ug-splashscreen {
        opacity: 1;
    }

    .ug-splashscreen.ug-fade-out {
        opacity: 0;
    }

    .ug-splashscreen__skip {
        opacity: 1;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .ug-splashscreen__skip {
        border: 2px solid #fff;
        background: #000;
    }

    .ug-splashscreen__skip:hover,
    .ug-splashscreen__skip:focus {
        background: #fff;
        color: #000;
    }
}
