/* ============================================
   G & T Auto Imports — Custom Styles
   ============================================ */

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

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

body {
    overflow-x: hidden;
}

/* ============================================
   Navigation
   ============================================ */
.nav-text {
    color: #0f172a;
    transition: color 0.3s ease;
}

.nav-subtext {
    color: #64748b;
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

/* Navbar scroll state */
.navbar-scrolled {
    background-color: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.navbar-scrolled .nav-text {
    color: #0f172a;
}

.navbar-scrolled .nav-subtext {
    color: #64748b;
}

/* Mobile menu */
.mobile-link {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

#mobile-menu.open {
    opacity: 1;
    visibility: visible;
}

#mobile-menu.closed {
    opacity: 0;
    visibility: hidden;
}

/* Mobile menu button animation */
#mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

#mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ============================================
   Hero Section
   ============================================ */
#hero {
    position: relative;
}

/* Scroll line animation */
@keyframes scrollLine {
    0% {
        height: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        height: 3rem;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* ============================================
   Vehicle Cards
   ============================================ */
.vehicle-card {
    position: relative;
}

.vehicle-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #0d9488, #14b8a6);
    transition: width 0.5s ease;
    z-index: 1;
}

.vehicle-card:hover::before {
    width: 100%;
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    transition: all 0.5s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible without JS)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }
    
    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
}

/* Reduced motion — disable animations */
@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;
    }
}

/* ============================================
   Form Styles
   ============================================ */
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='%2394a3b8' 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:focus {
    border-color: #0d9488;
    outline: none;
}

input:focus, textarea:focus {
    border-color: #0d9488;
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.08);
}

/* ============================================
   Back to Top Button
   ============================================ */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

#back-to-top:not(.visible) {
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
}

#back-to-top.visible {
    transform: translateY(0);
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.75rem, 5vw, 2.5rem);
    }
}

/* ============================================
   Selection Color
   ============================================ */
::selection {
    background-color: rgba(13, 148, 136, 0.2);
    color: #134e4a;
}

/* ============================================
   Focus Visible for Accessibility
   ============================================ */
:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
    border-radius: 2px;
}
