/* ===== Custom Styles for Ray's Barbershop ===== */

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

body {
    background-color: #0a060c;
}

/* Selection */
::selection {
    background-color: rgba(200, 149, 108, 0.3);
    color: #fce7f3;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #0a060c;
}
::-webkit-scrollbar-thumb {
    background: #500a28;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #c8956c;
}

/* ===== Hero Animations ===== */
.hero-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: revealUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-reveal:nth-child(1) { animation-delay: 0.1s; }
.hero-reveal:nth-child(2) { animation-delay: 0.25s; }
.hero-reveal:nth-child(3) { animation-delay: 0.4s; }
.hero-reveal:nth-child(4) { animation-delay: 0.55s; }

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

/* Scroll dot animation */
@keyframes scrollDot {
    0% { top: 0; opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.scroll-dot {
    animation: scrollDot 1.5s ease-in-out infinite;
}

/* ===== Service Cards ===== */
.service-card {
    opacity: 0;
    transform: translateY(40px);
    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;
}

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

.service-card:nth-child(1) { transition-delay: 0.05s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.15s; }
.service-card:nth-child(4) { transition-delay: 0.2s; }
.service-card:nth-child(5) { transition-delay: 0.25s; }
.service-card:nth-child(6) { transition-delay: 0.3s; }

/* ===== Gallery ===== */
.gallery-item {
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item.visible {
    opacity: 1;
    transform: scale(1);
}

.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }

/* ===== About Section ===== */
#about .relative > div:first-child {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

#about .relative > div:first-child.visible {
    opacity: 1;
    transform: translateX(0);
}

#about > div > div:last-child > div:first-child {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s,
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.2s;
}

#about > div > div:last-child > div:first-child.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Navbar ===== */
#navbar.scrolled {
    background: rgba(10, 6, 12, 0.92);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(80, 10, 40, 0.3);
}

#navbar.scrolled .menu-line {
    background: #fbbf24;
}

/* ===== Mobile Menu ===== */
.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; }

/* Mobile menu button active state */
#menuBtn.active .menu-line:first-child {
    transform: rotate(45deg) translate(3px, 3px);
}
#menuBtn.active .menu-line:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}
#menuBtn.active .menu-line:nth-child(3) {
    width: 1.5rem;
    transform: rotate(-45deg) translate(3px, -3px);
}

/* ===== CTA Section ===== */
blockquote {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

blockquote.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== Contact Section ===== */
#contact > div > div:first-child > div:first-child {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

#contact > div > div:first-child > div:first-child.visible {
    opacity: 1;
    transform: translateX(0);
}

#contact > div > div:last-child > div:first-child {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s,
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}

#contact > div > div:last-child > div:first-child.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Focus Styles ===== */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 1px rgba(200, 149, 108, 0.2);
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .hero-reveal {
        animation-duration: 0.6s;
    }
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html {
        scroll-behavior: auto;
    }
}
