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

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

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(168, 69, 46, 0.2);
    color: inherit;
}

/* Scroll-reveal animations — progressive enhancement, hidden by default for reduced motion */
.reveal-on-scroll {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-on-scroll {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-on-scroll.is-visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 252, 250, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

#navbar.scrolled .nav-logo-text {
    color: #1c1917;
}

#navbar.scrolled .nav-link {
    color: #57534e;
}

#navbar.scrolled .nav-link:hover {
    color: #a8452e;
}

#navbar.scrolled #line1,
#navbar.scrolled #line2,
#navbar.scrolled #line3 {
    background: #1c1917;
}

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

#mobile-menu.open #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu.open #line2 {
    opacity: 0;
    transform: translateX(10px);
}

#mobile-menu.open #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
}

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

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

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

::-webkit-scrollbar-thumb {
    background: #d9bc96;
    border-radius: 3px;
}

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

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

/* Subtle hover animations for cards */
.group:hover .group-hover\:rotate-12 {
    transform: rotate(12deg);
}

/* Print styles */
@media print {
    #navbar,
    #hero,
    .reveal-on-scroll {
        display: block !important;
        opacity: 1 !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
