/* HML Homepage CTA — matched to Figma CTA / 15 / (1440 × 304) */

.hml-cta {
	--hml-cta-bg: #c60651;
	--hml-cta-white: #ffffff;
	--hml-cta-ink: #0b0b0b;
	--hml-cta-pad-x: calc(80 * var(--hml-u));
	--hml-cta-pad-y: calc(80 * var(--hml-u));
	--hml-cta-max: calc(1280 * var(--hml-u));
	--hml-cta-gap: calc(80 * var(--hml-u));
	--hml-cta-copy-gap: calc(32 * var(--hml-u));
	--hml-cta-h: calc(60 * var(--hml-u));
	--hml-cta-h-w: calc(752 * var(--hml-u));
	--hml-cta-btn-w: calc(155 * var(--hml-u));
	--hml-cta-btn-h: calc(48 * var(--hml-u));
	--hml-cta-btn-r: calc(6 * var(--hml-u));
	--hml-cta-dot: #d24b80;
	--hml-cta-dot-size: calc(24 * var(--hml-u));
	--hml-cta-dot-pos: calc(-12 * var(--hml-u)) calc(-4 * var(--hml-u));
	--hml-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--hml-ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	position: relative;
	isolation: isolate;
	overflow: hidden;
	width: 100%;
	max-width: 100%;
	background-color: var(--hml-cta-bg);
	color: var(--hml-cta-white);
	padding-top: var(--hml-cta-pad-y);
	padding-bottom: var(--hml-cta-pad-y);
	padding-left: max(var(--hml-cta-pad-x), env(safe-area-inset-left, 0px));
	padding-right: max(var(--hml-cta-pad-x), env(safe-area-inset-right, 0px));
	font-family: Inter, "Inter", system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.hml-cta,
.hml-cta *,
.hml-cta *::before,
.hml-cta *::after {
	box-sizing: border-box;
}

.elementor-widget-hml-homepage-cta,
.elementor-widget-hml-homepage-cta > .elementor-widget-container {
	padding: 0;
	overflow: visible;
}

.hml-cta--fullbleed {
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

html:has(.hml-cta--fullbleed):not(:has(.hml-header--sticky)) {
	overflow-x: clip;
}

.hml-cta__bg {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
	background-size: cover;
	background-position: center;
}

.hml-cta__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--hml-cta-overlay, #c60651);
	opacity: var(--hml-cta-overlay-o, 0.82);
}

.hml-cta__dots {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background-image: radial-gradient(circle, var(--hml-cta-dot) calc(2.1 * var(--hml-u)), transparent calc(2.45 * var(--hml-u)));
	background-size: var(--hml-cta-dot-size) var(--hml-cta-dot-size);
	background-position: var(--hml-cta-dot-pos);
}

.hml-cta__inner {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: flex-start;
	gap: var(--hml-cta-gap);
	width: 100%;
	max-width: var(--hml-cta-max);
	min-width: 0;
	margin: 0 auto;
}

.hml-cta__heading {
	margin: 0;
	flex: 1 1 var(--hml-cta-h-w);
	width: var(--hml-cta-h-w);
	max-width: var(--hml-cta-h-w);
	min-width: 0;
	font-family: Manrope, Inter, sans-serif;
	font-weight: 700;
	font-size: var(--hml-cta-h);
	line-height: 1.2;
	letter-spacing: 0.01em;
	color: var(--hml-cta-white);
	overflow-wrap: break-word;
	hyphens: manual;
}

.hml-cta__copy {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--hml-cta-copy-gap);
	min-width: 0;
	width: auto;
}

.hml-cta__body {
	margin: 0;
	width: 100%;
	font-family: Inter, sans-serif;
	font-weight: 400;
	font-size: calc(20 * var(--hml-u));
	line-height: 1.6;
	letter-spacing: 0;
	color: var(--hml-cta-white);
	overflow-wrap: break-word;
}

.hml-cta__phone {
	font-weight: 700;
	color: inherit;
	text-decoration: none;
	border-bottom: calc(1 * var(--hml-u)) solid transparent;
	padding-bottom: calc(1 * var(--hml-u));
	white-space: nowrap;
	transition: opacity 0.25s ease, border-color 0.25s ease;
}

.hml-cta__phone:hover,
.hml-cta__phone:focus-visible {
	opacity: 0.88;
	border-bottom-color: currentColor;
}

.hml-cta__btn {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--hml-cta-btn-w);
	min-width: var(--hml-cta-btn-w);
	height: var(--hml-cta-btn-h);
	min-height: var(--hml-cta-btn-h);
	padding: calc(8 * var(--hml-u)) calc(20 * var(--hml-u));
	border: calc(1 * var(--hml-u)) solid var(--hml-cta-white);
	border-radius: var(--hml-cta-btn-r);
	background: var(--hml-cta-white);
	color: var(--hml-cta-ink);
	font-family: Inter, sans-serif;
	font-weight: 500;
	font-size: calc(20 * var(--hml-u));
	line-height: 1.6;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	transition: background 0.28s var(--hml-ease), color 0.28s ease, border-color 0.28s ease, transform 0.28s var(--hml-ease), box-shadow 0.28s ease;
}

.hml-cta:not(.hml-cta--no-hover) .hml-cta__btn:hover,
.hml-cta:not(.hml-cta--no-hover) .hml-cta__btn:focus-visible {
	background: var(--hml-cta-ink);
	border-color: var(--hml-cta-ink);
	color: var(--hml-cta-white);
}

@media (hover: hover) and (pointer: fine) {
	.hml-cta:not(.hml-cta--no-hover) .hml-cta__btn:hover {
		transform: translateY(calc(-2 * var(--hml-u)));
		box-shadow: 0 calc(12 * var(--hml-u)) calc(28 * var(--hml-u)) rgba(11, 11, 11, 0.28);
	}
}

.hml-cta__btn:active {
	transform: translateY(0) scale(0.98);
}

.hml-cta__btn:focus-visible {
	outline: calc(3 * var(--hml-u)) solid var(--hml-cta-white);
	outline-offset: calc(3 * var(--hml-u));
}

/* Entrance — copy stays visible if JS is late, skipped, or the box is too tall to trip the observer. */
.hml-cta [data-hml-enter] {
	opacity: 1;
	transform: none;
}

.hml-cta.is-inview [data-hml-enter] {
	animation: hml-cta-enter 0.9s var(--hml-ease-out) both;
	animation-delay: var(--hml-d, 0s);
}

.hml-cta__heading { --hml-x: calc(-28 * var(--hml-u)); --hml-y: 0; --hml-d: 0.06s; }
.hml-cta__body { --hml-x: calc(22 * var(--hml-u)); --hml-y: calc(8 * var(--hml-u)); --hml-d: 0.16s; }
.hml-cta__btn { --hml-x: calc(16 * var(--hml-u)); --hml-y: calc(10 * var(--hml-u)); --hml-d: 0.26s; }

@keyframes hml-cta-enter {
	from {
		opacity: 0;
		transform: translate3d(var(--hml-x, 0), var(--hml-y, calc(18 * var(--hml-u))), 0);
	}
	to {
		opacity: 1;
		transform: translate3d(0, 0, 0);
	}
}

.hml-cta--no-motion [data-hml-enter] {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
}

@media (max-width: 1024px) {
	.hml-cta {
		--hml-cta-h: 52px;
		--hml-cta-h-w: 752px;
		--hml-cta-gap: 40px;
		--hml-cta-pad-x: 48px;
	}
}

/* iPad landscape / small laptop — two fluid columns, no 752px lock. */
@media (max-width: 1024px) and (min-width: 960px) {
	.hml-cta--fullbleed {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	.hml-cta {
		--hml-cta-h: 42px;
		--hml-cta-h-w: auto;
		--hml-cta-gap: 32px;
		--hml-cta-copy-gap: 24px;
		--hml-cta-pad-x: 40px;
		--hml-cta-pad-y: 64px;
		overflow-x: clip;
	}

	.hml-cta__inner {
		align-items: flex-start;
	}

	.hml-cta__heading {
		flex: 1.5 1 0;
		width: auto;
		max-width: none;
	}

	.hml-cta__copy {
		flex: 1 1 0;
		width: auto;
		max-width: none;
	}

	.hml-cta__body {
		font-size: 18px;
	}
}

/* iPad portrait and large phones — stack, keep the two-line headline. */
@media (max-width: 959px) {
	.hml-cta--fullbleed {
		width: 100%;
		max-width: 100%;
		margin-left: 0;
		margin-right: 0;
	}

	.hml-cta {
		--hml-cta-h: 42px;
		--hml-cta-h-w: 100%;
		--hml-cta-gap: 24px;
		--hml-cta-copy-gap: 24px;
		--hml-cta-pad-x: 40px;
		--hml-cta-pad-y: 56px;
		overflow-x: clip;
	}

	.hml-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.hml-cta__heading {
		flex: 0 0 auto;
		width: 100%;
		max-width: 13em;
	}

	.hml-cta__copy {
		flex: 0 0 auto;
		width: 100%;
		max-width: 34em;
	}

	.hml-cta__body {
		font-size: 18px;
	}
}

@media (max-width: 767px) {
	.hml-cta {
		--hml-cta-h: 28px !important;
		--hml-cta-pad-x: 20px;
		--hml-cta-pad-y: 48px;
		--hml-cta-gap: 20px;
		--hml-cta-copy-gap: 20px;
	}

	.hml-cta__heading {
		max-width: none;
		font-size: var(--hml-cta-h) !important;
	}

	.hml-cta__copy {
		max-width: none;
	}

	.hml-cta__body {
		font-size: 18px;
	}

	.hml-cta__btn {
		width: 100%;
		min-width: 0;
		white-space: normal;
		text-align: center;
	}

	.hml-cta__phone {
		white-space: normal;
	}
}

@media (max-width: 380px) {
	.hml-cta {
		--hml-cta-h: 24px !important;
		--hml-cta-pad-x: 16px;
	}

	.hml-cta__body {
		font-size: 16px;
	}

	.hml-cta__btn {
		font-size: 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.hml-cta [data-hml-enter],
	.hml-cta.is-inview [data-hml-enter],
	.hml-cta__btn,
	.hml-cta__phone {
		animation: none !important;
		transition: none !important;
		opacity: 1 !important;
		transform: none !important;
	}
}

/* Practice-area templates: MD button is "Text Photos", wider than homepage "Text Hugh". */
.hml-tpl-practice .hml-cta__btn {
	width: auto;
	min-width: var(--hml-cta-btn-w);
	padding-left: calc(24 * var(--hml-u));
	padding-right: calc(24 * var(--hml-u));
}

/* Wrongful Death: long MD heading must wrap — never steal the body column. */
.hml-tpl-wrongful .hml-cta,
.hml-cta.hml-tpl-wrongful {
	overflow: visible;
}

.hml-tpl-wrongful .hml-cta__inner,
.hml-cta.hml-tpl-wrongful .hml-cta__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
	align-items: start;
	width: 100%;
	min-width: 0;
}

.hml-tpl-wrongful .hml-cta__heading,
.hml-cta.hml-tpl-wrongful .hml-cta__heading {
	flex: none;
	width: auto;
	max-width: none;
	min-width: 0;
	opacity: 1;
}

.hml-tpl-wrongful .hml-cta__copy,
.hml-cta.hml-tpl-wrongful .hml-cta__copy {
	flex: none;
	width: auto;
	min-width: 0;
	max-width: none;
}

.hml-tpl-wrongful .hml-cta__body,
.hml-cta.hml-tpl-wrongful .hml-cta__body {
	overflow-wrap: break-word;
	word-break: normal;
	opacity: 1;
}

.hml-tpl-wrongful .hml-cta__btn,
.hml-cta.hml-tpl-wrongful .hml-cta__btn {
	white-space: normal;
	height: auto;
	min-height: var(--hml-cta-btn-h);
	max-width: 100%;
	text-align: center;
	opacity: 1;
}

@media (max-width: 959px) {
	.hml-tpl-wrongful .hml-cta__inner,
	.hml-cta.hml-tpl-wrongful .hml-cta__inner {
		grid-template-columns: minmax(0, 1fr);
	}
}

.elementor-editor-active .hml-cta [data-hml-enter],
.elementor-edit-area .hml-cta [data-hml-enter] {
	opacity: 1 !important;
	transform: none !important;
	animation: none !important;
}
