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

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(168, 80, 116, 0.2);
    color: inherit;
}

/* Marquee Animation */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

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

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(32px);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .animate-marquee {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
    img {
        transition: none;
    }
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobile-menu.open {
    transform: translateX(0);
}

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

/* Mobile link transitions */
.mobile-link {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.2s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Navbar states */
.nav-scrolled {
    background: rgba(250, 248, 245, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-link {
    color: rgba(26, 26, 26, 0.7) !important;
}

.nav-scrolled .font-serif.text-xl {
    color: rgb(115, 45, 74) !important;
}

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

/* Smooth focus outlines */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(251, 191, 36, 0.7);
    outline-offset: 2px;
    border-radius: 4px;
}

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

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

::-webkit-scrollbar-thumb {
    background: rgba(115, 45, 74, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(115, 45, 74, 0.5);
}
