/* Custom Styles for Stephen's HVAC */

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
}

.font-space-grotesk {
    font-family: 'Space Grotesk', sans-serif;
}

.font-inter {
    font-family: 'Inter', sans-serif;
}

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(2deg);
    }
}

@keyframes float-delayed {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) rotate(-2deg);
    }
}

@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(1.4);
        opacity: 0;
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float-delayed 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* Smooth Scroll Offset for Fixed Nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Navbar Scroll Effect */
.navbar-scrolled {
    box-shadow: 0 4px 20px rgba(6, 78, 59, 0.1);
}

/* Mobile Menu */
.mobile-menu-link {
    position: relative;
    transition: all 0.3s ease;
}

.mobile-menu-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #059669, #10B981);
    transition: width 0.3s ease;
}

.mobile-menu-link:hover::after {
    width: 100%;
}

/* Service Card Hover Effect */
.group:hover .group-hover\:-translate-y-2 {
    transform: translateY(-0.5rem);
}

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

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

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #064E3B, #10B981);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #065F46, #059669);
}

/* Form Focus Styles */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Button Ripple Effect */
button, a {
    position: relative;
    overflow: hidden;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive Typography */
@media (max-width: 640px) {
    h1 {
        font-size: 2.5rem;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 2rem;
        line-height: 1.3;
    }
}

/* Print Styles */
@media print {
    nav,
    .animate-float,
    .animate-float-delayed,
    #backToTop {
        display: none !important;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}

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

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .bg-stone-50 {
        background-color: #fff;
    }
    
    .text-stone-600 {
        color: #000;
    }
}

/* Selection Color */
::selection {
    background-color: #10B981;
    color: #fff;
}

/* Focus Visible for Accessibility */
*:focus-visible {
    outline: 2px solid #10B981;
    outline-offset: 2px;
}

/* Loading State */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Error State */
input.error,
textarea.error {
    border-color: #EF4444;
    background-color: #FEF2F2;
}

/* Success State */
input.success,
textarea.success {
    border-color: #10B981;
    background-color: #ECFDF5;
}
