/*!
 * Sarv Catalyst — Services
 *
 * Loaded on the services index and on every `/services/{slug}/` page, and
 * nowhere else. Like the Contact, catalogue and Industries stylesheets it is not
 * part of the shared ladder: it loads after `utilities.css` and therefore wins a
 * tie against a rule there, which is how this section can be drawn without
 * editing the layer every other template depends on.
 *
 * The index and the service pages share the file because they are one section
 * presented twice: the same hero, the same journey, the same invitation.
 *
 * Everything below reads the approved design tokens. No value is invented, no
 * colour is written as a literal, and every offset uses logical properties so
 * the section mirrors with the rest of the site.
 *
 * Cascade order in this file:
 *   1. Services index hero
 *   2. Service journey
 *   3. Service summaries
 *   4. Consultation invitation
 *   5. Service page hero
 *   6. Service page body
 *   7. Related services
 *   8. Responsive
 */

/* ===========================================================================
 * 1. Services index hero
 * ======================================================================== */

.sc-services-index,
.sc-service-page {
	--sc-services-hero-padding: clamp(2rem, 1.2rem + 2.4vw, 3.25rem);
	--sc-services-rule: var(--sc-color-border-subtle);
}

.sc-services-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--sc-color-surface-pale);
}

.sc-services-hero__pattern {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	inline-size: var(--sc-pattern-size-md);
	block-size: var(--sc-pattern-size-md);
	inset-block-start: -30%;
	inset-inline-end: -8%;
	background-color: var(--sc-color-pattern-line);
	opacity: var(--sc-pattern-opacity);
	mask-image: url("../images/brand/sarv-hero-pattern.svg");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: cover;
}

.sc-services-hero .sc-container {
	position: relative;
	z-index: 1;
}

.sc-services-hero__inner {
	padding-block: var(--sc-services-hero-padding);
}

.sc-services-hero .sc-breadcrumbs {
	margin-block-end: var(--sc-space-md);
}

.sc-services-hero__title {
	margin-block: var(--sc-space-sm) var(--sc-space-md);
	font-size: var(--sc-font-size-4xl);
	font-weight: var(--sc-font-weight-bold);
	line-height: var(--sc-line-height-tight);
	letter-spacing: var(--sc-letter-spacing-tight);
	color: var(--sc-color-heading);
}

.sc-services-hero__line {
	display: block;
}

.sc-services-hero__line--accent {
	color: var(--sc-color-brand);
}

.sc-services-hero__lead {
	max-inline-size: var(--sc-measure);
	margin-block: 0;
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

/* ===========================================================================
 * 2. Service journey
 *
 * Three phases in one band, divided by rules. The service names inside a phase
 * are ordinary text or ordinary links: nine repeated panels would say the scope
 * is nine separate products, which is the opposite of what it is.
 * ======================================================================== */

.sc-services-journey {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface);
}

.sc-services-journey__intro {
	max-inline-size: var(--sc-measure);
	margin-block-end: var(--sc-space-xl);
}

.sc-services-journey__lead {
	margin-block-start: var(--sc-space-md);
}

.sc-services-journey__phases {
	display: grid;
	gap: var(--sc-space-lg);
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: sc-service-phase;
}

.sc-service-phase {
	padding-block-start: var(--sc-space-md);
	border-block-start: var(--sc-border-width-strong) solid var(--sc-color-brand-subtle);
}

.sc-service-phase__label {
	margin-block: 0 var(--sc-space-sm);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	color: var(--sc-color-brand-strong);
}

.sc-service-phase__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-service-phase__item {
	display: flex;
	align-items: center;
	min-block-size: var(--sc-touch-target);
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-heading);
}

.sc-service-phase__link,
.sc-service-phase__name {
	color: inherit;
	text-decoration: none;
}

/* The link fills its row so the target is a touch target rather than the
   height of a line of text; the affordance is an underline at the text. */
.sc-service-phase__link {
	display: inline-flex;
	align-items: center;
	min-block-size: var(--sc-touch-target);
}

.sc-service-phase__link:is(:hover, :focus-visible) {
	color: var(--sc-color-brand-strong);
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.sc-service-phase__link:focus-visible {
	outline: var(--sc-focus-outline);
	outline-offset: var(--sc-focus-offset);
}

/* ===========================================================================
 * 3. Service summaries
 * ======================================================================== */

.sc-services-summaries {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface-pale);
}

.sc-services-summaries__list {
	display: grid;
	gap: 0;
	margin: var(--sc-space-xl) 0 0;
	padding: 0;
	list-style: none;
}

.sc-service-summary {
	display: grid;
	gap: var(--sc-space-xs);
	padding-block: var(--sc-space-lg);
	border-block-start: var(--sc-border-width) solid var(--sc-services-rule);
}

.sc-service-summary__title {
	margin-block: 0 var(--sc-space-2xs);
	font-size: var(--sc-font-size-xl);
	font-weight: var(--sc-font-weight-semibold);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-heading);
}

.sc-service-summary__description {
	max-inline-size: var(--sc-measure);
	margin-block: 0;
	font-size: var(--sc-font-size-base);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

.sc-service-summary__action {
	margin-block: 0;
}

.sc-service-summary__link {
	display: inline-flex;
	align-items: center;
	gap: var(--sc-space-3xs);
	min-block-size: var(--sc-touch-target);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	text-decoration: none;
	color: var(--sc-color-link);
}

.sc-service-summary__link:focus-visible {
	outline: var(--sc-focus-outline);
	outline-offset: var(--sc-focus-offset);
}

/* ===========================================================================
 * 4. Consultation invitation
 * ======================================================================== */

.sc-services-closing {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface);
	border-block-start: var(--sc-border-width) solid var(--sc-color-border-subtle);
}

.sc-services-closing__inner {
	max-inline-size: var(--sc-measure);
}

.sc-services-closing__title {
	margin-block: 0 var(--sc-space-md);
	font-size: var(--sc-font-size-2xl);
	font-weight: var(--sc-font-weight-bold);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-heading);
}

.sc-services-closing__body {
	margin-block: 0 var(--sc-space-lg);
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

.sc-services-closing__action {
	margin: 0;
}

/* ===========================================================================
 * 5. Service page hero
 * ======================================================================== */

.sc-service-hero {
	position: relative;
	overflow: hidden;
	background-color: var(--sc-color-surface-pale);
}

.sc-service-hero__pattern {
	position: absolute;
	z-index: 0;
	pointer-events: none;
	inline-size: var(--sc-pattern-size-md);
	block-size: var(--sc-pattern-size-md);
	inset-block-start: -30%;
	inset-inline-end: -8%;
	background-color: var(--sc-color-pattern-line);
	opacity: var(--sc-pattern-opacity);
	mask-image: url("../images/brand/sarv-hero-pattern.svg");
	mask-repeat: no-repeat;
	mask-position: center;
	mask-size: cover;
}

.sc-service-hero .sc-container {
	position: relative;
	z-index: 1;
}

.sc-service-hero__inner {
	padding-block: var(--sc-services-hero-padding);
}

.sc-service-hero .sc-breadcrumbs {
	margin-block-end: var(--sc-space-md);
}

.sc-service-hero__title {
	margin-block: var(--sc-space-sm) var(--sc-space-sm);
	font-size: var(--sc-font-size-4xl);
	font-weight: var(--sc-font-weight-bold);
	line-height: var(--sc-line-height-tight);
	letter-spacing: var(--sc-letter-spacing-tight);
	color: var(--sc-color-heading);
}

.sc-service-hero__lead {
	max-inline-size: var(--sc-measure);
	margin-block: 0;
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

/* ===========================================================================
 * 6. Service page body
 * ======================================================================== */

.sc-service-body {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface);
}

.sc-service-body__inner {
	display: grid;
	gap: var(--sc-space-xl);
}

.sc-service-body__paragraph {
	max-inline-size: var(--sc-measure);
	margin-block: 0 var(--sc-space-md);
	font-size: var(--sc-font-size-lg);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text);
}

.sc-service-body__paragraph:last-child {
	margin-block-end: 0;
}

.sc-service-body__points-title {
	margin-block: 0 var(--sc-space-sm);
	font-size: var(--sc-font-size-sm);
	font-weight: var(--sc-font-weight-semibold);
	letter-spacing: var(--sc-letter-spacing-wide);
	text-transform: uppercase;
	color: var(--sc-color-brand-strong);
}

.sc-service-body__points {
	margin: 0;
	padding: 0;
	list-style: none;
}

.sc-service-body__point {
	padding-block: var(--sc-space-2xs);
	font-size: var(--sc-font-size-base);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
	border-block-start: var(--sc-border-width) solid var(--sc-services-rule);
}

/* ===========================================================================
 * 7. Related services
 * ======================================================================== */

.sc-service-related {
	padding-block: var(--sc-space-section);
	background-color: var(--sc-color-surface-pale);
	border-block-start: var(--sc-border-width) solid var(--sc-color-border-subtle);
}

.sc-service-related__list {
	display: grid;
	gap: var(--sc-space-md);
	margin: var(--sc-space-lg) 0 0;
	padding: 0;
	list-style: none;
}

.sc-service-related__link {
	display: block;
	padding-block: var(--sc-space-sm);
	border-block-start: var(--sc-border-width) solid var(--sc-services-rule);
	text-decoration: none;
	color: inherit;
}

.sc-service-related__title {
	display: block;
	font-size: var(--sc-font-size-lg);
	font-weight: var(--sc-font-weight-semibold);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-heading);
}

.sc-service-related__description {
	display: block;
	margin-block-start: var(--sc-space-2xs);
	font-size: var(--sc-font-size-sm);
	line-height: var(--sc-line-height-snug);
	color: var(--sc-color-text-muted);
}

.sc-service-related__link:focus-visible {
	outline: var(--sc-focus-outline);
	outline-offset: var(--sc-focus-offset);
}

/* ===========================================================================
 * 8. Responsive
 * ======================================================================== */

@media (width >= 40rem) {
	.sc-service-related__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (width >= 60rem) {
	.sc-services-journey__phases {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		column-gap: var(--sc-space-xl);
	}

	.sc-service-phase + .sc-service-phase {
		padding-inline-start: var(--sc-space-xl);
		border-inline-start: var(--sc-border-width) solid var(--sc-services-rule);
	}

	.sc-service-summary {
		grid-template-columns: minmax(0, 22rem) minmax(0, 1fr) auto;
		align-items: start;
		column-gap: var(--sc-space-xl);
	}

	.sc-service-body__inner {
		grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
		align-items: start;
		column-gap: var(--sc-space-2xl);
	}

	.sc-service-related__list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
