/* --- RESET & BASICS --- */
@font-face {
    font-family: 'Trajan Regular';
    font-style: normal;
    font-weight: normal;
    src: url('fonts/TrajanPro-Regular.woff') format('woff');
}

/* --- 2. RESET & BASE STYLES --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #000;
    color: #1a1a1a;
    
    /* --- THE FIX IS HERE --- */
    min-height: 100vh; /* Fallback for old browsers */
    height: 100dvh;    /* Dynamic height: adjusts for Safari bottom bar */
    /* ----------------------- */

    width: 100%;
    overflow: hidden; 
    display: flex;
    flex-direction: column;
    position: relative;

    /* BACKGROUND IMAGE CONFIGURATION */
    background-image: url('images/main-image.jpg');
    background-size: cover;
    background-position: center right; 
    background-repeat: no-repeat;
}

a {
        text-decoration: none;
    }

/* --- 3. LAYOUT CONTAINER (Desktop Default) --- */
.container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    z-index: 2; /* Above the fade overlay */
    padding: 20px;
    
    /* CENTER EVERYTHING FOR DESKTOP */
    justify-content: center; 
    align-items: center;     
}

/* --- 4. HEADER STYLES --- */
header {
    text-align: center;
    text-shadow: 0px 2px 10px rgba(255, 255, 255, 0.2);
}

.subtitle {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 4px;
    line-height: 1.6;
    font-weight: 600;
    color: #111;
    margin-bottom: 50px;
}

h1.main-title {
    font-family: 'Trajan Regular', 'Cinzel', serif;
    font-weight: 400;
    color: #000;
    margin: 0;
    line-height: 0.9;
    
    /* Desktop Size */
    font-size: 120px; 
    letter-spacing: 5px;
}

/* --- 5. BUTTONS STYLES --- */
.actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    width: 100%;
    margin-top: 30px; /* Space between title and buttons */
}

.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(244, 244, 244, 0.85); 
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 15px 30px;
    text-decoration: none;
    color: #333;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    cursor: pointer;
    backdrop-filter: blur(5px); 
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.play-icon {
    width: 12px;
    height: 12px;
    margin-right: 10px;
    fill: #e05a35; 
}

/* --- 6. FADE OVERLAY (Desktop Default) --- */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: 1;
    
    /* Desktop Fade Height */
    height: 150px;
    background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.6) 100%);
}

/* =========================================
   MOBILE RESPONSIVE STYLES (Media Query)
   ========================================= */

@media (max-width: 768px) {
    
    body {
        /* Fixes background jitter on mobile */
        background-attachment: scroll; 
        background-position: right -3em center; 
        /* Ensure the body doesn't grow taller than the view */
        min-height: 0; 
        height: 100dvh;
    }

    /* 1. CHANGE CONTAINER TO RELATIVE */
    /* This allows us to pin items inside it */
    .container {
        display: block; /* Disable flexbox spacing on mobile */
        position: relative; 
        width: 100%;
        height: 100%;
        padding: 0; /* Remove padding, we will handle it in the elements */
    }

    /* 2. PIN HEADER TO TOP */
    header {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        /* "env" handles the notch, "60px" handles the design spacing */
        padding-top: calc(40px + env(safe-area-inset-top)); 
        z-index: 10;
    }

    .subtitle {
        font-size: 10px;
        letter-spacing: 2px;
        margin-bottom: 10px;
    }

    h1.main-title {
        font-size: 50px; /* Reduced slightly to ensure fit */
        letter-spacing: 2px;
    }

    /* 3. PIN BUTTONS TO BOTTOM */
    .actions {
        position: absolute;
        bottom: 0;
        left: 0;
        width: 100%;
        
        /* Layout for buttons */
        display: flex;
        flex-direction: row;
        gap: 10px;
        padding-left: 20px;
        padding-right: 20px;
        
        /* "env" handles the home swipe bar, "40px" handles design spacing */
        padding-bottom: calc(40px + env(safe-area-inset-bottom)); 
        z-index: 10;
    }

    .btn {
        flex: 1; 
        padding: 15px 10px; 
        font-size: 11px;
    }

    /* Adjust Fade to sit behind the pinned buttons */
    .fade-overlay {
        height: 45%; 
        background: linear-gradient(to bottom, transparent 0%, rgba(255,255,255,0.9) 60%, #fff 100%);
        position: absolute;
        bottom: 0;
        z-index: 1;
    }

}