/**
 * Homepage 04: What We Do.
 * Desktop (1024px+): design E, centred carousel of nine equal cards (track slides by translateX),
 * arrows + position bar (.s04e-nav). Phone: native scroll-snap rail, arrows + fill bar + count (.s04e-ctl).
 */

/* ---------- Shared ---------- */

.gs-home .gh-04.s04e-sec {
	background: var(--surface-foreground);
}

.gs-home .gh-04 .s04e-head {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.gs-home .gh-04 .s04e-eb .gs-eyebrow {
	color: #793427;
}

.gs-home .gh-04 .s04e-eb .gs-eyebrow::before {
	content: "";
	width: 48px;
	height: 1px;
	background: var(--brand-primary-main);
}

.gs-home .gh-04 .s04e-h {
	margin-top: 14px;
}

.gs-home .gh-04 .s04e-intro {
	color: var(--text-med-em);
}

.gs-home .gh-04 .s04e-rail {
	position: relative;
	display: flex;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scrollbar-width: none;
	container-type: inline-size;
}

.gs-home .gh-04 .s04e-rail::-webkit-scrollbar {
	display: none;
}

.gs-home .gh-04 .s04e-rail:focus-visible {
	outline: 2px solid var(--focus-ring);
	border-radius: 24px;
}

.gs-home .gh-04 .s04e-track {
	flex: none;
	display: flex;
	align-items: stretch;
	width: max-content;
}

.gs-home .gh-04 .s04e-card {
	flex: none;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	background: var(--card-bg);
	border-radius: 24px;
	box-shadow: var(--elevation-e1);
	scroll-snap-align: start;
}

.gs-home .gh-04 .s04e-tile {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--page-bg);
}

.gs-home .gh-04 .s04e-ic {
	display: block;
}

.gs-home .gh-04 .s04e-tag {
	font-weight: 600;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--text-med-em);
}

.gs-home .gh-04 .s04e-tag.s04e-core {
	color: var(--text-brand-em);
}

.gs-home .gh-04 .s04e-st {
	margin-top: 6px;
	font-weight: 600;
	letter-spacing: -.01em;
	color: var(--text-high-em);
	text-wrap: balance;
}

.gs-home .gh-04 .s04e-sl {
	margin-top: 8px;
	color: var(--text-med-em);
	text-wrap: pretty;
}

.gs-home .gh-04 .s04e-go {
	margin-top: auto;
}

.gs-home .gh-04 .s04e-arr {
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border-radius: 50%;
	background: var(--card-bg);
	border: 1px solid var(--outline-med-em);
	color: var(--text-brand-em);
	cursor: pointer;
}

.gs-home .gh-04 .s04e-arr:hover,
.gs-home .gh-04 .s04e-arr:focus {
	background: var(--card-bg);
	color: var(--text-brand-em);
}

.gs-home .gh-04 .s04e-arr svg {
	width: 20px;
	height: 20px;
	display: block;
}

.gs-home .gh-04 .s04e-arr[aria-disabled="true"] {
	color: var(--text-low-em);
	cursor: default;
}

.gs-home .gh-04 .s04e-arr:focus-visible {
	border-radius: 50%;
}

.gs-home .gh-04 .s04e-bar {
	position: relative;
	height: 3px;
	border-radius: 100px;
	background: var(--outline-brand-low-em);
	overflow: hidden;
}

/* icon strokes and fills */
.gs-home .gh-04 .s04e-k { fill: none; stroke: var(--brand-primary-main); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gs-home .gh-04 .s04e-t { fill: none; stroke: var(--brand-tan); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.gs-home .gh-04 .s04e-d { stroke-dasharray: 2 5; }
.gs-home .gh-04 .s04e-fa { fill: var(--brand-peach); }
.gs-home .gh-04 .s04e-fw { fill: var(--card-bg); }

/* without JS the arrows can't work; the rail still scrolls natively */
html:not(.gh-js) .gs-home .gh-04 :is(.s04e-nav, .s04e-ctl) {
	visibility: hidden;
}

/* ---------- Desktop (design E) ---------- */

@media (min-width: 1024px) {
	.gs-home .gh-04.s04e-sec {
		min-height: 880px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		padding: 160px 0;
	}

	.gs-home .gh-04 .s04e-h {
		font-size: 44px;
		line-height: 1.15;
	}

	.gs-home .gh-04 .s04e-intro {
		margin-top: 12px;
		max-width: 860px;
		font-size: 18px;
		line-height: 28px;
	}

	.gs-home .gh-04 .s04e-rail {
		margin-top: 44px;
		margin-bottom: -10px;
		padding: 4px 0 10px;
	}

	.gs-home .gh-04 .s04e-rail:focus-visible {
		outline-offset: 2px;
	}

	.gs-home .gh-04 .s04e-track {
		gap: 20px;
		transition: transform .45s cubic-bezier(.2, .7, .2, 1);
	}

	.gs-home .gh-04 .s04e-track.s04e-still {
		transition: none;
	}

	/* nine equal cards, four in view (285px at the 1200px column); three in view below 1200px */
	.gs-home .gh-04 .s04e-card {
		width: calc((100cqw - 60px) / 4);
		padding: 28px;
	}

	.gs-home .gh-04 .s04e-tile {
		width: 60px;
		height: 60px;
		border-radius: 16px;
	}

	.gs-home .gh-04 .s04e-ic {
		width: 40px;
		height: 40px;
	}

	.gs-home .gh-04 .s04e-tag {
		margin-top: 20px;
		font-size: 12px;
		line-height: 18px;
	}

	.gs-home .gh-04 .s04e-st {
		font-size: 20px;
		line-height: 26px;
	}

	.gs-home .gh-04 .s04e-sl {
		font-size: 15px;
		line-height: 23px;
	}

	.gs-home .gh-04 .s04e-go {
		padding-top: 20px;
	}

	.gs-home .gh-04 .s04e-nav {
		margin-top: 30px;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 20px;
	}

	.gs-home .gh-04 .s04e-arr {
		transition: border-color .2s ease, color .2s ease;
	}

	.gs-home .gh-04 .s04e-arr:hover {
		border-color: var(--brand-primary-main);
	}

	.gs-home .gh-04 .s04e-arr[aria-disabled="true"]:hover {
		border-color: var(--outline-med-em);
	}

	.gs-home .gh-04 .s04e-nav .s04e-bar {
		width: 120px;
	}

	.gs-home .gh-04 .s04e-thumb {
		position: absolute;
		top: 0;
		bottom: 0;
		left: 0;
		width: 44%;
		border-radius: 100px;
		background: var(--brand-primary-main);
		transition: left .45s cubic-bezier(.2, .7, .2, 1);
	}
}

@media (min-width: 1024px) and (max-width: 1199px) {
	.gs-home .gh-04 .s04e-card {
		width: calc((100cqw - 40px) / 3);
	}
}

/* ---------- Phone ---------- */

@media (max-width: 1023px) {
	.gs-home .gh-04.s04e-sec {
		padding: 112px 0;
	}

	.gs-home .gh-04 .w {
		width: 100%;
		max-width: 640px;
		margin: 0 auto;
		padding: 0 24px;
	}

	.gs-home .gh-04 .s04e-eb .gs-eyebrow::before,
	.gs-home .gh-04 .s04e-eb .gs-eyebrow::after {
		width: 32px;
	}

	.gs-home .gh-04 .s04e-h {
		font-size: 31px;
		line-height: 1.16;
	}

	.gs-home .gh-04 .s04e-intro {
		margin-top: 14px;
		max-width: 520px;
		font-size: 16px;
		line-height: 26px;
	}

	.gs-home .gh-04 .s04e-rail {
		margin: 40px -24px 0;
		padding: 4px 24px 12px;
		scroll-padding-inline: 24px;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
	}

	.gs-home .gh-04 .s04e-rail:focus-visible {
		outline-offset: -2px;
	}

	.gs-home .gh-04 .s04e-track {
		gap: 14px;
		transform: none;
	}

	.gs-home .gh-04 .s04e-card {
		width: min(calc(100cqw - 30px), 320px);
		padding: 24px 24px 20px;
		scroll-snap-stop: always;
	}

	.gs-home .gh-04 .s04e-tile {
		width: 52px;
		height: 52px;
		border-radius: 14px;
	}

	.gs-home .gh-04 .s04e-ic {
		width: 36px;
		height: 36px;
	}

	.gs-home .gh-04 .s04e-tag {
		margin-top: 18px;
		font-size: 11px;
		line-height: 16px;
	}

	.gs-home .gh-04 .s04e-st {
		font-size: 19px;
		line-height: 25px;
	}

	.gs-home .gh-04 .s04e-sl {
		font-size: 14px;
		line-height: 22px;
	}

	.gs-home .gh-04 .s04e-go {
		padding-top: 10px;
	}

	.gs-home .gh-04 .s04e-go .lnk {
		min-height: 44px;
		font-size: 14px;
		line-height: 20px;
	}

	.gs-home .gh-04 .s04e-go .lnk svg {
		width: 16px;
		height: 16px;
	}

	.gs-home .gh-04 .s04e-ctl {
		margin-top: 20px;
		display: flex;
		align-items: center;
		gap: 16px;
	}

	.gs-home .gh-04 .s04e-arrs {
		flex: none;
		display: flex;
		gap: 10px;
	}

	.gs-home .gh-04 .s04e-arr {
		-webkit-tap-highlight-color: transparent;
		transition: border-color .2s ease, color .2s ease, opacity .2s ease, transform .2s ease;
	}

	.gs-home .gh-04 .s04e-arr:active {
		transform: scale(.94);
	}

	.gs-home .gh-04 .s04e-arr[aria-disabled="true"] {
		opacity: .55;
	}

	.gs-home .gh-04 .s04e-arr[aria-disabled="true"]:active {
		transform: none;
	}

	.gs-home .gh-04 .s04e-ctl .s04e-bar {
		flex: 1;
		min-width: 40px;
	}

	.gs-home .gh-04 .s04e-fill {
		position: absolute;
		left: 0;
		top: 0;
		bottom: 0;
		width: 14%;
		border-radius: 100px;
		background: var(--brand-primary-main);
		transition: width .12s linear;
	}

	.gs-home .gh-04 .s04e-count {
		flex: none;
		font-size: 14px;
		line-height: 20px;
		color: var(--text-med-em);
		font-variant-numeric: tabular-nums;
		white-space: nowrap;
	}

	.gs-home .gh-04 .s04e-cn {
		display: inline-block;
		min-width: .6em;
		text-align: right;
		font-weight: 700;
		color: var(--text-high-em);
	}
}

/* wider phone layout (tablet): the rail bleeds to the viewport edges, cards line up with the text column */
@media (min-width: 641px) and (max-width: 1023px) {
	.gs-home .gh-04 .s04e-rail {
		margin-inline: calc(296px - 50vw);
		padding-inline: calc(50vw - 296px);
		scroll-padding-inline: calc(50vw - 296px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.gs-home .gh-04 .s04e-rail {
		scroll-behavior: auto;
	}
}
