/* Custom styles for Dr. Pepper House */

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

/* Scroll-reveal base: content always visible by default */
.scroll-reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

/* Progressive enhancement: only animate when JS is enabled and user prefers motion */
@media (prefers-reduced-motion: no-preference) {
    .js-enabled .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    .js-enabled .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    .js-enabled .scroll-reveal.revealed-delay-1 {
        transition-delay: 0.1s;
    }
    .js-enabled .scroll-reveal.revealed-delay-2 {
        transition-delay: 0.2s;
    }
    .js-enabled .scroll-reveal.revealed-delay-3 {
        transition-delay: 0.3s;
    }
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(0, 20, 77, 0.08);
}

.nav-text {
    color: #00144d;
}

/* Mobile menu animation */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.3s ease;
}

#mobile-menu.open {
    max-height: 400px;
    opacity: 1;
}

#mobile-menu.hidden {
    max-height: 0;
    opacity: 0;
}

/* Back to top button */
#back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f0fdf7;
}
::-webkit-scrollbar-thumb {
    background: #14b8a6;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

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

/* Image aspect ratio helpers */
img {
    max-width: 100%;
    height: auto;
}

/* Prevent layout shift on images */
img {
    object-fit: cover;
}
