/* ============================================
   Jason's Auto Repair — Custom Styles
   Classic & Elegant | Midnight Blue + Mint
   ============================================ */

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

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

body {
    font-family: 'Lato', system-ui, sans-serif;
    color: #1e4066;
    background: #ffffff;
    overflow-x: hidden;
}

::selection {
    background: #4ec47f;
    color: #091220;
}

/* ---- Navbar ---- */
.navbar {
    background: transparent;
    transition: background 0.5s ease, box-shadow 0.5s ease, backdrop-filter 0.5s ease;
}

.navbar.scrolled {
    background: rgba(9, 18, 32, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(78, 196, 127, 0.1);
}

.nav-logo-icon {
    color: #4ec47f;
    transition: color 0.3s ease;
}

.nav-link {
    position: relative;
}

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

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

.nav-link:hover {
    color: #7dd9a5 !important;
}

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

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

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

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

#menu-toggle.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

#menu-toggle.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    transition: transform 8s ease;
}

.hero-loaded .hero-img {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(9, 18, 32, 0.7) 0%,
        rgba(9, 18, 32, 0.55) 40%,
        rgba(9, 18, 32, 0.75) 100%
    );
    z-index: 1;
}

.hero-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease 0.3s, transform 0.8s ease 0.3s;
}

.hero-loaded .hero-content {
    opacity: 1;
    transform: translateY(0);
}

.hero-title {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.hero-loaded .hero-title {
    opacity: 1;
    transform: translateY(0);
}

.hero-subtitle {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease 0.7s, transform 0.6s ease 0.7s;
}

.hero-loaded .hero-subtitle {
    opacity: 1;
    transform: translateY(0);
}

.hero-ctas {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.6s ease 0.9s, transform 0.6s ease 0.9s;
}

.hero-loaded .hero-ctas {
    opacity: 1;
    transform: translateY(0);
}

.hero-trust {
    opacity: 0;
    transition: opacity 0.6s ease 1.1s;
}

.hero-loaded .hero-trust {
    opacity: 1;
}

.hero-badge {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease 0.2s, transform 0.5s ease 0.2s;
}

.hero-loaded .hero-badge {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Scroll Indicator ---- */
@keyframes scrollLine {
    0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
    50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
    51% { transform-origin: bottom; }
    100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

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

/* ---- Buttons ---- */
.btn-primary {
    box-shadow: 0 4px 20px rgba(45, 168, 94, 0.3);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    box-shadow: 0 6px 30px rgba(45, 168, 94, 0.45);
    transform: translateY(-2px);
}

.btn-secondary {
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    transform: translateY(-2px);
}

/* ---- Section Styles ---- */
.section-label {
    display: block;
}

.section-title {
    position: relative;
}

.section-subtitle {
    line-height: 1.7;
}

/* ---- Services ---- */
.services-grid {
    position: relative;
    z-index: 1;
}

.service-card {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.service-title {
    transition: color 0.3s ease;
}

.service-desc {
    transition: color 0.3s ease;
}

/* ---- About ---- */
.about-img-main {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.about-img-main.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-img-accent {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.7s ease 0.2s, transform 0.7s ease 0.2s;
}

.about-img-accent.visible {
    opacity: 1;
    transform: translateX(0);
}

.about-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.about-content.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.about-text.visible {
    opacity: 1;
    transform: translateY(0);
}

.about-text:nth-child(2) { transition-delay: 0.1s; }

.about-divider {
    opacity: 0;
    transition: opacity 0.5s ease 0.2s;
}

.about-divider.visible {
    opacity: 1;
}

.about-badge {
    opacity: 0;
    transform: rotate(-5deg) scale(0.9);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.about-badge.visible {
    opacity: 1;
    transform: rotate(-5deg) scale(1);
}

.about-stats {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease 0.3s, transform 0.5s ease 0.3s;
}

.about-stats.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Why Us ---- */
.why-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.why-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.why-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(15, 31, 51, 0.08);
}

/* ---- Testimonials ---- */
.testimonial-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease, box-shadow 0.5s ease, border-color 0.5s ease;
}

.testimonial-card.visible {
    opacity: 1;
    transform: translateY(0);
}

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

.testimonial-quote {
    opacity: 0.6;
}

.testimonial-text {
    position: relative;
    z-index: 1;
}

/* ---- CTA Section ---- */
.cta-section {
    position: relative;
}

.cta-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.cta-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(9, 18, 32, 0.8) 0%,
        rgba(9, 18, 32, 0.7) 100%
    );
    z-index: 1;
}

.cta-content {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.cta-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Contact ---- */
.contact-info {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.contact-info.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-item {
    opacity: 0;
    transform: translateX(-15px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.contact-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.contact-item:nth-child(1) { transition-delay: 0.05s; }
.contact-item:nth-child(2) { transition-delay: 0.1s; }
.contact-item:nth-child(3) { transition-delay: 0.15s; }

.contact-form-wrapper {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease 0.2s, transform 0.6s ease 0.2s;
}

.contact-form-wrapper.visible {
    opacity: 1;
    transform: translateX(0);
}

.form-input {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    border-color: #2da85e !important;
    box-shadow: 0 0 0 3px rgba(45, 168, 94, 0.1);
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

.btn-submit {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-submit:hover {
    box-shadow: 0 4px 20px rgba(45, 168, 94, 0.4);
    transform: translateY(-1px);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ---- Footer ---- */
.footer {
    position: relative;
}

.footer a:hover {
    text-decoration: none;
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
    .about-img-accent {
        display: none;
    }

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

    .hero-title span {
        display: inline;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .services-grid {
        gap: 1rem;
    }

    .service-card {
        padding: 1.5rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2.25rem;
    }

    .cta-section {
        padding: 4rem 1rem;
    }

    .contact-form-wrapper {
        padding: 1.5rem !important;
    }
}

/* ---- 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;
}

/* ---- Print ---- */
@media print {
    .navbar, .hero-scroll, .cta-section {
        display: none;
    }

    body {
        color: #000;
        background: #fff;
    }
}
