/* === Base Styles === */
html {
    scroll-behavior: smooth;
}

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

/* === Scroll Reveal Animations === */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Stagger children */
.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

.product-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.product-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .scroll-reveal,
    .service-card,
    .product-card {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* === Navbar Scroll State === */
.nav-scrolled {
    background: rgba(254, 253, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(5, 150, 105, 0.1);
}

.nav-scrolled .nav-link {
    color: rgb(6, 78, 59) !important;
}

.nav-scrolled .nav-link:hover {
    color: rgb(5, 150, 105) !important;
}

/* === Mobile Menu Transition === */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.3s ease;
    opacity: 0;
}

#mobileMenu.open {
    max-height: 400px;
    opacity: 1;
}

/* === Selection Color === */
::selection {
    background: rgb(16, 185, 129);
    color: rgb(254, 253, 248);
}

/* === Focus Styles === */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgb(16, 185, 129);
    outline-offset: 2px;
    border-radius: 4px;
}

/* === Smooth image loading === */
img {
    image-rendering: auto;
}

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

::-webkit-scrollbar-track {
    background: rgb(254, 253, 248);
}

::-webkit-scrollbar-thumb {
    background: rgb(110, 231, 183);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgb(5, 150, 105);
}

/* === Contact form === */
.contact-input {
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-input:focus {
    border-color: rgb(16, 185, 129);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

/* === Success message animation === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.success-message {
    animation: fadeInUp 0.4s ease forwards;
}
