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

body {
    overflow-x: hidden;
}

/* Scroll Reveal — progressive enhancement, JS-enabled only */
.js-enabled .reveal-on-scroll {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.js-enabled .reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.js-enabled .reveal-on-scroll:nth-child(1) { transition-delay: 0ms; }
.js-enabled .reveal-on-scroll:nth-child(2) { transition-delay: 100ms; }
.js-enabled .reveal-on-scroll:nth-child(3) { transition-delay: 200ms; }
.js-enabled .reveal-on-scroll:nth-child(4) { transition-delay: 300ms; }
.js-enabled .reveal-on-scroll:nth-child(5) { transition-delay: 400ms; }
.js-enabled .reveal-on-scroll:nth-child(6) { transition-delay: 500ms; }

/* Navbar scroll state */
.nav-scrolled {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(254, 252, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(27, 67, 50, 0.08);
    box-shadow: 0 1px 12px rgba(27, 67, 50, 0.06);
    transition: box-shadow 0.3s ease;
}

/* Mobile menu */
#mobile-menu:not(.hidden) {
    display: flex;
}

.mobile-overlay {
    cursor: pointer;
}

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(27, 67, 50, 0.08);
    transition: color 0.2s ease;
}

.mobile-link:hover {
    color: #1B4332;
}

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

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

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

.reveal-on-scroll.absolute.-bottom-5.-left-5 {
    animation: float-slow 4s ease-in-out infinite;
}

.reveal-on-scroll.absolute.-right-3.-top-3 {
    animation: float-medium 3.5s ease-in-out infinite;
}

.reveal-on-scroll.absolute.right-8.top-1/3 {
    animation: float-fast 4.5s ease-in-out infinite;
}

/* Selection color */
::selection {
    background-color: #1B4332;
    color: #FEFCF8;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #D4A017;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Reduce 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;
    }
}
