/* ── Base & Utilities ── */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #b8e6d0;
    color: #0a2a45;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ed;
}
::-webkit-scrollbar-thumb {
    background: #b8e6d0;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8fd4b2;
}

/* ── Animations ── */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

@keyframes floatSlow {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(1deg); }
}

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

@keyframes floatMediumReverse {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(8px); }
}

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

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

.animate-float-medium {
    animation: floatMedium 5s ease-in-out infinite;
}

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

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(15, 61, 107, 0.06);
}

/* ── Mobile Menu ── */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #5fbf92;
    transition: width 0.3s ease;
}

.mobile-link:hover::after {
    width: 100%;
}

/* ── Section Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
    .animate-float,
    .animate-float-slow,
    .animate-float-medium,
    .animate-float-medium-reverse {
        animation: none;
    }
}

/* ── Image aspect ratios ── */
img {
    max-width: 100%;
    height: auto;
}

/* ── Focus styles ── */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #5fbf92;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Smooth transitions on interactive elements ── */
a, button {
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
