/**
 * Mattherrera — premium editorial layout layer (child theme).
 *
 * Elementor → Section/Column/Widget → Advanced → CSS Classes:
 * - mh-measure     ~65ch prose (About, long copy)
 * - mh-case-row    portfolio / case-study rows (tighter type + image polish)
 * - mh-pull-quote  testimonial pull-quote treatment
 * - mh-cta-primary primary high-ticket CTA (apply on Button widget)
 */

/* ------------------------------------------------------------------------- token fallbacks */
body.mh-editorial-premium {
	--mh-fg: var(--wp--preset--color--foreground, #12100e);
	--mh-muted: var(--wp--preset--color--muted, #5e5852);
	--mh-accent: var(--wp--preset--color--accent, #3a2f4d);
	--mh-bg: var(--wp--preset--color--background, #f8f6f1);
	--mh-surface: var(--wp--preset--color--surface, #fff);
	--mh-border: var(--wp--preset--color--border, #dfd8cc);
	--mh-measure: var(--wp--custom--editorial--measure, 65ch);
	--mh-font-body: var(--wp--preset--font-family--body), system-ui, sans-serif;
	--mh-font-display: var(--wp--preset--font-family--display), Georgia, serif;
	--mh-radius: var(--wp--custom--editorial--radius-md, 8px);
	--mh-shadow: var(
		--wp--custom--editorial--shadow-soft,
		0 1px 2px rgba(18, 16, 14, 0.04),
		0 12px 40px rgba(18, 16, 14, 0.06)
	);
}

body.mh-editorial-premium {
	color: var(--mh-fg);
	background-color: var(--mh-bg);
	-webkit-font-smoothing: antialiased;
}

/* ------------------------------------------------------------------------- Elementor ↔ tokens */
body.mh-editorial-premium .elementor-widget-heading .elementor-heading-title {
	font-family: var(--mh-font-display) !important;
	color: var(--mh-fg) !important;
	letter-spacing: -0.02em;
	font-weight: 600 !important;
	line-height: 1.12;
}

body.mh-editorial-premium .elementor-widget-text-editor,
body.mh-editorial-premium .elementor-tab-title,
body.mh-editorial-premium .elementor-accordion-title {
	font-family: var(--mh-font-body) !important;
}

body.mh-editorial-premium .elementor-widget-text-editor {
	color: var(--mh-fg);
	line-height: 1.62;
}

body.mh-editorial-premium .elementor-widget-text-editor a {
	color: var(--mh-accent);
	text-underline-offset: 0.15em;
}

body.mh-editorial-premium .elementor-accordion .elementor-tab-title {
	color: var(--mh-fg) !important;
	font-weight: 600 !important;
}

body.mh-editorial-premium .elementor-widget-icon-list .elementor-icon-list-text {
	font-family: var(--mh-font-body) !important;
}

/* Hero kicker only — avoid uppercase on every icon list site-wide */
body.mh-editorial-premium #banner_section .elementor-widget-icon-list .elementor-icon-list-text {
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-size: 0.76rem;
	font-weight: 600;
	color: var(--mh-muted) !important;
}

body.mh-editorial-premium .elementor-section.elementor-section-boxed > .elementor-container {
	max-width: min(72rem, 92vw);
}

/* ------------------------------------------------------------------------- opt-in: long-form measure */
body.mh-editorial-premium .elementor-element.mh-measure .elementor-widget-text-editor .elementor-widget-container,
body.mh-editorial-premium .elementor-element.mh-measure.elementor-widget-text-editor .elementor-widget-container {
	max-width: var(--mh-measure);
	margin-inline: auto;
}

/* ------------------------------------------------------------------------- opt-in: primary CTA */
body.mh-editorial-premium .elementor-widget-button.mh-cta-primary .elementor-button {
	background-color: var(--mh-accent) !important;
	color: var(--mh-surface) !important;
	border: none !important;
	border-radius: var(--mh-radius) !important;
	padding: 0.72rem 1.55rem !important;
	font-family: var(--mh-font-body) !important;
	font-weight: 600 !important;
	letter-spacing: 0.03em;
	box-shadow: var(--mh-shadow);
	transition: filter 0.2s ease, transform 0.2s ease;
}

body.mh-editorial-premium .elementor-widget-button.mh-cta-primary .elementor-button:hover {
	filter: brightness(1.07);
}

/* EAEL creative button (hero / portfolio) shares mh-cta-primary */
body.mh-editorial-premium .elementor-widget-eael-creative-button.mh-cta-primary .eael-creative-button,
body.mh-editorial-premium .elementor-widget-eael-creative-button.mh-cta-primary .eael-creative-button-inner,
body.mh-editorial-premium .elementor-widget-eael-creative-button.mh-cta-primary a {
	background-color: var(--mh-accent) !important;
	color: var(--mh-surface) !important;
	border: none !important;
	border-radius: var(--mh-radius) !important;
	box-shadow: var(--mh-shadow);
	font-family: var(--mh-font-body) !important;
	font-weight: 600 !important;
	letter-spacing: 0.03em;
}

body.mh-editorial-premium .elementor-widget-eael-creative-button.mh-cta-primary a:hover,
body.mh-editorial-premium .elementor-widget-eael-creative-button.mh-cta-primary .eael-creative-button:hover {
	filter: brightness(1.07);
}

/* ------------------------------------------------------------------------- opt-in: editorial portfolio row */
body.mh-editorial-premium .mh-case-row .elementor-widget-heading .elementor-heading-title {
	font-size: clamp(1.35rem, 2.4vw, 1.9rem) !important;
	line-height: 1.18 !important;
}

body.mh-editorial-premium .mh-case-row .elementor-image img,
body.mh-editorial-premium .mh-case-row .elementor-widget-image img {
	border-radius: var(--mh-radius);
	box-shadow: var(--mh-shadow);
}

/* ------------------------------------------------------------------------- opt-in: testimonial */
body.mh-editorial-premium .mh-pull-quote .elementor-widget-text-editor .elementor-widget-container,
body.mh-editorial-premium blockquote.mh-pull-quote {
	font-family: var(--mh-font-display) !important;
	font-size: clamp(1.2rem, 2.1vw, 1.62rem) !important;
	line-height: 1.3 !important;
	color: var(--mh-fg) !important;
	border-left: 3px solid var(--mh-accent);
	padding-left: 1.2rem !important;
	margin: 0;
}

/* ------------------------------------------------------------------------- restraint: no hero particle layer (editorial calm) */
body.mh-editorial-premium #banner_section .eael-particle-wrapper,
body.mh-editorial-premium #banner_section canvas,
body.mh-editorial-premium #banner_section .eael-particle-background {
	display: none !important;
}

/* ------------------------------------------------------------------------- restraint: skip Elementor entrance animations on home */
body.mh-editorial-premium .elementor-invisible {
	opacity: 1 !important;
	visibility: visible !important;
	filter: none !important;
	transform: none !important;
}

/* ------------------------------------------------------------------------- section scaffolds (PHP-injected classes) */
body.mh-editorial-premium .mh-portfolio-intro .elementor-heading-title {
	letter-spacing: -0.03em;
}

body.mh-editorial-premium .mh-about-section {
	margin-block: clamp(2.5rem, 6vw, 5rem);
}

body.mh-editorial-premium .mh-testimonials-section {
	margin-block-end: clamp(2rem, 5vw, 4rem);
}

body.mh-editorial-premium .mh-pull-quote-wrap .eael-testimonial-text,
body.mh-editorial-premium .mh-pull-quote .eael-testimonial-text {
	font-family: var(--mh-font-display) !important;
	font-size: clamp(1.15rem, 2vw, 1.55rem) !important;
	line-height: 1.35 !important;
	color: var(--mh-fg) !important;
}

/* ------------------------------------------------------------------------- stats: match editorial numerals */
body.mh-editorial-premium .eael-counter-number {
	font-family: var(--mh-font-display) !important;
	color: var(--mh-fg) !important;
}

/* ------------------------------------------------------------------------- accessibility */
@media (prefers-reduced-motion: reduce) {
	body.mh-editorial-premium *,
	body.mh-editorial-premium *::before,
	body.mh-editorial-premium *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}
