/* Custom styles for Bound In Flesh Tattoos */

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

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: #334155;
}

/* Selection color */
::selection {
    background: rgba(20, 184, 166, 0.3);
    color: #f8fafc;
}

/* Navbar transition */
#navbar {
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
}

#navbar.scrolled {
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(20, 184, 166, 0.1);
}

/* Mobile menu animations */
.mobile-link {
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, color 0.3s ease;
}

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

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

/* Menu toggle animation */
.menu-line {
    transition: all 0.3s ease;
}

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

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

#menu-toggle.active .menu-line:nth-child(3) {
    width: 20px;
    transform: rotate(-45deg) translate(4px, -4px);
}

/* Service card hover effects */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.5);
}

/* Gallery hover effects */
.gallery-item {
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(2, 6, 23, 0.4), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Nav links underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: #14b8a6;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Prevent layout shift on images */
img {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    .service-card,
    .gallery-item img,
    .nav-link::after,
    .mobile-link {
        transition: none;
        animation: none;
    }
    
    .gallery-item:hover img {
        transform: none;
    }
}

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

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        line-height: 1.1;
    }
}
