/* Custom styles for Blanche Braiding Salon */

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

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background-color: #065f46;
    color: #fefdf8;
}

/* Section Labels */
.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #059669;
}

/* Section Headings */
.section-heading {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(2rem, 4vw, 3.25rem);
    font-weight: 700;
    line-height: 1.1;
    color: #064e3b;
}

/* Navbar scroll state */
#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(6, 78, 59, 0.08);
}

/* Mobile menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeUp 0.4s ease forwards;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }
#mobileMenu.open .mobile-link:nth-child(6) { animation-delay: 0.3s; }

/* Hamburger animation */
#menuBtn.active #bar1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.active #bar2 {
    opacity: 0;
}
#menuBtn.active #bar3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* Floating cards animation */
.floating-card {
    animation: float 3s ease-in-out infinite;
}
.floating-card:nth-child(2) {
    animation-delay: 0.5s;
}
.floating-card:nth-child(3) {
    animation-delay: 1s;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}

/* Marquee */
@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.animate-marquee {
    animation: marquee 30s linear infinite;
}

/* Scroll indicator */
@keyframes scroll-indicator {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(100%); }
}

.animate-scroll-indicator {
    animation: scroll-indicator 1.5s ease-in-out infinite;
}

/* Fade up animation for scroll reveal */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll reveal base - visible by default */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

/* Only animate when JS adds the class */
.js-loaded .reveal {
    opacity: 0;
    transform: translateY(24px);
}

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

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 48px;
    height: 48px;
    background-color: #065f46;
    color: #d1fae5;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    box-shadow: 0 4px 12px rgba(6, 78, 59, 0.3);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #047857;
    transform: translateY(-2px);
}

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

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

/* Responsive tweaks */
@media (max-width: 640px) {
    .section-heading {
        font-size: clamp(1.75rem, 8vw, 2.5rem);
    }
    
    .floating-card {
        padding: 0.75rem 1rem;
    }
    
    .floating-card .font-serif {
        font-size: 1.5rem;
    }
}
