/* ===== Custom Styles for Kreations by Kallie Hair Studio ===== */

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

/* ===== Scroll Reveal Animations ===== */
.scroll-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only animate when JS is enabled — progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .scroll-reveal {
        opacity: 0;
        transform: translateY(30px);
    }
    
    .scroll-reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    .scroll-reveal.delay-1 { transition-delay: 0.1s; }
    .scroll-reveal.delay-2 { transition-delay: 0.2s; }
    .scroll-reveal.delay-3 { transition-delay: 0.3s; }
    .scroll-reveal.delay-4 { transition-delay: 0.4s; }
    .scroll-reveal.delay-5 { transition-delay: 0.5s; }
    .scroll-reveal.delay-6 { transition-delay: 0.6s; }
}

/* ===== Navbar Styles ===== */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(198, 123, 92, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
}

#navbar.scrolled #nav-logo-text {
    color: white !important;
}

/* ===== Hero Parallax Subtle Effect ===== */
#hero {
    position: relative;
}

#hero img {
    will-change: transform;
}

/* ===== Button Hover Glow ===== */
button:hover, a:hover {
    will-change: transform, box-shadow;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #b56243;
}

/* ===== Selection Color ===== */
::selection {
    background: #C67B5C;
    color: white;
}

/* ===== Mobile Menu Animation ===== */
#mobile-menu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, opacity 0.3s ease;
}

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

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

/* ===== Back to Top Button ===== */
#back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

/* ===== Form Focus States ===== */
input:focus, select:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(198, 123, 92, 0.15);
}

/* ===== Image Loading Shimmer ===== */
img {
    background: linear-gradient(90deg, #f0e6dc 25%, #f5ede5 50%, #f0e6dc 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

img[src] {
    animation: none;
    background: none;
}

/* ===== Gallery Hover Overlay ===== */
.group:hover .group-hover\:scale-110 {
    transform: scale(1.1);
}

/* ===== Card Hover Shadow ===== */
.rounded-3xl {
    transition: box-shadow 0.4s ease, transform 0.4s ease;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .scroll-reveal {
        opacity: 1;
        transform: none;
    }
}
