/* Youngsville Nails — Custom Styles */

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

/* Prevent layout shift on images */
img {
    max-width: 100%;
    height: auto;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fef6f6;
}
::-webkit-scrollbar-thumb {
    background: #a12a2a;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #832626;
}

/* Selection color */
::selection {
    background: #f5b8b8;
    color: #3a0f0f;
}

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

@keyframes float-delay {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-5deg); }
}

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

.animate-float-delay {
    animation: float-delay 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Mobile menu animation */
.menu-line {
    display: block;
}

#menu-toggle.active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
    width: 1.5rem;
}

/* Scroll reveal base styles — always visible by default */
.reveal {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

/* Only apply hidden state when JS is active and prefers-reduced-motion allows */
@media (prefers-reduced-motion: no-preference) {
    .reveal.is-hidden {
        opacity: 0;
        transform: translateY(30px);
    }
}

/* Service card hover gradient overlay */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 1.5rem;
    border: 2px solid transparent;
    transition: border-color 0.4s ease;
    pointer-events: none;
}

.service-card:hover::after {
    border-color: rgba(255, 255, 255, 0.2);
}

/* Header shadow on scroll */
header.scrolled {
    box-shadow: 0 4px 20px rgba(161, 42, 42, 0.1);
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a12a2a;
    outline-offset: 2px;
    border-radius: 0.5rem;
}

/* Mobile menu open state */
#mobile-menu.open {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Back to top button animation */
#back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* Gallery image hover effect */
.group:hover .group-hover\:scale-105 {
    transform: scale(1.05);
}

/* Reduced motion preferences */
@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.is-hidden {
        opacity: 1;
        transform: none;
    }

    .animate-float,
    .animate-float-delay {
        animation: none;
    }
}
