/* ============================================
   JMAC Lawn and Tree Service — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background-color: #c9a84c;
    color: #0a1628;
}

/* ============================================
   Navigation
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(10, 22, 40, 0.97);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
    backdrop-filter: blur(10px);
}

.nav-link-color {
    color: rgba(250, 248, 244, 0.85);
}

#navbar.scrolled .nav-link-color {
    color: #1a2b4a;
}

#navbar.scrolled .nav-link-sub {
    color: #5c4033;
}

.nav-btn-border {
    border: 1.5px solid rgba(250, 248, 244, 0.4);
}

#navbar.scrolled .nav-btn-border {
    border-color: #0a1628;
}

.nav-menu-btn .menu-line {
    background-color: #0a1628;
}

#navbar.scrolled .nav-menu-btn .menu-line {
    background-color: #0a1628;
}

/* Mobile Menu */
.mobile-menu-link {
    font-family: 'Cormorant Garamond', Georgia, serif;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Hamburger Animation */
#menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ============================================
   Hero Section
   ============================================ */
.hero-tagline {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.3s;
}

.hero-title-line {
    display: inline-block;
    transform: translateY(100%);
    animation: slideUp 0.9s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

.hero-title-line:nth-child(1) { animation-delay: 0.5s; }
.hero-title-line:nth-child(2) { animation-delay: 0.65s; }
.hero-title-line:nth-child(3) { animation-delay: 0.8s; }
.hero-title-line:nth-child(4) { animation-delay: 0.95s; }

.hero-description {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.1s;
}

.hero-cta {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1.3s;
}

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

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

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

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

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

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

.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }

/* ============================================
   Testimonials
   ============================================ */
.testimonial-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.testimonial-card:nth-child(1) { transition-delay: 0.05s; }
.testimonial-card:nth-child(2) { transition-delay: 0.15s; }
.testimonial-card:nth-child(3) { transition-delay: 0.25s; }

/* ============================================
   Form Styles
   ============================================ */
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='%231a2b4a' 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;
}

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