/* ============================================
   Whaley Asphalt Inc — Custom Styles
   ============================================ */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Selection */
::selection {
    background: rgba(16, 185, 129, 0.3);
    color: #fdfbf7;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #070c09;
}
::-webkit-scrollbar-thumb {
    background: #1a3a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5a3e;
}

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

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

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

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

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

.reveal.revealed:nth-child(2) { transition-delay: 0.1s; }
.reveal.revealed:nth-child(3) { transition-delay: 0.2s; }
.reveal.revealed:nth-child(4) { transition-delay: 0.3s; }
.reveal.revealed:nth-child(5) { transition-delay: 0.4s; }
.reveal.revealed:nth-child(6) { transition-delay: 0.5s; }

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

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

#navbar.scrolled {
    background: rgba(7, 12, 9, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.03), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #10b981, #d4a853);
    transition: width 0.3s ease, left 0.3s ease;
}

.nav-link:hover::after {
    width: 60%;
    left: 20%;
}

/* ============================================
   Mobile Menu
   ============================================ */

#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #10b981, #d4a853);
    transition: width 0.3s ease, left 0.3s ease;
}

.mobile-link:hover::after {
    width: 80%;
    left: 10%;
}

/* Hamburger */
.menu-line {
    display: block;
}

#menuBtn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

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

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

/* ============================================
   Buttons
   ============================================ */

button, a[role="button"] {
    cursor: pointer;
}

/* ============================================
   Form Elements
   ============================================ */

select option {
    background: #0d1711;
    color: #faf5eb;
}

/* ============================================
   Gallery
   ============================================ */

.rounded-2xl {
    overflow: hidden;
}

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

@media (max-width: 767px) {
    html {
        scroll-padding-top: 70px;
    }
}

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

@media print {
    #navbar, #backToTop, #mobileMenu {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
}
