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

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

/* Custom selection color */
::selection {
    background-color: rgba(122, 29, 46, 0.2);
    color: #3B0A15;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FAF8F5;
}
::-webkit-scrollbar-thumb {
    background: #CC5060;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #9C273A;
}

/* Navigation transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu animations */
#mobile-menu.open {
    transform: translateX(0);
}
#mobile-menu.closed {
    transform: translateX(100%);
}

/* Hamburger animation */
.menu-line {
    transition: all 0.3s ease;
}
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
#menu-btn.active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.25rem;
}

/* Scroll reveal animations - progressive enhancement */
.reveal-up,
.reveal-left,
.reveal-right {
    opacity: 1;
    transform: none;
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal-up {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-left {
        opacity: 0;
        transform: translateX(-30px);
    }
    .reveal-right {
        opacity: 0;
        transform: translateX(30px);
    }
    .reveal-up.revealed,
    .reveal-left.revealed,
    .reveal-right.revealed {
        opacity: 1;
        transform: none;
    }
}

/* Image hover effects */
img {
    max-width: 100%;
    height: auto;
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #9C273A;
    outline-offset: 4px;
    border-radius: 4px;
}

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

/* Print styles */
@media print {
    nav, #menu-btn, .reveal-up, .reveal-left, .reveal-right {
        display: none;
    }
    body {
        background: white;
        color: black;
    }
}
