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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(251, 191, 36, 0.3);
    color: #faf5f7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #2d1317;
}
::-webkit-scrollbar-thumb {
    background: #763842;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a8606a;
}

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

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
#mobile-menu.open {
    max-height: 500px;
}

/* Hero stat card animations */
@keyframes float-1 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-12px) rotate(0.5deg); }
}
@keyframes float-2 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(10px) rotate(-0.5deg); }
}
@keyframes float-3 {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(0.3deg); }
}

.stat-card-1 {
    animation: float-1 6s ease-in-out infinite;
}
.stat-card-2 {
    animation: float-2 7s ease-in-out infinite;
}
.stat-card-3 {
    animation: float-3 5.5s ease-in-out infinite;
}

/* Scroll reveal base — content always visible by default */
.menu-reveal,
.about-reveal,
.about-content,
.gallery-reveal,
.gallery-item,
.visit-reveal,
.visit-info,
.visit-map,
.cta-reveal {
    opacity: 1;
    transform: none;
}

/* Only apply progressive enhancement when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .menu-reveal,
    .js-enabled .about-reveal,
    .js-enabled .about-content,
    .js-enabled .gallery-reveal,
    .js-enabled .cta-reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .js-enabled .gallery-item {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    .js-enabled .visit-reveal,
    .js-enabled .visit-info,
    .js-enabled .visit-map {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

/* Active nav link */
.nav-link-active {
    color: #fbbf24 !important;
}

/* Navbar scrolled state */
.navbar-scrolled {
    background: rgba(45, 19, 23, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(118, 56, 66, 0.3);
}

/* Gallery hover overlay */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(45, 19, 23, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
    border-radius: inherit;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Subtle grain texture overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 1;
}

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