/* Custom styles for Crossbow Hotel & Lodging */

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

/* Selection color */
::selection {
    background-color: rgba(15, 61, 46, 0.2);
    color: inherit;
}

/* Navbar transitions */
.nav-logo-path {
    transition: stroke 0.4s ease;
}

.nav-logo-text {
    transition: color 0.4s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu button animations */
.menu-line-1 {
    transform-origin: center;
}

.menu-line-2 {
    transform-origin: center;
}

.menu-line-3 {
    transform-origin: center;
}

body.menu-open .menu-line-1 {
    transform: translateY(6px) rotate(45deg);
}

body.menu-open .menu-line-2 {
    opacity: 0;
}

body.menu-open .menu-line-3 {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Mobile nav links */
.mobile-nav-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

body.menu-open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

body.menu-open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
body.menu-open .mobile-nav-link:nth-child(2) { transition-delay: 0.2s; }
body.menu-open .mobile-nav-link:nth-child(3) { transition-delay: 0.3s; }
body.menu-open .mobile-nav-link:nth-child(4) { transition-delay: 0.4s; }

/* Scroll reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

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

    .reveal:nth-child(2) { transition-delay: 0.1s; }
    .reveal:nth-child(3) { transition-delay: 0.2s; }
    .reveal:nth-child(4) { transition-delay: 0.3s; }
}

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

/* Room card hover */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Image aspect ratios */
.aspect-\[4\/5\] {
    aspect-ratio: 4 / 5;
}

/* Focus styles for accessibility */
input:focus,
textarea:focus,
button:focus {
    outline: none;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #81c282;
}

/* Subtle image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* Print styles */
@media print {
    nav, #contactForm, #formSuccess {
        display: none;
    }

    body {
        color: #0f3d2e;
        background: white;
    }

    section {
        page-break-inside: avoid;
    }
}
