/* Custom styles for Associated Glass Company */

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

/* Navigation transitions */
.nav-link {
    position: relative;
}

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

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

/* Mobile menu */
.mobile-menu-link {
    opacity: 0;
    transform: translateY(10px);
}

#mobileMenu.open .mobile-menu-link {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.3s ease;
}

#mobileMenu.open .mobile-menu-link:nth-child(1) { transition-delay: 0.1s; }
#mobileMenu.open .mobile-menu-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-menu-link:nth-child(3) { transition-delay: 0.2s; }
#mobileMenu.open .mobile-menu-link:nth-child(4) { transition-delay: 0.25s; }

/* Hamburger animation */
#menuBtn.open .hamburger-line:nth-child(1) {
    top: 50%;
    transform: rotate(45deg);
}

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

#menuBtn.open .hamburger-line:nth-child(3) {
    top: 50%;
    transform: rotate(-45deg);
}

/* Reveal animations - progressive enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #2d5291;
}

/* Selection color */
::selection {
    background: #d49a1a;
    color: #0c1a38;
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid #d49a1a;
    outline-offset: 2px;
}

/* Image optimization */
img {
    max-width: 100%;
    height: auto;
}

/* Print styles */
@media print {
    nav, #contactForm, .reveal {
        display: none;
    }
    
    body {
        color: #000;
        background: #fff;
    }
}
