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

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

body {
    overflow-x: hidden;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #F5F0E8;
}
::-webkit-scrollbar-thumb {
    background: #b9d0a5;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fb56f;
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-2deg); }
}

@keyframes float-slow {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delay {
    animation: float-delay 8s ease-in-out infinite;
}

.animate-float-slow {
    animation: float-slow 10s ease-in-out infinite;
}

/* Reveal animations — progressive enhancement, works without JS */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* JS-enhanced reveal (applied via script) */
@media (prefers-reduced-motion: no-preference) {
    .reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback for no-JS: ensure all content is visible */
.no-js .reveal-hidden {
    opacity: 1;
    transform: none;
}

/* Navbar transitions */
.nav-scrolled {
    background: rgba(245, 240, 232, 0.92) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 1px 20px rgba(45, 80, 22, 0.08) !important;
}

.nav-transparent {
    background: transparent !important;
    backdrop-filter: none !important;
}

/* Button focus styles */
a:focus-visible, button:focus-visible {
    outline: 2px solid #2D5016;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Selection color */
::selection {
    background: #b9d0a5;
    color: #14210a;
}
