/* Base styles & reset */
*, *::before, *::after {
    box-sizing: border-box;
}

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

body {
    overflow-x: hidden;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* Reveal animations — progressive enhancement */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Default hidden state for reduced motion preference */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(24px);
    }

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

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

#menu-overlay {
    transition: opacity 0.3s ease;
}

/* Navbar scroll state */
#navbar.scrolled {
    box-shadow: 0 1px 20px rgba(6, 78, 59, 0.06);
}

/* Custom select arrow */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23059669' 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 12px center;
    background-size: 16px;
    padding-right: 40px;
}

/* Smooth image loading */
img {
    loading: lazy;
}

/* Focus visible styles */
:focus-visible {
    outline: 2px solid #059669;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Button hover lift effect */
a[href="#contact"],
button[type="submit"] {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

a[href="#contact"]:hover,
button[type="submit"]:hover {
    transform: translateY(-1px);
}

/* Card hover effect */
.reveal.group {
    will-change: transform;
}

/* Service card hover */
.reveal.group:hover {
    transform: translateY(-4px);
}

/* Gallery hover */
.rounded-3xl.overflow-hidden img {
    will-change: transform;
}

/* Mobile link hover */
.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #059669;
    transition: width 0.3s ease;
}

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

/* Print styles */
@media print {
    header, footer, .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    
    #mobile-menu, #menu-overlay {
        display: none !important;
    }
}
