/* ============================================
   Dee Zee Manufacturing — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: rgba(45, 76, 26, 0.2);
    color: inherit;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #9ebe7e;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6fa047;
}

/* ============================================
   Animations
   ============================================ */

/* Fade-in for hero elements */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Scroll reveal */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(30px);
}

@media (prefers-reduced-motion: no-preference) {
    .reveal[data-reveal] {
        opacity: 0;
        transform: translateY(30px);
    }
}

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

/* ============================================
   Navbar
   ============================================ */

#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(250, 249, 246, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 0 rgba(45, 76, 26, 0.08);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
}

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

/* 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.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { transition-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { transition-delay: 0.25s; }

/* Menu icon animation */
#menuBtn.active #menuIcon span:nth-child(1) {
    transform: translateY(4px) rotate(45deg);
}
#menuBtn.active #menuIcon span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active #menuIcon span:nth-child(3) {
    transform: translateY(-4px) rotate(-45deg);
    width: 1.25rem;
}

/* ============================================
   Service Cards
   ============================================ */

.service-card {
    transition: background 0.5s ease;
}

.service-card .reveal {
    transition-delay: inherit;
}

/* ============================================
   Form Styles
   ============================================ */

select option {
    background: #faf9f6;
    color: #28401a;
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
}

/* ============================================
   Print
   ============================================ */

@media print {
    #navbar, #mobileMenu, .reveal[data-reveal] {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
