/* ==========================================================================
   Services Grid widget

   Sizing is driven by CONTAINER queries, not the viewport: every card is its
   own container, and its type/padding/artwork scale with the card's own width
   (cqi units). That keeps the design's proportions identical whether the card
   lands in a 1240px layout, a boxed 1140px theme container, or a phone.
   Plain px values precede each cq value as a fallback for older browsers.
   ========================================================================== */

.rew-services {
	font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--rew-accent: #02c5d5;
	--rew-card-bg-a: #0a1217;
	--rew-card-bg-b: #06090c;
	--rew-muted: #8794a0;
	--rew-line: rgba(255, 255, 255, .08);

	position: relative;
	overflow: hidden;
	padding: 84px 24px 64px;
	background-color: #04080b;
	color: #fff;
}

.rew-services *,
.rew-services *::before,
.rew-services *::after {
	box-sizing: border-box;
}

.rew-services__bg {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	background-repeat: no-repeat;
	opacity: var(--rew-bg-opacity, .6);
	pointer-events: none;
}

/* Vignette: keeps the artwork from reading as a bright blotch behind the copy. */
.rew-services__bg::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(130% 70% at 50% 0%, transparent 25%, rgba(4, 8, 11, .7) 75%, rgba(4, 8, 11, .95) 100%),
		linear-gradient(180deg, rgba(4, 8, 11, .35) 0%, transparent 25%, transparent 70%, rgba(4, 8, 11, .8) 100%);
}

.rew-services__inner {
	position: relative;
	z-index: 1;
	max-width: 1240px;
	margin: 0 auto;
	container-type: inline-size;
}

/* Ambient light pools behind the grid — what the glass actually refracts. */
.rew-services__glow {
	position: absolute;
	inset: 0;
	overflow: hidden;
	pointer-events: none;
}

.rew-services__glow span {
	position: absolute;
	display: block;
	border-radius: 50%;
	filter: blur(90px);
	opacity: var(--rew-orb-opacity, .5);
}

.rew-services__glow span:nth-child(1) {
	top: 4%;
	left: 8%;
	width: 42%;
	aspect-ratio: 1;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--rew-accent) 42%, transparent), transparent);
}

.rew-services__glow span:nth-child(2) {
	top: 34%;
	right: 2%;
	width: 38%;
	aspect-ratio: 1;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--rew-accent) 30%, transparent), transparent);
}

.rew-services__glow span:nth-child(3) {
	bottom: 2%;
	left: 32%;
	width: 46%;
	aspect-ratio: 1;
	background: radial-gradient(closest-side, color-mix(in srgb, var(--rew-accent) 22%, transparent), transparent);
}

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

.rew-services .rew-head {
	position: relative;
	text-align: center;
	margin-bottom: 44px;
	margin-bottom: clamp(28px, 3.4cqi, 46px);
	padding: 0 130px;
}

.rew-services .rew-badge {
	display: inline-block;
	padding: 8px 24px;
	padding: clamp(7px, .75cqi, 10px) clamp(18px, 2.1cqi, 26px);
	border: 1px solid color-mix(in srgb, var(--rew-accent) 55%, transparent);
	border-radius: 999px;
	font-size: 12px;
	font-size: clamp(10px, 1cqi, 12px);
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: #d3fbff;
	background: rgba(255, 255, 255, .05);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1);
}

.rew-services .rew-title {
	margin: 20px 0 0;
	margin: clamp(14px, 1.6cqi, 24px) 0 0;
	font-size: 54px;
	font-size: clamp(27px, 4.5cqi, 58px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -.02em;
	color: #fff;
}

.rew-services .rew-title__main,
.rew-services .rew-title__alt {
	display: block;
}

.rew-services .rew-title__alt {
	background: linear-gradient(90deg, var(--rew-accent), color-mix(in srgb, var(--rew-accent) 40%, #ffffff));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	color: var(--rew-accent);
}

.rew-services .rew-sub {
	max-width: 620px;
	max-width: clamp(320px, 52cqi, 640px);
	margin: 16px auto 0;
	font-size: 16px;
	font-size: clamp(13.5px, 1.35cqi, 17px);
	line-height: 1.6;
	color: var(--rew-muted);
}

.rew-services .rew-sidelabel {
	position: absolute;
	left: 0;
	top: 12px;
	text-align: left;
	font-size: 11px;
	font-size: clamp(9px, .92cqi, 11px);
	font-weight: 600;
	line-height: 1.9;
	letter-spacing: .2em;
	text-transform: uppercase;
	color: #6b7280;
}

.rew-services .rew-sidelabel::after {
	content: "";
	display: block;
	width: 32px;
	height: 1px;
	margin-top: 10px;
	background: var(--rew-line);
}

.rew-services .rew-note {
	position: absolute;
	right: 0;
	top: 0;
	display: flex;
	align-items: flex-start;
	gap: 4px;
	font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive;
	font-size: 25px;
	font-size: clamp(18px, 2.1cqi, 27px);
	line-height: 1.15;
	text-align: left;
	color: color-mix(in srgb, var(--rew-accent) 45%, #ffffff);
}

.rew-services .rew-note__arrow {
	width: 32px;
	width: clamp(24px, 2.7cqi, 34px);
	height: auto;
	aspect-ratio: 60 / 80;
	flex: none;
	margin-top: 8px;
	color: color-mix(in srgb, var(--rew-accent) 65%, #ffffff);
}

/* ---------- Grid ---------- */

.rew-services .rew-grid {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 20px;
	gap: clamp(12px, 1.7cqi, 22px);
}

.rew-services .rew-card {
	position: relative;
	display: flex;
	overflow: hidden;
	grid-column: span 2;
	/* Locks the reference design's card proportions. */
	aspect-ratio: 384 / 381;
	padding: 30px;
	padding: clamp(18px, 7.6cqi, 32px);
	border: 1px solid rgba(255, 255, 255, .11);
	border-radius: 18px;
	/* Glass: translucent tint + blurred backdrop + a sheen gradient on top. */
	background-color: var(--rew-glass-tint, rgba(12, 20, 26, .38));
	background-image: linear-gradient(155deg,
		rgba(255, 255, 255, .075) 0%,
		rgba(255, 255, 255, .025) 42%,
		rgba(255, 255, 255, .008) 100%);
	-webkit-backdrop-filter: blur(var(--rew-glass-blur, 22px)) saturate(140%);
	backdrop-filter: blur(var(--rew-glass-blur, 22px)) saturate(140%);
	transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
	container-type: inline-size;
}

.rew-services .rew-card--wide {
	grid-column: span 3;
	aspect-ratio: 592 / 353;
	padding: clamp(18px, 5.4cqi, 34px);
}

/*
 * Lighting is two cheap layers rather than one big blur:
 *   ::before  a tight accent glow hugging the bottom-left corner
 *   inset shadow  a 1px top hairline, which is what reads as "glass"
 */
.rew-services .rew-card {
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .14),
		inset 0 0 0 1px rgba(255, 255, 255, .02),
		inset 0 -20px 40px -30px rgba(255, 255, 255, .06),
		0 22px 48px -30px rgba(0, 0, 0, .95);
}

.rew-services .rew-card::before {
	content: "";
	position: absolute;
	left: -18%;
	bottom: -26%;
	width: 52%;
	height: 62%;
	background: radial-gradient(closest-side,
		color-mix(in srgb, var(--rew-accent) 34%, transparent),
		transparent 72%);
	opacity: var(--rew-glow, .42);
	transition: opacity .3s ease;
	pointer-events: none;
}

.rew-services .rew-card:hover {
	border-color: color-mix(in srgb, var(--rew-accent) 40%, transparent);
	transform: translateY(-3px);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .18),
		0 26px 54px -30px rgba(0, 0, 0, .95),
		0 0 40px -18px color-mix(in srgb, var(--rew-accent) 55%, transparent);
}

.rew-services .rew-card:hover::before {
	opacity: calc(var(--rew-glow, .42) + .22);
}

.rew-services .rew-card__body {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	flex: 1;
	max-width: 54%;
}

.rew-services .rew-card--wide .rew-card__body {
	max-width: 46%;
}

.rew-services .rew-card__num {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: 13px;
	font-size: clamp(10px, 3.1cqi, 13px);
	font-weight: 500;
	line-height: 1;
	letter-spacing: .08em;
	color: #6b7280;
}

.rew-services .rew-card--wide .rew-card__num {
	font-size: clamp(10px, 2.1cqi, 13px);
}

.rew-services .rew-card__num::after {
	content: "";
	width: 24px;
	width: clamp(16px, 6cqi, 28px);
	height: 1px;
	background: rgba(255, 255, 255, .2);
}

.rew-services .rew-card__icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 44px;
	width: clamp(32px, 11.4cqi, 46px);
	height: clamp(32px, 11.4cqi, 46px);
	margin: clamp(14px, 6cqi, 26px) 0 clamp(12px, 5cqi, 20px);
	border: 1px solid color-mix(in srgb, var(--rew-accent) 32%, transparent);
	border-radius: 13px;
	background: linear-gradient(145deg,
		color-mix(in srgb, var(--rew-accent) 20%, transparent),
		color-mix(in srgb, var(--rew-accent) 7%, transparent));
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, .1),
		0 0 22px -8px color-mix(in srgb, var(--rew-accent) 70%, transparent);
	font-size: 17px;
	font-size: clamp(13px, 4.4cqi, 18px);
	color: color-mix(in srgb, var(--rew-accent) 62%, #ffffff);
}

.rew-services .rew-card--wide .rew-card__icon {
	width: clamp(32px, 7.4cqi, 46px);
	height: clamp(32px, 7.4cqi, 46px);
	margin: clamp(14px, 4cqi, 26px) 0 clamp(12px, 3.2cqi, 20px);
	font-size: clamp(13px, 2.9cqi, 18px);
}

.rew-services .rew-card__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Stroked preset icons: scale to the tile, never fill. */
.rew-services .rew-card__icon .rew-icon {
	width: 52%;
	height: 52%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.rew-services .rew-card__label {
	margin: 0 0 10px;
	margin-bottom: clamp(7px, 2.8cqi, 12px);
	font-size: 11px;
	font-size: clamp(9px, 2.85cqi, 12px);
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #98a1b2;
}

.rew-services .rew-card--wide .rew-card__label {
	font-size: clamp(9px, 1.9cqi, 12px);
	margin-bottom: clamp(7px, 1.9cqi, 12px);
}

.rew-services .rew-card__title {
	margin: 0 0 12px;
	margin-bottom: clamp(8px, 3.2cqi, 15px);
	font-size: 26px;
	font-size: clamp(16px, 6.75cqi, 29px);
	font-weight: 800;
	line-height: 1.15;
	letter-spacing: -.015em;
	color: #fff;
}

.rew-services .rew-card--wide .rew-card__title {
	font-size: clamp(18px, 5.75cqi, 36px);
	margin-bottom: clamp(8px, 2.2cqi, 15px);
}

.rew-services .rew-card__desc {
	margin: 0 0 20px;
	margin-bottom: clamp(12px, 5cqi, 26px);
	max-width: 94%;
	font-size: 14px;
	font-size: clamp(11.5px, 3.6cqi, 15px);
	line-height: 1.55;
	color: var(--rew-muted);
}

.rew-services .rew-card--wide .rew-card__desc {
	font-size: clamp(11.5px, 2.5cqi, 15.5px);
	margin-bottom: clamp(12px, 3.4cqi, 26px);
}

.rew-services .rew-card__btn {
	display: inline-flex;
	align-items: center;
	align-self: flex-start;
	gap: 8px;
	margin-top: auto;
	padding: 11px 24px;
	padding: clamp(8px, 2.9cqi, 13px) clamp(14px, 6.4cqi, 28px);
	border: 1px solid color-mix(in srgb, var(--rew-accent) 55%, transparent);
	border-radius: 999px;
	font-size: 14px;
	font-size: clamp(11px, 3.5cqi, 14.5px);
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	color: #fff;
	text-decoration: none;
	background: rgba(255, 255, 255, .05);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
	transition: background .25s ease, border-color .25s ease;
}

.rew-services .rew-card--wide .rew-card__btn {
	padding: clamp(8px, 2cqi, 13px) clamp(14px, 4.4cqi, 28px);
	font-size: clamp(11px, 2.4cqi, 14.5px);
}

.rew-services .rew-card__btn:hover,
.rew-services .rew-card__btn:focus-visible {
	background: color-mix(in srgb, var(--rew-accent) 22%, transparent);
	border-color: var(--rew-accent);
	color: #fff;
}

.rew-services .rew-card__btn svg {
	width: 1.1em;
	height: 1.1em;
	flex: none;
	transition: transform .25s ease;
}

.rew-services .rew-card__btn:hover svg {
	transform: translateX(3px);
}

/* ---------- Card artwork ---------- */

.rew-services .rew-card__media {
	position: absolute;
	z-index: 1;
	right: -2%;
	bottom: -3%;
	width: 48%;
	pointer-events: none;
}

.rew-services .rew-card--wide .rew-card__media {
	top: 50%;
	bottom: auto;
	right: -2%;
	width: 54%;
	transform: translateY(-50%);
}

.rew-services .rew-card__media img {
	display: block;
	width: 100%;
	height: auto;
}

/* ---------- Trusted by ---------- */

.rew-services .rew-trusted {
	margin-top: 54px;
	margin-top: clamp(32px, 4.4cqi, 60px);
	padding-top: clamp(20px, 2.6cqi, 34px);
	border-top: 1px solid var(--rew-line);
	text-align: center;
}

.rew-services .rew-trusted__label {
	font-size: 11px;
	font-size: clamp(9px, .92cqi, 11.5px);
	font-weight: 600;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #6b7280;
}

.rew-services .rew-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 22px 48px;
	gap: clamp(16px, 2cqi, 26px) clamp(24px, 4.4cqi, 56px);
	margin-top: clamp(16px, 2.2cqi, 28px);
}

.rew-services .rew-logos img {
	height: 28px;
	height: clamp(20px, 2.4cqi, 32px);
	width: auto;
	opacity: .72;
	filter: grayscale(1) brightness(1.7);
	transition: opacity .25s ease;
}

.rew-services .rew-logos img:hover {
	opacity: 1;
}

.rew-services .rew-logos__more {
	font-size: clamp(11px, 1.15cqi, 14px);
	color: #6b7280;
}

/* ==========================================================================
   Responsive
   Type already scales with card width, so these only change how many cards
   share a row and where the artwork sits.
   ========================================================================== */

/* Tablet: wide cards go full width, normal cards pair up. */
@media (max-width: 1024px) {
	.rew-services {
		padding: 64px 20px 52px;
	}

	.rew-services .rew-head {
		padding: 0;
	}

	.rew-services .rew-sidelabel,
	.rew-services .rew-note {
		display: none;
	}

	.rew-services .rew-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.rew-services .rew-card {
		grid-column: span 1;
		aspect-ratio: 384 / 360;
	}

	.rew-services .rew-card--wide {
		grid-column: span 2;
		aspect-ratio: 592 / 300;
	}
}

/* Phone: single column, artwork drops below the copy so nothing is clipped. */
@media (max-width: 720px) {
	.rew-services {
		padding: 52px 16px 44px;
	}

	.rew-services .rew-grid {
		grid-template-columns: 1fr;
	}

	.rew-services .rew-card,
	.rew-services .rew-card--wide {
		grid-column: span 1;
		flex-direction: column;
		aspect-ratio: auto;
		padding: 24px;
	}

	.rew-services .rew-card__body,
	.rew-services .rew-card--wide .rew-card__body {
		max-width: 100%;
	}

	.rew-services .rew-card__desc {
		max-width: 100%;
	}

	.rew-services .rew-card__media,
	.rew-services .rew-card--wide .rew-card__media {
		position: relative;
		top: auto;
		right: auto;
		bottom: auto;
		width: 92% !important;
		margin: 20px auto 0;
		transform: none;
	}

	.rew-services .rew-card__btn {
		margin-top: 0;
	}

	/* cqi is relative to the card, which is now full-bleed — hold sane sizes. */
	.rew-services .rew-card__title,
	.rew-services .rew-card--wide .rew-card__title {
		font-size: clamp(22px, 7.2vw, 30px);
	}

	.rew-services .rew-card__desc,
	.rew-services .rew-card--wide .rew-card__desc {
		font-size: 14.5px;
	}

	.rew-services .rew-card__label,
	.rew-services .rew-card--wide .rew-card__label {
		font-size: 11px;
	}

	.rew-services .rew-card__btn,
	.rew-services .rew-card--wide .rew-card__btn {
		font-size: 14px;
		padding: 11px 22px;
	}

	.rew-services .rew-card__icon,
	.rew-services .rew-card--wide .rew-card__icon {
		width: 42px;
		height: 42px;
		font-size: 16px;
		margin: 18px 0 14px;
	}

	.rew-services .rew-card__num,
	.rew-services .rew-card--wide .rew-card__num {
		font-size: 12px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.rew-services .rew-card,
	.rew-services .rew-card__btn,
	.rew-services .rew-card__btn svg {
		transition: none;
	}

	.rew-services .rew-card:hover {
		transform: none;
	}
}
