/* ---- Work intro (a bridge into the portfolio, not a destination — its
   padding sits a step below section scale so the work arrives sooner) ---- */
.work-intro {
	padding-block: var(--space-lg);
	/* Editorial frame. Reproduces .container's horizontal geometry on a
	   full-bleed element, so the section's own background and border still run
	   edge to edge while its content is centred to the same inner width. The
	   max() keeps --gutter as the floor below --content-max, where the frame
	   would otherwise compute smaller than the gutter. Repeated verbatim on
	   .company-transition, .reasons__closing and .site-footer — these four are
	   the sections that never took a .container, and letting their fr columns
	   absorb the surplus is what pulled related elements apart above 1600px. */
	padding-inline: max(
		var(--gutter),
		(100% - (var(--content-max) - 2 * var(--gutter))) / 2
	);
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: var(--space-md);
	flex-wrap: wrap;
	border-top: 1px solid var(--color-line);
}

.work-intro__label {
	font-size: var(--size-h2);
	font-weight: 800;
}

.work-intro__copy {
	max-width: 38ch;
	color: var(--color-fg-dim);
	font-size: var(--size-body);
}

.work-intro__note {
	margin-top: var(--space-2xs);
	max-width: 38ch;
	color: var(--color-fg-faint);
	font-size: var(--size-small);
}

/* ---- Project section: one per viewport, media-dominant ---- */
.project-section {
	position: relative;
	min-height: 100dvh;
	display: flex;
	align-items: flex-end;
	overflow: hidden;
	background: var(--project-bg, #111);
	color: var(--project-fg, var(--color-fg));
}

.project-section__media {
	position: absolute;
	inset: 0;
	z-index: 0;
}

.project-section__media img,
.project-section__media video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.project-section__media-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(4rem, 1rem + 12vw, 16rem);
	letter-spacing: -0.015em;
	color: color-mix(in srgb, var(--project-fg, #fff) 12%, transparent);
	user-select: none;
}

.project-section__scrim {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		to top,
		color-mix(in srgb, var(--project-bg, #111) 78%, transparent) 0%,
		color-mix(in srgb, var(--project-bg, #111) 25%, transparent) 45%,
		transparent 75%
	);
}

.project-section__content {
	position: relative;
	z-index: 3;
	width: 100%;
	padding-block: var(--space-xl) var(--space-lg);
	pointer-events: none;
}

/* Only real links take pointer events. The CTA pill is no longer an anchor, so
   it stays transparent to the pointer and clicks reach the section link. */
.project-section__content a {
	pointer-events: auto;
}

.project-section__index {
	display: block;
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	opacity: 0.7;
	margin-bottom: var(--space-sm);
}

.project-section__title {
	font-size: var(--size-h1);
	font-weight: 800;
	letter-spacing: -0.015em;
	max-width: 16ch;
}

.project-section__desc {
	max-width: 48ch;
	font-size: var(--size-body-lg);
	font-weight: 500;
	margin-top: var(--space-sm);
	opacity: 0.86;
}

.project-section__meta {
	display: flex;
	gap: var(--space-md);
	margin-top: var(--space-sm);
	font-size: var(--size-small);
	opacity: 0.7;
	text-transform: none; /* Direction C: no capitals */
	letter-spacing: 0;
}

.project-section__cta {
	margin-top: var(--space-md);
}

/* Same geometry the old veil had: above the media and scrim, below the content
   block, which is pointer-events:none so clicks fall through to it. */
.project-section__link {
	position: absolute;
	inset: 0;
	z-index: 2;
}

/* .project-section has overflow:hidden, so the global focus ring's positive
   offset would be clipped away. Drawn inside the edge instead, at the same
   width and colour as everywhere else on the site. */
.project-section__link:focus-visible {
	outline-offset: -4px;
}

/* The pill is a <span> now, so .button-pill's own :hover can never fire on it.
   Driving the same inversion from the section keeps the affordance and matches
   the real click target, which is the whole panel. :focus-within gives keyboard
   users the identical signal when the section link is focused. */
.project-section:hover .project-section__cta,
.project-section:focus-within .project-section__cta {
	background: currentColor;
}

.project-section:hover .project-section__cta span,
.project-section:focus-within .project-section__cta span {
	color: var(--project-bg, var(--color-bg));
}

/* ---- Shared CTA pill ---- */
.button-pill {
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	padding: 0.9em 1.6em 0.8em;
	border-radius: var(--radius-pill);
	border: 1px solid currentColor;
	font-family: var(--font-display);
	font-size: var(--size-label);
	font-weight: 700;
	letter-spacing: 0;
	text-transform: none; /* Direction C: no capitals */
	transition: background var(--duration-fast) var(--ease-out),
		color var(--duration-fast) var(--ease-out);
}

.button-pill:hover,
.button-pill:focus-visible {
	background: currentColor;
}

.button-pill:hover span,
.button-pill:focus-visible span {
	color: var(--project-bg, var(--color-bg));
}

.button-pill span {
	transition: color var(--duration-fast) var(--ease-out);
}

/* ---- Company transition ---- */
.company-transition {
	padding-block: var(--space-xl);
	/* Editorial frame — see .work-intro above. */
	padding-inline: max(
		var(--gutter),
		(100% - (var(--content-max) - 2 * var(--gutter))) / 2
	);
	border-top: 1px solid var(--color-line);
	display: grid;
	grid-template-columns: 1.1fr 0.9fr;
	gap: var(--space-lg);
	align-items: end;
}

.company-transition__heading {
	font-size: var(--size-h2);
	font-weight: 800;
	max-width: 16ch;
}

.company-transition__copy {
	color: var(--color-fg-dim);
	font-size: var(--size-body);
	max-width: 46ch;
}

.company-transition__cta {
	margin-top: var(--space-md);
	display: inline-flex;
	align-items: center;
	gap: var(--space-2xs);
	font-family: var(--font-display);
	font-weight: 800;
	font-size: clamp(1rem, 0.85rem + 0.6vw, 1.35rem);
	letter-spacing: -0.015em;
	border-bottom: 2px solid var(--color-accent);
	padding-bottom: 0.2em;
}

/* 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) {
	.company-transition__cta:hover .company-transition__arrow {
		transform: translateX(6px);
	}
}

.company-transition__arrow {
	transition: transform var(--duration-fast) var(--ease-out);
}

@media (max-width: 780px) {
	.company-transition {
		grid-template-columns: 1fr;
		align-items: start;
	}
}

/* ---- Homepage QA — "QA throughout" ----
   A production inspection sheet in the site's editorial language. The
   proposition sits left, the checks run as one numbered column on the right,
   and fine rules do the work that cards and ticks would otherwise do.

   Deliberately not another full-scale editorial band: this is the precise beat
   between Process and Reasons, so the heading takes --size-h2 (the supporting
   scale) rather than the --size-section its neighbours use. Every value below
   is an existing token. */
.qa-check {
	padding-block: var(--space-xl);
	border-top: 1px solid var(--color-line);
}

/* Single column until there is genuinely room for the split — a cramped
   two-column checklist reads worse than a stacked one. */
.qa-check__grid {
	display: grid;
	gap: var(--space-lg);
}

@media (min-width: 900px) {
	.qa-check__grid {
		grid-template-columns: minmax(0, 38fr) minmax(0, 62fr);
		gap: var(--space-xl);
		align-items: start;
	}
}

/* Same eyebrow as the rest of the site, including its accent rule. */
.qa-check__label {
	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-sm);
}

.qa-check__label::before {
	content: "";
	width: 1.5rem;
	height: 1px;
	background: var(--color-accent);
}

/* Size and weight: the homepage section-heading step (direction-c.css). */
.qa-check__heading {
	max-width: 12ch;
	text-wrap: balance;
}

/* --size-body in a ~38% column: at the larger step this ran to six lines of
   32px and read as a grey slab competing with the heading. The intro is a note
   supporting the proposition, not a second statement. */
.qa-check__copy {
	margin-top: var(--space-sm);
	max-width: 38ch;
	font-size: var(--size-body);
	color: var(--color-fg-dim);
}

/* One index-column definition, shared by every row so the labels all start on
   the same vertical. */
.qa-check {
	--qa-index: 3.5ch;
	--qa-index-gap: var(--space-sm);
}

.qa-check__list {
	border-top: 1px solid var(--color-line);
}

/* Number, rule, label — the production-sheet rhythm. The index column is
   fixed so every label starts on the same vertical, which is what makes the
   run scannable. */
.qa-check__item {
	display: grid;
	grid-template-columns: var(--qa-index) 1fr;
	column-gap: var(--qa-index-gap);
	align-items: baseline;
	padding-block: var(--space-xs);
	border-bottom: 1px solid var(--color-line);
}

/* Faint, not accent. Eight repeated orange marks made the indices the first
   thing the eye landed on and pushed the component towards UI; they are
   navigational, and the eyebrow is now the section's only accent moment.
   Size and weight are unchanged — the colour alone does the work. */
.qa-check__index {
	font-size: var(--size-label);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	color: var(--color-fg-faint);
}

/* --size-body, not --size-body-lg: these are checkpoints to scan, not
   headline services. At the larger step eight rows made QA taller than
   Process, which is the section it is meant to punctuate. */
.qa-check__item-label {
	font-size: var(--size-body);
	line-height: 1.3;
	letter-spacing: -0.015em;
}

@media (max-width: 560px) {
	.qa-check {
		--qa-index: 3ch;
		--qa-index-gap: var(--space-xs);
	}
}
