/* ============================================
   Kenzell PAINT & Bodyshop — Custom Styles
   ============================================ */

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

/* Selection color */
::selection {
    background-color: rgba(16, 185, 129, 0.2);
    color: #064e3b;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.06);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

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

.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#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; }

/* Hamburger animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
}

#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;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Reveal Animations
   ============================================ */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94), 
                transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Default state for reveal elements — visible by default for no-JS fallback */
.reveal {
    transform: translateY(0);
}

/* Only apply hidden state when JS is active and element is below fold */
.js-active .reveal {
    opacity: 0;
    transform: translateY(24px);
}

.js-active .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.js-active .reveal:nth-child(1) { transition-delay: 0s; }
.js-active .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-active .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-active .reveal:nth-child(4) { transition-delay: 0.3s; }
.js-active .reveal:nth-child(5) { transition-delay: 0.4s; }
.js-active .reveal:nth-child(6) { transition-delay: 0.5s; }

/* ============================================
   Form Styles
   ============================================ */
select option {
    background: #064e3b;
    color: #d1fae5;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6ee7b7;
}

/* ============================================
   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;
    }
    
    .js-active .reveal {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    section {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

@media (min-width: 768px) {
    section {
        padding-left: 2rem;
        padding-right: 2rem;
    }
}

@media (min-width: 1024px) {
    section {
        padding-left: 0;
        padding-right: 0;
    }
}
