*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

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

/* Scroll-reveal animations — progressive enhancement, hidden by default */
.scroll-anim {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-anim.is-hidden {
        opacity: 0;
        transform: translateY(24px);
    }
}

/* Header scroll state */
#site-header.scrolled {
    background: rgba(20, 31, 46, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.08);
}

/* Mobile menu transitions */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}

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

/* Subtle gradient shimmer on hero */
@keyframes shimmer {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(30,45,61,0.85) 0%, rgba(232,79,38,0.6) 50%, rgba(158,107,54,0.5) 100%);
    background-size: 200% 200%;
    animation: shimmer 12s ease infinite;
    z-index: 0;
}

#hero > *:not(.absolute) {
    position: relative;
    z-index: 1;
}

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

/* Custom scrollbar */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #faf5eb; }
::-webkit-scrollbar-thumb { background: #d4a25a; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #c28944; }
