/* Custom styles for Alterations & Sewing by Sandy */

/* Thread animation lines */
.thread-line {
    position: absolute;
    animation: float-thread 8s ease-in-out infinite;
}

.thread-line:nth-child(2) {
    animation-delay: -2s;
    animation-duration: 10s;
}

.thread-line:nth-child(3) {
    animation-delay: -4s;
    animation-duration: 12s;
}

.thread-line:nth-child(4) {
    animation-delay: -1s;
    animation-duration: 9s;
}

@keyframes float-thread {
    0%, 100% {
        opacity: 0.3;
        transform: rotate(var(--rotation, -15deg)) translateX(0);
    }
    50% {
        opacity: 0.7;
        transform: rotate(var(--rotation, -15deg)) translateX(10px);
    }
}

/* Scroll reveal animations */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.reveal[data-reveal="left"] {
    transform: translateX(-30px);
}

.reveal[data-reveal="right"] {
    transform: translateX(30px);
}

.reveal[data-reveal="scale"] {
    transform: scale(0.95);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    
    .thread-line {
        animation: none;
        opacity: 0.5;
    }
    
    .group img {
        transition: none;
    }
    
    .group:hover img {
        transform: none;
    }
}

/* Smooth scroll offset for fixed nav */
html {
    scroll-padding-top: 80px;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #6b2d5b;
}

/* Mobile menu transitions */
#mobileMenu {
    transition: opacity 0.4s ease, visibility 0.4s ease;
}

#mobileMenu.open {
    opacity: 1;
    pointer-events: auto;
}

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

/* Menu button animation */
.menu-line {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

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

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

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

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

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(253, 242, 248, 0.95);
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 20px rgba(107, 45, 91, 0.08);
}

/* Form select styling */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b2d5b' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Image hover zoom with overflow hidden parent */
.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Selection color */
::selection {
    background: #fbcfe8;
    color: #4a1a3d;
}
