/* Curriculum Fatale - Main Stylesheet */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Arial', sans-serif;
    background-color: #000000;
}

/* Video background container */
.video-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    /* iOS Safari landscape fix */
    height: 100dvh; /* Dynamic viewport height for modern browsers */
    min-height: 100vh;
    min-height: 100dvh;
    z-index: 1;
    overflow: hidden;
    /* Background image fallback */
    background-image: url('../assets/bg_blueinput.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll; /* Fixed attachment can cause issues on mobile */
}

/* Video element styling */
.video-background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top left;
    /* Ensure video appears above background image when loaded */
    z-index: 2;
    /* Smooth transition for loading states */
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
}

/* Ensure video controls never appear */
.video-background video::-webkit-media-controls {
    display: none !important;
}

.video-background video::-webkit-media-controls-panel {
    display: none !important;
}

.video-background video::-webkit-media-controls-play-button {
    display: none !important;
}

.video-background video::-webkit-media-controls-start-playback-button {
    display: none !important;
}

/* Main content container (for future use) */
.main-content {
    position: relative;
    z-index: 10;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}


/* Accessibility: Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {
    .video-background video {
        display: none;
    }
    
    .video-background {
        /* Ensure background image is visible when video is hidden */
        background-image: url('../assets/bg_blueinput.jpg');
    }
}

/* Loading Placeholder Image */
.loading-placeholder {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translateY(-100vh);
    z-index: 50;
    cursor: pointer;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    /*filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.3));*/
    max-width: 600px;
    max-height: 890px;
    opacity: 0;
}

.loading-placeholder.loaded {
    transform: translate(-50%, -50%) translateY(0);
    opacity: 1;
}

.loading-placeholder.clickable {
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.loading-placeholder.anticipate {
    transform: translate(-50%, -50%) translateY(-30px);
}

.loading-placeholder.exit {
    transform: translate(-50%, -50%) translateY(100vh);
    transition: transform 0.4s cubic-bezier(0.6, 0.04, 0.98, 0.335);
}

.loading-placeholder img {
    width: 100%;
    height: auto;
    display: block;
}


/* Enhanced fallback system */
/* Smooth transition for video loading states */

/* Fallback for when video fails to load completely */
.video-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000;
    z-index: -1;
    /* This will only show if both video and image fail */
}

/* ========================================
   RESPONSIVE DESIGN BREAKPOINTS
   ======================================== */

/* Large tablets and small desktops (1024px and up) */
@media (min-width: 1024px) {
    .loading-placeholder {
        max-width: 600px;
        max-height: 890px;
    }
}

/* Tablets (768px to 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .loading-placeholder {
        max-width: 530px;
        max-height: 800px;
    }
}

/* Mobile devices (up to 767px) */
@media (max-width: 767px) {
    .video-background video {
        /* Ensure video covers properly on mobile */
        min-width: 100%;
        min-height: 100%;
    }
    
    .loading-placeholder {
        max-width: 450px;
        max-height: 620px;
    }
}

/* Small mobile devices (up to 480px) */
@media (max-width: 480px) {
    .loading-placeholder {
        max-width: 280px;
        max-height: 420px;
    }
}

/* ========================================
   ORIENTATION-SPECIFIC STYLES
   ======================================== */

/* Mobile landscape orientation only */
@media screen and (orientation: landscape) and (max-width: 1023px) {
    /* iOS Safari landscape fix - more aggressive approach */
    .video-background {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100svh; /* Small viewport height for iOS */
    }
    
    .video-background video {
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        height: 100svh;
        object-fit: cover;
        object-position: top left;
        z-index: 1;
        /* Force hardware acceleration */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    /* Smaller placeholder in landscape */
    .loading-placeholder {
        max-width: 500px;
        max-height: 700px;
    }
}

/* Mobile landscape (specific to phones) */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .loading-placeholder {
        max-width: 150px;
        max-height: 225px;
    }
}

