/* ==========================================================================
   Technology page "Related technologies" — bento grid on dark
   ========================================================================== */

.eit-trel {
	padding: clamp(52px, 7vw, 100px) 0;
	background:
		radial-gradient(60% 80% at 100% 0%, rgba(59, 79, 232, .28) 0%, rgba(59, 79, 232, 0) 70%),
		#071023;
	color: #ffffff;
}

.eit-trel__inner {
	max-width: var(--eit-wrap);
	margin-inline: auto;
	padding-inline: clamp(18px, 3vw, 30px);
	display: grid;
	gap: clamp(32px, 4vw, 52px);
}

.eit-trel__head {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 40px;
}

/* Size and weight come from the shared heading style (headings.css); the
   colour stays white here because the section is dark. */
.eit-trel__title {
	margin: 0;
	max-width: 20ch;
	color: #ffffff;
	text-wrap: balance;
}

/* ---------- Bento grid: three across, then two wider ---------- */

.eit-trel__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: clamp(14px, 1.6vw, 22px);
	grid-template-columns: 1fr;
}

@media (min-width: 640px) {
	.eit-trel__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.eit-trel__item:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* Rows of three; a final row of two splits the width in half, and a lone
   last card takes the full row, so no row is left with a gap. */
@media (min-width: 1000px) {
	.eit-trel__grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.eit-trel__item,
	.eit-trel__item:last-child:nth-child(odd) { grid-column: span 2; }
	.eit-trel__item:nth-child(3n + 1):nth-last-child(2),
	.eit-trel__item:nth-child(3n + 1):nth-last-child(2) ~ .eit-trel__item { grid-column: span 3; }
	.eit-trel__item:nth-child(3n + 1):last-child { grid-column: 1 / -1; }
}

.eit-trel__item { display: flex; }

.eit-trel__card {
	position: relative;
	flex: 1;
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 2.4vw, 32px);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 20px;
	background: rgba(255, 255, 255, .04);
	color: inherit;
	text-decoration: none;
	overflow: hidden;
	transition: border-color .25s ease, background-color .25s ease, transform .25s ease;
}

/* A soft wash of the technology's own colour rises from the corner on hover. */
.eit-trel__card::before {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(70% 90% at 0% 0%, var(--eit-trel-brand) 0%, transparent 70%);
	opacity: 0;
	transition: opacity .3s ease;
	pointer-events: none;
}

.eit-trel__card:hover,
.eit-trel__card:focus-visible {
	border-color: color-mix(in srgb, var(--eit-trel-brand) 60%, transparent);
	background: rgba(255, 255, 255, .06);
}

.eit-trel__card:hover::before,
.eit-trel__card:focus-visible::before { opacity: .16; }

a.eit-trel__card:hover { transform: translateY(-4px); }

.eit-trel__card:focus-visible { outline: 2px solid #ffffff; outline-offset: 3px; }

@media (prefers-reduced-motion: reduce) {
	.eit-trel__card, .eit-trel__card::before { transition: none; }
	a.eit-trel__card:hover { transform: none; }
}

.eit-trel__badge {
	position: relative;
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--eit-trel-brand);
	color: var(--eit-trel-ink);
	font-size: 17px;
	font-weight: 700;
	letter-spacing: -.01em;
}

.eit-trel__name {
	position: relative;
	margin: 24px 0 0;
	color: #ffffff;
	font-size: clamp(20px, 1.7vw, 24px);
	font-weight: 600;
	line-height: 1.25;
}

.eit-trel__text {
	position: relative;
	margin: 12px 0 0;
	max-width: 60ch;
	color: #b9c1d4;
	font-size: clamp(15px, 1.15vw, 16px);
	line-height: 1.65;
}

.eit-trel__more {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: auto;
	padding-top: 22px;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
}

.eit-trel__more svg { width: 18px; height: 18px; transition: transform .25s ease; }
.eit-trel__card:hover .eit-trel__more svg { transform: translateX(4px); }
