/* ============================================
   FantasticNails — Custom Styles
   ============================================ */

/* Base & Typography */
html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* Selection */
::selection {
    background: #0d9488;
    color: #fff;
}

::-moz-selection {
    background: #0d9488;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f5f5f4;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #0d9488;
}

/* Scroll Indicator Animation */
@keyframes scrollIndicator {
    0% { transform: translateY(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateY(200%); opacity: 0; }
}
.animate-scroll-indicator {
    animation: scrollIndicator 1.5s ease-in-out infinite;
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }
.reveal[data-delay="5"] { transition-delay: 0.5s; }
.reveal[data-delay="6"] { transition-delay: 0.6s; }

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
}

/* Navbar Transition States */
#navbar.scrolled {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(255,255,255,0.05);
}

#navbar.scrolled #nav-logo-text {
    color: #fff;
}

/* Service Card Hover */
.service-card {
    transform: translateY(0);
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery Item */
.gallery-item {
    height: 200px;
}

.gallery-item.col-span-2 {
    height: 424px;
}

.gallery-item.row-span-2 {
    grid-row: span 2;
}

@media (min-width: 768px) {
    .gallery-item {
        height: 240px;
    }
    .gallery-item.col-span-2 {
        height: 504px;
    }
}

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

/* Focus Styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #0d9488;
    outline-offset: 2px;
}

/* Smooth image loading */
img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

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

/* Custom underline animation for links */
.nav-link::after {
    content: '';
    display: block;
    width: 0;
    height: 1px;
    background: currentColor;
    transition: width 0.3s ease;
    margin-top: 2px;
}

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

/* Mobile nav link animation */
.mobile-nav-link {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: no-preference) {
    .mobile-nav-link {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.4s ease, transform 0.4s ease;
    }
}

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