/* ── Custom Animations ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0) rotate(12deg); }
    50% { transform: translateY(-16px) rotate(12deg); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-float-slow { animation: float-slow 6s ease-in-out infinite; }
.animate-float-medium { animation: float-medium 4s ease-in-out infinite; }
.animate-float-fast { animation: float-fast 3s ease-in-out infinite; }

/* ── Scroll Reveal (progressive enhancement) ── */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
        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);
    }
    .scroll-reveal:nth-child(2) { transition-delay: 0.1s; }
    .scroll-reveal:nth-child(3) { transition-delay: 0.2s; }
    .scroll-reveal:nth-child(4) { transition-delay: 0.3s; }
    .scroll-reveal:nth-child(5) { transition-delay: 0.4s; }
    .scroll-reveal:nth-child(6) { transition-delay: 0.5s; }
}

/* ── Smooth Scroll ── */
html {
    scroll-behavior: smooth;
}

/* ── Focus Styles ── */
*:focus-visible {
    outline: 2px solid #2dd4bf;
    outline-offset: 2px;
}

/* ── Selection ── */
::selection {
    background-color: rgba(45, 212, 191, 0.3);
    color: #0f172a;
}

/* ── Navbar transition ── */
#navbar.scrolled {
    background-color: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* ── Custom scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0f172a;
}
::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2dd4bf;
}

/* ── Mobile menu animation ── */
.mobile-menu-open #mobile-menu {
    opacity: 1;
    pointer-events: all;
}

/* ── Button ripple effect (subtle) ── */
button, a {
    -webkit-tap-highlight-color: transparent;
}
</style>
