/* ===== Custom Styles for Hilltop Cabins ===== */

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

/* Base font rendering */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ===== Scroll Reveal Animations ===== */
/* Default state: visible (no JS progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Enhanced state: only applies with JS via .revealed class */
.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

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

/* ===== Floating Stat Cards Animation ===== */
.stat-card {
    animation: float 6s ease-in-out infinite;
}

.stat-card:nth-child(1) {
    animation-delay: 0s;
}

.stat-card:nth-child(2) {
    animation-delay: -1.5s;
}

.stat-card:nth-child(3) {
    animation-delay: -3s;
}

.stat-card:nth-child(4) {
    animation-delay: -4.5s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* ===== Navbar Transition ===== */
.nav-scrolled {
    background-color: rgba(254, 253, 248, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(22, 107, 55, 0.08);
}

.nav-scrolled #navbar > div > div:first-child > a > div {
    background-color: #166b37 !important;
}

.nav-scrolled #navbar > div > div:first-child > a > span {
    color: #114426 !important;
}

/* ===== Mobile Menu Transitions ===== */
#mobile-menu {
    animation: slideDown 0.3s ease-out;
}

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

/* ===== Input Focus Styles ===== */
input:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(22, 107, 55, 0.1);
}

/* ===== Custom Selection Color ===== */
::selection {
    background-color: #166b37;
    color: #fefdf8;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .stat-card {
        animation: none;
    }
    
    .group img {
        transition: none;
    }
}

/* ===== Responsive Adjustments ===== */
@media (max-width: 768px) {
    .stat-card {
        animation: none;
    }
}
