/* River Place Recycling — Custom Styles */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Selection color */
::selection {
    background: #0d9488;
    color: white;
}

/* Navbar scroll state */
.nav-scrolled #navbar {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav-scrolled .nav-text-color {
    color: #0f172a;
}

.nav-scrolled a:not(.bg-teal-600):not(.text-teal-600) {
    color: #475569;
}

.nav-scrolled a:not(.bg-teal-600):not(.text-teal-600):hover {
    color: #0d9488;
}

/* Scroll reveal — progressive enhancement, respects reduced motion */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 1;
        transform: translateY(0);
        transition: opacity 0.6s cubic-bezier(0.22, 1, 0.36, 1), transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
    }
}

/* Staggered reveal delays for grid items */
@media (prefers-reduced-motion: no-preference) {
    .reveal:nth-child(1) { transition-delay: 0ms; }
    .reveal:nth-child(2) { transition-delay: 80ms; }
    .reveal:nth-child(3) { transition-delay: 160ms; }
    .reveal:nth-child(4) { transition-delay: 240ms; }
    .reveal:nth-child(5) { transition-delay: 320ms; }
    .reveal:nth-child(6) { transition-delay: 400ms; }
}

/* Hide reveals by default (JS enables them) */
.reveal {
    opacity: 0;
    transform: translateY(24px);
}

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

/* For users who prefer reduced motion, ensure content is always visible */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Image hover zoom */
.group img {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.group:hover img {
    transform: scale(1.03);
}

/* Button focus styles */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #14b8a6;
    outline-offset: 2px;
    border-radius: 4px;
}

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

/* Mobile menu transition */
#mobile-menu {
    animation: slideDown 0.25s ease-out;
}

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

/* Form success animation */
#form-success {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: scale(0.97); }
    to { opacity: 1; transform: scale(1); }
}
