/* ============================================
   Boulder Campground — Custom Styles
   ============================================ */

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Selection color */
::selection {
    background: rgba(217, 90, 53, 0.2);
    color: #5c2318;
}

/* ============================================
   Navigation
   ============================================ */
#nav {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease;
}

#nav.scrolled {
    background: rgba(253, 252, 249, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(180, 163, 142, 0.2);
}

.nav-link {
    position: relative;
}

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

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

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

#mobile-menu.close {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transition: color 0.3s ease;
}

.mobile-link:hover {
    color: #d95a35;
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

/* ============================================
   Hero Animations (above fold — always visible)
   ============================================ */
.hero-subtitle {
    animation: slideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    transform: translateY(0);
}

.hero-title {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s forwards;
    transform: translateY(0);
}

.hero-desc {
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    transform: translateY(0);
}

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

/* ============================================
   Scroll Reveal (below fold only)
   Progressive enhancement — content visible
   even if JS doesn't load.
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    /* Staggered delays */
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
}

/* Fallback: always visible if JS disabled or reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Space Cards
   ============================================ */
.space-card {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ============================================
   Form Styles
   ============================================ */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2396856e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ============================================
   Subtle hover transitions on all interactive
   ============================================ */
a, button {
    transition: all 0.3s ease;
}

img {
    display: block;
}

/* ============================================
   Thin decorative lines
   ============================================ */
.divider-line {
    height: 1px;
    background: linear-gradient(90deg, transparent, #e9d5c0, transparent);
}

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

::-webkit-scrollbar-track {
    background: #faf6f0;
}

::-webkit-scrollbar-thumb {
    background: #d2c4b6;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #b4a38e;
}

/* ============================================
   Responsive adjustments
   ============================================ */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.75rem;
    }
}

@media (max-width: 640px) {
    html {
        scroll-padding-top: 70px;
    }
}
