/* Photo grid and its lightbox. Tiles are portrait, as the studio's own photos are. */

.gallery__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr));
	gap: var(--space-15);
	padding: 0;
	list-style: none;
}

.gallery__link {
	display: block;
	aspect-ratio: 3 / 4;
	overflow: hidden;
	border-radius: var(--radius-sm);
	background-color: var(--color-bg-band);
}

.gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform var(--duration-slow) var(--ease);
}

.gallery__link:hover .gallery__img,
.gallery__link:focus-visible .gallery__img {
	transform: scale(1.04);
}

.lightbox {
	width: 100%;
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: var(--space-2);
	border: 0;
	background: transparent;
	color: var(--tst-white);
}

.lightbox::backdrop {
	background-color: rgb(var(--tst-ink-rgb) / 0.92);
}

.lightbox[open] {
	display: grid;
	grid-template-rows: auto minmax(0, 1fr) auto;
	gap: var(--space-2);
}

.lightbox__bar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: var(--font-2);
}

.lightbox__stage {
	display: grid;
	place-items: center;
	min-height: 0;
}

.lightbox__img {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.lightbox__nav {
	display: flex;
	justify-content: center;
	gap: var(--space-2);
}

.lightbox__btn {
	display: inline-grid;
	place-items: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: var(--border-hairline) solid rgb(255 255 255 / 0.5);
	border-radius: var(--radius-pill);
	background: transparent;
	color: var(--tst-white);
	--focus-color: var(--tst-white);
}

.lightbox__btn svg {
	width: 1.25rem;
	height: 1.25rem;
}

.lightbox__btn:hover,
.lightbox__btn:focus-visible {
	background-color: rgb(255 255 255 / 0.12);
}
