/* ── Custom Utilities ── */
html {
    scroll-behavior: smooth;
}

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

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

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

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

.animate-float-delayed {
    animation: float-delayed 5s ease-in-out infinite;
    animation-delay: 1s;
}

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

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

/* Fallback: always visible if JS is disabled */
@media not all and (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}

/* ── Navbar glass effect ── */
.nav-scrolled {
    background: rgba(250, 245, 247, 0.92) !important;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(79, 38, 52, 0.08), 0 4px 24px rgba(79, 38, 52, 0.06);
}

.nav-scrolled .font-serif,
.nav-scrolled span,
.nav-scrolled a:not(.bg-plum-800) {
    color: #4f2634 !important;
}

/* ── Selection color ── */
::selection {
    background: rgba(251, 191, 36, 0.25);
    color: #4f2634;
}

/* ── Mobile menu transitions ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

/* ── Subtle hover underline for links ── */
a:not(.bg-plum-800):not(.bg-amber-400):not([class*="bg-"]):not(.font-bold) {
    position: relative;
}
