/* ============================================
   Squirrelz Nest — Custom Styles
   ============================================ */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0A1F3F;
}
::-webkit-scrollbar-thumb {
    background: #C8A45E;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #D4BC4E;
}

/* Selection color */
::selection {
    background: #C8A45E;
    color: #0A1F3F;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

#navbar.scrolled {
    background: rgba(10, 31, 63, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(200, 164, 94, 0.1);
}

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

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

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

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

/* Menu button animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

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

/* ============================================
   Scroll Reveal Animations
   Progressive enhancement — only when JS runs
   and user prefers motion
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* ============================================
   Typography
   ============================================ */
.font-serif {
    text-wrap: balance;
}

/* ============================================
   Hero
   ============================================ */
#hero {
    position: relative;
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(4, 14, 30, 0.4) 0%,
        rgba(4, 14, 30, 0.2) 40%,
        rgba(4, 14, 30, 0.3) 70%,
        rgba(4, 14, 30, 1) 100%
    );
    z-index: 1;
    pointer-events: none;
}

#hero > .relative {
    z-index: 2;
}

/* ============================================
   Buttons
   ============================================ */
a {
    text-decoration: none;
}

/* ============================================
   Image hover effects
   ============================================ */
.group img {
    will-change: transform;
}

/* ============================================
   Gallery
   ============================================ */
#gallery .col-span-2 {
    min-height: 400px;
}

@media (min-width: 1024px) {
    #gallery .col-span-2 {
        min-height: auto;
    }
}

/* ============================================
   Map container
   ============================================ */
#visit iframe {
    min-height: 400px;
}

@media (min-width: 1024px) {
    #visit iframe {
        min-height: 500px;
    }
}

/* ============================================
   Utility
   ============================================ */
.text-balance {
    text-wrap: balance;
}

/* ============================================
   Reduced motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .group img {
        transition: none;
    }

    .group:hover img {
        transform: none;
    }
}
