/* Base styles & custom properties */
:root {
    --terra-500: #C2704E;
    --terra-600: #A85A3E;
}

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: #D4D1C9;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #A8A39A;
}

/* Selection color */
::selection {
    background: #E9B4A0;
    color: #5F3326;
}

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

/* Select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%237A756D' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 12px;
    padding-right: 2.5rem;
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(253, 251, 247, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .reveal[data-delay="100ms"] { transition-delay: 100ms; }
    .reveal[data-delay="200ms"] { transition-delay: 200ms; }
    .reveal[data-delay="300ms"] { transition-delay: 300ms; }
}

/* Ensure content is visible without JS */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Mobile menu animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
#mobileMenu.open {
    max-height: 400px;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* Button ripple effect on focus */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #C2704E;
    outline-offset: 2px;
}
