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

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

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

/* Floating card animations */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-8px); }
}

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

/* Scroll reveal — progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.reveal:not(.revealed) {
    opacity: 1;
    transform: translateY(24px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar glass effect */
#navbar.scrolled {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.08), 0 4px 24px rgba(22, 101, 52, 0.06);
}

/* Smooth focus styles */
input:focus, textarea:focus, button:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: rgba(22, 101, 52, 0.15);
    color: #166534;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
    background: #bce3bc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8dce8d;
}
