/* Base & Reset */
*, *::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;
}

::selection {
    background: rgba(201, 152, 56, 0.3);
    color: #F0FBF7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #040B14;
}
::-webkit-scrollbar-thumb {
    background: rgba(201, 152, 56, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(201, 152, 56, 0.5);
}

/* Scroll indicator animation */
@keyframes scrollIndicator {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Reveal animations — progressive enhancement, gated by JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: none;
}

@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: none;
    }
    .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; }
}

/* Navbar states */
#navbar.scrolled {
    background: rgba(4, 11, 20, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(201, 152, 56, 0.1);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

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

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: none;
    }
}

/* Mobile hamburger animation */
#mobile-toggle.active .nav-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-toggle.active .nav-line:nth-child(2) {
    opacity: 0;
}
#mobile-toggle.active .nav-line:nth-child(3) {
    width: 6;
    transform: rotate(-45deg) translate(5px, -5px);
}

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

/* Subtle glow on gold elements */
button:hover,
a:hover {
    will-change: background-color, color, border-color;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid rgba(201, 152, 56, 0.6);
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: auto;
    loading: lazy;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}
