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

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

body {
    overflow-x: hidden;
}

/* Scroll reveal — progressive enhancement, hidden by default via JS */
.reveal {
    opacity: 1;
    transform: none;
    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);
}

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

/* Hero animations — above the fold, always visible */
.hero-anim {
    opacity: 1;
    animation: heroFadeIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.1s; }
.hero-anim:nth-child(2) { animation-delay: 0.3s; }
.hero-anim:nth-child(3) { animation-delay: 0.5s; }
.hero-anim:nth-child(4) { animation-delay: 0.7s; }
.hero-anim:nth-child(5) { animation-delay: 0.9s; }

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-anim {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* Navbar */
#navbar.scrolled {
    background: rgba(3, 5, 4, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
}

#navbar.scrolled a:not([class*="bg-"]):not([class*="border"]) {
    color: rgba(250, 245, 235, 0.85);
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Gold accent line on menu items */
.menu-line {
    position: relative;
}

.menu-line::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: #d4a843;
    transition: width 0.3s ease;
}

.menu-line:hover::after {
    width: 100%;
}

/* Selection */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #fdfbf7;
}

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

::-webkit-scrollbar-track {
    background: #030504;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 67, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 67, 0.5);
}

/* Image placeholder fallbacks */
img {
    image-rendering: auto;
}

/* Smooth focus outlines */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 4px;
    border-radius: 2px;
}
