/* ============================================
   Mex's Barber Shop — Premium Dark Luxury
   Emerald Green + Cream + Gold Accents
   ============================================ */

/* --- CSS Custom Properties --- */
:root {
    --bg-primary: #070E0A;
    --bg-secondary: #0A120D;
    --bg-card: #0C1510;
    --bg-card-hover: #101A14;
    --bg-elevated: #111C15;
    
    --emerald-50: #ECFDF5;
    --emerald-100: #D1FAE5;
    --emerald-200: #A7F3D0;
    --emerald-300: #6EE7B7;
    --emerald-400: #34D399;
    --emerald-500: #10B981;
    --emerald-600: #047857;
    --emerald-700: #065F46;
    --emerald-800: #064E3B;
    --emerald-900: #022C22;
    
    --gold: #D4AF37;
    --gold-light: #E8C94A;
    --gold-dark: #B8941F;
    --gold-muted: rgba(212, 175, 55, 0.15);
    --gold-border: rgba(212, 175, 55, 0.3);
    
    --cream: #F5F5F0;
    --cream-light: #FAFAF5;
    --cream-muted: rgba(245, 245, 240, 0.7);
    
    --text-primary: #F5F5F0;
    --text-secondary: rgba(245, 245, 240, 0.7);
    --text-muted: rgba(245, 245, 240, 0.45);
    
    --font-display: 'Cinzel', serif;
    --font-body: 'Inter', sans-serif;
    
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    
    --shadow-gold: 0 0 40px rgba(212, 175, 55, 0.15);
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.4);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Grain Overlay --- */
.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

/* --- Typography --- */
.text-gold {
    color: var(--gold);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 4px;
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.9375rem;
    letter-spacing: 0.02em;
    transition: all var(--transition-base);
    cursor: pointer;
    border: none;
    white-space: nowrap;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-light) 100%);
    color: var(--bg-primary);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(212, 175, 55, 0.45);
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 100%);
}

.btn-outline-gold {
    background: transparent;
    color: var(--gold);
    border: 1.5px solid var(--gold-border);
}

.btn-outline-gold:hover {
    background: var(--gold-muted);
    border-color: var(--gold);
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* --- Section Headers --- */
.section-tag {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--gold);
    margin-bottom: 12px;
    padding: 6px 14px;
    border: 1px solid var(--gold-border);
    border-radius: 100px;
    background: var(--gold-muted);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.section-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    max-width: 560px;
    line-height: 1.7;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-header .section-desc {
    margin: 0 auto;
}

/* --- Navbar --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    background: rgba(7, 14, 10, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 14px 0;
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
}

.logo-text {
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-link {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--text-secondary);
    letter-spacing: 0.03em;
    transition: color var(--transition-fast);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--gold);
    transition: width var(--transition-base);
}

.nav-link:hover {
    color: var(--gold);
}

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

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

.mobile-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.35) saturate(0.8);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(7, 14, 10, 0.6) 0%,
        rgba(7, 14, 10, 0.4) 40%,
        rgba(7, 14, 10, 0.7) 80%,
        rgba(7, 14, 10, 1) 100%
    );
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 120px 24px 80px;
    max-width: 800px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--cream-muted);
    margin-bottom: 32px;
}

.badge-line {
    width: 32px;
    height: 1px;
    background: var(--gold);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    line-height: 1.05;
    letter-spacing: -0.01em;
    color: var(--text-primary);
    margin-bottom: 24px;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.1875rem);
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 560px;
    margin: 0 auto 40px;
}

.hero-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 64px;
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 32px;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--gold);
    letter-spacing: 0.05em;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--gold-border);
}

.hero-scroll {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
    font-size: 0.6875rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
}

.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 1; transform: scaleY(1); }
    50% { opacity: 0.4; transform: scaleY(0.6); }
}

/* --- Services --- */
.services {
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--gold-border));
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.08);
    border-radius: 8px;
    padding: 40px 36px;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: rgba(212, 175, 55, 0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-gold);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: var(--gold-muted);
    border: 1px solid var(--gold-border);
    margin-bottom: 24px;
}

.service-name {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.service-desc {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* --- About --- */
.about {
    padding: 120px 0;
    background: var(--bg-primary);
    position: relative;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-images {
    position: relative;
}

.about-img-main {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}

.about-img-main img {
    width: 100%;
    height: 450px;
    object-fit: cover;
}

.about-img-secondary {
    position: absolute;
    bottom: -40px;
    right: -40px;
    border-radius: 8px;
    overflow: hidden;
    border: 3px solid var(--bg-primary);
    box-shadow: var(--shadow-card);
}

.about-img-secondary img {
    width: 220px;
    height: 280px;
    object-fit: cover;
}

.about-accent {
    position: absolute;
    top: -24px;
    left: -24px;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-card);
    border: 1px solid var(--gold-border);
    border-radius: 12px;
    z-index: 2;
}

.about-content {
    padding: 20px 0;
}

.about-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 20px;
}

.about-features {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 32px 0 40px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.feature-check {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold-muted);
    border: 1px solid var(--gold-border);
    flex-shrink: 0;
}

/* --- Gallery --- */
.gallery {
    padding: 120px 0;
    background: var(--bg-secondary);
    position: relative;
}

.gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--gold-border));
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
}

.gallery-item img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

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

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(7, 14, 10, 0.85) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 24px;
    opacity: 0;
    transition: opacity var(--transition-base);
}

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

.gallery-overlay span {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--gold);
}

/* --- CTA --- */
.cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    inset: 0;
}

.cta-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.25) saturate(0.6);
}

.cta-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(7, 14, 10, 0.92) 0%,
        rgba(4, 120, 87, 0.4) 50%,
        rgba(7, 14, 10, 0.92) 100%
    );
}

.cta-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-title {
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.cta-actions {
    display: flex;
    justify-content: center;
}

/* --- Contact --- */
.contact {
    padding: 120px 0;
    background: var(--bg-primary);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 1px;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--gold-border));
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.contact-desc {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-item {
    display: flex;
    gap: 16px;
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--gold-muted);
    border: 1px solid var(--gold-border);
    flex-shrink: 0;
}

.contact-item h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.contact-item p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.contact-item a {
    color: var(--gold);
    transition: color var(--transition-fast);
}

.contact-item a:hover {
    color: var(--gold-light);
}

/* --- Contact Form --- */
.contact-form-wrapper {
    background: var(--bg-card);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 12px;
    padding: 40px;
}

.form-header {
    margin-bottom: 32px;
}

.form-header h3 {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-header p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 500;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-primary);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 6px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    transition: all var(--transition-fast);
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px var(--gold-muted);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-success {
    display: none;
    text-align: center;
    padding: 40px 20px;
}

.form-success.show {
    display: block;
}

.success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--gold-muted);
    border: 2px solid var(--gold-border);
}

.form-success h4 {
    font-family: var(--font-display);
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.form-success p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* --- Footer --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid rgba(212, 175, 55, 0.1);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    padding-bottom: 60px;
}

.footer-brand p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: 16px;
    max-width: 280px;
}

.footer-links h4,
.footer-contact h4 {
    font-family: var(--font-display);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 20px;
    letter-spacing: 0.05em;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.footer-links a:hover {
    color: var(--gold);
}

.footer-contact p {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 12px;
}

.footer-contact a {
    color: var(--gold);
    transition: color var(--transition-fast);
}

.footer-contact a:hover {
    color: var(--gold-light);
}

.footer-bottom {
    border-top: 1px solid rgba(212, 175, 55, 0.08);
    padding: 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* --- Scroll Reveal --- */
.reveal {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .about-grid {
        gap: 48px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: rgba(7, 14, 10, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        gap: 24px;
        padding: 40px;
        transition: right var(--transition-base);
        border-left: 1px solid var(--gold-border);
    }

    .nav-links.open {
        right: 0;
    }

    .mobile-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-title {
        font-size: clamp(2.5rem, 12vw, 4rem);
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
    }

    .hero-actions .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        flex-direction: column;
        gap: 16px;
    }

    .stat-divider {
        width: 40px;
        height: 1px;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .about-img-secondary {
        right: 0;
        bottom: -20px;
    }

    .about-img-main img,
    .about-img-secondary img {
        height: 300px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .gallery-item img {
        height: 240px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .contact-form-wrapper {
        padding: 28px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-content {
        padding: 100px 16px 60px;
    }

    .service-card {
        padding: 28px 24px;
    }

    .section-header {
        margin-bottom: 48px;
    }
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}
