/**
 * VA work blocks. Tokens come from the active theme's theme.json; each var()
 * carries the brand value as a fallback so the blocks still read if the
 * theme changes. --va-halftone is set by the theme.
 */

.va-work-list,
.va-work-grid,
.va-lightbox,
.va-facts,
.va-why,
.va-image-group,
.va-next,
.va-filter {
	--ink: var(--wp--preset--color--ink, #141312);
	--paper: var(--wp--preset--color--paper, #f1ede4);
	--rocket: var(--wp--preset--color--rocket, #ff4b46);
	--hair: 1px solid var(--wp--preset--color--stone, #b4ac9f);
	--rule: 2px solid var(--ink);
	--ease: var(--wp--custom--ease--snap, cubic-bezier(.2, .9, .2, 1));
}

.va-micro,
.va-filter__chip,
.va-facts dt,
.va-chip {
	font-family: var(--wp--preset--font-family--caption, Inter, sans-serif);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	line-height: 1.5;
}

.va-micro {
	color: var(--wp--preset--color--charcoal, #3d3934);
	margin: 0;
}

.va-micro--rocket {
	color: var(--wp--preset--color--rocket, #ff4b46);
}

/* Media boxes: ratio on the box, image fills it. */
.va-tile__media,
.va-feature__media,
.va-next__media,
.va-image-group__main {
	position: relative;
	display: block;
	overflow: hidden;
	background: var(--wp--preset--color--paper-warm, #e9e2d3);
}

.va-tile__media img,
.va-feature__media img,
.va-next__media img,
.va-image-group__main img,
.va-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.va-placeholder {
	background: repeating-linear-gradient(135deg, var(--wp--preset--color--paper-warm, #e9e2d3) 0 14px, var(--wp--preset--color--linen, #e5dfd2) 14px 28px);
}

/* Tile */
.va-tile {
	display: flex;
	flex-direction: column;
	gap: 14px;
	color: inherit;
	text-decoration: none;
}

.va-tile[hidden] {
	display: none;
}

.va-tile__media {
	aspect-ratio: 4 / 5;
}

.va-tile__media::after {
	content: "";
	position: absolute;
	inset: 0;
	outline: 3px solid transparent;
	outline-offset: -3px;
	transition: outline-color var(--wp--custom--duration--fast, 120ms) var(--ease);
	pointer-events: none;
}

.va-tile:hover .va-tile__media::after,
.va-tile:focus-visible .va-tile__media::after {
	outline-color: var(--rocket);
}

.va-tile:focus-visible {
	outline: none;
}

.va-chip {
	position: absolute;
	top: 14px;
	left: 14px;
	z-index: 1;
	background: var(--ink);
	color: var(--paper);
	padding: 5px 9px;
	font-size: 10px;
	font-weight: 600;
}

.va-tile__row,
.va-feature__row {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px 16px;
	border-top: var(--hair);
	padding-top: 12px;
}

.va-tile__title {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, Besley, serif);
	font-size: 22px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
}

.va-tile .va-micro {
	white-space: nowrap;
}

.va-tile:hover .va-tile__title {
	color: var(--rocket);
}

/* Feature */
.va-feature {
	display: flex;
	flex-direction: column;
	gap: 16px;
	color: inherit;
}

.va-feature__media {
	aspect-ratio: 21 / 9;
}

.va-feature__row {
	padding-top: 14px;
}

.va-feature__title {
	font-family: var(--wp--preset--font-family--heading, Besley, serif);
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 600;
	line-height: 1.2;
}

.va-feature:hover .va-feature__title {
	color: var(--rocket);
}

/* Pair: two tiles, the second pushed down. */
.va-work-list.is-layout-pair {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
	gap: clamp(48px, 8vw, 120px);
	align-items: start;
}

.va-work-list.is-layout-pair > .va-tile:nth-child(2),
.va-work-list.is-layout-pair > .va-workcard:nth-child(2) {
	padding-top: clamp(0px, 12vw, 200px);
}

/* Grid */
.va-work-list.is-layout-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
	gap: clamp(48px, 5vw, 80px) clamp(24px, 3vw, 48px);
}

/* Index head */
.va-work-count {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, Vank, Impact, sans-serif);
	font-size: clamp(48px, 6vw, 96px);
	line-height: .9;
	color: var(--wp--preset--color--rocket, #ff4b46);
}

.va-filter {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	border-top: var(--rule);
	padding-top: 20px;
}

.va-filter__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.va-filter__chip {
	padding: 9px 14px;
	border: 2px solid var(--ink);
	color: var(--ink);
	font-weight: 600;
	letter-spacing: .18em;
	transition: background-color var(--wp--custom--duration--fast, 120ms) var(--ease), color var(--wp--custom--duration--fast, 120ms) var(--ease);
}

.va-filter__chip:hover {
	color: var(--rocket);
}

.va-filter__chip.is-active {
	background: var(--ink);
	color: var(--paper);
}

/* Case study: kicker + facts */
.va-kicker {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 24px;
	align-items: baseline;
	font-family: var(--wp--preset--font-family--caption, Inter, sans-serif);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
}

.va-kicker a {
	color: var(--wp--preset--color--charcoal, #3d3934);
}

.va-kicker__accent {
	color: var(--wp--preset--color--rocket, #ff4b46);
	font-weight: 700;
}

.va-facts {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
	gap: 20px 40px;
	margin: 0;
	border-top: var(--rule);
	padding-top: 20px;
}

.va-facts div {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.va-facts dt {
	color: var(--wp--preset--color--charcoal, #3d3934);
}

.va-facts dd {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, Besley, serif);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
}

/* Case study: WHY? */
.va-why {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	gap: 32px clamp(40px, 6vw, 96px);
	align-items: start;
}

.va-why__label {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.va-why__word {
	margin: 0;
	font-family: var(--wp--preset--font-family--display, Vank, Impact, sans-serif);
	font-weight: 400;
	font-size: clamp(96px, 12vw, 200px);
	line-height: .88;
	text-transform: uppercase;
}

.va-why__copy {
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-width: 62ch;
	padding-top: clamp(0px, 2vw, 40px);
}

.va-why__copy p {
	margin: 0;
	font-size: 19px;
	line-height: 1.7;
	color: var(--wp--preset--color--charcoal, #3d3934);
	text-wrap: pretty;
}

.va-why__copy .va-why__lead {
	font-family: var(--wp--preset--font-family--heading, Besley, serif);
	font-size: clamp(26px, 2.4vw, 34px);
	font-weight: 500;
	line-height: 1.3;
	color: var(--ink);
}

/* Case study: image group */
.va-image-group {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
	gap: clamp(12px, 2vw, 24px);
}

.va-image-group__main {
	aspect-ratio: 4 / 5;
}

.va-image-group__panels {
	display: flex;
	flex-direction: column;
	gap: clamp(12px, 2vw, 24px);
}

.va-image-group__panel {
	flex: 1;
	min-height: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(24px, 4vw, 64px);
	border: var(--hair);
}

.va-image-group__panel img {
	display: block;
	max-width: min(320px, 70%);
	max-height: 160px;
	width: auto;
	height: auto;
	object-fit: contain;
}

.va-image-group__panel.is-halftone {
	border: 0;
	background: var(--va-halftone, #141312) center / cover;
}

.va-image-group__chip {
	background: var(--ink);
	padding: clamp(16px, 2vw, 28px);
}

.va-image-group__chip img {
	max-width: 180px;
	max-height: 80px;
}

/* Case study: next */
.va-next {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	gap: 32px clamp(40px, 6vw, 96px);
	align-items: end;
	padding-block: clamp(96px, 12vw, 180px);
	border-bottom: var(--rule);
	color: inherit;
}

.va-next__label {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.va-next__title {
	font-family: var(--wp--preset--font-family--display, Vank, Impact, sans-serif);
	font-size: clamp(64px, 9vw, 150px);
	line-height: .88;
	text-transform: uppercase;
}

.va-next:hover .va-next__title {
	color: var(--rocket);
}

.va-next__media {
	aspect-ratio: 16 / 10;
}

/* Case study: quote band (shares the theme's halftone band look). */
.va-band.is-quote {
	position: relative;
	overflow: hidden;
	margin: 0;
	display: flex;
	justify-content: flex-end;
	padding: clamp(56px, 8vw, 140px) var(--wp--preset--spacing--gutter, 5vw);
	background: var(--va-halftone, #141312) center / cover;
}

.va-band__box {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 22px;
	max-width: 780px;
	padding: clamp(28px, 3.5vw, 52px);
	background: var(--wp--preset--color--ink, #141312);
	color: var(--wp--preset--color--paper, #f1ede4);
}

.va-band__quote {
	margin: 0;
	font-family: var(--wp--preset--font-family--heading, Besley, serif);
	font-style: italic;
	font-weight: 500;
	font-size: clamp(30px, 3.4vw, 52px);
	line-height: 1.15;
	text-wrap: balance;
}

.va-band__quote p {
	margin: 0;
}

.va-band .va-micro {
	color: var(--wp--preset--color--stone, #b4ac9f);
}

.va-empty-hint {
	padding: 16px;
	border: 1px dashed currentColor;
	font-size: 14px;
}

/* Case study: hero */
.va-banner {
	position: relative;
	margin: 0;
	aspect-ratio: 21 / 9;
	overflow: hidden;
	background: var(--wp--preset--color--paper-warm, #e9e2d3);
}

.va-banner img,
.va-banner video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* ------------------------------------------------------------------
 * Relaunch card: feature image, SVG logo centred over it. A button that
 * opens the lightbox (includes/cards.php, assets/lightbox.js).
 * ------------------------------------------------------------------ */

.va-workcard {
	margin: 0;
}

.va-workcard__title {
	margin: 0;
	font: inherit;
}

.va-workcard__open {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: block;
	width: 100%;
	cursor: zoom-in;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	background: var(--wp--preset--color--paper-warm, #e9e2d3);
	border: 2px solid var(--ink);
	box-shadow: 6px 6px 0 var(--ink);
	transition: box-shadow var(--wp--custom--duration--fast, 120ms) var(--ease), transform var(--wp--custom--duration--fast, 120ms) var(--ease);
}

.va-workcard.is-feature .va-workcard__open {
	aspect-ratio: 21 / 9;
}

.va-workcard__open:disabled {
	cursor: default;
}

.va-workcard__media,
.va-workcard__media img,
.va-workcard__media .va-placeholder {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.va-workcard__media img {
	transition: transform 600ms var(--ease);
}

/* A soft scrim so a white or black logo holds on any photo. */
.va-workcard__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgb(20 19 18 / .28);
	transition: background-color var(--wp--custom--duration--fast, 120ms) var(--ease);
}

.va-workcard__open:has(.is-tone-black) .va-workcard__media::after,
.va-workcard__open:has(.is-tone-original) .va-workcard__media::after {
	background: rgb(241 237 228 / .18);
}

.va-workcard__logo,
.va-workcard__name {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: grid;
	place-items: center;
	padding: 18%;
	pointer-events: none;
}

.va-workcard__logo img {
	display: block;
	width: 100%;
	height: 100%;
	max-height: 40%;
	object-fit: contain;
	transition: transform 600ms var(--ease);
}

/* Percentage padding is measured from the width, which on a 21:9 card eats
   most of the height; inset the wide card by its height instead. */
.va-workcard.is-feature .va-workcard__logo,
.va-workcard.is-feature .va-workcard__name {
	padding: 0;
}

.va-workcard.is-feature .va-workcard__logo img {
	width: 36%;
	height: 45%;
	max-height: none;
}

.va-workcard__logo.is-tone-white img {
	filter: brightness(0) invert(1) drop-shadow(0 1px 12px rgb(20 19 18 / .25));
}

.va-workcard__logo.is-tone-black img {
	filter: brightness(0);
}

.va-workcard__name {
	color: var(--wp--preset--color--white, #fff);
	font-family: var(--wp--preset--font-family--display, Vank, Impact, sans-serif);
	font-size: clamp(28px, 3vw, 44px);
	line-height: 1;
	text-align: center;
	text-transform: uppercase;
}

.va-workcard__open:not(:disabled):hover,
.va-workcard__open:focus-visible {
	box-shadow: 10px 10px 0 var(--rocket);
	transform: translate(-2px, -2px);
}

.va-workcard__open:not(:disabled):hover .va-workcard__media img,
.va-workcard__open:focus-visible .va-workcard__media img {
	transform: scale(1.04);
}

.va-workcard__open:focus-visible {
	outline: 3px solid var(--rocket);
	outline-offset: 4px;
}

/* Work grid block: always constrained to the theme's wide size, so the
   cards hold the same width wherever the block sits (it's usually inside a
   full-width section with gutter padding). */
.va-work-grid {
	--va-cols: 4;
	box-sizing: border-box;
	width: 100%;
	max-width: var(--wp--style--global--wide-size, 1600px);
	margin-inline: auto !important;
}

.va-work-grid__heading {
	margin: 0 0 clamp(24px, 3vw, 40px);
}

.va-work-grid__list {
	display: grid;
	grid-template-columns: repeat(var(--va-cols), minmax(0, 1fr));
	gap: clamp(24px, 3vw, 48px);
}

@media (max-width: 1280px) {
	.va-work-grid__list {
		grid-template-columns: repeat(min(var(--va-cols), 3), minmax(0, 1fr));
	}
}

@media (max-width: 960px) {
	.va-work-grid__list {
		grid-template-columns: repeat(min(var(--va-cols), 2), minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.va-work-grid__list {
		grid-template-columns: minmax(0, 1fr);
	}
}

.va-empty-hint {
	padding: 16px;
	border: 1px dashed var(--wp--preset--color--stone, #b4ac9f);
	font-family: var(--wp--preset--font-family--caption, Inter, sans-serif);
	font-size: 13px;
}

/* ------------------------------------------------------------------
 * Lightbox
 * ------------------------------------------------------------------ */

html.va-lightbox-open {
	overflow: hidden;
}

.va-lightbox {
	box-sizing: border-box;
	width: 100vw;
	max-width: none;
	height: 100dvh;
	max-height: none;
	margin: 0;
	padding: clamp(12px, 2vw, 24px) clamp(16px, 3vw, 40px);
	border: 0;
	background: var(--ink);
	color: var(--paper);
	display: none;
	grid-template-columns: auto minmax(0, 1fr) auto;
	grid-template-rows: auto minmax(0, 1fr) auto;
	grid-template-areas:
		"bar bar bar"
		"prev stage next"
		"summary summary summary";
	gap: clamp(12px, 2vw, 24px);
	align-items: center;
}

.va-lightbox[open] {
	display: grid;
}

.va-lightbox::backdrop {
	background: var(--ink);
}

.va-lightbox__bar {
	grid-area: bar;
	display: flex;
	align-items: flex-start;
	gap: 16px 24px;
	border-bottom: 1px solid rgb(241 237 228 / .2);
	padding-bottom: 12px;
}

.va-lightbox__heading {
	flex: 1;
	min-width: 0;
}

.va-lightbox__title {
	margin: 0;
	color: inherit;
	font-family: var(--wp--preset--font-family--display, Vank, Impact, sans-serif);
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1;
	text-transform: uppercase;
}

.va-lightbox__meta,
.va-lightbox__count,
.va-lightbox__caption {
	margin: 6px 0 0;
	font-family: var(--wp--preset--font-family--caption, Inter, sans-serif);
	font-size: 11px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: var(--wp--preset--color--sand, #d6cfc2);
}

.va-lightbox__count {
	margin: 0;
	align-self: center;
	white-space: nowrap;
}

.va-lightbox__close,
.va-lightbox__nav {
	all: unset;
	box-sizing: border-box;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	cursor: pointer;
	border: 2px solid var(--paper);
	color: var(--paper);
	font-family: var(--wp--preset--font-family--caption, Inter, sans-serif);
	font-size: 22px;
	line-height: 1;
	transition: background-color var(--wp--custom--duration--fast, 120ms) var(--ease), color var(--wp--custom--duration--fast, 120ms) var(--ease);
}

.va-lightbox__close:hover,
.va-lightbox__nav:hover {
	background: var(--rocket);
	border-color: var(--rocket);
	color: var(--ink);
}

.va-lightbox__close:focus-visible,
.va-lightbox__nav:focus-visible {
	outline: 3px solid var(--rocket);
	outline-offset: 3px;
}

.va-lightbox__nav[hidden] {
	display: none;
}

.va-lightbox__nav--prev {
	grid-area: prev;
}

.va-lightbox__nav--next {
	grid-area: next;
}

.va-lightbox.is-single .va-lightbox__stage {
	grid-column: 1 / -1;
}

.va-lightbox__stage {
	grid-area: stage;
	margin: 0;
	height: 100%;
	min-height: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 10px;
	touch-action: pan-y;
	user-select: none;
}

.va-lightbox__img {
	display: block;
	min-height: 0;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	flex: 0 1 auto;
	-webkit-user-drag: none;
}

.va-lightbox__caption {
	flex: none;
	margin: 0;
	text-align: center;
	text-transform: none;
	letter-spacing: .04em;
	font-size: 13px;
}

.va-lightbox__summary {
	grid-area: summary;
	margin: 0 auto;
	max-width: 70ch;
	text-align: center;
	font-family: var(--wp--preset--font-family--body, Figtree, sans-serif);
	font-size: 16px;
	line-height: 1.5;
	color: var(--wp--preset--color--linen, #e5dfd2);
}

.va-lightbox__summary[hidden],
.va-lightbox__caption[hidden],
.va-lightbox__meta[hidden] {
	display: none;
}

@media (max-width: 760px) {
	.va-lightbox {
		grid-template-columns: 1fr 1fr;
		grid-template-areas:
			"bar bar"
			"stage stage"
			"prev next"
			"summary summary";
		grid-template-rows: auto minmax(0, 1fr) auto auto;
	}

	.va-lightbox__nav--next {
		justify-self: end;
	}

	.va-lightbox__summary {
		font-size: 14px;
		max-height: 7.5em;
		overflow: auto;
	}
}

@media (prefers-reduced-motion: reduce) {
	.va-workcard__open,
	.va-workcard__media img,
	.va-workcard__logo img {
		transition: none;
	}

	.va-workcard__open:not(:disabled):hover,
	.va-workcard__open:focus-visible {
		transform: none;
	}

	.va-workcard__open:not(:disabled):hover .va-workcard__media img,
	.va-workcard__open:focus-visible .va-workcard__media img {
		transform: none;
	}
}
