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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    overflow-x: hidden;
}

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

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

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

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

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

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    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-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

/* Navigation */
.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(253, 249, 243, 0.97);
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(44, 36, 32, 0.08);
}

#navbar.scrolled .nav-link {
    color: #2C2420;
}

#navbar.scrolled .nav-link::after {
    background-color: #B85C38;
}

/* Mobile menu */
.mobile-link {
    position: relative;
}

/* Form focus states */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #B85C38 !important;
    box-shadow: 0 0 0 3px rgba(184, 92, 56, 0.1);
}

/* Button hover lift */
button[type="submit"],
a[href="#contact"] {
    position: relative;
    overflow: hidden;
}

button[type="submit"]::before,
a[href="#contact"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transition: left 0.5s ease;
}

button[type="submit"]:hover::before,
a[href="#contact"]:hover::before {
    left: 100%;
}

/* Image hover zoom */
img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

/* Divider */
.divider {
    width: 60px;
    height: 1px;
    background: linear-gradient(90deg, #B85C38, transparent);
}

/* Mobile menu animation */
#mobile-menu {
    pointer-events: none;
}

#mobile-menu.active {
    pointer-events: all;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

/* 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;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
}

/* Utility */
.text-balance {
    text-wrap: balance;
}

/* Print */
@media print {
    #navbar,
    #mobile-menu-btn,
    .animate-bounce {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
