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

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

/* Selection color */
::selection {
    background-color: rgba(224, 79, 36, 0.15);
    color: inherit;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: #d4b284;
    border-radius: 3px;
}

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

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

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                pointer-events 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}

#mobileMenu.closed {
    opacity: 0;
    pointer-events: none;
}

/* Mobile links */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}

/* Print styles */
@media print {
    header,
    footer,
    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
    }
    
    body {
        background: white !important;
    }
}
