/* ============================================
   Blurry Blendz Barbershop — Custom Styles
   Classic & Elegant | Teal + Slate Palette
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-teal-50: #f0fdfa;
    --color-teal-100: #ccfbf1;
    --color-teal-300: #5eead4;
    --color-teal-400: #2dd4bf;
    --color-teal-500: #14b8a6;
    --color-teal-600: #0d9488;
    --color-teal-700: #0f766e;
    --color-teal-800: #115e59;
    --color-teal-900: #134e4a;
    --color-teal-950: #042f2e;
    --color-slate-50: #f8fafc;
    --color-slate-100: #f1f5f9;
    --color-slate-200: #e2e8f0;
    --color-slate-400: #94a3b8;
    --color-slate-500: #64748b;
    --color-slate-600: #475569;
    --color-slate-700: #334155;
    --color-slate-800: #1e293b;
    --color-slate-900: #0f172a;
    --color-stone-50: #fafaf9;
    --color-stone-100: #f5f5f4;
    --color-stone-200: #e7e5e4;
}

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

body {
    overflow-x: hidden;
}

/* --- Selection Color --- */
::selection {
    background-color: var(--color-teal-600);
    color: #ffffff;
}

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

::-webkit-scrollbar-track {
    background: var(--color-stone-100);
}

::-webkit-scrollbar-thumb {
    background: var(--color-teal-600);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-teal-700);
}

/* --- Navbar Transition --- */
#navbar.scrolled {
    background-color: rgba(4, 47, 46, 0.97);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
}

#navbar.scrolled .nav-logo-text {
    color: #ffffff;
}

/* --- Nav Links --- */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-teal-300);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
}

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

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

/* --- Mobile Menu Icon Animation --- */
#menuBtn.active #menuLine1 {
    transform: rotate(45deg) translate(5px, 5px);
}

#menuBtn.active #menuLine2 {
    opacity: 0;
}

#menuBtn.active #menuLine3 {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Reveal Animations --- */
/* Default state: visible (progressive enhancement) */
.reveal {
    opacity: 1;
    transform: translateY(0);
    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);
}

/* Only apply hidden state when prefers-reduced-motion is not set */
@media (prefers-reduced-motion: no-preference) {
    .reveal {
        opacity: 0;
        transform: translateY(30px);
    }

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

/* Stagger delays for grid items */
.reveal:nth-child(1) { transition-delay: 0.05s; }
.reveal:nth-child(2) { transition-delay: 0.1s; }
.reveal:nth-child(3) { transition-delay: 0.15s; }
.reveal:nth-child(4) { transition-delay: 0.2s; }
.reveal:nth-child(5) { transition-delay: 0.25s; }
.reveal:nth-child(6) { transition-delay: 0.3s; }

/* --- Service Card Hover --- */
.group:hover .group-hover\:bg-teal-100 {
    transition: background-color 0.5s ease;
}

/* --- Button Hover Effects --- */
button, a {
    transition: all 0.3s ease;
}

/* --- Image Hover Zoom --- */
img {
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* --- Form Focus States --- */
input:focus,
select:focus,
textarea:focus {
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.1);
}

/* --- Decorative Divider --- */
.divider-accent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.divider-accent::before,
.divider-accent::after {
    content: '';
    flex: 1;
    max-width: 120px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--color-teal-300), transparent);
}

/* --- Print Styles --- */
@media print {
    #navbar,
    #mobileMenu,
    .reveal {
        display: none !important;
    }

    body {
        color: #000;
        background: #fff;
    }

    .bg-teal-950 {
        background-color: #1e293b !important;
    }
}

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

/* --- Wide Screen Tweaks --- */
@media (min-width: 1920px) {
    .max-w-7xl {
        max-width: 80rem;
    }
}
