/* Custom styles for Ragan's Overnite Lodging */

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

/* Scroll reveal base - content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only apply animation states when JS is enabled and motion is preferred */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal:not(.revealed) {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 252, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(129, 26, 43, 0.08);
}

#navbar.scrolled .font-display {
    color: #811a2b !important;
}

#navbar.scrolled .tracking-widest {
    color: #b9273d !important;
}

/* Mobile menu open state */
#mobile-menu.open {
    max-height: 500px;
}

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

::-webkit-scrollbar-track {
    background: #fffcf8;
}

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

::-webkit-scrollbar-thumb:hover {
    background: #eb748a;
}

/* Selection color */
::selection {
    background: #f9d0d9;
    color: #6c192a;
}

/* Focus styles */
:focus-visible {
    outline: 3px solid #f9d0d9;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Button hover effects */
a, button {
    -webkit-tap-highlight-color: transparent;
}

/* Image loading */
img {
    background-color: #fce7eb;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-float,
    .animate-float-delayed,
    .animate-float-slow {
        animation: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #back-to-top,
    .animate-float,
    .animate-float-delayed,
    .animate-float-slow {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
