/* ── Base & Utilities ── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { overflow-x: hidden; }

/* ── Navbar Scroll State ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
#navbar.scrolled {
    background: rgba(255, 254, 248, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(5, 78, 59, 0.07);
}

/* ── Floating Cards Animation ── */
@keyframes float-slow {
    0%, 100% { transform: translateY(0px) rotate(-1deg); }
    50% { transform: translateY(-14px) rotate(0deg); }
}
@keyframes float-medium {
    0%, 100% { transform: translateY(0px) rotate(1deg); }
    50% { transform: translateY(-10px) rotate(0deg); }
}
@keyframes float-fast {
    0%, 100% { transform: translateY(0px) rotate(0.5deg); }
    50% { transform: translateY(-8px) rotate(-0.5deg); }
}
.floating-card-1 { animation: float-slow 5s ease-in-out infinite; }
.floating-card-2 { animation: float-medium 4s ease-in-out infinite; }
.floating-card-3 { animation: float-fast 3.5s ease-in-out infinite; }

/* ── Scroll Reveal ── */
.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);
}
.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; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }

/* ── Mobile Menu ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#mobile-menu.open {
    max-height: 500px;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #ecfdf5; }
::-webkit-scrollbar-thumb { background: #6ee7b7; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #34d399; }

/* ── Selection ── */
::selection { background: #a7f3d0; color: #064e3b; }

/* ── Service Card Hover Enhancement ── */
.group:hover .group-hover\:bg-emerald-200 {
    background-color: #a7f3d0;
}

/* ── Form Select Arrow ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%239ca3af' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* ── Smooth Image Loading ── */
img {
    opacity: 1;
    transition: opacity 0.4s ease;
}
img[data-src] {
    opacity: 0;
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .reveal { opacity: 1; transform: none; }
}
