/* Custom Styles for Crown Inn */

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

/* Navigation Styles */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05);
}

#navbar.scrolled .nav-logo-text {
    color: #262320;
}

/* Reveal Animations - Progressive Enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger delays */
    .reveal:nth-child(1) { transition-delay: 0.1s; }
    .reveal:nth-child(2) { transition-delay: 0.2s; }
    .reveal:nth-child(3) { transition-delay: 0.3s; }
    .reveal:nth-child(4) { transition-delay: 0.4s; }
}

/* Ensure content is visible even without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Fallback: show reveals if JS fails */
.no-js .reveal {
    opacity: 1;
    transform: none;
}

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

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

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

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

/* Selection Color */
::selection {
    background: #B85C38;
    color: #ffffff;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Image Loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* Print Styles */
@media print {
    #navbar,
    #mobile-menu-btn {
        display: none;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    section {
        page-break-inside: avoid;
    }
}

/* Mobile Optimizations */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.2;
    }
    
    h1 {
        letter-spacing: -0.02em;
    }
}

/* High Contrast Mode Support */
@media (forced-colors: active) {
    .bg-terracotta-500 {
        background-color: ButtonText;
    }
    
    .text-terracotta-500 {
        color: ButtonText;
    }
}

/* 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;
    }
}
