/* Custom styles for Repairing America */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Base font smoothing */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Eyebrow label */
.section-eyebrow {
    letter-spacing: 0.12em;
}

/* Section titles */
.section-title {
    position: relative;
}

/* Navbar scroll state */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, padding 0.3s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(10, 35, 66, 0.08);
    padding-top: 0;
    padding-bottom: 0;
}

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

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

.nav-link {
    position: relative;
}

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

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

#navbar.scrolled .nav-link {
    color: #0A2342 !important;
}

#navbar.scrolled .nav-link::after {
    background: #34D399;
}

/* Mobile menu */
#mobile-menu {
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mobile-nav-link {
    transition: color 0.2s ease, padding-left 0.2s ease;
}

.mobile-nav-link:hover {
    color: #34D399;
    padding-left: 8px;
}

/* Hero animations */
.hero-eyebrow {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.2s;
}

.hero-headline {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.4s;
}

.hero-sub {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.6s;
}

.hero-ctas {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 0.8s;
}

.hero-trust {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1s;
}

.hero-scroll {
    animation: fadeUp 0.8s ease forwards;
    opacity: 0;
    animation-delay: 1.2s;
}

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

/* Service cards */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

/* Why us cards */
.why-card {
    transition: transform 0.3s ease;
}

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

/* Testimonial cards */
.testimonial-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Scroll reveal animations */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
    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; }

/* Section reveals */
.about-image {
    opacity: 0;
    transform: translateX(-32px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
    outline: none;
}

/* Selection color */
::selection {
    background: #6EE7B7;
    color: #0A2342;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #0A2342;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #13315C;
}

/* Responsive adjustments */
@media (max-width: 640px) {
    .font-serif {
        line-height: 1.1;
    }
}

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

    .reveal {
        opacity: 1;
        transform: none;
    }

    .about-image {
        opacity: 1;
        transform: none;
    }
}
