/* Custom styles for Palm Beach Pool Resurfacing */

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

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Scroll reveal animations - progressive enhancement via JS */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

    .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; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(253, 252, 248, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(22, 101, 52, 0.1);
}

.navbar-scrolled .menu-line {
    background: #166534 !important;
}

.navbar-scrolled .font-serif {
    color: #14532d !important;
}

.navbar-scrolled a:not(.bg-emerald-800):not(.bg-cream-50) {
    color: #166534 !important;
}

/* Mobile menu */
.mobile-menu-open {
    transform: translateX(0) !important;
}

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

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

/* Gallery item */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s ease;
}

/* Process step */
.process-step {
    transition: transform 0.3s ease;
}

/* Button focus */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #16a34a;
    outline-offset: 2px;
}

/* Selection */
::selection {
    background: #166534;
    color: #fdfcf8;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}

/* Form input focus states */
input:focus,
select:focus,
textarea:focus {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}
