/* Custom styles for T & J Pavers & Ponds */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

/* Section animations */
.section-eyebrow {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.section-eyebrow.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-title {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.section-title.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-subtitle {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}

.section-subtitle.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Service cards */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Process steps */
.process-step {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.process-step.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery items */
.gallery-item {
    opacity: 0;
    transform: scale(0.97);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

/* Navbar scroll state */
.nav-scrolled {
    background: rgba(250, 248, 244, 0.95) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

.nav-scrolled #navbar a:not(.bg-emerald-800) {
    color: #064e3b !important;
}

/* Mobile menu transitions */
#mobileMenu.open {
    opacity: 1 !important;
    pointer-events: all !important;
}

#mobileMenu.closed {
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Hamburger animation */
.menu-line:nth-child(1) {
    transform-origin: center;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

.menu-line:nth-child(3) {
    transform-origin: center;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}

#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* Mobile link animation */
.mobile-link {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

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

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

/* Reduced motion */
@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;
    }
    
    .section-eyebrow,
    .section-title,
    .section-subtitle,
    .service-card,
    .process-step,
    .gallery-item {
        opacity: 1;
        transform: none;
    }
}

/* Custom select styling */
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='%23064e3b' 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;
}

/* Input focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #059669 !important;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

/* Subtle hover lift for cards */
.service-card {
    will-change: transform, box-shadow;
}

/* Print styles */
@media print {
    nav, #contactForm, #successMessage, .animate-fade-in {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
