/* ==========================================================================
   Infinite Cards — "Benefits of Joining Our Team" style card grid.
   Defaults use the Infinite Agents palette; every colour is a variable.
   ========================================================================== */

.ibb-cards {
	--ibb-c-red: #C62828;
	--ibb-c-red-bright: #ED3131;
	--ibb-c-red-deep: #781515;
	--ibb-c-bg-1: #0b0b0b;
	--ibb-c-bg-2: #111111;
	--ibb-c-title: #ffffff;
	--ibb-c-sub: #a9a9a9;
	--ibb-c-card-bg: linear-gradient(180deg, rgba(255,255,255,.045) 0%, rgba(255,255,255,.02) 100%);
	--ibb-c-card-border: #262626;
	--ibb-c-card-border-hover: #3a3a3a;
	--ibb-c-card-title: #ffffff;
	--ibb-c-card-text: #a9a9a9;
	--ibb-c-num: #333333;
	--ibb-c-grid-line: rgba(255,255,255,.035);
	--ibb-c-shadow-hover: 0 20px 40px rgba(0,0,0,.35);
	--ibb-c-radius: 18px;
	--ibb-c-gap: 18px;
	--ibb-c-pad-y: clamp(56px, 8vw, 104px);
	--ibb-c-max: 1200px;
	--ibb-c-font-head: inherit;

	container-type: inline-size;
	container-name: ibb-cards;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	margin: 0;
	padding: var(--ibb-c-pad-y) 0;
	background:
		radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--ibb-c-red) 22%, transparent) 0%, transparent 70%),
		linear-gradient(180deg, var(--ibb-c-bg-1) 0%, var(--ibb-c-bg-2) 100%);
	color: var(--ibb-c-card-text);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}
.ibb-cards *,
.ibb-cards *::before,
.ibb-cards *::after { box-sizing: border-box; }

/* Faint grid pattern fading out from the top centre. */
.ibb-cards::before {
	content: "";
	position: absolute;
	inset: 0;
	pointer-events: none;
	background-image:
		linear-gradient(var(--ibb-c-grid-line) 1px, transparent 1px),
		linear-gradient(90deg, var(--ibb-c-grid-line) 1px, transparent 1px);
	background-size: 56px 56px;
	-webkit-mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
	        mask-image: radial-gradient(ellipse at 50% 30%, #000 0%, transparent 70%);
}

/* Light scheme */
.ibb-cards--light {
	--ibb-c-bg-1: #ffffff;
	--ibb-c-bg-2: #f6f6f6;
	--ibb-c-title: #0b0b0b;
	--ibb-c-sub: #6a6a6a;
	--ibb-c-card-bg: #ffffff;
	--ibb-c-card-border: #ececec;
	--ibb-c-card-border-hover: #dcdcdc;
	--ibb-c-card-title: #0b0b0b;
	--ibb-c-card-text: #5d5d5d;
	--ibb-c-num: #e6e6e6;
	--ibb-c-grid-line: rgba(0,0,0,.035);
	--ibb-c-shadow-hover: 0 20px 44px rgba(0,0,0,.10);
}
.ibb-cards--light {
	background:
		radial-gradient(60% 50% at 50% 0%, color-mix(in srgb, var(--ibb-c-red) 8%, transparent) 0%, transparent 70%),
		linear-gradient(180deg, var(--ibb-c-bg-1) 0%, var(--ibb-c-bg-2) 100%);
}

/* Full width inside boxed themes (same technique as the banner). */
.ibb-cards.ibb-cards--bleed {
	--ibb-vw: calc(100vw - var(--ibb-sbw, 0px));
	width: var(--ibb-vw) !important;
	max-width: none !important;
	margin-left: calc((100% - var(--ibb-vw)) / 2) !important;
	margin-right: 0 !important;
}

.ibb-cards__wrap {
	position: relative;
	max-width: var(--ibb-c-max);
	margin: 0 auto;
	padding: 0 clamp(18px, 4vw, 32px);
}

/* ---- Heading --------------------------------------------------------- */
.ibb-cards__head {
	max-width: 760px;
	margin: 0 auto clamp(32px, 5vw, 52px);
	text-align: center;
}
.ibb-cards .ibb-cards__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 14px;
	padding: 0;
	font-family: var(--ibb-c-font-head);
	font-size: 13px;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--ibb-c-red-bright);
}
.ibb-cards--light .ibb-cards__eyebrow { color: var(--ibb-c-red); }
.ibb-cards .ibb-cards__eyebrow::before,
.ibb-cards .ibb-cards__eyebrow::after {
	content: "";
	width: 28px;
	height: 2px;
	background: currentColor;
}
.ibb-cards .ibb-cards__title {
	margin: 0;
	padding: 0;
	font-family: var(--ibb-c-font-head);
	font-size: clamp(30px, 4.2vw, 46px);
	font-weight: 800;
	line-height: 1.12;
	letter-spacing: -.02em;
	text-transform: none;
	color: var(--ibb-c-title);
}
.ibb-cards .ibb-cards__sub {
	margin: 14px 0 0;
	padding: 0;
	font-size: clamp(15px, 1.6vw, 18px);
	color: var(--ibb-c-sub);
}

/* ---- Grid ------------------------------------------------------------ */
.ibb-cards .ibb-cards__grid {
	display: grid;
	gap: var(--ibb-c-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}
.ibb-cards--cols-3 .ibb-cards__grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ibb-cards--cols-4 .ibb-cards__grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* ---- Card ------------------------------------------------------------ */
.ibb-cards .ibb-card {
	position: relative;
	overflow: hidden;
	margin: 0;
	padding: 30px 28px 28px;
	list-style: none;
	background: var(--ibb-c-card-bg);
	border: 1px solid var(--ibb-c-card-border);
	border-radius: var(--ibb-c-radius);
	transition: border-color .25s, transform .25s, box-shadow .25s;
}
.ibb-cards .ibb-card::marker { content: none; }
.ibb-cards .ibb-card::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: linear-gradient(90deg, var(--ibb-c-red), transparent);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform .35s;
}
.ibb-cards .ibb-card:hover,
.ibb-cards .ibb-card:focus-within {
	border-color: var(--ibb-c-card-border-hover);
	box-shadow: var(--ibb-c-shadow-hover);
	transform: translateY(-4px);
}
.ibb-cards .ibb-card:hover::after,
.ibb-cards .ibb-card:focus-within::after { transform: scaleX(1); }

.ibb-cards .ibb-card__num {
	position: absolute;
	top: 18px;
	right: 22px;
	font-family: var(--ibb-c-font-head);
	font-size: 54px;
	font-weight: 800;
	line-height: 1;
	color: transparent;
	-webkit-text-stroke: 1px var(--ibb-c-num);
	transition: -webkit-text-stroke-color .25s;
	user-select: none;
}
.ibb-cards .ibb-card:hover .ibb-card__num { -webkit-text-stroke-color: color-mix(in srgb, var(--ibb-c-red-bright) 55%, transparent); }
.ibb-cards--no-num .ibb-card__num { display: none; }

.ibb-cards .ibb-card__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin-bottom: 22px;
	border: 1px solid color-mix(in srgb, var(--ibb-c-red-bright) 35%, transparent);
	border-radius: 14px;
	background: color-mix(in srgb, var(--ibb-c-red) 12%, transparent);
	color: var(--ibb-c-red-bright);
	transition: background .25s, color .25s, border-color .25s;
}
.ibb-cards--light .ibb-card__icon { color: var(--ibb-c-red); }
.ibb-cards .ibb-card:hover .ibb-card__icon {
	background: var(--ibb-c-red);
	border-color: var(--ibb-c-red);
	color: #fff;
}
.ibb-cards .ibb-card__icon svg,
.ibb-cards .ibb-card__icon .ibb-icon { width: 28px; height: 28px; }
.ibb-cards .ibb-card__icon i { font-size: 26px; line-height: 1; }
.ibb-cards .ibb-card__icon svg:not(.ibb-icon) { fill: currentColor; }

.ibb-cards .ibb-card__title {
	position: relative;
	margin: 0 0 10px;
	padding: 0 56px 0 0;
	font-family: var(--ibb-c-font-head);
	font-size: 19px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.01em;
	text-transform: none;
	color: var(--ibb-c-card-title);
}
.ibb-cards .ibb-card__title a { color: inherit; text-decoration: none; }
/* Whole card clickable when it has a link. */
.ibb-cards .ibb-card--link .ibb-card__title a::after { content: ""; position: absolute; inset: -400px; }
.ibb-cards .ibb-card--link { cursor: pointer; }
.ibb-cards .ibb-card__title a:focus-visible { outline: 2px solid var(--ibb-c-red-bright); outline-offset: 4px; border-radius: 4px; }

.ibb-cards .ibb-card__text {
	margin: 0;
	padding: 0;
	font-size: 15px;
	line-height: 1.65;
	color: var(--ibb-c-card-text);
}

/* ---- CTA band -------------------------------------------------------- */
.ibb-cards__cta {
	position: relative;
	overflow: hidden;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 32px;
	margin-top: 28px;
	padding: clamp(26px, 3.4vw, 40px) clamp(24px, 4vw, 48px);
	border-radius: var(--ibb-c-radius);
	background: linear-gradient(110deg, var(--ibb-c-red-deep) 0%, var(--ibb-c-red) 100%);
}
.ibb-cards__cta::after {
	content: "";
	position: absolute;
	top: -150px;
	right: -90px;
	width: 340px;
	height: 340px;
	border: 1px solid rgba(255,255,255,.18);
	border-radius: 50%;
	pointer-events: none;
}
.ibb-cards__cta-copy { position: relative; z-index: 1; max-width: 640px; }
.ibb-cards .ibb-cards__cta-title {
	margin: 0;
	font-family: var(--ibb-c-font-head);
	font-size: clamp(21px, 2.4vw, 27px);
	font-weight: 700;
	line-height: 1.25;
	color: #fff;
}
.ibb-cards .ibb-cards__cta-text { margin: 6px 0 0; font-size: 16px; color: rgba(255,255,255,.88); }
.ibb-cards .ibb-cards__btn {
	position: relative;
	z-index: 1;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 28px;
	border-radius: 999px;
	background: #fff;
	color: #0b0b0b;
	font-family: var(--ibb-c-font-head);
	font-size: 15px;
	font-weight: 700;
	text-decoration: none;
	transition: background .2s, color .2s;
}
.ibb-cards .ibb-cards__btn svg { transition: transform .2s; }
.ibb-cards .ibb-cards__btn:hover,
.ibb-cards .ibb-cards__btn:focus-visible { background: #0b0b0b; color: #fff; }
.ibb-cards .ibb-cards__btn:hover svg { transform: translateX(4px); }
.ibb-cards .ibb-cards__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* ---- Responsive: reacts to the section's own width --------------------- */
@container ibb-cards (max-width: 960px) {
	.ibb-cards--cols-3 .ibb-cards__grid,
	.ibb-cards--cols-4 .ibb-cards__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container ibb-cards (max-width: 640px) {
	.ibb-cards .ibb-cards__grid,
	.ibb-cards--cols-3 .ibb-cards__grid,
	.ibb-cards--cols-4 .ibb-cards__grid { grid-template-columns: 1fr; }
	.ibb-cards .ibb-card { padding: 26px 22px 24px; }
	.ibb-cards .ibb-card__num { font-size: 46px; }
	.ibb-cards__cta { flex-direction: column; align-items: flex-start; }
	.ibb-cards .ibb-cards__btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	.ibb-cards .ibb-card,
	.ibb-cards .ibb-card::after,
	.ibb-cards .ibb-card__icon,
	.ibb-cards .ibb-cards__btn svg { transition: none; }
	.ibb-cards .ibb-card:hover,
	.ibb-cards .ibb-card:focus-within { transform: none; }
}
