/* Base styles and custom utilities */
html {
    scroll-behavior: smooth;
}

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

/* Scroll reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }

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

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(255, 255, 255, 0.97) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(128, 0, 32, 0.08);
}

.navbar-scrolled .nav-logo-text {
    color: #800020 !important;
}

.navbar-scrolled .nav-link {
    color: #374151 !important;
}

.navbar-scrolled .mobile-nav-link {
    color: #374151 !important;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 500px;
    opacity: 1;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: all;
    transform: translateY(0);
}

#back-to-top {
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

::-webkit-scrollbar-thumb {
    background: #f9c3cf;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ec6078;
}

/* Selection color */
::selection {
    background: #f9c3cf;
    color: #590014;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #800020;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }

    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

/* Print styles */
@media print {
    nav, #back-to-top, button {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }
}
