/* Reset & Base */
*, *::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 */
::selection {
    background: #c4704b;
    color: #fff;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Scroll Reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

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

#mobile-menu.closed {
    transform: translateX(100%);
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

.navbar-scrolled .navbar-logo {
    color: #292524;
}

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

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

/* Button focus states */
a:focus-visible, button:focus-visible {
    outline: 2px solid #c4704b;
    outline-offset: 4px;
    border-radius: 2px;
}

/* Image loading placeholder */
img {
    background-color: #f5e8d0;
}

/* 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 {
        opacity: 1;
        transform: none;
    }
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

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

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

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

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

/* Image aspect ratio utilities */
.aspect-\[4\/5\] {
    aspect-ratio: 4/5;
}

/* Mobile menu overlay */
#mobile-menu {
    z-index: 60;
}

/* Prevent body scroll when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Print styles */
@media print {
    nav, #mobile-menu, .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
    }
}
