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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(184, 92, 56, 0.2);
    color: #3D2B1F;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F0;
}
::-webkit-scrollbar-thumb {
    background: #D9A078;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B85C38;
}

/* Reveal Animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.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; }

/* Nav Scroll State */
.nav-scrolled {
    background: rgba(61, 43, 31, 0.95) !important;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-scrolled .nav-link {
    color: rgba(253, 248, 240, 0.9) !important;
}

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

/* Hero gradient animation */
@keyframes gradientShift {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

#hero {
    background-size: 200% 200%;
    animation: gradientShift 15s ease infinite;
}

/* Smooth focus outlines */
button:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #B85C38;
    outline-offset: 2px;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #F2E0C4 0%, #EBC4A8 100%);
}

/* Gallery hover overlay transition fix */
.group:hover .group-hover\:opacity-100 {
    opacity: 1;
}

/* Subtle parallax-like feel for gallery items */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        will-change: opacity, transform;
    }
}

/* Reduce motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}
