/* Custom styles for Cache Salon */

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

/* Prevent flash of unstyled content */
body {
    opacity: 1;
}

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

::-webkit-scrollbar-track {
    background: #141e32;
}

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

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

/* Selection color */
::selection {
    background: rgba(212, 154, 30, 0.3);
    color: #f0f3f9;
}

/* Reveal animations - progressive enhancement */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    }

    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Stagger children */
    .service-card {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease, box-shadow 0.5s ease;
    }

    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }

    /* Gallery items */
    #gallery .reveal {
        opacity: 0;
        transform: scale(0.95);
        transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    }

    #gallery .reveal.revealed {
        opacity: 1;
        transform: scale(1);
    }
}

/* Navbar styles */
.nav-link {
    position: relative;
}

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

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

/* Active nav link when scrolled */
.nav-link.active {
    color: #f5e0a0;
}

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

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

#menuBtn.open #bar1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.open #bar2 {
    opacity: 0;
}

#menuBtn.open #bar3 {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 6px;
}

/* Mobile links animation */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s 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; }

/* Hero parallax-like effect */
#hero .absolute {
    will-change: transform;
}

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

@keyframes float-reverse {
    0%, 100% { transform: translateY(0) rotate(45deg); }
    50% { transform: translateY(20px) rotate(40deg); }
}

/* Custom focus styles */
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d49a1e;
    outline-offset: 2px;
}

/* Reduce motion for accessibility */
@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 {
        opacity: 1;
        transform: none;
    }

    .service-card {
        opacity: 1;
        transform: none;
    }

    #gallery .reveal {
        opacity: 1;
        transform: none;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .font-serif {
        font-size: clamp(1.5rem, 5vw, 2.5rem);
    }
}

/* Print styles */
@media print {
    nav, #contactForm, button, iframe {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    .bg-navy-950, .bg-navy-900 {
        background: white !important;
    }

    .text-white, .text-white\/60, .text-white\/50, .text-white\/70, .text-white\/80 {
        color: black !important;
    }
}
