*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    overflow-x: hidden;
}

/* Preloader */
#preloader {
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#preloader.fade-out {
    opacity: 0;
    visibility: hidden;
}

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

#navbar.scrolled {
    background: rgba(6, 10, 20, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(201, 162, 39, 0.1);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1.5px;
    background: linear-gradient(90deg, #c9a227, #f0d078);
    transition: width 0.3s ease;
}

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

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

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

.mobile-link {
    position: relative;
}

/* Floating cards */
.floating-card {
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    animation-delay: 0s;
}

.card-2 {
    animation-delay: 2s;
}

.card-3 {
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* Reveal animations (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #f0d078 0%, #c9a227 50%, #e2b84b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

::-webkit-scrollbar-track {
    background: #060a14;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #c9a227, #a8841e);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #f0d078, #c9a227);
}

/* Selection */
::selection {
    background: rgba(201, 162, 39, 0.3);
    color: #f0d078;
}

/* Image lazy loading fade */
img[loading="lazy"] {
    transition: opacity 0.5s ease;
}

img[loading="lazy"]:not([src]) {
    opacity: 0;
}

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

/* Map invert fix for dark theme */
iframe[style*="invert"] {
    border-radius: 0 0 16px 16px;
}
