/* ==========================================================================
   Home — Hero: The Connection Point
   Scoped to .el-cp. Lines: assets/js/sections/home-hero.js
   Desktop (1100px+): text left, seven needs on an arc right, joined to the
   full stop of "Connected." Below 1100px: one column, the needs hang from
   a single line. Nothing waits for animation: all text shows at once.
   ========================================================================== */

.el-cp {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	align-items: center;
	column-gap: clamp(2rem, 4vw, 4rem);
	max-width: var(--el-wide, 1240px);
	margin: 0 auto;
	padding: clamp(6.75rem, 14vh, 9rem) var(--el-gutter, 1.25rem) var(--wp--preset--spacing--60, 5rem);
	box-sizing: content-box;
	color: var(--el-ink, #070816);
}

.el-cp p,
.el-cp ul {
	margin: 0;
}

.el-cp__sr {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* ---------- Text column ---------- */

.el-cp__text {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.el-cp__pill {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	padding: 0.45em 1em 0.45em 0.7em;
	border: 1px solid var(--el-line, #e6e8ed);
	border-radius: 999px;
	background-color: var(--el-mist, #f4f5f7);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1.3;
}

.el-cp__pill::before {
	content: "";
	flex: none;
	width: 0.55em;
	height: 0.55em;
	margin-right: 0.45em;
	border-radius: 50%;
	background-color: var(--el-blue, #003dfa);
	box-shadow: 0.45em 0 0 0 var(--el-coral, #fb484c);
}

.el-cp__title {
	margin: clamp(1rem, 2.4vh, 1.5rem) 0 0;
	font-size: clamp(2.75rem, min(6.6vw + 0.5rem, 11.5vh), 6.5rem);
	font-weight: 700;
	line-height: 0.95;
	letter-spacing: -0.05em;
}

/* "Connected." always sits on its own line, at every width. */
.el-cp__line2 {
	display: block;
	white-space: nowrap;
}

/* "Connected" in the brand gradient (same as the Index numbers). Paint
   only, so the metrics and the hub position are unchanged. */
.el-cp__grad {
	color: var(--el-blue, #003dfa);
	background-image: linear-gradient(100deg, #003dfa 15%, #fb484c 90%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* The full stop: Everlink's connection point */
.el-cp__hub {
	display: inline-block;
	width: 0.2em;
	height: 0.2em;
	margin-left: 0.04em;
	border-radius: 50%;
	background: linear-gradient(135deg, #003dfa 10%, #fb484c 90%);
	vertical-align: 0.02em;
	animation: el-cp-hub 0.6s var(--el-ease, ease) 0.2s both;
}

.el-cp__lead {
	max-width: 34rem;
	margin-top: clamp(1.1rem, 2.6vh, 1.6rem) !important;
	color: var(--el-ink, #070816);
	font-size: var(--wp--preset--font-size--large, 1.25rem);
	font-weight: 500;
	line-height: 1.5;
}

/* The closing sentence sits on its own line, led by "One team" */
.el-cp__close {
	display: block;
	margin-top: 0.3em;
}

.el-cp__close strong {
	font-weight: 700;
}

.el-cp__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: clamp(1.5rem, 3.4vh, 2rem);
}

.el-cp__note {
	margin-top: 1rem !important;
	color: var(--el-muted, #555a6b);
	font-size: 0.875rem;
	font-style: italic;
	font-weight: 700;
}

.el-cp__note a {
	color: inherit;
	font-weight: 700;
	white-space: nowrap;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.el-cp__note a:hover {
	color: var(--el-ink, #070816);
}

/* ---------- Service needs ---------- */

.el-cp__needs-wrap {
	position: relative;
	z-index: 1;
	min-width: 0;
}

.el-cp__needs {
	padding: 0;
	list-style: none;
}

.el-cp__need {
	display: inline-flex;
	align-items: baseline;
	gap: 0.6rem;
	color: var(--el-ink, #070816);
	font-size: clamp(1rem, 1.35vw, 1.1875rem);
	font-weight: 600;
	letter-spacing: -0.015em;
	line-height: 1.25;
	text-decoration: none;
	border-radius: 6px;
}

.el-cp__need:hover {
	color: var(--el-blue, #003dfa);
}

.el-cp__need:focus-visible {
	outline: 2px solid var(--el-blue, #003dfa);
	outline-offset: 4px;
}

.el-cp__num {
	font-size: 0.8125rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	color: var(--el-blue, #003dfa);
	background-image: linear-gradient(100deg, #003dfa 15%, #fb484c 90%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

/* ---------- Desktop: arc + lines ---------- */

@media (min-width: 1100px) {
	.el-cp__eyebrow {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.el-cp__needs {
		display: flex;
		flex-direction: column;
		gap: clamp(0.85rem, 2.6vh, 1.75rem);
	}

	/* A deliberate arc around the connection point */
	.el-cp__needs li:nth-child(1) { margin-left: 8%; }
	.el-cp__needs li:nth-child(2) { margin-left: 22%; }
	.el-cp__needs li:nth-child(3) { margin-left: 32%; }
	.el-cp__needs li:nth-child(4) { margin-left: 36%; }
	.el-cp__needs li:nth-child(5) { margin-left: 32%; }
	.el-cp__needs li:nth-child(6) { margin-left: 22%; }
	.el-cp__needs li:nth-child(7) { margin-left: 8%; }

	.el-cp__lines {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100%;
		overflow: visible;
		pointer-events: none;
		z-index: 0;
	}

	.el-cp__lines path {
		fill: none;
		stroke: #c9cdd6;
		stroke-width: 1.4;
		stroke-linecap: round;
		transition: stroke 0.2s ease;
	}

	.el-cp__lines path.is-lit {
		stroke: var(--el-blue, #003dfa);
	}

	.el-cp__lines circle {
		fill: var(--el-ink, #070816);
	}

	/* Keep the lead under the headline so lines never run behind it */
	.el-cp__lead {
		max-width: min(34rem, 92%);
	}

	/* One-time entrance: lines draw out from the full stop */
	.el-cp.is-entering .el-cp__lines path {
		stroke-dasharray: 1;
		stroke-dashoffset: 1;
		animation: el-cp-draw 0.9s var(--el-ease, ease) both;
	}

	.el-cp.is-entering .el-cp__lines circle {
		animation: el-cp-dot 0.4s var(--el-ease, ease) both;
	}
}

/* ---------- Below 1100px: one column, needs hang from one line ---------- */

@media (max-width: 1099px) {
	.el-cp {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
	}

	.el-cp__lines {
		display: none;
	}

	.el-cp__needs-wrap {
		margin-top: 2.75rem;
		padding-left: 28px;
	}

	/* Small connection point and the line the needs hang from */
	.el-cp__needs-wrap::before {
		content: "";
		position: absolute;
		left: 2px;
		top: 2px;
		width: 12px;
		height: 12px;
		border-radius: 50%;
		background: linear-gradient(135deg, #003dfa 10%, #fb484c 90%);
	}

	.el-cp__needs-wrap::after {
		content: "";
		position: absolute;
		left: 7.5px;
		top: 14px;
		bottom: 22px;
		width: 1.4px;
		background-color: #c9cdd6;
		transform-origin: top;
		animation: el-cp-spine 0.9s var(--el-ease, ease) 0.3s both;
	}

	.el-cp__eyebrow {
		margin-bottom: 0.5rem !important;
		color: var(--el-muted, #555a6b);
		font-size: 0.8125rem;
		font-weight: 600;
		letter-spacing: 0.08em;
		text-transform: uppercase;
	}

	.el-cp__needs li {
		position: relative;
	}

	.el-cp__needs li::before {
		content: "";
		position: absolute;
		left: -20px;
		top: 22px;
		width: 14px;
		height: 1.4px;
		background-color: #c9cdd6;
	}

	.el-cp__need {
		display: flex;
		min-height: 44px;
		padding-top: 0.6rem;
		box-sizing: border-box;
		font-size: 1.125rem;
	}
}

@media (max-width: 480px) {
	.el-cp__actions {
		flex-direction: column;
	}

	.el-cp__actions .wp-block-button,
	.el-cp__actions .wp-block-button__link {
		width: 100%;
		box-sizing: border-box;
		text-align: center;
	}

	.el-cp__note {
		text-align: center;
	}
}

/* ---------- Motion ---------- */

@keyframes el-cp-hub {
	from { transform: scale(0); }
	to { transform: scale(1); }
}

@keyframes el-cp-draw {
	to { stroke-dashoffset: 0; }
}

@keyframes el-cp-dot {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes el-cp-spine {
	from { transform: scaleY(0); }
	to { transform: scaleY(1); }
}

@media (prefers-reduced-motion: reduce) {
	.el-cp__hub,
	.el-cp__needs-wrap::after,
	.el-cp.is-entering .el-cp__lines path,
	.el-cp.is-entering .el-cp__lines circle {
		animation: none !important;
		stroke-dashoffset: 0 !important;
	}
}
