/* Base & Typography */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfbf7;
}
::-webkit-scrollbar-thumb {
    background: #d9b6a0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c4421e;
}

/* Selection */
::selection {
    background: #c4421e;
    color: #fdfbf7;
}

/* Reveal Animations */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-left {
    transform: translateX(-40px);
}

.reveal-right {
    transform: translateX(40px);
}

.reveal-up.visible,
.reveal-left.visible,
.reveal-right.visible {
    opacity: 1;
    transform: translate(0, 0);
}

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

/* Navbar */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.9);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

/* Nav Links */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #c4421e;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.mobile-link {
    position: relative;
}

/* Hero Image Reveal */
.reveal-right > div {
    clip-path: inset(0 100% 0 0);
    transition: clip-path 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-right.visible > div {
    clip-path: inset(0 0 0 0);
}

/* Smooth hover for cards */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Image aspect ratio fallbacks */
img {
    max-width: 100%;
    height: auto;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .group:hover .group-hover\:scale-105 {
        transform: none;
    }
}

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

/* Print styles */
@media print {
    #navbar,
    #gallery,
    .reveal-up,
    .reveal-left,
    .reveal-right {
        opacity: 1;
        transform: none;
    }
    
    body {
        background: white;
        color: black;
    }
}
