/* Espresso Chalet — Custom Styles */

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

/* Base selection color */
::selection {
    background-color: rgba(212, 168, 83, 0.3);
    color: #F5F5F0;
}

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(2) {
    animation-delay: 0.15s;
}

.hero-anim:nth-child(3) {
    animation-delay: 0.3s;
}

.hero-anim:nth-child(4) {
    animation-delay: 0.45s;
}

.hero-anim:nth-child(5) {
    animation-delay: 0.6s;
}

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

/* Scroll reveal — progressive enhancement: default visible, animated via JS */
.reveal {
    /* Default: fully visible for accessibility / no-JS */
    opacity: 1;
}

.reveal.animated {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Navbar transitions */
#navbar.scrolled {
    background-color: rgba(2, 6, 16, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 168, 83, 0.1);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile menu transitions */
#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

/* Subtle image hover glow */
.group:hover img {
    filter: brightness(1.05);
}

/* Form focus styles */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(212, 168, 83, 0.3);
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero-anim {
        opacity: 1;
        transform: none;
        animation: none;
    }

    .reveal.animated {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .group:hover img {
        transition: none;
    }

    .nav-link::after {
        transition: none;
    }
}

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

::-webkit-scrollbar-track {
    background: #040A14;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 83, 0.3);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 83, 0.5);
}
