/* Custom styles for S'Creamz Ice Cream */

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

/* Ensure content is visible before JS runs for scroll-reveal */
.scroll-reveal {
    opacity: 1;
    transform: none;
}

/* Scroll reveal — only active when JS adds the class */
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Scroll reveal — hidden state (applied by JS) */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal.animate {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    }
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion: no animations at all */
@media (prefers-reduced-motion: reduce) {
    .scroll-reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(2, 6, 23, 0.92);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Nav link hover underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: #2dd4bf;
    transition: width 0.3s ease;
}

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

/* Mobile link hover */
.mobile-link {
    transition: all 0.2s ease;
}

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

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

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

/* Light theme scrollbar */
body::-webkit-scrollbar-track {
    background: #f8fafc;
}
body::-webkit-scrollbar-thumb {
    background: #94a3b8;
}

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #e2e8f0 0%, #f1f5f9 100%);
}

/* Subtle card tilt on hover */
.group:hover .group-hover\/scale-105 {
    transform: scale(1.05);
}

/* Staggered animation delays for flavor cards */
.grid > *:nth-child(1) { transition-delay: 0ms; }
.grid > *:nth-child(2) { transition-delay: 100ms; }
.grid > *:nth-child(3) { transition-delay: 200ms; }
.grid > *:nth-child(4) { transition-delay: 300ms; }
.grid > *:nth-child(5) { transition-delay: 400ms; }
.grid > *:nth-child(6) { transition-delay: 500ms; }
