/* ── Base & Utilities ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(32px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fallback: ensure content is visible even without JS */
@supports not (animation: none) {
    .scroll-reveal { opacity: 1; transform: none; }
}

/* ── Navbar Transition ── */
#navbar.scrolled {
    background: rgba(10, 35, 66, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #62c491;
    transition: width 0.3s ease;
    border-radius: 1px;
}
.nav-link:hover::after { width: 100%; }

/* ── Mobile Nav Links ── */
.mobile-nav-link {
    position: relative;
}

/* ── Floating Animation ── */
@keyframes float {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-20px) scale(1.05); }
}
.animate-float { animation: float 6s ease-in-out infinite; }
.animate-float-delay { animation: float 6s ease-in-out 2s infinite; }
.animate-float-delay2 { animation: float 5s ease-in-out 4s infinite; }

/* ── Focus Styles ── */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #62c491;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Selection ── */
::selection { background: rgba(98, 196, 145, 0.3); color: #0A2342; }

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f4fbf7; }
::-webkit-scrollbar-thumb { background: #a8bdd4; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #7ea0c0; }
