/* ===========================================================================
   GALLERY PAGE — page-gallery.php and templates/sections/gallery-page-*.php
   Loaded on that page only (inc/enqueue.php), after responsive.css, and every
   rule is scoped to it (.vub-page-gallery on <body>), so no other page can
   change. Its media queries live here with it for the same reason.

   The homepage's own background behind it all — its charcoal planes, halftone
   streaks and fine rules, the red dots shimmering — with white headings, grey
   supporting text and the site's one red. Square corners, narrow gaps between
   photographs.
   =========================================================================== */

.vub-page-gallery {
	/* The frame the photographs sit in: wider than the site's text column,
	   with a narrower gutter — 40px on a desktop, never under 20px. */
	--vub-gallery-gutter: max(1.25rem, var(--vub-gutter) * 0.42);
	/* Between photographs, and between the featured strip's panels. */
	--vub-gallery-gap: clamp(0.5rem, 0.9vw, 0.875rem);
	/* The homepage gallery's lean: its frames stand about 23° off upright.
	   tan(23°), so a panel's slanted side runs this far across per unit down. */
	--vub-gallery-tan: 0.4245;
	--vub-gallery-strip-h: clamp(10rem, 21vw, 19.5rem);
}

/* The hidden attribute wins over the display the components below set. */
.vub-page-gallery .vub-gallery-page [hidden] { display: none !important; }

.vub-page-gallery .vub-gallery-page {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	overflow: clip;
	background-color: var(--vub-black);
}

.vub-page-gallery .vub-gallery-frame {
	position: relative;
	max-width: var(--vub-container-wide);
	margin-inline: auto;
	padding-inline: var(--vub-gallery-gutter);
}

/* ---------------------------------------------------------------------------
   The ground: the homepage's background
   templates/sections/gallery-page-ground.php — the homepage gallery's own
   band picture, at the size the homepage shows it: about 0.85 of its own
   size on a desktop and 1.25 on a phone, never narrower than the screen,
   centred. Laid out from the width alone and carried on in mirrored copies,
   so "Load more" shows more of it instead of resizing it. Each copy keeps the
   picture's shape, so shimmer.js's fit (cover, centred, in the copy) is the
   picture exactly and every live dot lands on its printed one. The run drifts
   with --vub-parallax, which main.js writes on <main> (.vub-parallax), as a
   homepage band's picture drifts, with room above it to drift into; <main>'s
   .vub-parallax--seamless fades it to black at the top and the bottom.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-page {
	/* The light scrim the homepage's bands take: the picture is dark already. */
	--vub-parallax-scrim: rgba(8, 9, 10, 0.15);
	--vub-ground-scale: 1.25;
	--vub-ground-drift: calc(var(--vub-ground-scale) * 18rem);
}

.vub-page-gallery .vub-gallery-ground {
	position: absolute;
	inset: 0;
	z-index: -2;
	overflow: hidden;
	pointer-events: none;
}

.vub-page-gallery .vub-gallery-ground__run {
	position: absolute;
	top: calc(var(--vub-ground-drift) * -1);
	left: 50%;
	width: max(100%, calc(var(--vub-ground-w) * var(--vub-ground-scale) * 1px));
	/* Up by the rows above the page's top ('from' in vub_gallery_backdrop()),
	   as a share of the run's own height, so it holds at any width. */
	--vub-ground-shift: calc(-100% * var(--vub-ground-from, 0) / (var(--vub-ground-copies, 1) * var(--vub-ground-h)));
	transform: translate3d(-50%, calc(var(--vub-ground-shift) + var(--vub-parallax, 0) * var(--vub-ground-drift)), 0);
	will-change: transform;
}

.vub-page-gallery .vub-gallery-ground__copy {
	position: relative;
	aspect-ratio: var(--vub-ground-w) / var(--vub-ground-h);
}

/* Every other copy upside down, so each join is the picture meeting its own
   reflection: the planes and streaks run straight on across it. */
.vub-page-gallery .vub-gallery-ground__copy--mirrored { transform: scaleY(-1); }

.vub-page-gallery .vub-gallery-ground__copy picture { display: contents; }

.vub-page-gallery .vub-gallery-ground__copy img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
}

.vub-page-gallery .vub-gallery-ground .vub-shimmer {
	position: absolute;
	inset: 0;
}

/* The words over it carry a dark halo, as the About page's do over its band,
   so they stay steady wherever a red streak passes behind them. */
.vub-page-gallery .vub-gallery-intro__head,
.vub-page-gallery .vub-gallery-filters__btn,
.vub-page-gallery .vub-gallery-more__btn {
	text-shadow:
		0 1px 2px rgba(8, 9, 10, 0.85),
		0 0 18px rgba(8, 9, 10, 0.75);
}

.vub-page-gallery .vub-gallery-filters__btn[aria-pressed="true"],
.vub-page-gallery .vub-gallery-more__btn:hover,
.vub-page-gallery .vub-gallery-more__btn:focus-visible { text-shadow: none; }

/* ---------------------------------------------------------------------------
   Halftone dots at the closing banner's two ends
   Each field of dots is three layers of one grid of dots — large, medium and
   small, all on the same centres — each faded out from the field's edge over
   a longer reach. Close to the edge the large dots show; further in only the
   medium, then the small, then nothing: the dots shrink as they fade, as a
   printed halftone does. The fields' shapes are set with the banner below.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-dots {
	--vub-dot-colour: rgba(216, 31, 42, 0.8);
	--vub-dot-step: 7px;
	/* Where the field is densest, and how far its smallest dots reach from
	   there — kept inside the field's box, so it fades out rather than
	   stopping at a straight edge. */
	--vub-dot-at: 100% 30%;
	--vub-dot-rx: 100%;
	--vub-dot-ry: 70%;

	position: absolute;
	display: block;
	pointer-events: none;
}

.vub-page-gallery .vub-dots > span {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(circle, var(--vub-dot-colour) 0 var(--vub-dot-r), transparent calc(var(--vub-dot-r) + 0.6px));
	background-size: var(--vub-dot-step) var(--vub-dot-step);
	-webkit-mask-image: radial-gradient(ellipse calc(var(--vub-dot-rx) * var(--vub-dot-k)) calc(var(--vub-dot-ry) * var(--vub-dot-k)) at var(--vub-dot-at), #000 20%, transparent 100%);
	mask-image: radial-gradient(ellipse calc(var(--vub-dot-rx) * var(--vub-dot-k)) calc(var(--vub-dot-ry) * var(--vub-dot-k)) at var(--vub-dot-at), #000 20%, transparent 100%);
}

.vub-page-gallery .vub-dots > span:nth-child(1) { --vub-dot-r: 1.75px; --vub-dot-k: 0.38; }
.vub-page-gallery .vub-dots > span:nth-child(2) { --vub-dot-r: 1.15px; --vub-dot-k: 0.68; }
.vub-page-gallery .vub-dots > span:nth-child(3) { --vub-dot-r: 0.7px;  --vub-dot-k: 1; }

/* ---------------------------------------------------------------------------
   The introduction
   Its words keep the site's own text column (--vub-gutter), as on every other
   page; the strip under them runs out to the wider photo frame.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-intro {
	padding-top: clamp(1.75rem, 3.5vw, 3rem);
}

.vub-page-gallery .vub-gallery-intro__head {
	padding-inline: max(0px, var(--vub-gutter) - var(--vub-gallery-gutter));
}

.vub-page-gallery .vub-breadcrumb { margin-bottom: clamp(1rem, 2vw, 1.5rem); }

.vub-page-gallery .vub-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vub-space-3xs) 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--vub-text-xs);
	letter-spacing: var(--vub-tracking-wide);
	color: var(--vub-text-faint);
}

.vub-page-gallery .vub-breadcrumb__item { margin: 0; }

.vub-page-gallery .vub-breadcrumb__item + .vub-breadcrumb__item::before {
	content: "/";
	margin-inline: 0.6em;
	color: var(--vub-text-faint);
}

.vub-page-gallery .vub-breadcrumb a {
	color: var(--vub-text-muted);
	text-decoration: none;
	transition: var(--vub-transition-color);
}

.vub-page-gallery .vub-breadcrumb a:hover,
.vub-page-gallery .vub-breadcrumb a:focus-visible { color: var(--vub-white); }

.vub-page-gallery .vub-breadcrumb [aria-current="page"] { color: var(--vub-text); }

/* The eyebrows here are spaced as wide as the reference has them. */
.vub-page-gallery .vub-gallery-page .vub-eyebrow { letter-spacing: 0.3em; }

.vub-page-gallery .vub-gallery-intro__title {
	margin: 0 0 0.3em;
	font-size: calc(var(--vub-text-3xl) * 1.2);
	line-height: var(--vub-leading-tight);
}

.vub-page-gallery .vub-gallery-intro__lead {
	margin: 0;
	font-size: var(--vub-text-lg);
	color: var(--vub-text-muted);
}

/* ---------------------------------------------------------------------------
   The featured strip
   Three panels edge to edge, each clipped to a parallelogram leaning like the
   homepage gallery's frames; the outer two keep their outside edge upright.
   Each slanted side runs --vub-gallery-slant across over the strip's height,
   and each panel after the first is pulled back under its neighbour by that
   much less the gap — so the gap between two slanted sides is the same at the
   top as at the bottom. The pictures stay upright and fill their panels.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-feature {
	--vub-gallery-slant: calc(var(--vub-gallery-strip-h) * var(--vub-gallery-tan));

	display: flex;
	height: var(--vub-gallery-strip-h);
	margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
	padding: 0;
	list-style: none;
}

.vub-page-gallery .vub-gallery-feature__panel {
	position: relative;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	clip-path: polygon(var(--vub-gallery-slant) 0, 100% 0, calc(100% - var(--vub-gallery-slant)) 100%, 0 100%);
}

.vub-page-gallery .vub-gallery-feature__panel + .vub-gallery-feature__panel {
	margin-left: calc(var(--vub-gallery-gap) - var(--vub-gallery-slant));
}

.vub-page-gallery .vub-gallery-feature__panel:first-child {
	clip-path: polygon(0 0, 100% 0, calc(100% - var(--vub-gallery-slant)) 100%, 0 100%);
}

.vub-page-gallery .vub-gallery-feature__panel:last-child {
	clip-path: polygon(var(--vub-gallery-slant) 0, 100% 0, 100% 100%, 0 100%);
}

.vub-page-gallery .vub-gallery-feature__panel:only-child { clip-path: none; }

.vub-page-gallery .vub-gallery-feature__link {
	position: absolute;
	inset: 0;
	display: block;
	overflow: hidden;
	background-color: var(--vub-surface-2);
}

.vub-page-gallery .vub-gallery-feature__link img,
.vub-page-gallery .vub-gallery-grid__link img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: var(--vub-photo-focus, 50% 50%);
	transition: transform 700ms var(--vub-ease-out);
}

/* The slant clips an outline away, so a focused panel is ringed from the
   inside: its top and bottom edges light up, with the open mark. */
.vub-page-gallery .vub-gallery-feature__link::after {
	content: "";
	position: absolute;
	inset: 0;
	box-shadow: inset 0 0 0 3px var(--vub-focus);
	opacity: 0;
	pointer-events: none;
}

.vub-page-gallery .vub-gallery-feature__link:focus-visible { outline: none; }
.vub-page-gallery .vub-gallery-feature__link:focus-visible::after { opacity: 1; }

/* The open mark sits in each panel's top right, clear of its slanted side. */
.vub-page-gallery .vub-gallery-feature .vub-gallery-expand {
	top: 0.75rem;
	right: calc(0.75rem + 3rem * var(--vub-gallery-tan));
	bottom: auto;
}

.vub-page-gallery .vub-gallery-feature__panel:last-child .vub-gallery-expand,
.vub-page-gallery .vub-gallery-feature__panel:only-child .vub-gallery-expand { right: 0.75rem; }

/* ---------------------------------------------------------------------------
   The filters
   Shown only with the script that works them (.vub-gallery-js on <html>, set
   inline by the grid's template). The chosen one is solid red.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-filters { display: none; }

.vub-gallery-js .vub-page-gallery .vub-gallery-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--vub-space-2xs) clamp(0.25rem, 1.2vw, 1rem);
	margin: clamp(2rem, 3.5vw, 3rem) 0 clamp(1.25rem, 2.2vw, 2rem);
}

.vub-page-gallery .vub-gallery-filters__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 2.5rem;
	margin: 0;
	padding: 0.5em 1.75em;
	border: var(--vub-border-width) solid transparent;
	border-radius: var(--vub-radius-button);
	background-color: transparent;
	box-shadow: none;
	font-family: var(--vub-font-body);
	font-size: var(--vub-text-xs);
	font-weight: var(--vub-weight-bold);
	line-height: 1;
	letter-spacing: var(--vub-tracking-wide);
	text-transform: uppercase;
	color: var(--vub-text);
	cursor: pointer;
	transition: var(--vub-transition-color);
}

.vub-page-gallery .vub-gallery-filters__btn:hover,
.vub-page-gallery .vub-gallery-filters__btn:focus-visible {
	border-color: var(--vub-border-strong);
	background-color: transparent;
	color: var(--vub-white);
}

.vub-page-gallery .vub-gallery-filters__btn[aria-pressed="true"],
.vub-page-gallery .vub-gallery-filters__btn[aria-pressed="true"]:hover,
.vub-page-gallery .vub-gallery-filters__btn[aria-pressed="true"]:focus-visible {
	border-color: var(--vub-red);
	background-color: var(--vub-red);
	color: var(--vub-white);
}

.vub-page-gallery .vub-gallery-filters__btn:focus-visible {
	outline: 2px solid var(--vub-focus);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   The grid
   One column on a phone, two on a tablet, three from 1024px. Every thumbnail
   is the same 4:3 box; each photograph keeps its own focus inside it.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--vub-gallery-gap);
	margin: clamp(1.5rem, 3vw, 2.25rem) 0 0;
	padding: 0;
	list-style: none;
}

/* With the filters above it, they set the gap. */
.vub-gallery-js .vub-page-gallery .vub-gallery-grid { margin-top: 0; }

.vub-page-gallery .vub-gallery-grid__item { margin: 0; }

.vub-gallery-js .vub-page-gallery .vub-gallery-grid__item.is-hidden { display: none; }

.vub-page-gallery .vub-gallery-grid__item.is-entering { animation: vub-gallery-enter var(--vub-duration-slow) var(--vub-ease-out) both; }

@keyframes vub-gallery-enter {
	from { opacity: 0; transform: translateY(0.5rem); }
	to   { opacity: 1; transform: none; }
}

.vub-page-gallery .vub-gallery-grid__link {
	position: relative;
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background-color: var(--vub-surface-2);
	color: var(--vub-white);
	text-decoration: none;
}

/* A restrained dark gradient along the foot, under the caption. */
.vub-page-gallery .vub-gallery-grid__link::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(0deg, rgba(8, 9, 10, 0.82) 0%, rgba(8, 9, 10, 0.4) 26%, rgba(8, 9, 10, 0) 52%);
	opacity: 0;
	transition: opacity var(--vub-duration-slow) var(--vub-ease);
	pointer-events: none;
}

.vub-page-gallery .vub-gallery-grid__caption {
	position: absolute;
	left: clamp(0.75rem, 1.4vw, 1.125rem);
	right: 3.75rem;
	bottom: clamp(0.75rem, 1.2vw, 1rem);
	z-index: 1;
	font-size: var(--vub-text-sm);
	font-weight: var(--vub-weight-medium);
	line-height: var(--vub-leading-snug);
	color: var(--vub-white);
	opacity: 0;
	transform: translateY(0.35rem);
	transition:
		opacity var(--vub-duration-slow) var(--vub-ease),
		transform var(--vub-duration-slow) var(--vub-ease-out);
}

/* The mark that says "this opens": a small square with corner brackets. */
.vub-page-gallery .vub-gallery-expand {
	position: absolute;
	right: clamp(0.625rem, 1.2vw, 0.875rem);
	bottom: clamp(0.625rem, 1.2vw, 0.875rem);
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border: 1px solid rgba(255, 255, 255, 0.55);
	background-color: rgba(8, 9, 10, 0.55);
	color: var(--vub-white);
	opacity: 0;
	transform: scale(0.9);
	transition:
		opacity var(--vub-duration-slow) var(--vub-ease),
		transform var(--vub-duration-slow) var(--vub-ease-out),
		background-color var(--vub-duration) var(--vub-ease),
		border-color var(--vub-duration) var(--vub-ease);
}

.vub-page-gallery .vub-gallery-expand svg {
	width: 1rem;
	height: 1rem;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
}

/* Pointed at or focused: the photograph eases in a little, the caption and
   the open mark come up. */
.vub-page-gallery .vub-gallery-grid__link:hover img,
.vub-page-gallery .vub-gallery-grid__link:focus-visible img,
.vub-page-gallery .vub-gallery-feature__link:hover img,
.vub-page-gallery .vub-gallery-feature__link:focus-visible img { transform: scale(1.04); }

.vub-page-gallery .vub-gallery-grid__link:hover::after,
.vub-page-gallery .vub-gallery-grid__link:focus-visible::after { opacity: 1; }

.vub-page-gallery .vub-gallery-grid__link:hover .vub-gallery-grid__caption,
.vub-page-gallery .vub-gallery-grid__link:focus-visible .vub-gallery-grid__caption {
	opacity: 1;
	transform: none;
}

.vub-page-gallery a:hover > .vub-gallery-expand,
.vub-page-gallery a:focus-visible > .vub-gallery-expand {
	opacity: 1;
	transform: none;
}

.vub-page-gallery a:hover > .vub-gallery-expand {
	border-color: var(--vub-red);
	background-color: var(--vub-red);
}

.vub-page-gallery .vub-gallery-grid__link:focus-visible {
	outline: 2px solid var(--vub-focus);
	outline-offset: 2px;
	border-radius: 0;
}

/* Screens that cannot hover show the caption and the open mark all the time,
   so nothing is kept behind a pointer they do not have. */
@media (hover: none) {
	.vub-page-gallery .vub-gallery-grid__link::after { opacity: 0.85; }

	.vub-page-gallery .vub-gallery-grid__caption,
	.vub-page-gallery .vub-gallery-expand {
		opacity: 1;
		transform: none;
	}

	/* Except over the featured strip, too small on a phone for three marks. */
	.vub-page-gallery .vub-gallery-feature .vub-gallery-expand { opacity: 0; }
}

/* ---------------------------------------------------------------------------
   Load more
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-more { display: none; }

.vub-gallery-js .vub-page-gallery .vub-gallery-more {
	display: flex;
	justify-content: center;
	margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.vub-page-gallery .vub-gallery-more__btn {
	min-width: min(100%, 17rem);
	padding-block: 1.1em;
	border-color: rgba(255, 255, 255, 0.55);
}

.vub-page-gallery .vub-gallery-more__btn:focus-visible {
	outline: 2px solid var(--vub-focus);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   The closing invitation
   A framed banner: the words on the left, the red button on the right, over a
   boxing photograph dimmed in from the right. Dots at both ends.
--------------------------------------------------------------------------- */
.vub-page-gallery .vub-gallery-cta {
	padding-block: clamp(2.5rem, 5vw, 4rem) clamp(3rem, 6vw, 5rem);
}

.vub-page-gallery .vub-gallery-cta__box {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	padding: clamp(2rem, 4vw, 3.25rem) clamp(1.5rem, 5vw, 4.5rem);
	border: var(--vub-rule);
	background-color: var(--vub-surface);
}

.vub-page-gallery .vub-gallery-cta__media {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: -2;
	width: min(58%, 48rem);
}

.vub-page-gallery .vub-gallery-cta__media img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	opacity: 0.5;
	filter: saturate(0.7);
}

/* The photograph comes up out of the banner's own ground, darkest under the
   words, and stays dim enough under the button. */
.vub-page-gallery .vub-gallery-cta__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image:
		linear-gradient(90deg, var(--vub-surface) 0%, rgba(16, 18, 20, 0.6) 38%, rgba(16, 18, 20, 0.2) 100%),
		linear-gradient(0deg, rgba(16, 18, 20, 0.55) 0%, rgba(16, 18, 20, 0) 45%);
}

.vub-page-gallery .vub-dots--cta-left,
.vub-page-gallery .vub-dots--cta-right {
	--vub-dot-colour: rgba(216, 31, 42, 0.7);
	--vub-dot-step: 6px;

	top: 0;
	bottom: 0;
	z-index: -1;
	width: clamp(3rem, 7vw, 7rem);
}

.vub-page-gallery .vub-dots--cta-left  { left: 0;  --vub-dot-at: 0% 60%;   --vub-dot-ry: 60%; }
.vub-page-gallery .vub-dots--cta-right { right: 0; --vub-dot-at: 100% 60%; --vub-dot-ry: 60%; }

.vub-page-gallery .vub-gallery-cta__body {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--vub-space-lg) var(--vub-space-xl);
}

.vub-page-gallery .vub-gallery-cta__text { max-width: 40rem; }

.vub-page-gallery .vub-gallery-cta__title {
	margin: 0 0 0.3em;
	font-size: calc(var(--vub-text-2xl) * 1.15);
	line-height: var(--vub-leading-tight);
}

.vub-page-gallery .vub-gallery-cta__lead {
	margin: 0;
	font-size: var(--vub-text-md);
	color: var(--vub-text-muted);
}

.vub-page-gallery .vub-gallery-cta__btn {
	padding: 1.15em 2em;
	white-space: nowrap;
}

.vub-page-gallery .vub-gallery-cta__btn svg {
	width: 1.1em;
	height: 1.1em;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	transition: transform var(--vub-duration) var(--vub-ease-out);
}

.vub-page-gallery .vub-gallery-cta__btn:hover svg,
.vub-page-gallery .vub-gallery-cta__btn:focus-visible svg { transform: translateX(3px); }

.vub-page-gallery .vub-gallery-cta__btn:focus-visible {
	outline: 2px solid var(--vub-focus);
	outline-offset: 3px;
}

/* ---------------------------------------------------------------------------
   Sizes
--------------------------------------------------------------------------- */
/* The ground at the homepage's sizes: 1.25 on a phone (above), its own size
   on a tablet, 0.85 from 1024px. */
@media (min-width: 600px) {
	.vub-page-gallery .vub-gallery-page { --vub-ground-scale: 1; }
}

@media (min-width: 1024px) {
	.vub-page-gallery .vub-gallery-page { --vub-ground-scale: 0.854; }
}

/* Phones: the filters close up, so they take two rows rather than three. */
@media (max-width: 559px) {
	.vub-gallery-js .vub-page-gallery .vub-gallery-filters { column-gap: 0.125rem; }

	.vub-page-gallery .vub-gallery-filters__btn { padding-inline: 0.9em; }
}

@media (min-width: 560px) {
	.vub-page-gallery .vub-gallery-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
	.vub-page-gallery .vub-gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Phones: the button goes under the words, and the photograph sits further
   back behind both. */
@media (max-width: 719px) {
	.vub-page-gallery .vub-gallery-cta__media { width: 100%; }

	.vub-page-gallery .vub-gallery-cta__media img { opacity: 0.32; }

	.vub-page-gallery .vub-gallery-cta__media::after {
		background-image: linear-gradient(90deg, rgba(16, 18, 20, 0.85) 0%, rgba(16, 18, 20, 0.45) 100%);
	}

	.vub-page-gallery .vub-gallery-cta__body {
		flex-direction: column;
		align-items: flex-start;
	}

	.vub-page-gallery .vub-gallery-cta__btn {
		width: 100%;
		white-space: normal;
	}

	.vub-page-gallery .vub-dots--cta-left { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.vub-page-gallery .vub-gallery-feature__link img,
	.vub-page-gallery .vub-gallery-grid__link img,
	.vub-page-gallery .vub-gallery-grid__link::after,
	.vub-page-gallery .vub-gallery-grid__caption,
	.vub-page-gallery .vub-gallery-expand,
	.vub-page-gallery .vub-gallery-cta__btn svg { transition: none; }

	.vub-page-gallery .vub-gallery-grid__link:hover img,
	.vub-page-gallery .vub-gallery-grid__link:focus-visible img,
	.vub-page-gallery .vub-gallery-feature__link:hover img,
	.vub-page-gallery .vub-gallery-feature__link:focus-visible img { transform: none; }

	.vub-page-gallery .vub-gallery-grid__item.is-entering { animation: none; }

	/* main.js does not drift it either; this only makes sure. */
	.vub-page-gallery .vub-gallery-ground__run { transform: translate3d(-50%, var(--vub-ground-shift), 0); }
}
