/**
 * Service detail pages.
 *
 * Reuses the site's existing composition and every existing token — the only
 * genuinely new component here is the contained related-work strip. Classes are
 * service-prefixed rather than borrowed from the homepage so nothing on
 * /services/{slug}/ can be changed by a later homepage-specific rule.
 */

/* ---- Hero ---- */
.service-hero {
	padding-block: clamp(8rem, 6rem + 6vw, 11rem) var(--space-xl);
	border-bottom: 1px solid var(--color-line);
}

.service-hero__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	color: var(--color-fg-dim);
	margin-bottom: var(--space-md);
}

.service-hero__eyebrow::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--color-accent);
}

.service-hero__heading {
	font-size: var(--size-hero);
	font-weight: 800;
	letter-spacing: -0.015em;
	max-width: 16ch;
	text-wrap: balance;
}

.service-hero__statement {
	margin-top: var(--space-md);
	max-width: 46ch;
	font-size: var(--size-body-lg);
	color: var(--color-fg-dim);
}

/* ---- Shared section rhythm ----
   Same inter-section padding and rule as every other informational band on
   the site, so a service page sits in the existing vertical rhythm. */
.service-section {
	padding-block: var(--space-xl);
	border-top: 1px solid var(--color-line);
}

.service-section:first-of-type {
	border-top: 0;
}

.service-section__heading {
	font-size: var(--size-section);
	font-weight: 800;
	letter-spacing: -0.015em;
	max-width: 16ch;
	text-wrap: balance;
}

.service-section__copy {
	margin-top: var(--space-md);
	max-width: 50ch;
	font-size: var(--size-body-lg);
	color: var(--color-fg-dim);
}


/* An overview of several paragraphs set beneath its heading ran down the left
   third of the page with the rest of it empty. From 64rem the heading and the
   copy sit side by side, the composition the About page and the homepage's
   "A new name." already use; the copy keeps its measure, and any steps run
   full width beneath. One column below that, as before. */
@media (min-width: 64rem) {
	.service-overview {
		display: grid;
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		column-gap: clamp(32px, 5vw, 96px);
		align-items: start;
	}

	.service-overview > .service-section__heading {
		grid-column: 1;
	}

	.service-overview > .service-section__copy {
		grid-column: 2;
		margin-top: 0;
	}

	.service-overview > .service-actions {
		grid-column: 1 / -1;
	}
}

/* ---- What we do: numbered production actions ---- */
.service-actions {
	list-style: none;
	margin-block: var(--space-lg) 0;
	padding: 0;
	border-top: 1px solid var(--color-line);
}

.service-actions__item {
	display: flex;
	align-items: baseline;
	gap: var(--space-md);
	padding-block: var(--space-sm);
	border-bottom: 1px solid var(--color-line);
}

.service-actions__index {
	flex-shrink: 0;
	width: 2.5ch;
	font-size: var(--size-label);
	font-weight: 700;
	color: var(--color-fg-faint);
}

.service-actions__label {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
	letter-spacing: -0.015em;
}

/* ---- Production process ---- */
.service-process {
	list-style: none;
	margin-block: var(--space-lg) 0;
	padding-block: var(--space-md) 0;
	padding-inline: 0;
	border-top: 1px solid var(--color-line);
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: var(--space-lg);
}

.service-process__step {
	display: flex;
	flex-direction: column;
	gap: var(--space-xs);
	padding-left: var(--space-md);
	border-left: 1px solid var(--color-line);
}

.service-process__step:first-child {
	padding-left: 0;
	border-left: 0;
}

.service-process__index {
	display: block;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(2rem, 1rem + 4vw, 3.25rem);
	line-height: 1;
	color: var(--color-fg-faint);
}

.service-process__label {
	display: block;
	font-weight: 800;
	font-size: var(--size-body-lg);
	letter-spacing: -0.015em;
}

.service-process__desc {
	display: block;
	color: var(--color-fg-dim);
	font-size: var(--size-small);
	max-width: 26ch;
}

/* ---- Capabilities ---- */
.service-capabilities {
	margin-top: var(--space-lg);
	max-width: 68ch;
	font-family: var(--font-display);
	font-weight: 700;
	font-size: clamp(1.5rem, 1.05rem + 2.2vw, 2.5rem);
	line-height: 1.35;
	letter-spacing: -0.015em;
	color: var(--color-fg-dim);
	text-wrap: balance;
}

/* A second capability group and beyond. Several groups share one section, so
   this gap has to beat the --space-lg between a heading and its own list: at
   equal gaps a heading floats between two lists and stops belonging to either.
   --space-xl over --space-lg is the same inequality variables.css describes,
   and the section boundary still outranks both — it adds a rule and that
   padding twice over. Scoped to the adjacency, so a Service with one group
   renders exactly as it always did. */
.service-capabilities + .service-section__heading {
	margin-top: var(--space-xl);
}

/* ---- Relevant work ----
   The one new component. Media-led and contained: no card, no border, no
   radius, no shadow — the campaign colour field is the ground and the type
   sits beneath it. */
.service-work__list {
	list-style: none;
	margin: var(--space-lg) 0 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-lg) var(--space-md);
}

.service-work__link {
	display: block;
	color: inherit;
}

.service-work__media {
	position: relative;
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--project-bg, var(--color-bg-elevated));
}

.service-work__media img,
.service-work__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--duration-base) var(--ease-out);
}

.service-work__link:focus-visible .service-work__media img,
.service-work__link:focus-visible .service-work__media video {
	transform: scale(1.02);
}

/* Movement on hover only where hover genuinely exists (a tap would strand it
   mid-nudge on a touch device); keyboard focus keeps its own state above. */
@media (hover: hover) and (pointer: fine) {
	.service-work__link:hover .service-work__media img,
	.service-work__link:hover .service-work__media video {
		transform: scale(1.02);
	}
}

.service-work__meta {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-sm);
	margin-top: var(--space-sm);
	flex-wrap: wrap;
}

.service-work__title {
	font-family: var(--font-display);
	font-weight: 800;
	font-size: var(--size-h2);
	letter-spacing: -0.015em;
	transition: color var(--duration-fast) var(--ease-out);
}

.service-work__link:hover .service-work__title,
.service-work__link:focus-visible .service-work__title {
	color: var(--color-accent);
}

.service-work__services {
	font-size: var(--size-small);
	text-transform: none; /* Direction C: no capitals */
	letter-spacing: 0;
	color: var(--color-fg-faint);
}

/* ---- Why BannerJoy ---- */
.service-reasons {
	margin-top: var(--space-lg);
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-md) var(--space-xl);
}

.service-reasons__item {
	padding-top: var(--space-sm);
	border-top: 1px solid var(--color-line);
}

.service-reasons__heading {
	font-size: clamp(1.75rem, 1.19rem + 2.286vw, 2.875rem);
	font-weight: 800;
	letter-spacing: -0.015em;
}

.service-reasons__desc {
	margin-top: var(--space-2xs);
	color: var(--color-fg-dim);
	max-width: 42ch;
}

/* ---- Related services ---- */
.service-related__label {
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	color: var(--color-fg-faint);
}

.service-related__list {
	list-style: none;
	margin: var(--space-sm) 0 0;
	padding: 0;
	border-top: 1px solid var(--color-line);
}

.service-related__item {
	border-bottom: 1px solid var(--color-line);
}

.service-related__link {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-md);
	padding-block: var(--space-sm);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1.5rem, 1.1rem + 2vw, 2.5rem);
	letter-spacing: -0.015em;
	transition: color var(--duration-fast) var(--ease-out);
}

.service-related__link:hover,
.service-related__link:focus-visible {
	color: var(--color-accent);
}

.service-related__arrow {
	transition: transform var(--duration-fast) var(--ease-out);
}

/* Movement on hover only where hover genuinely exists — a tap would strand
   it mid-nudge on a touch device. */
@media (hover: hover) and (pointer: fine) {
	.service-related__link:hover .service-related__arrow {
		transform: translateX(6px);
	}
}

/* ---- Responsive recomposition — mirrors the site's existing breakpoints ---- */
@media (max-width: 900px) {
	.service-process {
		grid-template-columns: repeat(2, 1fr);
		row-gap: var(--space-lg);
	}

	.service-process__step:nth-child(3) {
		padding-left: 0;
		border-left: 0;
	}

	.service-reasons {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 640px) {
	.service-process,
	.service-work__list {
		grid-template-columns: 1fr;
	}

	.service-process__step {
		padding-left: 0;
		padding-top: var(--space-md);
		border-left: 0;
		border-top: 1px solid var(--color-line);
	}

	.service-process__step:first-child {
		padding-top: 0;
		border-top: 0;
	}

	.service-actions__item {
		gap: var(--space-sm);
	}
}


/* ---- Mid-page CTA ----
   The one band on a service page that is meant to break the rhythm rather than
   continue it. Everything else is black with a hairline above it; this sits on
   --color-bg-elevated with a rule top and bottom, so it reads as an aside the
   eye stops at without any device the rest of the site does not already use.

   Full-bleed and square: the elevation is the interruption, and insetting it or
   rounding it would turn a production note into a card. The two actions it
   carries are typographic — a weighted link over a rule, not a button row —
   which is what keeps it clearly distinct from .final-cta, whose whole shape is
   a heading above a pill. Same page, two different kinds of offer: this one
   answers a question mid-read, that one closes. */
.service-mid-cta {
	padding-block: var(--space-xl);
	background: var(--color-bg-elevated);
	border-block: 1px solid var(--color-line);
}

/* One column on a narrow screen, in the order the decision is actually made:
   question, answer, explanation, then the two ways forward. That is DOM order,
   so it is also keyboard order. */
.service-mid-cta__inner {
	display: grid;
	gap: var(--space-sm);
	align-items: start;
}

/* Desktop restores the two-column composition and puts the actions back under
   the statement they belong to — by placement, not by `order`, so nothing
   traverses in a different sequence to the one it reads in. */
@media (min-width: 56rem) {
	.service-mid-cta__inner {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
		grid-template-areas:
			"exchange copy"
			"actions  copy";
		grid-template-rows: auto 1fr;
		column-gap: var(--space-xl);
		/* Deliberately tight: the statement and the actions are one continuous
		   move from answer to next step, and a full section gap between them
		   read as two unrelated blocks. */
		row-gap: var(--space-xs);
	}

	.service-mid-cta__exchange { grid-area: exchange; }
	.service-mid-cta__copy     { grid-area: copy; }
	.service-mid-cta__actions  { grid-area: actions; }
}

.service-mid-cta__heading {
	font-size: var(--size-h2);
	font-weight: 800;
	letter-spacing: -0.015em;
	max-width: 18ch;
	text-wrap: balance;
}

/* The answer, and the emphatic line in the band. Set plain: it is a sentence,
   not an item, so it carries no bullet — the weight and size are what mark it
   as the reply to the heading above it. */
.service-mid-cta__statement {
	margin-top: var(--space-sm);
	font-size: var(--size-body-lg);
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--color-fg);
	max-width: 24ch;
	text-wrap: balance;
}

/* When the statement is the way forward (template-parts/service/mid-cta.php)
   it keeps its colour, size and words, and gains what says "this goes
   somewhere" everywhere else on the site: the accent underline and the
   arrow. Inline-flex with a 44px minimum so a thumb finds it on a phone. */
.service-mid-cta__statement-link {
	display: inline-flex;
	align-items: baseline;
	gap: 0.3em;
	min-height: 44px;
	padding-block: 0.25rem;
	box-sizing: border-box;
	color: inherit;
	text-decoration: none;
	border: 0;
}

/* The same rule under the words as the primary action's label. */
.service-mid-cta__statement-label {
	border-bottom: 2px solid currentColor;
	padding-bottom: 0.05em;
}

.service-mid-cta__statement-arrow {
	display: inline-block;
	transition: transform var(--duration-fast) var(--ease-out);
}

.service-mid-cta__statement-link:focus-visible .service-mid-cta__statement-arrow {
	transform: translateX(0.25em);
}

@media (hover: hover) and (pointer: fine) {
	.service-mid-cta__statement-link:hover .service-mid-cta__statement-arrow {
		transform: translateX(0.25em);
	}
}

/* ---- The two ways forward ----
   Stacked, not a button row: one obvious path and one quieter alternative
   reads as a studio offering a choice, where two pills side by side reads as a
   funnel. They sit under the statement so they belong to that side of the
   exchange rather than floating loose in the band.

   Primary and secondary differ in size, weight and rule as well as tone, so
   the hierarchy survives without colour — and both carry the arrow the rest of
   the site already uses for "this goes somewhere". */
.service-mid-cta__actions {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	/* Tight enough that the two read as one pair of choices; the touch padding
	   inside each link supplies the rest of the separation. */
	gap: var(--space-2xs);
	margin-top: var(--space-2xs);
}

@media (min-width: 56rem) {
	.service-mid-cta__actions {
		margin-top: 0;
	}
}

.service-mid-cta__action {
	display: inline-flex;
	align-items: baseline;
	gap: var(--space-2xs);
	/* Keeps the hit area comfortable on touch without drawing a box around a
	   link that is not meant to look like a button. */
	padding-block: 0.5rem;
	min-height: 44px;
	box-sizing: border-box;
	transition: color var(--duration-fast) var(--ease-out),
		border-color var(--duration-fast) var(--ease-out);
}

.service-mid-cta__action-arrow {
	transition: transform var(--duration-fast) var(--ease-out);
}

.service-mid-cta__action:focus-visible .service-mid-cta__action-arrow {
	transform: translateX(0.25em);
}

/* Movement on hover only where hover genuinely exists (a tap would strand it
   mid-nudge on a touch device); keyboard focus keeps its own state above. */
@media (hover: hover) and (pointer: fine) {
	.service-mid-cta__action:hover .service-mid-cta__action-arrow {
		transform: translateX(0.25em);
	}
}

/* Primary: full contrast, body-lg, and the only underscored action. */
.service-mid-cta__action--primary {
	font-size: var(--size-body-lg);
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--color-fg);
}

.service-mid-cta__action--primary .service-mid-cta__action-label {
	border-bottom: 2px solid var(--color-accent);
	padding-bottom: 0.1em;
}

.service-mid-cta__action--primary:hover,
.service-mid-cta__action--primary:focus-visible {
	color: var(--color-accent);
}

/* Secondary: the site's existing quiet-link treatment, one step down in size
   and weight so it never competes with the primary path. */
.service-mid-cta__action--secondary {
	font-size: var(--size-body);
	font-weight: 500;
	/* Brighter than supporting copy, dimmer than the primary: this is a real
	   second option, not a footnote. Size, weight and the 1px rule are what
	   keep it subordinate, so the lift costs no hierarchy. */
	color: var(--color-fg-soft);
}

.service-mid-cta__action--secondary .service-mid-cta__action-label {
	border-bottom: 1px solid var(--color-fg-faint);
	padding-bottom: 0.15em;
}

.service-mid-cta__action--secondary:hover,
.service-mid-cta__action--secondary:focus-visible {
	color: var(--color-fg);
}

.service-mid-cta__action--secondary:hover .service-mid-cta__action-label,
.service-mid-cta__action--secondary:focus-visible .service-mid-cta__action-label {
	border-color: var(--color-fg);
}

/* A heading with no statement should not leave the copy hanging high, so the
   copy keeps its own top margin only when it is the column's first child. */
.service-mid-cta__copy {
	max-width: 46ch;
	font-size: var(--size-body);
	color: var(--color-fg-dim);
}

@media (min-width: 56rem) {
	.service-mid-cta__copy {
		/* Nudges the copy onto the heading's first baseline rather than its
		   cap height, which reads as aligned where a flush top does not. */
		padding-top: 0.35em;
	}
}
