/* ============================================
   Greenway Kia at the Avenues — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f0e8;
}
::-webkit-scrollbar-thumb {
    background: #b5694e;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #8c4a32;
}

/* Selection */
::selection {
    background: #b5694e;
    color: #fff;
}

/* ============================================
   Animations
   ============================================ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Scroll-triggered animations */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.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; }

/* ============================================
   Navigation
   ============================================ */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.4s ease;
}

#navbar.scrolled {
    background: rgba(245, 240, 232, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 0, 0, 0.08);
}

.nav-text {
    transition: color 0.3s ease;
}

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

#navbar.scrolled .nav-text {
    color: #1c1917;
}

#navbar.scrolled .nav-subtext {
    color: #8c4a32;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #b5694e, #d4956f);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.5s ease;
}

.service-card:hover::before {
    transform: scaleX(1);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    position: relative;
    transition: transform 0.4s ease;
}

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

/* ============================================
   Buttons
   ============================================ */
a, button {
    -webkit-tap-highlight-color: transparent;
}

button[type="submit"]:active {
    transform: scale(0.98);
}

/* ============================================
   Form Inputs
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* ============================================
   Mobile Menu
   ============================================ */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

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

/* ============================================
   Parallax-like subtle effects
   ============================================ */
.service-card,
.testimonial-card {
    will-change: transform;
}

/* ============================================
   Utility: reduce motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.2;
    }
}
