/* Custom styles for Ken's Hairstyling */

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

/* Prevent flash of hidden content for scroll sections */
.scroll-section {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: no-preference) {
    .scroll-section.revealed {
        animation: fadeInUp 0.7s ease forwards;
    }
    
    .scroll-section.reveal-hidden {
        opacity: 0;
        transform: translateY(30px);
        transition: opacity 0.7s ease, transform 0.7s ease;
    }
    
    .scroll-section.reveal-hidden.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* Hero orb animation */
@media (prefers-reduced-motion: no-preference) {
    .hero-orb {
        animation: float 8s ease-in-out infinite;
    }
    
    .hero-orb:nth-child(2) {
        animation-delay: -2s;
        animation-duration: 10s;
    }
    
    .hero-orb:nth-child(3) {
        animation-delay: -4s;
        animation-duration: 12s;
    }
    
    @keyframes float {
        0%, 100% {
            transform: translate(0, 0) scale(1);
        }
        33% {
            transform: translate(30px, -20px) scale(1.05);
        }
        66% {
            transform: translate(-20px, 20px) scale(0.95);
        }
    }
}

/* Scroll line animation */
@media (prefers-reduced-motion: no-preference) {
    .scroll-line {
        animation: scrollPulse 2s ease-in-out infinite;
    }
    
    @keyframes scrollPulse {
        0%, 100% {
            opacity: 0.3;
            transform: scaleY(1);
        }
        50% {
            opacity: 0.8;
            transform: scaleY(1.2);
        }
    }
}

/* Navbar scroll state */
.navbar-scrolled {
    background: rgba(5, 13, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 168, 75, 0.1);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu transitions */
.mobile-menu-open {
    opacity: 1 !important;
    pointer-events: all !important;
}

/* Gold shimmer effect on hover for buttons */
.btn-gold {
    position: relative;
    overflow: hidden;
}

.btn-gold::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: left 0.5s ease;
}

.btn-gold:hover::after {
    left: 100%;
}

/* Custom selection color */
::selection {
    background: rgba(212, 168, 75, 0.3);
    color: #fff;
}

/* Subtle pattern overlay for dark sections */
.pattern-overlay {
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.03) 1px, transparent 0);
    background-size: 24px 24px;
}

/* Image hover zoom for gallery */
.gallery-item {
    overflow: hidden;
}

.gallery-item img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Card hover effects */
.service-card {
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                border-color 0.4s ease,
                box-shadow 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3),
                0 0 0 1px rgba(212, 168, 75, 0.1);
}

/* Focus styles for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid rgba(212, 168, 75, 0.6);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduce motion for users who prefer it */
@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;
    }
}

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

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

::-webkit-scrollbar-track {
    background: #0A1628;
}

::-webkit-scrollbar-thumb {
    background: rgba(212, 168, 75, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(212, 168, 75, 0.5);
}
