/* Custom styles for Perfection Nails */

/* 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 */
::selection {
    background: rgba(94, 234, 212, 0.3);
    color: #f0fdf9;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #060e1a;
}
::-webkit-scrollbar-thumb {
    background: #1e4060;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2d5a78;
}

/* Navbar transition */
#navbar.scrolled {
    background: rgba(6, 14, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Service cards */
.service-card {
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #5eead4, transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
}

.service-card:hover::before {
    opacity: 1;
}

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

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

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

/* Mobile menu */
#mobileMenu.active {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu:not(.active) {
    opacity: 0;
    pointer-events: none;
}

.mobile-link {
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.4s ease;
}

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

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

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

#menuBtn.open .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
#menuBtn.open .menu-line:nth-child(2) {
    opacity: 0;
}
#menuBtn.open .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 20px;
}

/* Hero text animation */
.hero-title {
    opacity: 0;
    transform: translateY(30px);
    animation: heroReveal 1s ease forwards;
}

.hero-title span {
    display: block;
}

.hero-title span:nth-child(1) {
    animation-delay: 0.1s;
}

.hero-title span:nth-child(2) {
    animation-delay: 0.25s;
}

.hero-title span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes heroReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-sub {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.6s;
}

.hero-cta {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 0.8s;
}

.hero-stats {
    opacity: 0;
    animation: fadeUp 0.8s ease forwards;
    animation-delay: 1s;
}

.hero-image {
    opacity: 0;
    transform: translateX(40px);
    animation: imageReveal 1s ease forwards;
    animation-delay: 0.3s;
}

@keyframes fadeUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
    from {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes imageReveal {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Scroll reveal (progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s ease, transform 0.8s ease;
    }

    .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; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Select styling */
select option {
    background: #0a1628;
    color: #f0fdf9;
}

/* Focus visible */
*:focus-visible {
    outline: 2px solid #5eead4;
    outline-offset: 2px;
}
