/**
 * SigmaGraft Elements — Science & Stats.
 *
 * Defaults only: every value here is overridable by the widget's controls.
 * Stat layout comes from the shared .sgx-grid system in base.css; dividers use
 * the same leading-edge + inline clip technique as the trust bar, so wrapped
 * rows never show a stray rule.
 */

.sgx-sci {
	position: relative;
	overflow-x: clip;
	isolation: isolate;
	padding: 76px 0;
	background-color: #0E2E5C;
	background-position: center center;
	background-size: cover;
}

.sgx-sci__overlay {
	position: absolute;
	inset: 0;
	z-index: 0;
	pointer-events: none;
}

.sgx-sci__inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 56px;
	width: 100%;
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 24px;
}

.sgx-sci--container-full .sgx-sci__inner {
	max-width: none;
}

/* ═════════ Intro column ═════════ */

.sgx-sci__intro {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	flex: 0 0 34%;
	max-width: 34%;
	min-width: 0;
	text-align: start;
}

.sgx-sci__eyebrow {
	margin: 0 0 14px;
	color: #6EB4EC;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 1.2px;
	text-transform: uppercase;
}

.sgx-sci__heading {
	margin: 0 0 16px;
	color: #FFFFFF;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.28;
}

.sgx-sci__text {
	margin: 0 0 26px;
	max-width: 48ch;
	color: rgba(255, 255, 255, .72);
	font-size: 14px;
	line-height: 1.7;
	text-wrap: pretty;
}

.sgx-sci__btn {
	--sgx-btn-fg: #FFFFFF;
	--sgx-btn-bg: rgba(255, 255, 255, 0);
	--sgx-btn-bd: rgba(255, 255, 255, .55);
	--sgx-btn-fg-h: #0E2E5C;
	--sgx-btn-bg-h: #FFFFFF;
	--sgx-btn-bd-h: #FFFFFF;
	--sgx-btn-t: 220ms;
	--sgx-btn-lift: 0px;
	--sgx-btn-nudge: 3px;

	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	padding: 12px 26px;
	border: 1px solid var(--sgx-btn-bd);
	border-radius: 3px;
	background-color: var(--sgx-btn-bg);
	color: var(--sgx-btn-fg);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	transition:
		color var(--sgx-btn-t) ease,
		background-color var(--sgx-btn-t) ease,
		border-color var(--sgx-btn-t) ease,
		box-shadow var(--sgx-btn-t) ease,
		transform var(--sgx-btn-t) ease;
}

.sgx-sci__btn:hover,
.sgx-sci__btn:focus-visible {
	color: var(--sgx-btn-fg-h);
	background-color: var(--sgx-btn-bg-h);
	border-color: var(--sgx-btn-bd-h);
	transform: translateY(var(--sgx-btn-lift));
}

.sgx-sci__btn:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 3px;
}

.sgx-sci__btn .sgx-icon {
	font-size: 12px;
	width: 12px;
	height: 12px;
	transition: transform var(--sgx-btn-t) ease;
}

.sgx-sci__btn--icon-after:hover .sgx-icon {
	transform: translateX(var(--sgx-btn-nudge));
}

.sgx-sci__btn--icon-before:hover .sgx-icon {
	transform: translateX(calc(-1 * var(--sgx-btn-nudge)));
}

[dir="rtl"] .sgx-sci__btn--icon-after:hover .sgx-icon {
	transform: translateX(calc(-1 * var(--sgx-btn-nudge)));
}

[dir="rtl"] .sgx-sci__btn--icon-before:hover .sgx-icon {
	transform: translateX(var(--sgx-btn-nudge));
}

/* ═════════ Stats grid ═════════ */

.sgx-sci__grid-wrap {
	flex: 1 1 auto;
	min-width: 0;
}

.sgx-sci-div-on .sgx-sci__grid-wrap {
	overflow-x: clip;
	overflow-y: visible;
}

.sgx-sci__grid {
	--sgx-div-w: 1px;
	--sgx-div-v: var(--sgx-div-w);
	--sgx-div-h: 0px;
	--sgx-div-color: rgba(255, 255, 255, .18);
	--sgx-div-style: solid;
	--sgx-div-inset: 4px;
}

/* Pulls the leading rule of every row out of the clip. */
.sgx-sci-div-on .sgx-sci__grid {
	margin-inline-start: calc(-1 * var(--sgx-div-w));
}

.sgx-sci__cell {
	position: relative;
	display: flex;
}

.sgx-sci-div-on .sgx-sci__cell::before {
	content: "";
	position: absolute;
	inset-inline-start: calc(-1 * var(--sgx-col-gap) / 2);
	top: var(--sgx-div-inset);
	bottom: var(--sgx-div-inset);
	border-inline-start: var(--sgx-div-v) var(--sgx-div-style) var(--sgx-div-color);
	pointer-events: none;
}

.sgx-sci-div-on .sgx-sci__cell::after {
	content: "";
	position: absolute;
	top: calc(-1 * var(--sgx-row-gap) / 2);
	inset-inline: var(--sgx-div-inset);
	border-top: var(--sgx-div-h) var(--sgx-div-style) var(--sgx-div-color);
	pointer-events: none;
}

.sgx-sci-div-on .sgx-sci__cell:first-child::after {
	content: none;
}

/* ═════════ Stat ═════════ */

.sgx-sci__stat {
	--sgx-ic: #FFFFFF;
	--sgx-s-t: 260ms;
	--sgx-s-lift: 0px;

	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	align-items: flex-start;
	width: 100%;
	min-width: 0;
	padding: 0 26px;
	color: inherit;
	text-align: start;
	text-decoration: none;
	transition:
		background-color var(--sgx-s-t) ease,
		border-color var(--sgx-s-t) ease,
		transform var(--sgx-s-t) ease;
}

.sgx-sci__stat:hover {
	transform: translateY(var(--sgx-s-lift));
}

a.sgx-sci__stat:focus-visible {
	outline: 2px solid #FFFFFF;
	outline-offset: 4px;
}

.sgx-sci__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 18px;
	color: var(--sgx-ic);
}

.sgx-sci__icon .sgx-icon {
	font-size: 30px;
	width: 30px;
	height: 30px;
}

.sgx-sci__img {
	display: block;
	width: 48px;
	height: auto;
}

.sgx-sci__value {
	display: flex;
	align-items: baseline;
	margin: 0 0 8px;
	color: #FFFFFF;
	font-size: 34px;
	font-weight: 700;
	line-height: 1.1;
	letter-spacing: -.5px;
	/* Stops the width jumping around while the number counts up. */
	font-variant-numeric: tabular-nums;
}

.sgx-sci__label {
	margin: 0 0 9px;
	color: #FFFFFF;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
}

.sgx-sci__desc {
	margin: 0;
	max-width: 30ch;
	color: rgba(255, 255, 255, .65);
	font-size: 13px;
	line-height: 1.6;
	text-wrap: pretty;
}

/* ═════════ Responsive fallbacks ═════════ */

@media (max-width: 1024px) {

	.sgx-sci__inner {
		flex-direction: column;
		align-items: stretch;
	}

	.sgx-sci__intro {
		flex: 1 1 auto;
		max-width: none;
	}

	.sgx-sci__heading {
		font-size: 28px;
	}
}

@media (max-width: 767px) {

	.sgx-sci__stat {
		padding: 0;
	}

	.sgx-sci__heading {
		font-size: 24px;
	}

	.sgx-sci__value {
		font-size: 30px;
	}
}
