/* Custom styles beyond Tailwind */

html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Navbar scroll state */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(4, 120, 87, 0.08);
}

/* Mobile menu */
#mobileMenu {
    animation: slideDown 0.25s ease;
}

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

.mobile-link {
    display: block;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(4, 120, 87, 0.08);
    transition: color 0.2s ease;
}

.mobile-link:last-child {
    border-bottom: none;
}

/* Subtle hover underline for nav links */
nav a:not(.bg-emerald-600):hover {
    position: relative;
}

/* Selection color */
::selection {
    background: rgba(4, 120, 87, 0.15);
    color: #064e3b;
}

/* Smooth image loading */
img {
    opacity: 1;
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.5s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Contact form */
#contactForm input,
#contactForm textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1.5px solid rgba(4, 120, 87, 0.2);
    border-radius: 0.75rem;
    background: rgba(255, 255, 255, 0.6);
    font-family: inherit;
    font-size: 0.9375rem;
    color: #064e3b;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    outline: none;
}

#contactForm input::placeholder,
#contactForm textarea::placeholder {
    color: rgba(6, 78, 59, 0.4);
}

#contactForm input:focus,
#contactForm textarea:focus {
    border-color: #047857;
    box-shadow: 0 0 0 3px rgba(4, 120, 87, 0.1);
}

#contactForm textarea {
    resize: vertical;
    min-height: 120px;
}

/* Success message */
#formSuccess {
    display: none;
}

#formSuccess.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
    #mobileMenu {
        animation: none;
    }
    #formSuccess.show {
        animation: none;
    }
}
