/* ============================================
   Alfredo Paz The Barber — Custom Styles
   Classic & Elegant · Forest Green + Off-White
   ============================================ */

/* --- Custom Properties --- */
:root {
    --color-forest-50: #f2f7f4;
    --color-forest-100: #e3efe6;
    --color-forest-200: #c7dfcc;
    --color-forest-300: #9ec4a3;
    --color-forest-400: #6fa074;
    --color-forest-500: #4d7d54;
    --color-forest-600: #3c6142;
    --color-forest-700: #304e35;
    --color-forest-800: #263d2a;
    --color-forest-900: #1f3222;
    --color-forest-950: #0f190e;
    --color-offwhite-50: #fdfcfa;
    --color-offwhite-100: #faf8f4;
    --color-offwhite-200: #f5f0e8;
    --color-offwhite-300: #ede5d8;
    --color-offwhite-400: #e8dfcf;
    
    --font-serif: 'Playfair Display', Georgia, serif;
    --font-sans: 'Lato', system-ui, sans-serif;
    
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

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

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

body {
    margin: 0;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* --- Button Styles --- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    background-color: #faf8f4;
    color: #1f3222;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #304e35;
    transition: width 0.4s var(--ease-out-expo);
    z-index: -1;
}

.btn-primary:hover {
    color: #faf8f4;
}

.btn-primary:hover::before {
    width: 100%;
}

.btn-primary-lg {
    display: inline-flex;
    align-items: center;
    background-color: #faf8f4;
    color: #1f3222;
    padding: 18px 42px;
    font-family: var(--font-sans);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.btn-primary-lg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background-color: #304e35;
    transition: width 0.4s var(--ease-out-expo);
    z-index: -1;
}

.btn-primary-lg:hover {
    color: #faf8f4;
}

.btn-primary-lg:hover::before {
    width: 100%;
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    background-color: transparent;
    color: #ede5d8;
    padding: 14px 32px;
    font-family: var(--font-sans);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid rgba(237, 229, 216, 0.4);
    cursor: pointer;
    transition: all 0.4s var(--ease-out-expo);
}

.btn-secondary:hover {
    background-color: rgba(237, 229, 216, 0.1);
    border-color: rgba(237, 229, 216, 0.8);
    color: #fdfcfa;
}

/* --- Hero Overlay --- */
.hero-overlay {
    background: linear-gradient(
        180deg,
        rgba(15, 25, 14, 0.55) 0%,
        rgba(15, 25, 14, 0.70) 50%,
        rgba(15, 25, 14, 0.85) 100%
    );
}

/* --- Scroll Line Animation --- */
@keyframes scrollLine {
    0% {
        transform: scaleY(0);
        transform-origin: top;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        transform: scaleY(1);
        transform-origin: top;
        opacity: 0;
    }
}

.animate-scroll-line {
    animation: scrollLine 2s ease-in-out infinite;
}

/* --- Navbar Transitions --- */
#navbar {
    transition: background-color 0.5s var(--ease-out-expo), 
                padding 0.5s var(--ease-out-expo),
                box-shadow 0.5s var(--ease-out-expo);
}

#navbar.scrolled {
    background-color: rgba(15, 25, 14, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 rgba(237, 229, 216, 0.08);
}

#navbar.scrolled .nav-link,
#navbar.scrolled #logo-text,
#navbar.scrolled #logo-sub,
#navbar.scrolled .menu-line,
#navbar.scrolled #logo-icon {
    color: #faf8f4;
    border-color: rgba(250, 248, 244, 0.3);
}

/* --- Mobile Menu --- */
.mobile-link {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s var(--ease-out-expo), transform 0.4s var(--ease-out-expo), color 0.3s;
}

#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; }

/* --- Menu Toggle Animation --- */
.menu-line {
    transition: transform 0.4s var(--ease-out-expo), opacity 0.3s ease;
}

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

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

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

/* --- Service Cards --- */
.service-card {
    background-color: #fdfcfa;
    border-radius: 2px;
    transition: transform 0.5s var(--ease-out-expo), box-shadow 0.5s var(--ease-out-expo);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(15, 25, 14, 0.12);
}

/* --- Gallery Items --- */
.gallery-item {
    overflow: hidden;
    border-radius: 2px;
    cursor: pointer;
}

.gallery-item::after {
    content: '';
    display: block;
    padding-bottom: 100%;
}

/* --- Reveal Animations --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

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

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
    
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* --- Responsive --- */
@media (max-width: 767px) {
    .font-serif {
        line-height: 1.1;
    }
}

@media (min-width: 768px) {
    .reveal {
        opacity: 0;
        transform: translateY(40px);
    }
    
    .reveal.revealed {
        opacity: 1;
        transform: translateY(0);
    }
}
