/* animAR Custom Styles */

/* Smooth scrolling behavior */
html {
    scroll-behavior: smooth;
}

/* Video background optimization */
video {
    object-fit: cover;
    object-position: center;
    will-change: transform;
}

/* Ensure video doesn't cause layout shift */
.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

/* Better text rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* Improve contrast on hero text */
h1 {
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.8);
}

/* Custom hover effects */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(255, 255, 255, 0.1);
}

/* Mobile optimizations */
@media (max-width: 768px) {
    /* Reduce hero text size on very small screens */
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }

    /* Scale down video container on mobile to show more content */
    #hero-video-container {
        transform: scale(0.88);
        transform-origin: center;
    }

    /* Better spacing on mobile */
    section {
        padding: 2rem 0;
    }
}

/* Prevent text selection on buttons */
button, a {
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    user-select: none;
}

/* Loading state for video */
video:not([src]) {
    background: #000;
}

/* Smooth transitions for navigation */
nav a {
    position: relative;
    transition: color 0.3s ease;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: white;
    transition: width 0.3s ease;
}

nav a:hover::after {
    width: 100%;
}

/* Section transitions */
section {
    opacity: 1;
    animation: fadeIn 0.8s ease-in;
}

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

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #4a4a4a;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #6a6a6a;
}

/* Ensure proper spacing around content */
.container {
    max-width: 1280px;
}

/* Add subtle backdrop blur effect */
.backdrop-blur-sm {
    backdrop-filter: blur(8px);
}

/* Focus styles for accessibility */
a:focus, button:focus {
    outline: 2px solid rgba(255, 255, 255, 0.5);
    outline-offset: 4px;
}

/* Better mobile menu (if needed in future) */
@media (max-width: 768px) {
    nav .hidden {
        display: none;
    }
}

/* Hero video container styling */
#home .rounded-2xl {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.8);
}

/* Hero text styling */
#hero-text h1 {
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* Smooth transitions for video switching */
#hero-loop,
#hero-buttons,
#hero-overlay,
#youtube-player,
#back-to-loop-btn {
    transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

#hero-buttons.hidden {
    opacity: 0;
    transform: translateY(-10px);
}

/* Play button animation */
#play-video-btn svg {
    transition: transform 0.2s ease;
}

#play-video-btn:hover svg {
    transform: scale(1.1);
}

/* Back button styling */
#back-to-loop-btn {
    transition: all 0.2s ease;
}

#back-to-loop-btn:hover {
    transform: translateX(-2px);
}

/* Ensure iframe fills container properly */
#youtube-player {
    z-index: 5;
}

/* Responsive adjustments for contained video */
@media (max-width: 768px) {
    #home h1 {
        font-size: 2rem;
    }

    #home p {
        font-size: 1rem;
    }

    #back-to-loop-btn {
        font-size: 0.875rem;
        padding: 0.5rem 1rem;
    }
}
