/* ============================================
   Worcester House OCMD — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: rgba(123, 45, 59, 0.2);
    color: #3a0f18;
}

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 248, 245, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(123, 45, 59, 0.08);
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.2s ease;
}

#mobileMenu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

#mobileMenu.open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu Button Animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}
body.menu-open .menu-line:nth-child(2) {
    opacity: 0;
}
body.menu-open .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Stay Cards */
.stay-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease, border-color 0.4s ease, background 0.4s ease;
}

.stay-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Reveal Sections */
.reveal-section {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Image hover containers */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF8F5;
}
::-webkit-scrollbar-thumb {
    background: #c4a8b0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #7B2D3B;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .stay-card,
    .reveal-section {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}
