/* Custom styles for Grove Heating & Air Conditioning */

:root {
    --terracotta: #d97552;
    --terracotta-dark: #cc5f3b;
    --sand: #f9f4ee;
    --trust-dark: #0c4a6e;
}

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

/* Custom animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

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

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

.animate-slide-up {
    animation: slideUp 0.8s ease-out forwards;
}

.animate-slide-up-delay {
    animation: slideUpDelay 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

.animate-slide-up-delay-2 {
    animation: slideUpDelay2 0.8s ease-out 0.4s forwards;
    opacity: 0;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header scroll effect */
header.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

/* Mobile menu animations */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#menuBtn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu open state */
#mobileMenu.open {
    max-height: 400px;
}

/* Service card hover effect */
.group:hover .group-hover\\:bg-white\\/20 {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(217, 117, 82, 0.2);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #cc5f3b;
}

/* Selection color */
::selection {
    background: rgba(217, 117, 82, 0.3);
    color: #0c4a6e;
}

/* 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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Print styles */
@media print {
    header,
    .animate-bounce {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}

/* Utility for image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}
