/* Custom styles for Trapper Springs Campground */

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

/* Navbar scroll state */
.nav-fixed {
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Stat cards animation */
.stat-card {
    opacity: 0;
    transform: translateY(20px);
    animation: floatIn 0.6s ease forwards;
}

.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.5s; }
.stat-card:nth-child(3) { animation-delay: 0.7s; }
.stat-card:nth-child(4) { animation-delay: 0.9s; }

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

/* Reveal animations (below the fold only) */
.reveal-grid,
.reveal-card,
.reveal-image {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-grid.revealed,
.reveal-card.revealed,
.reveal-image.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Initial state for reveal elements — only hidden when JS adds .revealed */
@media (prefers-reduced-motion: no-preference) {
    .reveal-grid:not(.revealed),
    .reveal-card:not(.revealed),
    .reveal-image:not(.revealed) {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Mobile menu */
#mobile-menu {
    transition: max-height 0.3s ease, opacity 0.3s ease;
}

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

/* Selection color */
::selection {
    background-color: #f0b020;
    color: #102a43;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #102a43;
}
::-webkit-scrollbar-thumb {
    background: #486581;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #627d98;
}

/* Image aspect ratios */
img {
    display: block;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .stat-card {
        animation: none;
        opacity: 1;
        transform: none;
    }
    .reveal-grid:not(.revealed),
    .reveal-card:not(.revealed),
    .reveal-image:not(.revealed) {
        opacity: 1;
        transform: none;
    }
    * {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}
