/* ── Base Reset & Typography ── */
*, *::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-color: rgba(5, 150, 105, 0.2);
    color: #064e3b;
}

/* ── Navigation ── */
.nav-link {
    position: relative;
}

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

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

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

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

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

/* ── Mobile Menu ── */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

.mobile-menu-open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

.mobile-menu-open .mobile-link:nth-child(1) { transition-delay: 0.05s; }
.mobile-menu-open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
.mobile-menu-open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
.mobile-menu-open .mobile-link:nth-child(4) { transition-delay: 0.2s; }

/* ── Menu Icon Animation ── */
.menu-open #bar1 {
    transform: translateY(5px) rotate(45deg);
}

.menu-open #bar2 {
    opacity: 0;
}

.menu-open #bar3 {
    transform: translateY(-5px) rotate(-45deg);
    width: 100%;
}

/* ── Scroll Reveal ── */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.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; }

/* ── Back to Top ── */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

/* ── 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='%23047857' stroke-width='2' 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 !important;
}

/* ── Smooth Image Loading ── */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

/* ── Focus Styles ── */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* ── Responsive Adjustments ── */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.15;
    }
}

@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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .aspect-square img:hover {
        transform: none;
    }
}
