/* ============================================
   JOEL'S MECHANICAL — Shared Styles & Animations
   ============================================ */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background-color: #131313; color: #e5e2e1; }

/* ============================================
   KEYFRAME ANIMATIONS
   ============================================ */

@keyframes headerSlideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to   { transform: translateY(0);     opacity: 1; }
}

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes dropdownSlide {
    from { opacity: 0; transform: translateY(-10px) translateX(-50%); }
    to   { opacity: 1; transform: translateY(0)     translateX(-50%); }
}

@keyframes mobileMenuSlide {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes glowPulse {
    0%, 100% { text-shadow: 0 0 0 rgba(250, 189, 0, 0); }
    50%       { text-shadow: 0 0 12px rgba(250, 189, 0, 0.6); }
}

@keyframes shimmer {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

@keyframes borderFlare {
    from { box-shadow: none; }
    to   { box-shadow: 0 0 10px rgba(255, 193, 7, 0.4); }
}

@keyframes underlineGrow {
    from { transform: scaleX(0); transform-origin: left; }
    to   { transform: scaleX(1); transform-origin: left; }
}

/* ============================================
   HEADER
   ============================================ */

header {
    animation: headerSlideDown 0.45s ease-out;
    transition: padding 0.3s ease, background-color 0.3s ease, backdrop-filter 0.3s ease;
}

header.header-shrink {
    padding-top: 0.4rem !important;
    padding-bottom: 0.4rem !important;
    background-color: rgba(19, 19, 19, 0.96) !important;
    backdrop-filter: blur(10px);
}

/* ============================================
   NAVIGATION LINKS
   ============================================ */

.nav-link {
    position: relative;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #d4c5ab;
    transition: color 0.2s ease;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #fabd00;
    transition: width 0.25s ease;
}

.nav-link:hover {
    color: #fabd00;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link.active {
    color: #fabd00;
}

.nav-link.active::after {
    width: 100%;
    animation: underlineGrow 0.4s ease-out;
}

/* ============================================
   SERVICES DROPDOWN
   ============================================ */

.nav-dropdown-container {
    position: relative;
}

.nav-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 230px;
    background-color: #252525;
    border: 2px solid #4f4632;
    z-index: 200;
    display: none;
    flex-direction: column;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.nav-dropdown.active {
    display: flex;
    animation: dropdownSlide 0.22s ease-out both;
}

.nav-dropdown::before {
    content: '';
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 4px solid transparent;
    border-bottom-color: #4f4632;
}

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    font-family: 'Inter', sans-serif;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #d4c5ab;
    border-left: 3px solid transparent;
    transition: color 0.15s, background-color 0.15s, border-left-color 0.15s, padding-left 0.15s;
}

.nav-dropdown a:hover {
    color: #fabd00;
    background-color: #353535;
    border-left-color: #fabd00;
    padding-left: 1.5rem;
}

/* ============================================
   MOBILE MENU
   ============================================ */

#mobile-menu {
    display: none;
}

#mobile-menu.active {
    display: flex;
    flex-direction: column;
    animation: mobileMenuSlide 0.25s ease-out;
}

#mobile-submenu {
    display: none;
    flex-direction: column;
    padding-left: 1rem;
    margin-left: 0.5rem;
    border-left: 2px solid #4f4632;
}

#mobile-submenu.active {
    display: flex;
    animation: mobileMenuSlide 0.2s ease-out;
}

#mobile-menu-btn {
    transition: transform 0.2s ease;
}

#mobile-menu-btn:active {
    transform: scale(0.9);
}

/* ============================================
   HERO CONTENT STAGGER
   ============================================ */

.hero-1 { animation: fadeUp 0.65s ease-out 0.05s both; }
.hero-2 { animation: fadeUp 0.65s ease-out 0.2s both;  }
.hero-3 { animation: fadeUp 0.65s ease-out 0.35s both; }
.hero-4 { animation: fadeUp 0.65s ease-out 0.5s both;  }
.hero-5 { animation: fadeUp 0.65s ease-out 0.65s both; }

/* ============================================
   SCROLL-TRIGGERED ANIMATIONS
   ============================================ */

[data-animate] {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-animate].animate-in {
    opacity: 1;
    transform: translateY(0);
}

[data-animate][data-delay="100"] { transition-delay: 0.10s; }
[data-animate][data-delay="200"] { transition-delay: 0.20s; }
[data-animate][data-delay="300"] { transition-delay: 0.30s; }
[data-animate][data-delay="400"] { transition-delay: 0.40s; }
[data-animate][data-delay="500"] { transition-delay: 0.50s; }

[data-animate-scale] {
    opacity: 0;
    transform: scale(0.94);
    transition: opacity 0.55s ease, transform 0.55s ease;
}
[data-animate-scale].animate-in {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   FORM INPUTS
   ============================================ */

.input-industrial {
    background-color: #0e0e0e;
    border: 1px solid #c7c6c6;
    color: #e5e2e1;
    font-family: 'Inter', sans-serif;
    font-size: 16px;
    line-height: 24px;
    padding: 0.75rem;
    width: 100%;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, border-width 0.1s ease;
    appearance: none;
    -webkit-appearance: none;
}

.input-industrial:focus {
    outline: none;
    border: 2px solid #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.15), 0 0 8px rgba(255, 193, 7, 0.2);
}

.input-industrial::placeholder {
    color: #4f4632;
}

.input-industrial option {
    background-color: #252525;
    color: #e5e2e1;
}

/* ============================================
   BUTTONS
   ============================================ */

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: #ffc107;
    color: #261a00;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, transform 0.1s;
}

.btn-primary:hover {
    background-color: #fabd00;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.4), 0 0 16px rgba(255, 193, 7, 0.2);
}

.btn-primary:active {
    transform: scale(0.97);
}

.btn-machined {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(180deg, #ffc107 0%, #fabd00 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.2);
    color: #261a00;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border: none;
    cursor: pointer;
    transition: filter 0.2s, transform 0.1s, box-shadow 0.2s;
}

.btn-machined:hover {
    filter: brightness(1.08);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.2),
                0 0 0 3px rgba(255, 193, 7, 0.35);
}

.btn-machined:active {
    background: #fabd00;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.35);
    transform: translateY(1px);
}

.btn-machined.loading {
    position: relative;
    overflow: hidden;
    pointer-events: none;
    opacity: 0.9;
}

.btn-machined.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.35) 50%, transparent 100%);
    background-size: 200% 100%;
    animation: shimmer 0.9s linear infinite;
}

.btn-machined.success {
    background: linear-gradient(180deg, #4caf50 0%, #388e3c 100%);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

/* ============================================
   INDUSTRIAL CARDS
   ============================================ */

.industrial-card {
    background-color: #252525;
    border: 2px solid #333333;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.industrial-card:hover {
    border-color: #ffc107;
    box-shadow: 0 0 0 1px rgba(255,193,7,0.1), 0 4px 24px rgba(0,0,0,0.4);
}

/* ============================================
   GALLERY ITEMS
   ============================================ */

.gallery-item {
    overflow: hidden;
    transition: border-color 0.3s ease;
}

.gallery-item img {
    transition: transform 0.55s ease, filter 0.55s ease;
}

.gallery-item:hover {
    border-color: #ffc107 !important;
}

.gallery-item:hover img {
    transform: scale(1.06);
    filter: grayscale(0%) !important;
}

/* ============================================
   SERVICE LIST ITEMS
   ============================================ */

.service-list-item {
    transition: border-left-color 0.2s ease, padding-left 0.2s ease;
}

.service-list-item:hover {
    border-left-color: #ffc107 !important;
    padding-left: 1.25rem;
}

/* ============================================
   HAZARD STRIPE ACCENT
   ============================================ */

.hazard-stripe {
    background: repeating-linear-gradient(
        45deg,
        #ffc107,
        #ffc107 10px,
        #1a1a1a 10px,
        #1a1a1a 20px
    );
    height: 4px;
}

/* ============================================
   GRIT TEXTURE OVERLAY
   ============================================ */

.bg-grit {
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ============================================
   PHONE PULSE (in header)
   ============================================ */

.phone-cta {
    transition: color 0.2s ease, text-shadow 0.2s ease;
}

.phone-cta:hover {
    animation: glowPulse 1.5s ease-in-out infinite;
}

/* ============================================
   FORM SUCCESS MESSAGE
   ============================================ */

#form-success {
    animation: scaleIn 0.4s ease-out;
}

/* ============================================
   STATS BAR
   ============================================ */

.stat-item {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stat-item.animate-in {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   SCROLL-TO-TOP
   ============================================ */

#scroll-top {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px);
}

#scroll-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* ============================================
   RESPONSIVE NAV DROPDOWN
   ============================================ */

@media (max-width: 767px) {
    .nav-dropdown {
        display: none !important;
    }
}
