/* ── Base & Typography ── */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* ── Scroll Reveal ── */
.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);
}

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

/* ── Navbar ── */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(5, 150, 105, 0.08);
}

.nav-logo {
    transition: color 0.3s ease;
}

#navbar:not(.scrolled) .nav-logo {
    color: #fff;
}

#navbar.scrolled .nav-logo {
    color: #064e3b;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

#navbar:not(.scrolled) .nav-link {
    color: rgba(255, 255, 255, 0.85);
}

#navbar:not(.scrolled) .nav-link:hover {
    color: #fff;
}

#navbar:not(.scrolled) .nav-link::after {
    background: #fff;
}

/* ── Mobile Menu ── */
.mobile-menu-link {
    transition: opacity 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.menu-line {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.menu-line.open-1 {
    transform: rotate(45deg) translate(4px, 4px);
}

.menu-line.open-2 {
    opacity: 0;
}

.menu-line.open-3 {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* ── Hero ── */
.hero-gradient {
    background: linear-gradient(135deg, #064e3b 0%, #059669 40%, #047857 70%, #065f46 100%);
}

.hero-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.08) 1px, transparent 0);
    background-size: 40px 40px;
}

.hero-subtitle {
    animation: fadeDown 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s both;
}

.hero-title {
    animation: fadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.4s both;
}

.hero-tagline {
    animation: fadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s both;
}

.hero-ctas {
    animation: fadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.8s both;
}

.hero-scroll {
    animation: fadeUp 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.2s both;
}

.hero-orb {
    animation: orbFloat 8s ease-in-out infinite;
}

.hero-orb-2 {
    animation-delay: -3s;
    animation-duration: 10s;
}

.hero-orb-3 {
    animation-delay: -5s;
    animation-duration: 12s;
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

.service-card:hover svg {
    transform: scale(1.1) rotate(5deg);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-card svg {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ── Gallery ── */
.gallery-item {
    overflow: hidden;
    border-radius: 4px;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.08);
}

/* ── CTA Section ── */
.cta-gradient {
    background: linear-gradient(135deg, #065f46 0%, #047857 50%, #064e3b 100%);
}

.cta-pattern {
    background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.06) 1px, transparent 0);
    background-size: 32px 32px;
}

.cta-orb {
    animation: orbFloat 10s ease-in-out infinite;
}

.cta-orb-2 {
    animation-delay: -4s;
    animation-duration: 14s;
}

/* ── Form ── */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.08);
}

/* ── Smooth transitions for all interactive elements ── */
a, button {
    transition: all 0.3s ease;
}

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

/* ── Responsive ── */
@media (max-width: 767px) {
    .hero-title {
        font-size: 2.75rem;
    }

    .hero-title br {
        display: none;
    }
}
