/* Custom styles for Duffield Hotel Brooklyn */

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

/* Hero entrance animations - only for below-fold, hero is visible by default */
.hero-badge {
    animation: slideDown 0.8s ease-out forwards;
    opacity: 0;
    transform: translateY(-20px);
}

.hero-title {
    animation: slideUp 0.8s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    animation: slideUp 0.8s ease-out 0.4s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-ctas {
    animation: slideUp 0.8s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-info {
    animation: slideUp 0.8s ease-out 0.8s forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-scroll {
    animation: fadeIn 0.8s ease-out 1.2s forwards;
    opacity: 0;
}

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

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

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* Scroll reveal animations - BELOW THE FOLD ONLY */
.reveal {
    /* Default state: visible for accessibility */
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

/* Navbar styles */
#navbar.scrolled {
    background: rgba(254, 252, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

/* Nav link hover effect */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 2px;
    background: #d44a24;
    transition: width 0.3s ease;
}

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

/* Mobile menu transitions */
#mobileMenu.open {
    opacity: 1;
    visibility: visible;
}

#mobileMenu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Hamburger animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 5px;
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #d44a24;
    outline-offset: 2px;
}

/* Input focus styles */
input:focus,
textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: #f9ddd3;
    color: #6a2216;
}

/* 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 !important;
        transform: none !important;
    }
    
    .animate-float,
    .animate-float-delayed,
    .animate-float-slow {
        animation: none !important;
    }
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #f2ebd8 0%, #f9ddd3 100%);
}

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

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

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

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