/* Custom styles for Supersport Restoration */

:root {
    --nav-width: 6rem;
}

html {
    scroll-behavior: smooth;
}

body {
    overflow-x: hidden;
}

/* Smooth scroll offset for fixed nav */
section[id] {
    scroll-margin-top: 80px;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0a2e;
}
::-webkit-scrollbar-thumb {
    background: #d4a843;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #fbbf24;
}

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #fbbf24;
}

/* Navbar styles */
#navbar {
    background: transparent;
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(15, 6, 28, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(212, 168, 67, 0.1);
}

.nav-link {
    position: relative;
}

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

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

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

.mobile-link {
    position: relative;
}

/* Reveal animations - Progressive enhancement */
/* Default state: visible (works without JS) */
.reveal,
.reveal-hero {
    opacity: 1;
    transform: none;
}

/* When JS is enabled and prefers-reduced-motion is off, apply animations */
.js-enabled @media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

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

    .reveal-hero {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .reveal-hero.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hero reveal animations - always visible by default */
.reveal-hero {
    opacity: 1;
    transform: none;
}

/* Staggered reveal delays */
.reveal:nth-child(1) { transition-delay: 0ms; }
.reveal:nth-child(2) { transition-delay: 100ms; }
.reveal:nth-child(3) { transition-delay: 200ms; }
.reveal:nth-child(4) { transition-delay: 300ms; }

/* Gold shimmer effect on hover for cards */
.group:hover .group-hover\:bg-amber-500\/20 {
    background-color: rgba(212, 168, 67, 0.2);
}

/* Image hover zoom */
overflow-hidden {
    overflow: hidden;
}

/* Form select dropdown styling */
select option {
    background: #1a0a2e;
    color: #fff;
}

/* Map dark theme override */
iframe[title*="Google Maps"] {
    filter: invert(90%) hue-rotate(180deg) brightness(0.9) contrast(0.9);
}

/* Subtle glow for amber elements */
.shadow-amber-500\/20 {
    box-shadow: 0 10px 40px -10px rgba(212, 168, 67, 0.2);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-display {
        font-size: clamp(2rem, 8vw, 3.5rem);
    }
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }
}
