/* ==========================================================================
   Home — The Everlink Index
   Scoped to .el-index. Behaviour: assets/js/sections/home-services.js
   .is-enhanced is added by the script. Without it, every category shows
   its details in a plain list (all widths).
   ========================================================================== */

.el-index {
	--el-index-soft: #3d4150;
	display: grid;
	grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
	grid-template-areas:
		"head intro"
		"head actions"
		"body body";
	column-gap: clamp(2rem, 5vw, 4.5rem);
	max-width: var(--el-wide, 1240px);
	margin: 0 auto;
	padding: var(--wp--preset--spacing--60, 5rem) var(--el-gutter, 1.25rem);
	box-sizing: content-box;
	color: var(--el-ink, #070816);
}

.el-index p,
.el-index h2,
.el-index h3,
.el-index ul {
	margin: 0;
}

/* ---------- Header ---------- */

.el-index__head {
	grid-area: head;
	align-self: end;
}

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

.el-index__heading {
	font-size: clamp(2.5rem, 5vw, 4rem);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.04em;
	text-wrap: balance;
}

.el-index__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;
}

.el-index__intro {
	grid-area: intro;
	align-self: end;
	max-width: 30rem;
	color: var(--el-muted, #555a6b);
	font-size: 1.125rem;
	font-style: italic;
	font-weight: 700;
	line-height: 1.5;
}

.el-index__actions {
	grid-area: actions;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
	margin-top: 1rem;
}

.el-index__action {
	color: var(--el-ink, #070816);
	font-weight: 600;
	text-decoration: none;
}

.el-index__action::after {
	content: " →";
}

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

/* ---------- Index list (base / no JavaScript) ---------- */

.el-index__body {
	grid-area: body;
	margin-top: clamp(2.5rem, 5vw, 4rem);
}

.el-index__item {
	padding: 1.5rem 0;
	border-top: 1px solid var(--el-line, #e6e8ed);
}

.el-index__title-wrap {
	font-size: inherit;
	font-weight: inherit;
	letter-spacing: normal;
	line-height: inherit;
}

.el-index__trigger {
	display: grid;
	grid-template-columns: 4.25rem minmax(0, 1fr) auto;
	align-items: baseline;
	gap: 1rem;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--el-ink, #070816);
	font: inherit;
	text-align: left;
	cursor: pointer;
}

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

.el-index__num {
	font-size: clamp(2rem, 3.2vw, 2.75rem);
	font-weight: 600;
	line-height: 1;
	letter-spacing: -0.04em;
	font-variant-numeric: tabular-nums;
	width: fit-content;
	/* Brand gradient on every index number (logo blue to coral). */
	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;
}

.el-index__title {
	font-size: clamp(1.25rem, 2.1vw, 1.875rem);
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: -0.025em;
	color: var(--el-index-soft);
	transition: color 0.25s var(--el-ease, ease);
}

.el-index__sign {
	display: none;
}

/* Detail content */
.el-index__panel {
	padding-top: 1rem;
}

.el-index__big,
.el-index__panel-title {
	display: none;
}

.el-index__line {
	max-width: 34rem;
	color: var(--el-muted, #555a6b);
	font-size: 1.0625rem;
	line-height: 1.5;
}

.el-index__examples {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 1.5rem;
	margin-top: 1.25rem !important;
	padding: 0;
	list-style: none;
}

.el-index__examples li {
	padding: 0.7rem 0;
	border-top: 1px solid var(--el-line, #e6e8ed);
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.4;
}

.el-index__explore {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	margin-top: 1.5rem;
	color: var(--el-ink, #070816);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 6px;
	text-decoration-thickness: 1px;
	border-radius: 6px;
}

.el-index__explore span {
	transition: transform 0.3s var(--el-ease, ease);
}

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

.el-index__explore:hover span {
	transform: translateX(3px);
}

.el-index__note {
	margin-top: 1.5rem !important;
	color: #3d4150;
	font-size: 0.9375rem;
	font-weight: 500;
}

/* Selected or open category: weight and contrast, never faded neighbours */
.el-index__item.is-active .el-index__title,
.el-index__trigger:hover .el-index__title {
	color: var(--el-ink, #070816);
}

.el-index__item.is-active .el-index__title {
	font-weight: 700;
}

/* ==========================================================================
   Desktop (901px and up), enhanced: index left, one shared panel right.
   All panels share one grid cell, so the panel column is as tall as the
   longest category and switching never moves the content below.
   ========================================================================== */

@media (min-width: 901px) {
	.el-index.is-enhanced .el-index__body {
		display: grid;
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: clamp(2rem, 5vw, 4.5rem);
		align-items: start;
	}

	.el-index.is-enhanced .el-index__item {
		display: contents;
	}

	.el-index.is-enhanced .el-index__title-wrap {
		grid-column: 1;
	}

	.el-index.is-enhanced .el-index__item:nth-child(1) .el-index__title-wrap { grid-row: 1; }
	.el-index.is-enhanced .el-index__item:nth-child(2) .el-index__title-wrap { grid-row: 2; }
	.el-index.is-enhanced .el-index__item:nth-child(3) .el-index__title-wrap { grid-row: 3; }
	.el-index.is-enhanced .el-index__item:nth-child(4) .el-index__title-wrap { grid-row: 4; }
	.el-index.is-enhanced .el-index__item:nth-child(5) .el-index__title-wrap { grid-row: 5; }
	.el-index.is-enhanced .el-index__item:nth-child(6) .el-index__title-wrap { grid-row: 6; }
	.el-index.is-enhanced .el-index__item:nth-child(7) .el-index__title-wrap { grid-row: 7; }

	.el-index.is-enhanced .el-index__note {
		grid-column: 1;
		grid-row: 8;
		padding-left: 5.25rem;
	}

	.el-index.is-enhanced .el-index__trigger {
		padding: 0.55rem 0;
	}

	.el-index.is-enhanced .el-index__panel {
		grid-column: 2;
		grid-row: 1 / 9;
		align-self: start;
		padding: 0.5rem 0 0 clamp(1.5rem, 3.5vw, 3rem);
		border-left: 1px solid var(--el-line, #e6e8ed);
		opacity: 0;
		visibility: hidden;
		transform: translateY(6px);
		transition: opacity 0.25s var(--el-ease, ease), transform 0.25s var(--el-ease, ease),
			visibility 0s linear 0.25s;
	}

	.el-index.is-enhanced .el-index__item.is-active .el-index__panel {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: opacity 0.35s var(--el-ease, ease) 0.05s, transform 0.35s var(--el-ease, ease) 0.05s,
			visibility 0s linear 0s;
	}

	/* The number in the logo's blue to coral; sized to lead, not to dominate. */
	.el-index.is-enhanced .el-index__big {
		display: block;
		width: fit-content;
		font-size: clamp(4.5rem, 7vw, 6.5rem);
		font-weight: 700;
		line-height: 0.85;
		letter-spacing: -0.06em;
		font-variant-numeric: tabular-nums;
		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;
	}

	.el-index.is-enhanced .el-index__panel-title {
		display: block;
		width: fit-content;
		max-width: 100%;
		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;
		margin-top: 1.5rem !important;
		font-size: clamp(1.5rem, 2.2vw, 1.875rem);
		font-weight: 700;
		line-height: 1.15;
		letter-spacing: -0.025em;
		text-wrap: balance;
	}

	.el-index.is-enhanced .el-index__line {
		margin-top: 0.75rem !important;
		font-size: 1.1875rem;
	}
}

/* ==========================================================================
   Mobile and tablet (900px and down)
   ========================================================================== */

@media (max-width: 900px) {
	.el-index {
		grid-template-columns: minmax(0, 1fr);
		grid-template-areas:
			"head"
			"intro"
			"body"
			"actions";
	}

	.el-index__intro {
		margin-top: 1rem !important;
		font-size: 1.0625rem;
	}

	.el-index__body {
		margin-top: 2rem;
		border-bottom: 1px solid var(--el-line, #e6e8ed);
	}

	.el-index__item {
		padding: 0;
	}

	.el-index__trigger {
		grid-template-columns: 2.5rem minmax(0, 1fr) 1.25rem;
		align-items: center;
		gap: 0.75rem;
		min-height: 64px;
		padding: 0.9rem 0;
	}

	.el-index__num {
		font-size: 1.5rem;
	}

	.el-index__title {
		font-size: 1.1875rem;
		font-weight: 600;
		color: var(--el-ink, #070816);
	}

	.el-index__item.is-active .el-index__title {
		font-weight: 700;
	}

	/* Full width details: no indent under the number */
	.el-index__panel {
		padding: 0 0 1.5rem;
	}

	.el-index__examples {
		grid-template-columns: minmax(0, 1fr);
	}

	.el-index__note {
		margin: 0 !important;
		padding: 1.25rem 0;
		border-top: 1px solid var(--el-line, #e6e8ed);
	}

	.el-index.is-enhanced .el-index__sign {
		display: block;
		position: relative;
		width: 14px;
		height: 14px;
		justify-self: end;
	}

	.el-index.is-enhanced .el-index__sign::before,
	.el-index.is-enhanced .el-index__sign::after {
		content: "";
		position: absolute;
		left: 0;
		top: 6px;
		width: 14px;
		height: 2px;
		border-radius: 2px;
		background-color: var(--el-muted, #555a6b);
		transition: transform 0.25s var(--el-ease, ease);
	}

	.el-index.is-enhanced .el-index__sign::after {
		transform: rotate(90deg);
	}

	.el-index.is-enhanced .el-index__item.is-active .el-index__sign::after {
		transform: rotate(0deg);
	}

	.el-index.is-enhanced .el-index__item:not(.is-active) .el-index__panel {
		display: none;
	}

	.el-index__actions {
		flex-direction: column;
		gap: 0.625rem;
		margin-top: 2rem;
	}

	.el-index__action {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 52px;
		padding: 0 1.25rem;
		border-radius: 999px;
		background-color: var(--el-mist, #f4f5f7);
		box-shadow: inset 0 0 0 1px var(--el-line, #e6e8ed);
		text-align: center;
	}

	.el-index__action--primary {
		background-color: var(--el-ink, #070816);
		box-shadow: none;
		color: #fff;
	}

	.el-index__action--primary:hover {
		background-color: var(--el-blue, #003dfa);
		color: #fff;
	}

	.el-index__action::after {
		content: none;
	}
}
