*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body { overflow-x: hidden; }

/* Scroll reveal animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Hero animations */
.hero-anim {
    opacity: 0;
    transform: translateY(24px);
    animation: heroReveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-anim:nth-child(2) { animation-delay: 0.12s; }
.hero-anim:nth-child(3) { animation-delay: 0.24s; }
.hero-anim:nth-child(4) { animation-delay: 0.36s; }
.hero-anim:nth-child(5) { animation-delay: 0.48s; }

@keyframes heroReveal {
    to { opacity: 1; transform: translateY(0); }
}

.hero-img-anim {
    opacity: 0;
    transform: translateX(40px);
    animation: heroImgReveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.2s forwards;
}

@keyframes heroImgReveal {
    to { opacity: 1; transform: translateX(0); }
}

/* Navbar scroll state */
nav.scrolled {
    background: rgba(253, 251, 247, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06), 0 4px 24px rgba(0, 0, 0, 0.04);
}

/* 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='%239ca3af' 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;
}

/* Subtle hover lift on service cards */
.group:hover {
    transform: translateY(-4px);
}

.group {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Smooth focus styles */
input:focus, textarea:focus, select:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: #D1FAE5;
    color: #064E3B;
}

/* Mobile menu transition */
#mobileMenu {
    animation: slideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .scroll-reveal { opacity: 1; transform: none; }
    .hero-anim { opacity: 1; transform: none; }
    .hero-img-anim { opacity: 1; transform: none; }
}
