/* Custom styles for Andover Hair Company */

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

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #1a0a1e;
}
::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #d4943a, #b87333);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #e0a84d, #d4943a);
}

/* Selection color */
::selection {
    background: rgba(212, 148, 58, 0.3);
    color: #f0d8f0;
}

/* Hero orb animations */
@keyframes float-slow {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -30px) scale(1.05); }
    66% { transform: translate(-20px, 20px) scale(0.95); }
}

@keyframes float-medium {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-25px, 25px) scale(1.03); }
    66% { transform: translate(15px, -15px) scale(0.97); }
}

@keyframes float-fast {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    33% { transform: translate(-48%, -52%) scale(1.08); }
    66% { transform: translate(-52%, -48%) scale(0.92); }
}

.hero-orb-1 {
    animation: float-slow 12s ease-in-out infinite;
}

.hero-orb-2 {
    animation: float-medium 10s ease-in-out infinite;
}

.hero-orb-3 {
    animation: float-fast 14s ease-in-out infinite;
}

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

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

/* Service card shimmer */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(212, 148, 58, 0.05), transparent);
    transition: left 0.7s ease;
    z-index: 1;
}

.service-card:hover::before {
    left: 100%;
}

/* Gallery item hover */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(212, 148, 58, 0.1), transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
    border-radius: inherit;
}

.gallery-item:hover::after {
    opacity: 1;
}

/* Navbar transition */
.nav-scrolled {
    background: rgba(26, 10, 30, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 148, 58, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

/* Mobile menu animations */
.mobile-menu-open {
    max-height: 400px !important;
}

.menu-line:nth-child(1) {
    transform-origin: center;
}

.menu-line:nth-child(2) {
    transform-origin: center;
}

.menu-line:nth-child(3) {
    transform-origin: center;
}

/* Mobile menu open state */
.mobile-menu-active .menu-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.mobile-menu-active .menu-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-active .menu-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Fade-in on scroll (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);
    }

    .reveal-delay-1 { transition-delay: 0.1s; }
    .reveal-delay-2 { transition-delay: 0.2s; }
    .reveal-delay-3 { transition-delay: 0.3s; }
    .reveal-delay-4 { transition-delay: 0.4s; }
    .reveal-delay-5 { transition-delay: 0.5s; }
    .reveal-delay-6 { transition-delay: 0.6s; }
}

/* Select dropdown styling */
select option {
    background: #3d0f47;
    color: #f0d8f0;
}

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

/* 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;
    }
}
