/* ============================================
   Oak Hills Painting — Custom Styles
   ============================================ */

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

body {
    overflow-x: hidden;
}

/* Selection color */
::selection {
    background-color: #87c087;
    color: #0a1c0a;
}

/* ============================================
   Scroll Reveal Animations
   (Progressive enhancement — content visible
    by default, animated via JS only)
   ============================================ */
@media (prefers-reduced-motion: no-preference) {
    .service-card,
    .gallery-item,
    .testimonial-card {
        opacity: 0;
        transform: translateY(24px);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }

    .service-card.revealed,
    .gallery-item.revealed,
    .testimonial-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Staggered delays */
    .service-card:nth-child(1) { transition-delay: 0.05s; }
    .service-card:nth-child(2) { transition-delay: 0.1s; }
    .service-card:nth-child(3) { transition-delay: 0.15s; }
    .service-card:nth-child(4) { transition-delay: 0.2s; }
    .service-card:nth-child(5) { transition-delay: 0.25s; }
    .service-card:nth-child(6) { transition-delay: 0.3s; }

    .gallery-item:nth-child(1) { transition-delay: 0.05s; }
    .gallery-item:nth-child(2) { transition-delay: 0.1s; }
    .gallery-item:nth-child(3) { transition-delay: 0.15s; }
    .gallery-item:nth-child(4) { transition-delay: 0.2s; }
    .gallery-item:nth-child(5) { transition-delay: 0.25s; }
    .gallery-item:nth-child(6) { transition-delay: 0.3s; }

    .testimonial-card:nth-child(1) { transition-delay: 0.05s; }
    .testimonial-card:nth-child(2) { transition-delay: 0.15s; }
    .testimonial-card:nth-child(3) { transition-delay: 0.25s; }
}

/* ============================================
   Navbar active state
   ============================================ */
nav a.active {
    color: #245c24;
    position: relative;
}

nav a.active::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 2px;
    background: #245c24;
    border-radius: 1px;
}

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

/* ============================================
   Custom scrollbar
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdfcfa;
}
::-webkit-scrollbar-thumb {
    background: #b7d9b7;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #87c087;
}

/* ============================================
   Mobile menu transitions
   ============================================ */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1), padding 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#mobile-menu.open {
    max-height: 400px;
    padding-top: 0;
}

/* ============================================
   Button ripple / press effect
   ============================================ */
button:active,
a:active {
    transform: scale(0.98);
}

/* ============================================
   Print styles
   ============================================ */
@media print {
    header, footer, .service-card, .gallery-item, .testimonial-card {
        opacity: 1 !important;
        transform: none !important;
    }
    #mobile-menu { display: none; }
}
