/* Custom styles for R&S Automotive */

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

/* Base body styles */
body {
    overflow-x: hidden;
}

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

@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Navbar scroll effect */
.navbar-scrolled {
    background: rgba(10, 10, 10, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 107, 74, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Mobile menu active state */
.mobile-menu-active {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Mobile menu link hover */
.mobile-link {
    font-size: 1.25rem;
    letter-spacing: 0.05em;
}

.mobile-link:hover {
    color: #ff7f5f;
}

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

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

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

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

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

/* Input autofill styling */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #121212 inset !important;
    -webkit-text-fill-color: #ffffff !important;
    caret-color: #ffffff;
}

/* Image loading placeholder */
img {
    background-color: #1c1c1c;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #ff6b4a;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Animation keyframes */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}

/* Subtle glow effect for accents */
.glow-coral {
    box-shadow: 0 0 40px rgba(255, 107, 74, 0.15);
}

/* Card hover tilt effect */
.group:hover .group-hover\:from-coral-500\/30 {
    background: linear-gradient(135deg, rgba(255, 107, 74, 0.3) 0%, rgba(232, 90, 60, 0.2) 100%);
}

/* Ensure hero text is readable */
#hero h1,
#hero p,
#hero a {
    position: relative;
    z-index: 10;
}

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Responsive typography adjustments */
@media (max-width: 640px) {
    .font-display {
        letter-spacing: 0.02em;
    }
}

/* Print styles */
@media print {
    nav, #contact-form, .scroll-reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}
