/* ===== Base & Utilities ===== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(212, 168, 83, 0.3);
    color: #fff;
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #050D18;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #D4A853, #A87B2E);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #F0D48A, #D4A853);
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseSlow {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(-50%);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.4;
    }
    50% {
        transform: translateY(-20px) rotate(180deg);
        opacity: 0.8;
    }
}

.animate-fade-up {
    animation: fadeUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pulse-slow {
    animation: pulseSlow 4s ease-in-out infinite;
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* ===== Particles ===== */
.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.particle.gold {
    background: radial-gradient(circle, #F0D48A, #D4A853);
    box-shadow: 0 0 6px #D4A853, 0 0 12px rgba(212, 168, 83, 0.3);
}

.particle.mint {
    background: radial-gradient(circle, #5EEAD4, #34D399);
    box-shadow: 0 0 6px #34D399, 0 0 12px rgba(52, 211, 153, 0.3);
}

/* ===== Category Cards ===== */
.category-card {
    position: relative;
}

.category-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    pointer-events: none;
    transition: border-color 0.3s ease;
}

.category-card:hover::after {
    border-color: rgba(212, 168, 83, 0.2);
}

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

#navbar.scrolled {
    background: rgba(5, 13, 24, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 83, 0.1), 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, #D4A853, #F0D48A);
    transition: width 0.3s ease;
}

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

.nav-link:hover {
    color: #D4A853 !important;
}

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 1px;
    background: #D4A853;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
}

.mobile-link:hover {
    color: #D4A853 !important;
}

/* ===== Menu Button Animation ===== */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
}

/* ===== Section Dividers ===== */
.section-divider {
    height: 1px;
    background: linear-gradient(to right, transparent, rgba(212, 168, 83, 0.2), transparent);
}

/* ===== Feature Cards Hover ===== */
.text-center.group:hover .w-16 {
    transform: scale(1.1) rotate(5deg);
}

/* ===== Map Contrast ===== */
iframe {
    border-radius: 16px;
}

/* ===== Responsive adjustments ===== */
@media (max-width: 640px) {
    .font-display {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }

    h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
    }
}

/* ===== Focus styles for accessibility ===== */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #D4A853;
    outline-offset: 4px;
    border-radius: 4px;
}

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

    html {
        scroll-behavior: auto;
    }

    .animate-marquee {
        animation: none;
    }
}
