@import url('https://fonts.googleapis.com/css2?family=Antonio:wght@400;700&display=swap');

html {
    /* Fix for mobile viewport height issues (address bar) */
    height: 100%;
    height: -webkit-fill-available;
}

html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    /* Hide scrollbars */
    font-family: 'Antonio', sans-serif, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    /* Improve font rendering */
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    /* Prevent text size adjustment on mobile */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* This container holds the video and ensures it fills the background */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    /* 100% of the viewport width */
    width: 100dvw;
    /* Dynamic viewport width for modern browsers */
    height: 100vh;
    /* 100% of the viewport height */
    height: 100dvh;
    /* Dynamic viewport height - fixes mobile browser address bar issues */
    min-height: -webkit-fill-available;
    z-index: -1;
    /* Place it behind all other content */
    overflow: hidden;
}

/* Style the video itself */
#background-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Ensures the video covers the screen without distortion */
    filter: grayscale(100%);
    /* This makes the video black and white */
    /* Hardware acceleration for better performance */
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    will-change: transform;
    /* Prevent flickering on iOS */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* This container centers the logo */
.logo-container {
    position: absolute;
    /* Vertically center the entire block */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Hide initially and fade in to prevent flash of unstyled content */
    opacity: 0;
    animation: fadeIn 0.5s 0.2s forwards;
}

/* Style the logo image */
.logo-container img {
    width: 60vw;
    /* 60% of the viewport width */
    max-width: 540px;
    /* Maximum size for large screens */
    height: auto;
    /* Prevent image dragging on touch devices */
    -webkit-user-drag: none;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    /* Optimize image rendering for crisp display */
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    /* Performance optimizations */
    will-change: transform;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
}

/* This container holds and styles the text */
.text-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    /* This margin creates the space between the logo and the text */
    margin-top: 8px;
    color: #fff;
    /* White text color */
}

/* Style for "SPLIT INFINITY" */
.title {
    font-family: 'Antonio', sans-serif;
    font-weight: 700;
    /* Bold */
    font-size: clamp(2.5rem, 8vw, 5rem);
    /* Increased size slightly */
    letter-spacing: normal;
    /* Removed wide spacing to match Pictures site */
    margin: 0;
    line-height: 1;
    /* Prevent text selection on touch devices */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Style for "EVENTS" */
.subtitle {
    font-family: 'Antonio', sans-serif;
    font-weight: 400;
    /* Regular */
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    /* Increased size to match proportion */
    letter-spacing: normal;
    /* Removed wide spacing */
    margin: 0;
    /* margin-top: -8px; Removed negative margin */
    line-height: 1;
    /* Prevent text selection on touch devices */
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
}

/* Footer signature styling */
footer {
    position: fixed !important;
    bottom: 20px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    font-family: 'Nothing You Could Do', cursive !important;
    font-size: 20px !important;
    font-weight: 400 !important;
    color: #fff !important;
    text-align: center !important;
    letter-spacing: 0.05em !important;
    white-space: nowrap !important;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    z-index: 10 !important;
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    display: block !important;
    opacity: 0.7 !important;
}

/* Animation to fade in content */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Animation to fade in footer with reduced opacity */
@keyframes fadeInFooter {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.7;
    }
}

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .logo-container {
        opacity: 1;
        animation: none;
    }

    .footer {
        opacity: 0.7;
        animation: none;
    }
}

/* ===================================================
   Responsive Adjustments
=================================================== */

/* For Tablets */
@media screen and (max-width: 1024px) {
    .logo-container img {
        width: 70vw;
        max-width: 450px;
    }

    .title {
        font-size: 3rem;
    }

    .subtitle {
        font-size: 1.2rem;
    }

    footer {
        font-size: 18px !important;
        bottom: 20px !important;
    }
}

/* For Smartphones */
@media screen and (max-width: 768px) {
    .logo-container img {
        width: 85vw;
        max-width: 350px;
    }

    .title {
        font-size: 2.2rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    /* Adjust spacing for smaller screens */
    .text-container {
        margin-top: 6px;
    }

    /* Ensure content is visible even with mobile browser UI */
    .logo-container {
        padding: 20px;
        box-sizing: border-box;
    }

    footer {
        font-size: 16px !important;
        bottom: 15px !important;
    }
}

/* For very small phones */
@media screen and (max-width: 375px) {
    .logo-container img {
        width: 90vw;
        max-width: 280px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .text-container {
        margin-top: 5px;
    }

    footer {
        font-size: 14px !important;
        bottom: 10px !important;
    }
}

/* Landscape orientation on mobile */
@media screen and (max-height: 500px) and (orientation: landscape) {
    .logo-container img {
        width: 30vw;
        max-width: 200px;
    }

    .title {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 0.8rem;
    }

    .text-container {
        margin-top: 4px;
    }
}

/* High DPI displays (Retina, etc.) */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
    .logo-container img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Dark mode support (if user has dark mode preference) */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #000;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {

    /* Disable hover effects on touch devices */
    * {
        -webkit-tap-highlight-color: transparent;
    }

    /* Improve touch target sizes if needed */
    .logo-container {
        touch-action: manipulation;
    }
}