/* =============================================
   ZR Elite Roofing — Custom Styles
   ============================================= */

/* Base & Reset */
*, *::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-color: rgba(132, 32, 50, 0.15);
    color: #6e1c2c;
}

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

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-logo-color,
.nav-logo-fill {
    transition: color 0.4s ease;
}

#navbar .nav-logo-color,
#navbar .nav-logo-fill {
    color: #6e1c2c;
}

#navbar.scrolled .nav-logo-color,
#navbar.scrolled .nav-logo-fill {
    color: #842032;
}

.nav-text-color {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-text-color {
    color: #1c1917;
}

.nav-sub-text-color {
    transition: color 0.4s ease;
}

#navbar.scrolled .nav-sub-text-color {
    color: #78716c;
}

.nav-menu-btn span {
    transition: all 0.3s ease;
}

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

#mobileMenu.open .mobile-nav-link {
    animation: fadeUp 0.4s ease forwards;
    opacity: 1;
}

.mobile-nav-link {
    opacity: 0;
}

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

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* =============================================
   Animations
   ============================================= */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* =============================================
   Form Styles
   ============================================= */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* =============================================
   Utility
   ============================================= */
@media (max-width: 767px) {
    .font-serif {
        font-size: clamp(2rem, 8vw, 3rem);
    }
}
