/* Custom styles for Fitz's Barbershop */

:root {
    --color-forest-950: #0f1a0a;
    --color-dark-950: #040605;
    --color-gold-500: #d4a843;
    --color-off-white: #f0ece4;
}

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

/* Selection color */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: #f0ece4;
}

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

/* Navbar scroll state */
#navbar.scrolled {
    background: rgba(4, 6, 5, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 67, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

/* Navigation link hover effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: linear-gradient(90deg, #d4a843, #e6c055);
    transition: width 0.3s ease;
}

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

/* Mobile nav links */
.mobile-nav-link {
    position: relative;
}

.mobile-nav-link::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(212, 168, 67, 0.1), transparent);
    transition: width 0.3s ease;
    border-radius: 4px;
}

.mobile-nav-link:hover::before {
    width: 12px;
}

/* Fade-in animations (above the fold - no JS required) */
.fade-in {
    opacity: 1;
    animation: fadeInUp 0.8s ease forwards;
}

.fade-in:nth-child(2) {
    animation-delay: 0.15s;
}

.fade-in:nth-child(3) {
    animation-delay: 0.3s;
}

.fade-in:nth-child(4) {
    animation-delay: 0.45s;
}

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

/* Scroll reveal (below the fold - progressive enhancement) */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
    
    /* Stagger children */
    .service-card {
        opacity: 0;
        transform: translateY(20px);
        transition: opacity 0.5s ease, transform 0.5s ease;
    }
    
    .service-card.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service card hover glow */
.service-card:hover {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(212, 168, 67, 0.05);
}

/* Gold gradient text utility */
.text-gold-gradient {
    background: linear-gradient(135deg, #d4a843, #e6c055, #d4a843);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Input autofill styling for dark theme */
input:-webkit-autofill,
textarea:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 30px #0d110f inset !important;
    -webkit-text-fill-color: #f0ece4 !important;
}

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

::-webkit-scrollbar-track {
    background: #040605;
}

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

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

/* Image loading placeholder */
img {
    background: linear-gradient(135deg, #0d110f 0%, #1a2418 100%);
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 2px solid #d4a843;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Mobile menu animation */
#mobile-menu {
    animation: slideDown 0.3s ease forwards;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Reduced motion */
@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;
    }
    
    .fade-in {
        opacity: 1;
        animation: none;
    }
}

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