/* Custom styles for Ranch House Salon */

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

/* Prevent flash of hidden content - all content is visible by default */
/* JS adds animation classes progressively */

/* Service card hover effects */
.service-card {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Gallery item hover effects */
.gallery-item {
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Nav transition */
#navbar.scrolled {
    background: rgba(253, 246, 240, 0.95);
    backdrop-filter: blur(20px);
    box-shadow: 0 1px 20px rgba(139, 26, 74, 0.08);
}

#navbar.scrolled .nav-link {
    color: #8B1A4A;
}

#navbar.scrolled .logo-text {
    color: #8B1A4A;
}

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

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

/* Scroll reveal animations - progressive enhancement */
/* Default state: visible (works without JS) */
/* When JS runs, we add the animated state */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1), transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.revealed {
    opacity: 0;
    transform: translateY(40px);
}

/* Reduced motion - disable animations */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .gallery-item {
        transition: none;
    }
    
    .service-card:hover,
    .gallery-item:hover {
        transform: none;
    }
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #8B1A4A;
}

/* Selection color */
::selection {
    background: #f9d0df;
    color: #54102c;
}

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

/* Mobile menu button animation */
#menuBtn.active #menuIcon line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #menuIcon line:nth-child(2) {
    opacity: 0;
}

#menuBtn.active #menuIcon line:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Hero text animation - only runs if JS is enabled, content is already visible */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-animate .hero-content {
    animation: fadeInUp 1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-animate .hero-delay-1 {
    animation-delay: 0.2s;
    opacity: 0;
}

.hero-animate .hero-delay-2 {
    animation-delay: 0.4s;
    opacity: 0;
}

.hero-animate .hero-delay-3 {
    animation-delay: 0.6s;
    opacity: 0;
}

/* Staggered service card animations */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.service-card.animated {
    animation: slideInUp 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Gallery animation */
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.gallery-item.animated {
    animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Geometric shape float animation */
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.float-shape {
    animation: float 6s ease-in-out infinite;
}

.float-shape-delay {
    animation: float 6s ease-in-out 3s infinite;
}
