/* ── Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    margin: 0;
    overflow-x: hidden;
}

::selection {
    background: rgba(4, 120, 87, 0.15);
    color: #064E3B;
}

/* ── Scroll Reveal ── */
.section-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

@media (prefers-reduced-motion: no-preference) {
    .section-reveal {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .section-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Hero Orbs Animation ── */
@media (prefers-reduced-motion: no-preference) {
    .hero-orb {
        animation: float 8s ease-in-out infinite;
    }
    
    .hero-orb:nth-child(2) {
        animation-delay: -2s;
        animation-duration: 10s;
    }
    
    .hero-orb:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 12s;
    }
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -20px) scale(1.05); }
    66% { transform: translate(-10px, 15px) scale(0.95); }
}

/* ── Navbar Transition ── */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(253, 248, 240, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(4, 120, 87, 0.08);
}

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

#mobile-menu .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#mobile-menu .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#mobile-menu .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 24px;
}

/* ── Service Card Stagger ── */
.service-card {
    transition: background-color 0.5s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .service-card {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.6s ease, transform 0.6s ease, background-color 0.5s ease;
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Form Focus States ── */
input:focus,
textarea:focus {
    outline: none;
}

/* ── Custom Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #FDF8F0;
}

::-webkit-scrollbar-thumb {
    background: #047857;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #065F46;
}

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

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 1px;
    background: #34D399;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

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