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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(200, 98, 57, 0.3);
    color: #F5E6D3;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0D0D0D;
}
::-webkit-scrollbar-thumb {
    background: #242424;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #C86239;
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(13, 13, 13, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(232, 213, 196, 0.05);
}

/* Scroll animations */
.scroll-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);
}

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

.scroll-reveal.delay-1 { transition-delay: 0.1s; }
.scroll-reveal.delay-2 { transition-delay: 0.2s; }
.scroll-reveal.delay-3 { transition-delay: 0.3s; }
.scroll-reveal.delay-4 { transition-delay: 0.4s; }

/* Scroll dot animation */
@keyframes scrollDot {
    0% { top: -16px; opacity: 0; }
    50% { opacity: 1; }
    100% { top: 48px; opacity: 0; }
}

.animate-scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* Feature item hover */
.feature-item {
    position: relative;
}

.feature-item::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #C86239, transparent);
    transition: all 0.4s ease;
    transform: translateX(-50%);
}

.feature-item:hover::after {
    width: 60%;
}

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

.menu-line.active:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.menu-line.active:nth-child(2) {
    opacity: 0;
}
.menu-line.active:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 24px;
}

/* Nav link hover underline */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #C86239;
    transition: width 0.3s ease;
}

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

/* Gallery hover overlay */
.rounded-2xl.overflow-hidden {
    position: relative;
}

/* Prefers reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .animate-scroll-dot {
        animation: none;
    }
    
    .rounded-2xl.overflow-hidden img {
        transition: none;
    }
    
    .feature-item::after {
        transition: none;
    }
}
