/**
 * Homepage Project CTA section — split yellow/white band with heading and contact button.
 */

.sp-project-cta {
	position: relative;
	isolation: isolate;
	display: flex;
	padding: var(--sp-project-cta-pad-top) 0 var(--sp-project-cta-pad-bottom);
	background-color: var(--spaciefy-white);
	color: var(--sp-project-cta-heading-color);
}

.sp-project-cta::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	z-index: -1;
	width: var(--sp-project-cta-yellow-width);
	background-color: var(--sp-project-cta-yellow-bg);
}

.sp-project-cta::after {
	content: "";
	position: absolute;
	top: 0;
	left: var(--sp-project-cta-line-inset-left);
	right: var(--sp-project-cta-line-inset-right);
	height: 1px;
	background-color: #000000;
	opacity: 0.2;
	pointer-events: none;
}

.sp-project-cta__inner {
	width: var(--sp-project-cta-container-width);
	max-width: var(--sp-project-cta-container-max);
	margin-left: auto;
	margin-right: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--sp-project-cta-inner-gap);
	text-align: left;
}

.sp-project-cta__heading {
	margin: 0;
	flex: 1 1 auto;
	min-width: 0;
	max-width: var(--sp-project-cta-heading-max);
	text-align: left;
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-project-cta-heading-size);
	font-style: normal;
	font-weight: 300;
	line-height: var(--sp-project-cta-heading-lh);
	color: #0e0e0e;
}

.sp-project-cta__cta {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	flex-shrink: 0;
	gap: var(--sp-hero-cta-gap);
	max-width: 100%;
}

.sp-project-cta__cta-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: var(--sp-project-cta-button-pad-y) var(--sp-project-cta-button-pad-x);
	border: 0;
	border-radius: var(--sp-hero-cta-radius);
	font-family: var(--spaciefy-font-manrope);
	font-size: var(--sp-project-cta-button-size);
	font-style: normal;
	font-weight: 700;
	line-height: normal;
	color: #000000;
	background-color: var(--spaciefy-yellow);
	text-align: center;
	max-width: 100%;
	transition: opacity 0.2s ease;
}

.sp-project-cta__cta-button:hover,
.sp-project-cta__cta-button:focus-visible {
	opacity: 0.9;
}

.sp-project-cta__cta-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: var(--sp-project-cta-icon-size);
	height: var(--sp-project-cta-icon-size);
	border-radius: var(--sp-cta-icon-radius);
	color: var(--spaciefy-yellow);
	background-color: var(--spaciefy-black);
	transition: opacity 0.2s ease;
}

.sp-project-cta__cta-icon:hover,
.sp-project-cta__cta-icon:focus-visible {
	opacity: 0.9;
}

.sp-project-cta__cta-icon svg {
	width: var(--sp-cta-icon-svg);
	height: var(--sp-cta-icon-svg);
}

@media (max-width: 992px) {
	.sp-project-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.sp-project-cta__heading {
		max-width: 100%;
	}

	.sp-project-cta__cta {
		align-self: flex-end;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile — 768px and below.
 *
 * The desktop split band does not survive a phone width: at 34% the yellow
 * panel is narrower than the heading sitting on it. The design fills the whole
 * band instead and stacks the CTA under the heading.
 * ------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.sp-project-cta {
		--sp-project-cta-yellow-width: 100%;
		--sp-project-cta-heading-size: clamp(28px, calc(1.8033vw + 25.75px), 40px);
		--sp-project-cta-heading-lh: 1.2;
		--sp-project-cta-inner-gap: clamp(32px, calc(2.1858vw + 31.22px), 48px);
		--sp-project-cta-pad-top: clamp(40px, calc(2.8415vw + 40.58px), 62.4px);
		--sp-project-cta-pad-bottom: clamp(44px, calc(3.0055vw + 43.92px), 68px);
	}

	.sp-project-cta__inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.sp-project-cta__heading {
		max-width: 100%;
	}

	.sp-project-cta__cta {
		flex-direction: row;
		align-items: center;
		align-self: flex-start;
		gap: 10px;
		width: auto;
	}

	/* The band is fully yellow here, so the yellow pill would disappear into
	   it; the button inverts to match the arrow tile beside it. */
	.sp-project-cta__cta-button {
		width: auto;
		color: var(--spaciefy-white);
		background-color: var(--spaciefy-black);
	}
}
