/* ========================================
   Monterey Motel — Custom Styles
======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #1a3c34;
    color: #faf8f5;
}

/* ========================================
   Hero Animations (above the fold — always visible)
======================================== */
.hero-anim {
    opacity: 1;
    transform: translateY(0);
    animation: heroReveal 0.8s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.2s; }
.hero-anim:nth-child(3) { animation-delay: 0.35s; }
.hero-anim:nth-child(4) { animation-delay: 0.5s; }
.hero-anim:nth-child(5) { animation-delay: 0.65s; }

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

/* ========================================
   Scroll Reveal (below the fold — progressive enhancement)
======================================== */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
                    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Default state is visible — JS only adds the 'revealed' class for timing */
    .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Scroll Gallery
======================================== */
@keyframes scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-scroll {
    display: flex;
    gap: 1.5rem;
    animation: scroll 40s linear infinite;
    width: max-content;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* ========================================
   Nav Transition States
======================================== */
.nav-scrolled {
    background: rgba(250, 248, 245, 0.92) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(26, 60, 52, 0.08);
}

.nav-scrolled .nav-link {
    color: #5c544a !important;
}

.nav-scrolled #nav-brand {
    color: #1a3c34 !important;
}

.nav-scrolled #nav-logo {
    color: #1a3c34 !important;
}

/* ========================================
   Mobile Menu
======================================== */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

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

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

/* ========================================
   Form Focus States
======================================== */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(45, 106, 92, 0.1);
}

/* ========================================
   Subtle Hover Lift for Cards
======================================== */
.group:hover {
    transform: translateY(-2px);
}

.group {
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}

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