/* ============================================
   Wabtec Corp — Premium Dark Luxury Styles
   ============================================ */

/* --- Reset & 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 {
    background: rgba(212, 175, 55, 0.3);
    color: #faf8f3;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a1628;
}
::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 175, 55, 0.5);
}

/* --- Navigation --- */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    background: transparent;
}

#navbar.scrolled {
    background: rgba(5, 13, 26, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.08);
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #d4af37;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* --- Menu Toggle Animation --- */
#menu-icon.active span:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}
#menu-icon.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menu-icon.active span:nth-child(3) {
    transform: rotate(-45deg) translate(3px, -3px);
    width: 1.5rem;
}

/* --- Hero --- */
#hero {
    position: relative;
}

/* --- Section Animations (progressive enhancement) --- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        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-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* --- Gold shimmer on hover for cards --- */
.group:hover .group-hover\\:scale-105 {
    transform: scale(1.05);
}

/* --- Input focus styles --- */
input:focus,
textarea:focus,
select:focus {
    border-color: rgba(212, 175, 55, 0.6) !important;
    box-shadow: 0 0 0 1px rgba(212, 175, 55, 0.1);
}

/* --- Button hover glow --- */
button:hover {
    box-shadow: 0 0 30px -5px rgba(212, 175, 55, 0.3);
}

/* --- Image lazy load fallback --- */
img {
    max-width: 100%;
    height: auto;
}

/* --- Responsive adjustments --- */
@media (max-width: 768px) {
    html {
        font-size: 15px;
    }
}

@media (max-width: 360px) {
    html {
        font-size: 14px;
    }
}
