/* ─── CP Barbershop — Global CSS ──────────────────────────────────────────── */

/* ─── Google Fonts ─────────────────────────────────────────────────────────── */
/* Big Shoulders Display | Source Serif 4 | IBM Plex Mono */
/* Loaded via functions.php wp_enqueue_style */

/* ─── Color System ─────────────────────────────────────────────────────────── */
:root {
    --color-bg:               #1A1612;
    --color-bg-raised:        #1A2B1F;
    --color-surface:          #2E2620;
    --color-accent:           #C86B2A;
    --color-accent-hover:     #D97A38;
    --color-community:        #154421;
    --color-community-light:  #1E6130;
    --color-text:             #F0EAE0;
    --color-text-muted:       #9E8E7E;
    --color-divider:          #3D3228;
}

/* ─── Typography System ────────────────────────────────────────────────────── */
:root {
    --font-display:  'Big Shoulders Display', sans-serif;
    --font-body:     'Source Serif 4', serif;
    --font-mono:     'IBM Plex Mono', monospace;

    /* Scale */
    --fs-display:    clamp(4rem, 13vw, 10rem);
    --fs-h1:         clamp(2.75rem, 7vw, 6rem);
    --fs-h2:         clamp(1.875rem, 4vw, 3.25rem);
    --fs-h3:         clamp(1.25rem, 2.5vw, 1.875rem);
    --fs-body-lg:    clamp(1.125rem, 1.4vw, 1.25rem);
    --fs-body:       clamp(1rem, 1.2vw, 1.125rem);
    --fs-lead:       clamp(1.125rem, 1.5vw, 1.375rem);
    --fs-small:      clamp(0.875rem, 1vw, 1rem);
    --fs-label:      0.6875rem;
    --fs-price:      1rem;
    --fs-caption:    0.8125rem;

    /* Weights */
    --fw-display:    800;
    --fw-bold:       600;
    --fw-regular:    400;

    /* Letter spacing */
    --ls-display:   -0.02em;
    --ls-label:      0.12em;
    --ls-body:       0.01em;

    /* Line heights */
    --lh-display:    0.92;
    --lh-heading:    1.1;
    --lh-body:       1.7;

    /* Spacing scale */
    --space-xs:      0.5rem;
    --space-sm:      1rem;
    --space-md:      2rem;
    --space-lg:      4rem;
    --space-xl:      7rem;
    --space-2xl:     10rem;

    /* Transitions */
    --ease-out:      cubic-bezier(0.16, 1, 0.3, 1);
    --ease-in-out:   cubic-bezier(0.87, 0, 0.13, 1);
    --duration-fast: 0.3s;
    --duration-med:  0.6s;
    --duration-slow: 1s;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: var(--fs-body);
    font-weight: var(--fw-regular);
    line-height: var(--lh-body);
    letter-spacing: var(--ls-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

/* ─── Typography defaults ──────────────────────────────────────────────────── */
.cp-display {
    font-family: var(--font-display);
    font-size: var(--fs-display);
    font-weight: var(--fw-display);
    line-height: var(--lh-display);
    letter-spacing: var(--ls-display);
    text-transform: uppercase;
}

.cp-h1 {
    font-family: var(--font-display);
    font-size: var(--fs-h1);
    font-weight: var(--fw-display);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-display);
    text-transform: uppercase;
}

.cp-h2 {
    font-family: var(--font-display);
    font-size: var(--fs-h2);
    font-weight: var(--fw-display);
    line-height: var(--lh-heading);
    letter-spacing: var(--ls-display);
    text-transform: uppercase;
}

.cp-h3 {
    font-family: var(--font-display);
    font-size: var(--fs-h3);
    font-weight: var(--fw-bold);
    line-height: var(--lh-heading);
    text-transform: uppercase;
}

.cp-label {
    font-family: var(--font-mono);
    font-size: var(--fs-label);
    font-weight: var(--fw-regular);
    letter-spacing: var(--ls-label);
    text-transform: uppercase;
    color: var(--color-text-muted);
}

.cp-price {
    font-family: var(--font-mono);
    font-size: var(--fs-price);
    font-weight: var(--fw-regular);
    color: var(--color-accent);
}

.cp-caption {
    font-family: var(--font-mono);
    font-size: var(--fs-caption);
    color: var(--color-text-muted);
}

/* ─── Utility ──────────────────────────────────────────────────────────────── */
.cp-accent    { color: var(--color-accent); }
.cp-community { color: var(--color-community-light); }
.cp-muted     { color: var(--color-text-muted); }

.cp-divider {
    width: 100%;
    height: 1px;
    background: var(--color-divider);
    border: none;
}

/* ─── Global mobile fixes ───────────────────────────────────────────────────── */
@media (max-width: 767px) {
    /* Prevent horizontal overflow globally */
    body { overflow-x: hidden; }

    /* All section inners get safe horizontal padding on small screens */
    .cp-services-hub__inner,
    .cp-locations-hub__inner,
    .cp-about__hero-content,
    .cp-about__stats-inner,
    .cp-about__story-inner,
    .cp-faq__inner,
    .cp-book__inner,
    .cp-service-single__header-inner,
    .cp-service-single__body,
    .cp-location-single__header-inner,
    .cp-location-single__body {
        padding-left: 1.25rem;
        padding-right: 1.25rem;
    }

    /* Stack grid cards single column on smallest screens */
    .cp-services-hub__grid,
    .cp-locations-hub__grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Elementor wrapper resets ─────────────────────────────────────────────── */
/* Strip all default padding/margin Elementor adds around our widgets */
.elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}

.elementor-section,
.elementor-container,
.elementor-column,
.elementor-column-wrap,
.e-con,
.e-con-inner {
    padding: 0 !important;
    margin: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ─── Elementor editor: force all animated elements visible ────────────────── */
/* GSAP starts elements at opacity:0 — in the editor they never animate in     */
.elementor-edit-mode *,
.elementor-editor-active * {
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !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;
    }
}
