/* ── Base & Utilities ── */
html { scroll-behavior: smooth; }
body { overflow-x: hidden; }

::selection {
    background: #10B981;
    color: #fff;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Default state: visible (progressive enhancement — JS adds .revealed) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .service-card {
        opacity: 0;
        transform: translateY(20px);
    }
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

/* ── Navbar ── */
#navbar {
    transition: background-color 0.3s ease, box-shadow 0.3s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 252, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    border-radius: 1px;
    transition: width 0.25s ease;
}

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

/* ── Mobile Menu ── */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, padding 0.35s ease;
}

#mobile-menu.open {
    max-height: 400px;
    padding: 0 1rem;
}

.mobile-nav-link {
    position: relative;
    display: block;
}

/* ── Service Cards ── */
.service-card {
    transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 20px 60px -15px rgba(5, 150, 105, 0.15);
}

/* ── Button Ripple ── */
button, a {
    -webkit-tap-highlight-color: transparent;
}

/* ── Form Focus States ── */
input:focus, textarea:focus {
    border-color: #10B981 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1) !important;
    outline: none;
}

/* ── Responsive Tweaks ── */
@media (max-width: 640px) {
    .font-serif {
        font-size: 1.75rem;
    }
}
