/* ========================================
   Precision Motor Werx - Custom Styles
   ======================================== */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

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

::-webkit-scrollbar-track {
    background: #1A1A1A;
}

::-webkit-scrollbar-thumb {
    background: #3D3D3D;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #E8734A;
}

/* Selection */
::selection {
    background: rgba(232, 115, 74, 0.3);
    color: #ffffff;
}

/* Navigation */
.nav {
    transition: all 0.3s ease;
}

.nav.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

.nav-link {
    position: relative;
}

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

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

/* Mobile Menu */
.mobile-nav-link {
    display: block;
    padding: 12px 0;
    border-bottom: 1px solid rgba(61, 61, 61, 0.5);
}

.mobile-nav-link:last-child {
    border-bottom: none;
}

/* Buttons */
.btn-primary {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-secondary {
    transition: all 0.3s ease;
}

/* Service Cards */
.service-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.service-card:hover .w-14 {
    transform: scale(1.05);
}

/* Feature Cards */
.feature-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-2px);
}

/* Contact Items */
.contact-item {
    transition: all 0.3s ease;
}

/* Reveal Animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0.1s; }
.reveal:nth-child(2) { transition-delay: 0.2s; }
.reveal:nth-child(3) { transition-delay: 0.3s; }
.reveal:nth-child(4) { transition-delay: 0.4s; }
.reveal:nth-child(5) { transition-delay: 0.5s; }
.reveal:nth-child(6) { transition-delay: 0.6s; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .service-card,
    .feature-card,
    .contact-item,
    .btn-primary {
        transition: none;
    }
    
    .service-card:hover {
        transform: none;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.15;
    }
    
    #hero h1 {
        font-size: 2.5rem;
    }
    
    @media (min-width: 768px) {
        #hero h1 {
            font-size: 3.5rem;
        }
    }
    
    @media (min-width: 1024px) {
        #hero h1 {
            font-size: 4rem;
        }
    }
}

/* Print Styles */
@media print {
    .nav,
    .scroll-indicator,
    .btn-primary,
    .btn-secondary {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
    
    .bg-charcoal-900,
    .bg-charcoal-800 {
        background: white !important;
    }
    
    .text-white,
    .text-gray-300,
    .text-gray-400 {
        color: black !important;
    }
}

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

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

/* Smooth image loading */
img {
    transition: opacity 0.3s ease;
}

img[loading="lazy"] {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
