/* ========================================
   Infinity Salon+Spa — Custom Styles
   Classic & Elegant Design System
======================================== */

/* --- Custom Scrollbar --- */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f3ee;
}
::-webkit-scrollbar-thumb {
    background: #9cc5a3;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6fa076;
}

/* --- Selection --- */
::selection {
    background: #284a31;
    color: #faf9f6;
}

/* --- Hero Animations --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-anim {
    opacity: 0;
    animation: fadeInUp 0.8s ease forwards;
}

.hero-anim:nth-child(1) { animation-delay: 0.2s; }
.hero-anim:nth-child(2) { animation-delay: 0.4s; }
.hero-anim:nth-child(3) { animation-delay: 0.6s; }
.hero-anim:nth-child(4) { animation-delay: 0.8s; }
.hero-anim:nth-child(5) { animation-delay: 1s; }

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

.reveal[data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    .hero-anim {
        opacity: 1;
        animation: none;
    }
    .reveal {
        opacity: 1;
        transform: none;
    }
    .reveal[data-reveal] {
        opacity: 1;
        transform: none;
    }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Service Card Image Container --- */
.service-card img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --- Navbar Transition --- */
.nav-scrolled {
    background: rgba(250, 249, 246, 0.97) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 1px 0 rgba(40, 74, 49, 0.1);
}

.nav-scrolled .nav-link {
    color: #284a31 !important;
}

.nav-scrolled .nav-text-color {
    color: #1a2f20 !important;
}

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

#mobile-menu.open .mobile-link {
    animation: fadeInUp 0.4s ease forwards;
}

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

/* --- Menu Button Animation --- */
.menu-btn.active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn.active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn.active .menu-line:nth-child(3) {
    width: 24px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* --- Image Hover Zoom --- */
.gallery-item img,
.service-card img {
    will-change: transform;
}

/* --- Button Focus States --- */
button:focus-visible,
a:focus-visible {
    outline: 2px solid #4d7f56;
    outline-offset: 2px;
}

/* --- Input Focus States --- */
input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* --- Gallery Grid Responsive --- */
@media (max-width: 767px) {
    .gallery-grid .md\\:col-span-2 {
        grid-column: span 1;
    }
    .gallery-grid .md\\:row-span-2 {
        grid-row: span 1;
    }
}
