/* Base styles and custom utilities */
:root {
    --burgundy-700: #781f37;
    --burgundy-800: #5c1729;
    --blush-50: #fff8f6;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(255, 248, 246, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(120, 31, 55, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: var(--burgundy-700);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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

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

#mobile-menu.open .mobile-menu-link {
    animation: slideIn 0.4s ease forwards;
}

#mobile-menu .mobile-menu-link:nth-child(1) { animation-delay: 0.05s; }
#mobile-menu .mobile-menu-link:nth-child(2) { animation-delay: 0.1s; }
#mobile-menu .mobile-menu-link:nth-child(3) { animation-delay: 0.15s; }
#mobile-menu .mobile-menu-link:nth-child(4) { animation-delay: 0.2s; }

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu toggle animation */
.menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

.menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.25rem;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Menu item hover */
.group:hover h4 {
    letter-spacing: 0.01em;
}

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

/* Selection color */
::selection {
    background: rgba(120, 31, 55, 0.15);
    color: var(--burgundy-800);
}

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

::-webkit-scrollbar-track {
    background: var(--blush-50);
}

::-webkit-scrollbar-thumb {
    background: rgba(120, 31, 55, 0.2);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(120, 31, 55, 0.4);
}

/* Focus styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--burgundy-700);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Touch device optimizations */
@media (hover: none) {
    .hover\\:scale-105:hover {
        transform: none;
    }
    
    .hover\\:shadow-xl:hover {
        box-shadow: none;
    }
}

/* Print styles */
@media print {
    #navbar,
    #gallery,
    .reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
