/* Custom Styles for E&E Hair Solutions */

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

/* Custom Selection Color */
::selection {
    background-color: rgba(74, 138, 90, 0.2);
    color: #1c3725;
}

/* Navbar Transition */
#navbar {
    transition: background-color 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

#navbar.scrolled {
    background-color: rgba(254, 253, 248, 0.92);
    backdrop-filter: blur(16px);
    box-shadow: 0 1px 20px rgba(42, 84, 54, 0.06);
}

/* Mobile Menu */
#mobileMenu.open {
    opacity: 1;
    pointer-events: all;
}

#mobileMenu.open .mobile-link {
    animation: fadeDown 0.4s ease forwards;
    opacity: 0;
}

#mobileMenu.open .mobile-link:nth-child(1) { animation-delay: 0.05s; }
#mobileMenu.open .mobile-link:nth-child(2) { animation-delay: 0.1s; }
#mobileMenu.open .mobile-link:nth-child(3) { animation-delay: 0.15s; }
#mobileMenu.open .mobile-link:nth-child(4) { animation-delay: 0.2s; }
#mobileMenu.open .mobile-link:nth-child(5) { animation-delay: 0.25s; }

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

/* Menu Button Animation */
.menu-btn-active .menu-line:nth-child(1) {
    transform: rotate(45deg) translate(4px, 4px);
}
.menu-btn-active .menu-line:nth-child(2) {
    opacity: 0;
}
.menu-btn-active .menu-line:nth-child(3) {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.25rem;
}

/* Hero Animations */
.hero-badge {
    animation: fadeInUp 0.8s ease forwards;
}
.hero-badge { opacity: 0; }

h1 {
    animation: fadeInUp 0.8s ease 0.15s forwards;
    opacity: 0;
}

h1 + p {
    animation: fadeInUp 0.8s ease 0.3s forwards;
    opacity: 0;
}

h1 + p + div {
    animation: fadeInUp 0.8s ease 0.45s forwards;
    opacity: 0;
}

h1 + p + div + div {
    animation: fadeInUp 0.8s ease 0.6s forwards;
    opacity: 0;
}

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

/* Reveal Animations — Progressive Enhancement */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(28px);
    }
    
    .reveal.visible {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Card Hover */
.service-card {
    transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
}

.service-card:hover {
    transform: translateY(-4px);
}

/* Gallery Item */
.gallery-item {
    transition: transform 0.4s ease;
}

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

/* Clip Diagonal */
.clip-diagonal {
    clip-path: polygon(30% 0, 100% 0, 100% 100%, 0% 100%);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #fdf9ee;
}
::-webkit-scrollbar-thumb {
    background: #c5dfcc;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #98c5a3;
}

/* Subtle pattern overlay for hero */
#hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(42, 84, 54, 0.03) 1px, transparent 0);
    background-size: 32px 32px;
    pointer-events: none;
}

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