/* ============================================
   Lovettsville Bed & Breakfast — Custom Styles
   ============================================ */

/* Base Reset & Typography */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

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

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

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

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

/* Selection */
::selection {
    background: rgba(240, 82, 58, 0.3);
    color: #1c2028;
}

/* Navbar Scroll State */
.nav-link {
    position: relative;
}

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

.nav-link:hover::after {
    width: 100%;
}

/* Hero Animation */
.hero-content > * {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 0.8s ease forwards;
}

.hero-content > *:nth-child(1) { animation-delay: 0.2s; }
.hero-content > *:nth-child(2) { animation-delay: 0.4s; }
.hero-content > *:nth-child(3) { animation-delay: 0.6s; }
.hero-content > *:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reveal Animation on Scroll */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal.delay-1 { transition-delay: 0.1s; }
.reveal.delay-2 { transition-delay: 0.2s; }
.reveal.delay-3 { transition-delay: 0.3s; }
.reveal.delay-4 { transition-delay: 0.4s; }

/* Form Focus States */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(240, 82, 58, 0.15);
}

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

/* Room Card Hover */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.05);
}

/* Map Overlay */
iframe[src*="google.com/maps"] {
    pointer-events: auto;
}

/* Mobile Menu Animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* Subtle Pattern Overlay for Sections */
.bg-pattern {
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23f0523a' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* Image Placeholder Fallback */
img {
    background: linear-gradient(135deg, #e2e3e5 0%, #c4c6ca 100%);
}

/* Smooth Image Loading */
img {
    transition: opacity 0.3s ease;
}

img[src] {
    opacity: 1;
}

/* Print Styles */
@media print {
    nav, #contact-form, .animate-bounce {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

/* 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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* High Contrast */
@media (prefers-contrast: high) {
    .text-white\/60 {
        color: #fff;
    }
    
    .text-charcoal-600 {
        color: #1c2028;
    }
}

/* Focus Visible for Keyboard Navigation */
:focus-visible {
    outline: 2px solid #f0523a;
    outline-offset: 2px;
}

/* Aspect Ratio Utilities */
.aspect-\[4\/3\] {
    aspect-ratio: 4 / 3;
}
