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

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

body {
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hero gradient */
.hero-gradient {
    background: linear-gradient(
        135deg,
        #C27C54 0%,
        #A66240 25%,
        #874E34 50%,
        #6D402B 75%,
        #3D2B1F 100%
    );
}

/* Preloader */
#preloader {
    pointer-events: none;
}

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

/* Reveal animations */
.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.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Hero staggered reveals */
#hero .reveal {
    opacity: 0;
    transform: translateY(20px);
}

#hero.loaded .reveal {
    animation: heroReveal 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

#hero .reveal:nth-child(1) { animation-delay: 0.2s; }
#hero .reveal:nth-child(2) { animation-delay: 0.4s; }
#hero .reveal:nth-child(3) { animation-delay: 0.6s; }
#hero .reveal:nth-child(4) { animation-delay: 0.8s; }

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 240, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(194, 124, 84, 0.1);
}

#navbar.scrolled a:not(.px-6) {
    color: #3D2B1F;
}

/* Mobile menu */
#mobile-menu.open {
    transform: translateX(0);
}

/* Menu list hover effects */
#menu .flex.justify-between:hover {
    transform: translateX(4px);
    transition: transform 0.2s ease;
}

#menu .flex.justify-between {
    transition: transform 0.2s ease;
}

/* Gallery images */
#gallery img {
    will-change: transform;
}

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

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

::-webkit-scrollbar-thumb {
    background: #D4B578;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #C27C54;
}

/* Selection color */
::selection {
    background: #C27C54;
    color: white;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid #C27C54;
    outline-offset: 2px;
}

/* 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; }
}
