/* Artmark Service Cards widget — dark section with a gradient-filled heading,
   a flexbox grid of cream cards (icon top-left, running number top-right,
   title + description bottom-aligned) and a notched blue quote band beneath.

   Namespaced .am-svc so it cannot touch .am-sol (Solutions), .am-caps
   (Capability Cards) or any other close cousin.

   Colours, typography, spacing, notches and the two gradients are all driven
   by widget controls; the values here are the design defaults. Anything a
   control can repaint on hover/focus is read through a CSS custom property so
   the state resets further down never beat the control. */

.am-svc {
	width: 100%;
	background-color: #0b1418;
}

.am-svc__inner {
	width: 100%;
	max-width: none;
	margin: 0 auto;
}

/* ---------------------------------------------------------------- */
/* "+ LABEL" eyebrow                                                 */
/* ---------------------------------------------------------------- */

/* Block, not flex: the alignment control sets text-align on .am-svc__head and
   the inline-flex label follows it, so one control aligns label and heading. */
.am-svc__head {
	width: 100%;
}

.am-svc__labelrow {
	display: block;
	width: 100%;
}

.am-svc__label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 18px;
	border: 0 solid transparent;
	font-size: 14px;
	line-height: 1;
	color: #d6eafb;
}

.am-svc__plus {
	font-size: 15px;
	line-height: 1;
}

/* ---------------------------------------------------------------- */
/* Heading — gradient text fill                                      */
/* ---------------------------------------------------------------- */

/* background-clip: text over a linear-gradient, with the angle and both
   colour stops exposed as custom properties (same technique as
   .am-tband__title in artmark-sections.css). */
.am-svc__title {
	margin: 0 0 44px;
	font-size: 52px;
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -0.01em;
	background-image: linear-gradient(
		var(--am-svc-h-angle, 100deg),
		var(--am-svc-h-a, #ffffff),
		var(--am-svc-h-b, #9fd2f5)
	);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
	-webkit-text-fill-color: transparent;
}

/* "Solid Colour" fill mode — the class lands on the widget wrapper. */
.am-svc-fill-solid .am-svc__title {
	background-image: none;
	color: var(--am-svc-h-solid, #ffffff);
	-webkit-text-fill-color: currentColor;
}

/* ---------------------------------------------------------------- */
/* Card grid                                                         */
/* ---------------------------------------------------------------- */

/* Flexbox rather than CSS grid: a short final row then centres itself (the
   design's last two of five cards), which grid-template-columns cannot do. */
.am-svc__grid {
	--am-svc-cols: 3;
	--am-svc-gap: 24px;
	--am-svc-rowgap: 26px;
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	justify-content: center;
	column-gap: var(--am-svc-gap);
	row-gap: var(--am-svc-rowgap);
}

.am-svc__grid--left {
	justify-content: flex-start;
}

.am-svc__card {
	--am-svc-notch: 0px;
	--am-svc-card-bg: #faf5ee;
	--am-svc-card-bd: transparent;
	--am-svc-card-bdw: 0px;
	--am-svc-lift: 0px;
	position: relative;
	flex: 0 0 calc((100% - (var(--am-svc-cols) - 1) * var(--am-svc-gap)) / var(--am-svc-cols));
	max-width: 100%;
	min-width: 0;
	min-height: 284px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
	padding: 32px;
	background-color: var(--am-svc-card-bg, #faf5ee);
	border: var(--am-svc-card-bdw, 0px) solid var(--am-svc-card-bd, transparent);
	color: inherit;
	text-decoration: none;
	clip-path: polygon(
		0 0,
		calc(100% - var(--am-svc-notch)) 0,
		100% var(--am-svc-notch),
		100% 100%,
		0 100%
	);
	transition: transform 0.25s ease, background-color 0.25s ease;
}

.am-svc__card--wide {
	flex: 0 0 calc(
		(100% - (var(--am-svc-cols) - 1) * var(--am-svc-gap)) / var(--am-svc-cols) * 2 + var(--am-svc-gap)
	);
}

.am-svc__card--full {
	flex: 0 0 100%;
}

/* Themes repaint links on hover/focus/active and a pseudo-class selector
   beats a bare class, so every state is neutralised here. The colours come
   back through custom properties, which the widget's own controls set — so
   the controls still win without needing !important. */
a.am-svc__card,
a.am-svc__card:hover,
a.am-svc__card:focus,
a.am-svc__card:focus-visible,
a.am-svc__card:active {
	background-image: none;
	background-color: var(--am-svc-card-bg, #faf5ee);
	border-color: var(--am-svc-card-bd, transparent);
	border-width: var(--am-svc-card-bdw, 0px);
	border-style: solid;
	box-shadow: none;
	outline: 0;
	color: inherit;
	text-decoration: none;
	transform: none;
}

/* Restated after the reset so the widget's hover controls take effect. */
a.am-svc__card:hover {
	background-color: var(--am-svc-card-bg-h, var(--am-svc-card-bg, #faf5ee));
	transform: translateY(var(--am-svc-lift, 0px));
}

/* Keyboard focus still needs to be visible. */
a.am-svc__card:focus-visible {
	outline: 2px solid var(--am-svc-focus, #8fd0f5);
	outline-offset: 2px;
}

/* --- card head: icon left, running number right --- */

.am-svc__cardtop {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.am-svc__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	border: 0 solid transparent;
}

.am-svc__icon img {
	display: block;
	width: 44px;
	height: 44px;
	object-fit: contain;
}

/* With no icon the number is the only child, so it needs the auto margin to
   stay in the right-hand corner; when both are present space-between handles
   it and the gap control stays meaningful. */
.am-svc__cardtop > .am-svc__num:only-child {
	margin-left: auto;
}

.am-svc__num {
	flex: 0 0 auto;
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.02em;
	color: #9ca3af;
}

/* --- card body, pinned to the bottom of the card --- */

.am-svc__body {
	display: flex;
	flex-direction: column;
}

.am-svc__ctitle {
	margin: 0 0 12px;
	font-size: 21px;
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: #111827;
}

.am-svc__desc {
	margin: 0;
	font-size: 15px;
	line-height: 24px;
	color: #6b7280;
}

/* ---------------------------------------------------------------- */
/* Quote band — notched top-right and bottom-left                    */
/* ---------------------------------------------------------------- */

.am-svc__band {
	--am-svc-bn-tr: 40px;
	--am-svc-bn-bl: 40px;
	position: relative;
	margin-top: 72px;
	padding: 52px 40px;
	overflow: hidden;
	background-color: var(--am-svc-band-a, #2f7fd6);
	background-image: linear-gradient(
		var(--am-svc-band-angle, 100deg),
		var(--am-svc-band-a, #2f7fd6),
		var(--am-svc-band-b, #4fa6f5)
	);
	clip-path: polygon(
		0 0,
		calc(100% - var(--am-svc-bn-tr)) 0,
		100% var(--am-svc-bn-tr),
		100% 100%,
		var(--am-svc-bn-bl) 100%,
		0 calc(100% - var(--am-svc-bn-bl))
	);
}

.am-svc__band-img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: var(--am-svc-band-imgop, 1);
	pointer-events: none;
}

.am-svc__quote {
	position: relative;
	z-index: 2;
	max-width: 880px;
	margin: 0 auto;
	text-align: center;
	font-size: 26px;
	font-weight: 400;
	line-height: 1.42;
	letter-spacing: -0.01em;
	color: #ffffff;
}

/* ---------------------------------------------------------------- */
/* Responsive                                                        */
/* ---------------------------------------------------------------- */

@media (max-width: 1024px) {
	.am-svc__grid {
		--am-svc-cols: 2;
	}

	.am-svc__title {
		font-size: 38px;
	}

	.am-svc__quote {
		font-size: 22px;
	}
}

@media (max-width: 767px) {
	.am-svc__grid {
		--am-svc-cols: 1;
	}

	.am-svc__title {
		font-size: 28px;
	}

	.am-svc__card {
		min-height: 0;
		gap: 24px;
	}

	.am-svc__ctitle {
		font-size: 19px;
	}

	.am-svc__band {
		--am-svc-bn-tr: 24px;
		--am-svc-bn-bl: 24px;
		padding: 36px 24px;
	}

	.am-svc__quote {
		font-size: 19px;
	}
}
