/* ========================================
   EVOLVE HAIR & BODY CO. — Custom Styles
   ======================================== */

/* --- Base & Typography --- */
html {
    scroll-behavior: smooth;
}

body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Navigation --- */
#navbar {
    background: transparent;
}

#navbar.scrolled {
    background: rgba(8, 11, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.nav-link {
    color: rgba(253, 252, 248, 0.85);
}

.nav-link:hover {
    color: #86efac;
}

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

#mobile-menu .mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s ease, transform 0.4s ease, color 0.3s ease;
}

#mobile-menu.open .mobile-link {
    opacity: 1;
    transform: translateY(0);
}

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

/* Hamburger Animation */
.menu-line {
    transition: transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
}

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

#menu-toggle.active .menu-line:nth-child(2) {
    opacity: 0;
}

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

/* --- Hero --- */
.hero-bg {
    will-change: transform;
}

.hero-overlay {
    background: linear-gradient(
        135deg,
        rgba(5, 46, 22, 0.88) 0%,
        rgba(22, 101, 52, 0.75) 40%,
        rgba(13, 65, 35, 0.82) 100%
    );
}

.hero-headline {
    animation: heroFadeIn 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

.hero-subtitle {
    animation: heroFadeIn 1s ease-out 0.2s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-desc {
    animation: heroFadeIn 1s ease-out 0.4s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-ctas {
    animation: heroFadeIn 1s ease-out 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.hero-scroll-indicator {
    animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
    0%, 100% { transform: translate(-50%, 0); opacity: 0.5; }
    50% { transform: translate(-50%, 8px); opacity: 1; }
}

/* --- Buttons --- */
.btn-primary {
    background: #16a34a;
    color: #fdfcf8;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid #16a34a;
    text-decoration: none;
}

.btn-primary:hover {
    background: #15803d;
    border-color: #15803d;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(22, 163, 74, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fdfcf8;
    padding: 14px 28px;
    border-radius: 50px;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: 2px solid rgba(253, 252, 248, 0.4);
    text-decoration: none;
}

.btn-secondary:hover {
    border-color: #fdfcf8;
    background: rgba(253, 252, 248, 0.1);
    transform: translateY(-2px);
}

/* --- Section Styles --- */
.section-eyebrow {
    letter-spacing: 0.25em;
}

.section-title {
    letter-spacing: -0.02em;
}

/* --- Service Cards --- */
.service-card {
    background: white;
    border-radius: 1.25rem;
    padding: 1.5rem;
    border: 1px solid rgba(253, 243, 224, 0.8);
    transition: all 0.4s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(22, 101, 52, 0.12);
}

.service-card-img {
    transition: transform 0.7s ease;
}

/* --- Gallery --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 1rem;
}

.gallery-item {
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
}

.gallery-item:nth-child(1) {
    grid-row: span 2;
}

.gallery-item:nth-child(4) {
    grid-row: span 2;
}

.gallery-img {
    width: 100%;
    height: 100%;
    object-cover;
    transition: transform 0.7s ease;
}

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

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(5, 46, 22, 0.3) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.4s ease;
}

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

/* --- Testimonials --- */
.testimonial-card {
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(22, 101, 52, 0.1);
}

/* --- Form --- */
.form-input {
    font-family: 'Inter', system-ui, sans-serif;
}

.form-input:focus {
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

/* --- Scroll Reveal --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: none;
}

/* JS-enabled state: hidden initially, animated in */
.js-enabled .reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.js-enabled .reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.js-enabled .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-enabled .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-enabled .reveal:nth-child(4) { transition-delay: 0.3s; }

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .hero-headline,
    .hero-subtitle,
    .hero-desc,
    .hero-ctas {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 240px);
    }
    .gallery-item:nth-child(1),
    .gallery-item:nth-child(4) {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        grid-template-rows: repeat(6, 220px);
    }
}
