/* ============================================
   KISS LA Nail Boutique — Custom Styles
   ============================================ */

/* Base */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

::selection {
    background: #6B0F1A;
    color: #FDF8F5;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #FDF8F5;
}
::-webkit-scrollbar-thumb {
    background: #b91c3a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #6B0F1A;
}

/* Navbar */
#navbar {
    transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background: rgba(253, 248, 245, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(107, 15, 26, 0.08);
}

#navbar.scrolled .menu-line {
    background: #6B0F1A;
}

/* Mobile Menu */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

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

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

/* Menu Button Animation */
#menuBtn.active .menu-line:nth-child(1) {
    transform: translateY(5px) rotate(45deg);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
#menuBtn.active .menu-line:nth-child(3) {
    transform: translateY(-5px) rotate(-45deg);
    width: 1.25rem;
}

/* Service Cards */
.service-card {
    will-change: transform;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(107, 15, 26, 0);
    transition: background 0.4s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    background: rgba(107, 15, 26, 0.08);
}

/* Floating Cards Animation */
@keyframes float-1 {
    0%, 100% { transform: rotate(-3deg) translateY(0); }
    50% { transform: rotate(-3deg) translateY(-12px); }
}

@keyframes float-2 {
    0%, 100% { transform: rotate(1deg) translateY(0); }
    50% { transform: rotate(1deg) translateY(-8px); }
}

@keyframes float-3 {
    0%, 100% { transform: rotate(-1deg) translateY(0); }
    50% { transform: rotate(-1deg) translateY(-10px); }
}

.floating-card-1 { animation: float-1 5s ease-in-out infinite; }
.floating-card-2 { animation: float-2 6s ease-in-out infinite; }
.floating-card-3 { animation: float-3 4.5s ease-in-out infinite; }

/* Scroll Reveal (progressive enhancement — only when JS is enabled and prefers-reduced-motion is off) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

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

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
}

/* 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;
    }

    .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Focus styles */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
    outline: 2px solid #6B0F1A;
    outline-offset: 2px;
}

/* Utility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}
