/**
 * Homepage hero section — Figma node 23:4183 (1920×960 artboard).
 */

.sp-hero {
	position: relative;
	width: 100%;
	/* min-height: var(--sp-hero-min-height); */
	min-height: auto;
	padding: 0 0 var(--sp-hero-pad-bottom);
	background-color: var(--spaciefy-black);
	background-image: url("../images/hero-bg.png");
	background-size: cover;
	background-position: center top;
	background-repeat: no-repeat;
	overflow: hidden;
}

.sp-hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	grid-template-rows: 1fr auto;
	column-gap: var(--sp-section-gap);
	padding-top: var(--sp-hero-top-gap);
}

.sp-hero__content {
	grid-column: 1 / -1;
	grid-row: 1;
	align-self: start;
	max-width: none;
	pointer-events: none;
}

.sp-hero__content a,
.sp-hero__content button {
	pointer-events: auto;
}

.sp-hero__heading {
	margin: 0 0 var(--sp-hero-heading-gap);
	max-width: var(--sp-hero-heading-line-max);
	width: 100%;
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-hero-heading-size);
	font-style: normal;
	font-weight: 300;
	line-height: 1.11;
	color: #ffffff;
	word-break: break-word;
}

.sp-hero__subtext {
	max-width: var(--sp-hero-subtext-max);
	margin: 0 0 var(--sp-hero-subtext-cta-gap);
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-hero-subtext-size);
	font-style: normal;
	font-weight: 200;
	line-height: 1.48562;
	letter-spacing: 0.66px;
	color: #ffffff;
}

.sp-hero__subtext strong,
.sp-hero__subtext b {
	font-weight: 500;
	color: #ffffff;
}

.sp-hero__subtext p {
	margin: 0;
}

.sp-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: var(--sp-hero-cta-gap);
	width: fit-content;
	max-width: 100%;
}

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

.sp-hero__cta-button:hover,
.sp-hero__cta-button:focus-visible,
.sp-hero__cta-icon:hover,
.sp-hero__cta-icon:focus-visible {
	opacity: 1;
}

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

.sp-hero__cta-icon svg {
	width: var(--sp-hero-cta-icon-svg, var(--sp-cta-icon-svg));
	height: var(--sp-hero-cta-icon-svg, var(--sp-cta-icon-svg));
	min-width: 11px;
	min-height: 11px;
}

.sp-hero__showcase {
	grid-column: 3;
	grid-row: 1 / -1;
	display: flex;
	align-items: end;
	gap: var(--sp-hero-showcase-gap);
	align-self: end;
	justify-self: end;
	position: relative;
	z-index: 2;
}

.sp-hero__preview {
	flex-shrink: 0;
	width: var(--sp-hero-preview-width);
	max-width: 100%;
}

.sp-hero__preview-track {
	position: relative;
	width: 100%;
	aspect-ratio: 389 / 242;
	overflow: hidden;
}

.sp-hero__preview-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.35s ease;
}

.sp-hero__preview-image.is-active {
	opacity: 1;
	z-index: 1;
}

.sp-hero__services {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--sp-hero-service-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.sp-hero__service-item {
	margin: 0;
}

.sp-hero__service-trigger {
	position: relative;
	display: block;
	padding: 0;
	border: 0;
	background: none;
	font-family: var(--spaciefy-font-manrope);
	font-size: var(--sp-hero-service-font-size);
	font-style: normal;
	font-weight: 400;
	line-height: var(--sp-hero-service-lh);
	color: #ffffff;
	text-align: right;
	text-wrap: balance;
	cursor: pointer;
	transition: color 0.25s ease;
}

/* Hit area claims this trigger's share of the list gap and no more, so
   stacked triggers never steal taps from each other. */
.sp-hero__service-trigger::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	min-width: var(--sp-tap-min);
	height: calc(100% + var(--sp-hero-service-gap));
	transform: translateY(-50%);
}

.sp-hero__service-trigger:hover,
.sp-hero__service-trigger:focus-visible,
.sp-hero__service-trigger.is-active {
	color: #ffffff;
}

.sp-hero__service-trigger:focus-visible {
	outline: 2px solid var(--spaciefy-yellow);
	outline-offset: 3px;
}

.sp-hero__footer {
	grid-column: 1 / -1;
	grid-row: 2;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	column-gap: var(--sp-section-gap);
	align-items: baseline;
	width: 100%;
	padding-top: var(--sp-hero-footer-top-gap);
	position: relative;
	z-index: 1;
}

.sp-hero__badge {
	grid-column: 1;
	display: inline-flex;
	align-items: center;
	gap: 0.75em;
	min-width: 0;
	justify-self: start;
	font-size: var(--sp-hero-meta-font-size);
}

.sp-hero__badge-icon {
	display: block;
	flex-shrink: 0;
	width: 1.94em;
	height: 1.94em;
}

.sp-hero__badge-text {
	margin: 0;
	font-family: var(--spaciefy-font-helvetica);
	font-size: 1em;
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 0.526px;
	color: #ffffff;
	opacity: 0.8;
}

.sp-hero__location {
	grid-column: 2;
	margin: 0;
	font-family: var(--spaciefy-font-helvetica);
	font-size: var(--sp-hero-meta-font-size);
	font-style: normal;
	font-weight: 400;
	line-height: normal;
	letter-spacing: 0.526px;
	color: #ffffff;
	opacity: 0.8;
	text-align: center;
	text-wrap: balance;
	justify-self: center;
}

/* Tablet — 992px to 768px */
@media (max-width: 992px) {
	.sp-hero,
	.sp-hero__inner {
		min-height: auto;
	}

	.sp-hero__inner {
		grid-template-columns: minmax(0, 1fr) auto;
		grid-template-rows: auto auto;
		row-gap: var(--sp-section-gap);
	}

	.sp-hero__content {
		grid-column: 1 / -1;
		grid-row: 1;
	}

	.sp-hero__showcase {
		grid-column: 2;
		grid-row: 2;
		display: flex;
		flex-direction: row;
		align-items: flex-end;
		gap: var(--sp-hero-showcase-gap);
		justify-self: end;
		align-self: end;
	}

	.sp-hero__preview {
		flex-shrink: 0;
		width: var(--sp-hero-preview-width);
		max-width: none;
	}

	.sp-hero__services {
		flex-direction: column;
		align-items: flex-end;
		gap: var(--sp-hero-service-gap);
	}

	.sp-hero__service-trigger {
		text-align: right;
	}

	.sp-hero__footer {
		grid-column: 1;
		grid-row: 2;
		align-self: end;
		padding-top: 0;
		grid-template-columns: 1fr;
		row-gap: 0.5rem;
		align-items: start;
	}

	.sp-hero__badge,
	.sp-hero__location {
		grid-column: 1;
		justify-self: start;
	}

	.sp-hero__location {
		text-align: left;
	}
}

/* ---------------------------------------------------------------------------
 * Mobile — 768px and below.
 *
 * Follows the dedicated mobile design: heading, subtext, CTA row and a single
 * meta row. The showcase (rotating preview image plus the service trigger
 * list) is not part of that design and is dropped, so the hero stays a short
 * single-purpose panel rather than a scrolling stack.
 * ------------------------------------------------------------------------- */

@media (max-width: 768px) {
	.sp-hero {
		/* Figma holds the heading and subtext to ~84% of the frame rather than
		   the full content column, which is what drives the line breaks. */
		--sp-hero-heading-line-max: min(100%, 84vw);
		--sp-hero-subtext-max: min(100%, 84vw);

		/* Mobile type is drawn larger than the desktop ramp's floor: 39px and
		   20px at the 402px artboard, growing gently to the 768px boundary. */
		--sp-hero-heading-size: clamp(37px, calc(2.1309vw + 30.436px), 46.8px);
		--sp-hero-subtext-size: clamp(19px, calc(0.8197vw + 16.704px), 23px);
		--sp-hero-heading-gap: clamp(20px, calc(1.3115vw + 18.727px), 28px);
		--sp-hero-subtext-cta-gap: clamp(26px, calc(1.5027vw + 22.959px), 34px);
		--sp-hero-top-gap: clamp(107px, calc(8vh + 63px), 147px);
		--sp-hero-footer-top-gap: clamp(26px, calc(10vw - 2px), 66px);
		--sp-hero-pad-bottom: clamp(40px, calc(4vw + 28px), 56px);

		/* CTA pill and icon tile share one row height (55px at the 402px artboard). */
		--sp-hero-cta-font-size: clamp(16px, calc(0.929vw + 13.265px), 20.4px);
		--sp-hero-cta-pad-x: clamp(35px, calc(2.0765vw + 29.652px), 45.6px);
		--sp-hero-cta-icon-svg: clamp(16px, calc(0.929vw + 13.265px), 20.4px);
		--sp-cta-icon-radius: 12px;
	}

	/* Badge and location share one row in the design, so both step down to the
	   artboard's meta size. 12px is the readability floor rather than Figma's
	   ~10px, which is the one place the mobile type is deliberately larger. */
	.sp-hero__badge {
		font-size: clamp(12.5px, calc(0.4098vw + 10.852px), 15px);
		min-width: 0;
	}

	.sp-hero__badge-text {
		white-space: nowrap;
	}

	.sp-hero__location {
		font-size: clamp(12px, calc(0.4098vw + 10.352px), 14.5px);
		letter-spacing: 0.2px;
	}

	.sp-hero {
		min-height: 100svh;
		display: flex;
		flex-direction: column;
	}

	.sp-hero__inner {
		display: flex;
		flex-direction: column;
		flex: 1;
		grid-template-columns: unset;
		grid-template-rows: unset;
		row-gap: 0;
	}

	.sp-hero__showcase {
		display: none;
	}

	/* Top gap is fixed via header.css; remaining height sits below the CTA so
	   the meta row breathes before the foot of the panel. */
	.sp-hero__content {
		flex: 0 0 auto;
		grid-column: auto;
		grid-row: auto;
		align-self: auto;
	}

	.sp-hero__heading {
		line-height: 1.2;
	}

	/* Badge and location share one baseline row at the foot of the panel. */
	.sp-hero__footer {
		flex: 0 0 auto;
		grid-column: auto;
		grid-row: auto;
		align-self: auto;
		grid-template-columns: auto auto;
		justify-content: space-between;
		align-items: center;
		column-gap: clamp(12px, 3vw, 24px);
		row-gap: 0.5rem;
		margin-top: auto;
		padding-top: var(--sp-hero-footer-top-gap);
	}

	.sp-hero__badge {
		grid-column: 1;
		justify-self: start;
	}

	.sp-hero__location {
		grid-column: 2;
		justify-self: end;
		text-align: right;
	}

	/* Let the label wrap onto a second line before it can push past the
	   viewport; the icon keeps its own fixed tap target beside it. */
	.sp-hero__cta {
		--sp-hero-cta-row-height: clamp(50px, calc(2.735vw + 44px), 68px);
		display: inline-flex;
		align-items: center;
		gap: 10px;
		width: fit-content;
		max-width: 100%;
	}

	.sp-hero__cta-button {
		flex: none;
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: var(--sp-hero-cta-row-height);
		padding-block: 0;
		padding-inline: var(--sp-hero-cta-pad-x);
	}

	.sp-hero__cta-icon {
		flex: none;
		width: var(--sp-hero-cta-row-height);
		height: var(--sp-hero-cta-row-height);
		min-width: var(--sp-hero-cta-row-height);
		min-height: var(--sp-hero-cta-row-height);
	}
}
