/* ========================================
   Top Knot Hair Salon — Custom Styles
   Burgundy + Blush | Clean Minimalist
======================================== */

/* ---------- Base ---------- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    overflow-x: hidden;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #FAF7F5;
}
::-webkit-scrollbar-thumb {
    background: #d94f68;
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: #a82d44;
}

/* ---------- Selection ---------- */
::selection {
    background: #f9d0d9;
    color: #5c1f2b;
}

/* ---------- Hero Animations ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ---------- Reveal Animations (progressive enhancement) ---------- */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
        transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
                    transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    .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; }
    
    /* Hero entrance */
    .hero-subtitle {
        animation: heroSlideUp 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.2s forwards;
    }
    .hero-title-line {
        animation: heroSlideUp 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    }
    .hero-title-line:nth-child(1) { animation-delay: 0.3s; }
    .hero-title-line:nth-child(2) { animation-delay: 0.45s; }
    .hero-title-line:nth-child(3) { animation-delay: 0.6s; }
    .hero-title-line:nth-child(4) { animation-delay: 0.75s; }
    
    #hero-desc {
        animation: heroFadeIn 0.8s ease 1s forwards;
    }
    #hero-cta {
        animation: heroFadeIn 0.8s ease 1.15s forwards;
    }
    #hero-stats {
        animation: heroFadeIn 0.8s ease 1.3s forwards;
    }
    
    @keyframes heroSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    @keyframes heroFadeIn {
        from {
            opacity: 0;
            transform: translateY(20px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Gallery hover */
    .gallery-item img {
        transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }
    
    /* Service cards */
    .service-card {
        transition: background-color 0.5s ease, transform 0.5s ease;
    }
}

/* ---------- Navbar ---------- */
#navbar {
    transition: box-shadow 0.3s ease;
}

#navbar.scrolled {
    box-shadow: 0 1px 0 rgba(123, 45, 59, 0.08);
}

#navbar.scrolled #nav-bg {
    opacity: 1;
}

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

#mobile-menu.open #line1 {
    transform: rotate(45deg) translate(4px, 4px);
}
#mobile-menu.open #line2 {
    opacity: 0;
}
#mobile-menu.open #line3 {
    transform: rotate(-45deg) translate(4px, -4px);
    width: 1.5rem;
}

/* ---------- Active nav link ---------- */
.nav-link.active {
    color: #7B2D3B;
}

.nav-link.active::after {
    width: 100% !important;
}

/* ---------- Form focus styles ---------- */
input:focus,
textarea:focus,
select:focus {
    border-bottom-color: #7B2D3B !important;
}

input:focus ~ label,
textarea:focus ~ label,
select:focus ~ label {
    color: #7B2D3B;
}

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

/* ---------- Print styles ---------- */
@media print {
    #navbar,
    #mobile-menu,
    .reveal {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
    }
}

/* ---------- Utility ---------- */
.writing-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
}
