/* ═══════════════════════════════════════════════════════════════════
   Vans Electric — Custom Styles
   Premium dark luxury · Forest green + gold + cream
   ═══════════════════════════════════════════════════════════════════ */

/* ── Reset & Base ── */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    display: block;
    max-width: 100%;
}

::selection {
    background: rgba(212, 175, 90, 0.3);
    color: #faf8f4;
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #0a0a0a;
}
::-webkit-scrollbar-thumb {
    background: #1f381f;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a4a2a;
}

/* ── Focus styles ── */
:focus-visible {
    outline: 2px solid #d4af5a;
    outline-offset: 2px;
}

/* ── Navbar ── */
.nav {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(10, 10, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04);
}

.nav-link {
    position: relative;
}

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

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

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

.menu-line {
    transition: all 0.3s ease;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(3px, 3px);
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle[aria-expanded="true"] .menu-line:nth-child(3) {
    width: 1.25rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

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

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

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

/* ── Hero ── */
.hero {
    position: relative;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        url('https://images.pexels.com/photos/190101/pexels-photo-190101.jpeg?auto=compress&cs=tinysrgb&fit=crop&w=1920&h=1080')
        center center / cover no-repeat;
}

.hero-content {
    animation: heroFadeIn 1s ease forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Service Cards ── */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #d4af5a, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

/* ── Scroll Reveal (progressive enhancement) ── */
/* Default state: always visible — JS adds the animation */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* When JS is active, set initial hidden state */
.js-active .reveal {
    opacity: 0;
    transform: translateY(30px);
}

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

/* Stagger delays */
.js-active .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-active .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-active .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    html {
        scroll-behavior: auto;
    }
    .service-card:hover {
        transform: none;
    }
    img:hover {
        transform: none;
    }
}

/* ── Back to Top ── */
.back-to-top {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.back-to-top:hover {
    transform: translateY(-2px);
}

/* ── Form ── */
select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23d4af5a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

select option {
    background: #111111;
    color: #faf8f4;
}

/* ── Utility ── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ── Responsive ── */
@media (max-width: 767px) {
    .hero-content {
        padding-top: 1rem;
    }

    .hero h1 {
        font-size: 2.75rem;
    }

    .floating-card {
        position: relative;
        margin-top: 1rem;
    }
}
