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

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(123, 45, 59, 0.15);
    color: #3d2820;
}

/* Reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.2s; }
.reveal:nth-child(4) { transition-delay: 0.3s; }

/* Staggered reveal for menu items */
.group {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.group.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(254, 253, 251, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(61, 40, 32, 0.06);
}

#navbar.scrolled .font-serif {
    color: #3d2820;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Hamburger animation */
#mobile-menu-btn.active #line1 {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu-btn.active #line2 {
    opacity: 0;
}

#mobile-menu-btn.active #line3 {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* Smooth image loading */
img {
    display: block;
    max-width: 100%;
}

/* Focus styles */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 1px solid rgba(123, 45, 59, 0.5);
    outline-offset: 2px;
}

/* Remove default button styles */
button {
    background: none;
    border: none;
    cursor: pointer;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(123, 45, 59, 0.2);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(123, 45, 59, 0.4);
}

/* Form focus states */
input:focus,
textarea:focus {
    border-bottom-color: rgba(244, 163, 184, 0.8) !important;
}

/* Prevent layout shift on images */
.aspect-square,
.aspect-\[4\/5\],
.aspect-\[4\/3\] {
    position: relative;
}

/* Print styles */
@media print {
    #navbar,
    #mobile-menu-btn {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
