/* ========================================
   Best Home Windows and Siding
   Custom Styles
   ======================================== */

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

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #0a0f1e;
}

::-webkit-scrollbar-thumb {
    background: #2dd4bf;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5eead4;
}

/* Selection */
::selection {
    background: rgba(45, 212, 191, 0.2);
    color: #0d1529;
}

/* ========================================
   Navigation
   ======================================== */
#navbar.scrolled {
    background: rgba(10, 15, 30, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(45, 212, 191, 0.1);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.7);
}

#navbar.scrolled #nav-logo-text,
#navbar.scrolled #nav-logo-sub {
    color: white;
}

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

.menu-line:nth-child(1) {
    transform-origin: center;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

#mobile-menu-btn.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}

#mobile-menu-btn.active .menu-line:nth-child(2) {
    transform: translateY(-5px) rotate(-45deg);
}

/* ========================================
   Hero Scroll Animation
   ======================================== */
@keyframes scrollDown {
    0% {
        top: -16px;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        top: 48px;
        opacity: 0;
    }
}

.animate-scroll-down {
    animation: scrollDown 1.5s ease-in-out infinite;
}

/* ========================================
   Reveal Animations
   ======================================== */
.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);
}

/* ========================================
   Service Cards
   ======================================== */
.service-card {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.5s ease,
                box-shadow 0.5s ease;
}

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

.service-card:hover {
    box-shadow: 0 20px 60px rgba(13, 21, 41, 0.08);
}

/* ========================================
   Gallery Items
   ======================================== */
.gallery-item {
    transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover {
    transform: scale(1.02);
}

/* ========================================
   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='%23111d38' 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;
}

/* ========================================
   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;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    .animate-scroll-down {
        animation: none;
    }
}

/* ========================================
   Responsive Adjustments
   ======================================== */
@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }
    
    #hero h1 {
        font-size: 2.25rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    #hero h1 {
        font-size: 1.875rem;
    }
    
    #hero .text-2xl {
        font-size: 1.5rem;
    }
}
