/* ===== Custom Styles for Pratt Truck & Trailer Service ===== */

:root {
    --color-midnight-900: #111a26;
    --color-mint-500: #2ab872;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* ===== Typography ===== */
.font-serif {
    font-family: 'Playfair Display', Georgia, serif;
}

.font-sans {
    font-family: 'DM Sans', system-ui, sans-serif;
}

/* ===== Navbar ===== */
#navbar {
    background: transparent;
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

#navbar.scrolled {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(17, 26, 38, 0.06);
}

/* ===== Service Cards ===== */
.service-card {
    will-change: transform;
}

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

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

.mobile-link {
    position: relative;
}

.mobile-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--color-mint-500);
    transition: width 0.3s ease;
}

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

/* ===== Scroll Reveal Animations ===== */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

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

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .service-card,
    html {
        transition: none;
        animation: none;
    }
    
    .reveal {
        opacity: 1;
        transform: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* ===== Selection ===== */
::selection {
    background: rgba(42, 184, 114, 0.2);
    color: var(--color-midnight-900);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #99adc9;
}

/* ===== Focus Styles ===== */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #2ab872;
    outline-offset: 2px;
    border-radius: 4px;
}

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