/* Custom styles for Mountain Ridge Preservation */

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

/* Base transitions */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(253, 248, 240, 0.95) !important;
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.06);
}

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

.nav-scrolled .mobile-menu-line {
    background: #635648 !important;
}

/* Hero animations */
.hero-badge {
    animation: fadeInDown 0.8s ease-out both;
}

.hero-badge:nth-child(1) {
    animation-delay: 0.1s;
}

h1 {
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero p {
    animation: fadeInUp 0.8s ease-out 0.4s both;
}

.hero .flex-col {
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

.hero .grid {
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Service card hover */
.service-card {
    transform: translateY(0);
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out, background 0.4s ease-out;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery items */
.gallery-item {
    cursor: pointer;
}

/* Mobile menu */
#mobile-menu.open {
    opacity: 1 !important;
    visibility: visible !important;
}

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

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

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

/* Mobile menu button animation */
.mobile-menu-btn.active .mobile-menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Prefers 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;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

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

/* Selection color */
::selection {
    background: #f3bfb4;
    color: #5c3122;
}
