/* ============================================
   Southern Roots Salon & Boutique
   Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection Color */
::selection {
    background-color: #d4a574;
    color: #052e16;
}

/* ============================================
   Navbar
   ============================================ */
#navbar {
    transition: background-color 0.5s ease, box-shadow 0.5s ease, padding 0.5s ease;
}

#navbar.scrolled {
    background-color: rgba(5, 46, 22, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.nav-link-text {
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-link-text {
    text-shadow: none;
}

/* ============================================
   Hero Animations
   ============================================ */
.hero-tagline {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.3s;
    opacity: 0;
}

.hero-headline {
    animation: fadeSlideUp 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.hero-subheadline {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 0.9s;
    opacity: 0;
}

.hero-ctas {
    animation: fadeSlideUp 0.8s ease forwards;
    animation-delay: 1.2s;
    opacity: 0;
}

@keyframes fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Indicator */
.scroll-indicator {
    animation: bounce 2s ease infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-8px);
    }
    60% {
        transform: translateY(-4px);
    }
}

/* ============================================
   Section Labels
   ============================================ */
.section-label {
    letter-spacing: 0.3em;
}

/* ============================================
   Reveal Animations (below fold only)
   ============================================ */
.text-reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll .text-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-on-scroll .text-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays for grid items */
.service-card {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.5s ease;
}

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

.service-card.hidden-init {
    opacity: 0;
    transform: translateY(30px);
}

/* ============================================
   Service Cards
   ============================================ */
.service-card {
    overflow: hidden;
}

/* ============================================
   Gallery
   ============================================ */
.gallery-item {
    cursor: pointer;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* ============================================
   Testimonial Cards
   ============================================ */
.testimonial-card {
    transition: transform 0.5s ease, background-color 0.5s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
}

/* ============================================
   Mobile Menu
   ============================================ */
#mobile-menu {
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#mobile-menu.open {
    opacity: 1;
    pointer-events: all;
}

#mobile-menu.closed {
    opacity: 0;
    pointer-events: none;
}

.mobile-nav-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

#mobile-menu.open .mobile-nav-link:nth-child(1) { transition-delay: 0.1s; }
#mobile-menu.open .mobile-nav-link:nth-child(2) { transition-delay: 0.15s; }
#mobile-menu.open .mobile-nav-link:nth-child(3) { transition-delay: 0.2s; }
#mobile-menu.open .mobile-nav-link:nth-child(4) { transition-delay: 0.25s; }
#mobile-menu.open .mobile-nav-link:nth-child(5) { transition-delay: 0.3s; }

/* ============================================
   Form Elements
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(22, 101, 52, 0.15);
}

/* ============================================
   Button Hover Effects
   ============================================ */
a {
    transition: color 0.3s ease;
}

/* ============================================
   Responsive Adjustments
   ============================================ */
@media (max-width: 767px) {
    .hero-headline {
        font-size: 2.75rem;
    }
    
    .hero-headline br {
        display: none;
    }
    
    .hero-headline::after {
        content: 'Bloom';
        display: block;
        font-size: 0.7em;
    }
}

@media (min-width: 768px) {
    .hero-headline br {
        display: block;
    }
}

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .hero-tagline,
    .hero-headline,
    .hero-subheadline,
    .hero-ctas {
        animation: none;
        opacity: 1;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .service-card,
    .gallery-item img,
    .testimonial-card {
        transition: none;
    }
    
    .service-card.hidden-init {
        opacity: 1;
        transform: none;
    }
}

/* ============================================
   Smooth Scrollbar Styling
   ============================================ */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: #166534;
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #14532d;
}
