/* Custom styles for Dayajo Lawn Care */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0f4f8;
}
::-webkit-scrollbar-thumb {
    background: #d4890a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b56808;
}

/* Selection color */
::selection {
    background: #f6e09a;
    color: #102a43;
}

/* Navbar transitions */
.nav-link {
    position: relative;
}
.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #d4890a;
    transition: width 0.3s ease;
}
.nav-link:hover::after {
    width: 100%;
}

/* Mobile menu */
.mobile-nav-link {
    position: relative;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease forwards;
    opacity: 0;
}

.animate-fade-in-up:nth-child(1) {
    animation-delay: 0.1s;
}
.animate-fade-in-up:nth-child(2) {
    animation-delay: 0.2s;
}
.animate-fade-in-up:nth-child(3) {
    animation-delay: 0.3s;
}
.animate-fade-in-up:nth-child(4) {
    animation-delay: 0.4s;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
    }
    50% {
        transform: scaleY(1);
        transform-origin: top;
    }
    51% {
        transform-origin: bottom;
    }
    100% {
        transform: scaleY(0);
        transform-origin: bottom;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* Reveal animations - only apply when JS adds the class */
.reveal {
    /* Default state: fully visible for accessibility */
    opacity: 1;
    transform: none;
}

/* Progressive enhancement: animate on scroll only if JS runs and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s ease, transform 0.6s ease;
    }
    
    .reveal.animated {
        opacity: 0;
        transform: translateY(24px);
    }
    
    .reveal.animated.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover effects */
.service-card {
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #d4890a, #f6e09a);
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.service-card:hover::before {
    transform: scaleX(1);
}

/* Pulse animation for badge dot */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.animate-pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Form select arrow */
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'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Mobile menu transitions */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Active menu state */
#mobile-menu.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
#mobile-menu.open .menu-line:nth-child(2) {
    opacity: 0;
}
#mobile-menu.open .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Focus visible for accessibility */
:focus-visible {
    outline: 2px solid #d4890a;
    outline-offset: 2px;
}

/* Print styles */
@media print {
    nav, #mobile-menu, .animate-scroll-line {
        display: none;
    }
    body {
        color: #000;
        background: #fff;
    }
}
