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

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

body {
    overflow-x: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF5EC;
}
::-webkit-scrollbar-thumb {
    background: #D4CEC3;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #B8613C;
}

/* Selection */
::selection {
    background: #B8613C;
    color: #FDFBF7;
}

/* Reveal Animations */
.reveal-up {
    opacity: 0;
    transform: translateY(30px);
    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-up.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal-right {
    opacity: 0;
    transform: translateX(-30px);
    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-right.revealed {
    opacity: 1;
    transform: translateX(0);
}

/* Staggered delays */
.reveal-up:nth-child(2) { transition-delay: 100ms; }
.reveal-up:nth-child(3) { transition-delay: 200ms; }
.reveal-up:nth-child(4) { transition-delay: 300ms; }

/* Scroll line animation */
.scroll-line {
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; height: 12px; }
    50% { opacity: 1; height: 20px; }
}

/* Navbar */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

#navbar.scrolled .nav-logo {
    color: #2D2820;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeUp 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile menu button */
#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translateY(4px);
}
#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    width: 0;
}
#menu-toggle.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translateY(-4px);
}

/* Image hover effects */
.group img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Form focus states */
input:focus, textarea:focus {
    border-color: #B8613C !important;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[data-src] {
    opacity: 0;
}

/* Aspect ratio fallbacks */
.aspect-\[4\/5\] { aspect-ratio: 4/5; }
.aspect-\[5\/4\] { aspect-ratio: 5/4; }
.aspect-\[3\/4\] { aspect-ratio: 3/4; }
.aspect-\[3\/5\] { aspect-ratio: 3/5; }
.aspect-square { aspect-ratio: 1; }
.aspect-\[16\/10\] { aspect-ratio: 16/10; }

/* Print styles */
@media print {
    #navbar, #mobile-menu, .scroll-line { display: none; }
    body { background: white; }
}
