/* ============================================
   Royal Barbers — Custom Styles
   ============================================ */

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

/* Base font settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
    background: #1a2744;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a3b5f;
}

/* Navbar transition states */
#navbar.scrolled {
    background: rgba(10, 22, 40, 0.95) !important;
    backdrop-filter: blur(20px) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .menu-line {
    background: white !important;
}

/* Mobile menu animations */
#mobileMenu.open {
    max-height: 400px;
}

#mobileMenu.closed {
    max-height: 0;
}

/* Mobile menu button active state */
#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) {
    transform: rotate(-45deg) translate(5px, -5px);
    width: 1.5rem;
}

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

/* Scroll reveal hidden state (applied by JS) */
.reveal.revealed {
    opacity: 0;
    transform: translateY(30px);
}

/* Staggered delays for grid items */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.3s; }

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
    .reveal.revealed {
        opacity: 1 !important;
        transform: none !important;
    }
    .group img {
        transition: none !important;
    }
}

/* Selection color */
::selection {
    background: #d4af5a;
    color: #0a1628;
}

/* Custom select arrow */
select {
    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='%231a2744' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Gallery hover overlay */
.aspect-square.group img {
    transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle gradient for service cards */
.bg-gradient-to-br {
    transition: all 0.4s ease;
}

/* Gold accent underline for headings */
.font-display {
    letter-spacing: -0.02em;
}

/* Ensure map iframe doesn't overflow */
iframe {
    max-width: 100%;
}
