/**
 * Contact page — Figma node 1344:8549.
 */

body.hypro-contact-page {
	background: #fff;
}

body.hypro-contact-page #page.site {
	max-width: none;
	width: 100%;
	padding: 0;
	margin: 0;
}

body.hypro-contact-page .site-main {
	padding: 0;
	width: 100%;
}

.hypro-contact {
	/* clip-path avoids overflow-x:hidden clipping absolutely positioned cards */
	overflow-x: clip;
	--contact-pad: clamp(1.25rem, 5.56vw, 5rem);
	--contact-navy: #1a1e28;
	--contact-cyan: #2ec4e6;
	/* How far the cards bleed below the hero bottom edge (desktop only) */
	--contact-card-bleed: clamp(3.5rem, 6vw, 5rem);
}

/* ─── Hero ─────────────────────────────────────────────────────────────── */
.hypro-contact-hero {
	position: relative;
	/* z-index: 2 keeps cards above the white body section */
	z-index: 2;
	/* Height follows the 1440×590 asset: 590/1440 ≈ 41 vw */
	height: clamp(22rem, 41vw, 36rem);
	background: #1a1e28;
	overflow: visible;
}

.hypro-contact-hero__bg {
	position: absolute;
	inset: 0;
	pointer-events: none;
}

/* Photo layer — behind gradient overlays */
.hypro-contact-hero__photo {
	position: absolute;
	inset: 0;
	z-index: 0;
	background-size: cover;
	background-position: center center;
	background-repeat: no-repeat;
}

.hypro-contact-hero__gradient {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: radial-gradient(
		ellipse 110% 100% at 50% 100%,
		rgba(46, 196, 230, 0.35) 0%,
		rgba(26, 58, 72, 0.75) 42%,
		rgba(26, 30, 40, 0.85) 78%
	);
}

.hypro-contact-hero__rings {
	position: absolute;
	z-index: 2;
	inset: -15% -20% auto -20%;
	height: 90%;
	background:
		radial-gradient(ellipse 50% 40% at 20% 60%, rgba(46, 196, 230, 0.08) 0%, transparent 55%),
		radial-gradient(ellipse 45% 38% at 75% 45%, rgba(115, 215, 237, 0.07) 0%, transparent 50%);
	opacity: 1;
}

.hypro-contact-hero__tint {
	position: absolute;
	z-index: 3;
	inset: 0;
	background: linear-gradient(
		to bottom,
		rgba(26, 30, 40, 0.3) 0%,
		rgba(26, 30, 40, 0.1) 50%,
		rgba(26, 30, 40, 0.65) 100%
	);
}

/* Pull overlays back when the photo is present */
.hypro-contact-hero--has-photo .hypro-contact-hero__gradient {
	opacity: 0.55;
}

.hypro-contact-hero--has-photo .hypro-contact-hero__tint {
	opacity: 0.5;
}

/* Title — vertically centred in the hero */
.hypro-contact-hero__inner {
	position: relative;
	z-index: 2;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	max-width: 90rem;
	margin: 0 auto;
	padding: 0 var(--contact-pad);
	text-align: center;
	box-sizing: border-box;
}

.hypro-contact-hero__title {
	margin: 0;
	font-family: Saira, Inter, sans-serif;
	font-weight: 500;
	font-size: clamp(2.75rem, 6vw, 4.5rem);
	line-height: 1.05;
	letter-spacing: -0.04em;
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.35em;
}

.hypro-contact-hero__title-gradient {
	background: linear-gradient(
		120deg,
		rgba(46, 196, 230, 1) 0%,
		rgba(115, 215, 237, 1) 45%,
		rgba(180, 210, 220, 0.95) 100%
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

.hypro-contact-hero__title-outline {
	color: transparent;
	-webkit-text-stroke: 1.5px rgba(247, 247, 248, 0.55);
}

@supports not (-webkit-text-stroke: 1px transparent) {
	.hypro-contact-hero__title-outline {
		color: rgba(247, 247, 248, 0.35);
		-webkit-text-stroke: 0;
	}
}

/* ─── Cards — absolute-anchored to hero bottom, bleed into body ─────────── */
.hypro-contact-cards {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 5;
	transform: translateY(var(--contact-card-bleed));
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: clamp(0.75rem, 2vw, 1.25rem);
	max-width: 80rem;
	margin: 0 auto;
	padding: 0 var(--contact-pad);
	box-sizing: border-box;
}

.hypro-contact-card {
	background: rgba(30, 34, 46, 0.96);
	border: 1px solid rgba(123, 140, 167, 0.28);
	border-radius: 12px;
	padding: clamp(1.25rem, 2.5vw, 1.75rem);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	min-width: 0;
	min-height: 0;
	overflow: visible;
}

.hypro-contact-card__title {
	margin: 0;
	font-family: Saira, Inter, sans-serif;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1.35;
	color: #f7f7f8;
}

.hypro-contact-card__text {
	margin: 0;
	font-family: Inter, sans-serif;
	font-size: 0.875rem;
	font-weight: 400;
	line-height: 1.45;
	color: #bdc2cc;
	flex: 1 1 auto;
}

.hypro-contact-card__email {
	margin: 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-family: Inter, sans-serif;
	font-size: 0.875rem;
	font-weight: 600;
}

.hypro-contact-card__icon {
	display: flex;
	color: var(--contact-cyan);
	flex-shrink: 0;
}

.hypro-contact-card__email a {
	color: #73d7ed;
	text-decoration: none;
	word-break: break-all;
}

.hypro-contact-card__email a:hover {
	text-decoration: underline;
}

/* ─── White body: Connect + form ───────────────────────────────────────── */
.hypro-contact-body {
	position: relative;
	z-index: 1;
	background: #fff;
	/* Top padding = card bleed + card natural height + small breathing room */
	padding-top: calc(var(--contact-card-bleed) + clamp(8rem, 14vw, 6rem));
	padding-bottom: clamp(4rem, 8vw, 6rem);
}

.hypro-contact-body__inner {
	max-width: 80rem;
	margin: 0 auto;
	padding-left: var(--contact-pad);
	padding-right: var(--contact-pad);
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
	gap: clamp(2rem, 5vw, 4rem);
	align-items: start;
}

.hypro-contact-aside__title {
	margin: 0 0 1rem;
	font-family: Saira, Inter, sans-serif;
	font-weight: 500;
	font-size: clamp(1.75rem, 2.5vw, 2.5rem);
	line-height: 1.2;
	letter-spacing: -0.03em;
	color: var(--contact-navy);
}

.hypro-contact-aside__lede {
	margin: 0 0 1.75rem;
	font-family: Inter, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: #3d4654;
	max-width: 36rem;
}

.hypro-contact-aside__list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.hypro-contact-aside__item {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	font-family: Inter, sans-serif;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
	color: #262a35;
}

.hypro-contact-aside__icon {
	display: flex;
	color: #0b9cbc;
	flex-shrink: 0;
	margin-top: 0.1rem;
}

.hypro-contact-aside__item a {
	color: #262a35;
	text-decoration: none;
}

.hypro-contact-aside__item a:hover {
	text-decoration: underline;
}

.hypro-contact-form-wrap {
	min-width: 0;
}

.hypro-contact-form-slot.entry-content {
	font-size: 1rem;
}

.hypro-contact-shortcode-placeholder {
	margin: 0;
	padding: 1.25rem 1rem;
	font-family: Inter, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.5;
	color: #7b8ca7;
	border: 1px dashed #c5cbd4;
	border-radius: 8px;
	background: #f7f7f8;
}

.hypro-contact-icon-svg {
	display: block;
}

/* ─── Mid desktop: keep bleed, soften card density ─────────────────────── */
@media (max-width: 1100px) and (min-width: 961px) {
	.hypro-contact-card__title {
		font-size: 0.9375rem;
	}

	.hypro-contact-card__text,
	.hypro-contact-card__email {
		font-size: 0.8125rem;
	}
}

/*
 * Tablet / mobile — drop absolute card positioning.
 * Cards flow in the hero, then overlap the white section with a small negative margin.
 * Avoids clipped titles and the huge padding-top spacer gap.
 */
@media (max-width: 960px) {
	.hypro-contact {
		--contact-card-bleed: 1.5rem;
		overflow-x: clip;
	}

	.hypro-contact-hero {
		height: auto;
		min-height: 0;
		display: flex;
		flex-direction: column;
		padding-bottom: 0;
	}

	/* Full hero graphic — arcs/photo stay visible behind title + cards (Figma mobile) */
	.hypro-contact-hero__bg {
		inset: 0;
		height: auto;
	}

	.hypro-contact-hero--has-photo .hypro-contact-hero__gradient {
		opacity: 0.7;
	}

	.hypro-contact-hero--has-photo .hypro-contact-hero__tint {
		opacity: 0.4;
	}

	.hypro-contact-hero__rings {
		inset: -20% -30% auto -30%;
		height: 110%;
		opacity: 1;
	}

	/* Tall title band so the hero reads clearly before the cards */
	.hypro-contact-hero__inner {
		position: relative;
		z-index: 2;
		height: auto;
		min-height: clamp(16rem, 48vw, 22rem);
		padding: clamp(6rem, 16vw, 8rem) var(--contact-pad) clamp(2.75rem, 7vw, 3.75rem);
		align-items: center;
	}

	.hypro-contact-hero__title {
		font-size: clamp(2.5rem, 9vw, 3.5rem);
	}

	.hypro-contact-cards {
		position: relative;
		bottom: auto;
		left: auto;
		right: auto;
		z-index: 5;
		transform: none;
		grid-template-columns: 1fr;
		gap: 0.75rem;
		width: 100%;
		max-width: 36rem;
		margin: 0 auto calc(-1 * var(--contact-card-bleed));
		padding: 0 var(--contact-pad) 0;
	}

	.hypro-contact-card {
		padding: 1.25rem 1.15rem;
	}

	.hypro-contact-body {
		/* Bleed offset + double the previous breathing room before “Connect with us” */
		padding-top: calc(var(--contact-card-bleed) + 3.5rem);
		padding-bottom: clamp(3rem, 8vw, 5rem);
	}

	.hypro-contact-body__inner {
		grid-template-columns: 1fr;
		gap: 2.5rem;
	}
}

/* ─── Small phones ──────────────────────────────────────────────────────── */
@media (max-width: 600px) {
	.hypro-contact {
		--contact-pad: 1.25rem;
		--contact-card-bleed: 1.25rem;
	}

	.hypro-contact-hero__inner {
		min-height: clamp(18rem, 58vw, 24rem);
		padding-top: clamp(6.5rem, 18vw, 8rem);
		padding-bottom: clamp(3rem, 8vw, 4rem);
	}

	.hypro-contact-hero__title {
		font-size: clamp(2.35rem, 10vw, 2.85rem);
		gap: 0.3em;
	}

	.hypro-contact-hero__title-outline {
		-webkit-text-stroke-width: 1.25px;
		-webkit-text-stroke-color: rgba(247, 247, 248, 0.7);
	}

	.hypro-contact-hero__rings {
		inset: -25% -40% auto -40%;
		height: 120%;
	}

	.hypro-contact-cards {
		max-width: none;
		gap: 0.65rem;
	}

	.hypro-contact-card {
		padding: 1.15rem 1rem;
		gap: 0.65rem;
	}

	.hypro-contact-card__title {
		font-size: 1rem;
		line-height: 1.3;
	}

	.hypro-contact-aside__title {
		font-size: clamp(1.5rem, 6vw, 1.875rem);
	}

	.hypro-contact-aside__lede {
		margin-bottom: 1.25rem;
	}

	.hypro-contact-body {
		padding-top: calc(var(--contact-card-bleed) + 3rem);
	}
}

/* Fallback when overflow-x: clip is unsupported */
@supports not (overflow-x: clip) {
	.hypro-contact {
		overflow-x: hidden;
	}

	@media (max-width: 960px) {
		.hypro-contact {
			overflow: visible;
		}
	}
}
