/*
* L4NC3 Gallery (2026)
* Single-page gallery: CSS grid of lazy-loaded thumbnails, native <details>
* for "more info", and a lightweight lightbox (javascripts/gallery.js).
* Visual language follows the track archive: quiet labels, orange accents.
*/

:root {
	--gal-accent: #ff5500;
	--gal-accent-on-light: #b34700;
	--gal-label: "Cabin", "Segoe UI", system-ui, sans-serif;
}

/* #Grid
================================================== */

.art-grid {
	list-style: none;
	margin: 0 0 10px;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));   /* ~220px cells = thumbnails' native size */
	gap: 34px 20px;
	align-items: start;
}
@media only screen and (max-width: 959px) {
	.art-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media only screen and (max-width: 767px) {
	.art-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 14px; }
}

.art { margin: 0; min-width: 0; }

/* thumbnail button-link: same hover treatment as the archive's quilt tiles */
#wrapper_bottom a.art-open {
	display: block;
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: #1a1a1a;
	box-shadow: 1px 1px 9px rgba(0, 0, 0, 0.4);
	cursor: zoom-in;
	text-decoration: none;
}
.art-open img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .2s ease;
}
.art-open::after {
	content: "";
	position: absolute;
	inset: 0;
	background: rgba(255, 255, 255, 0);
	transition: background-color .2s ease;
}
.art-open:hover::after,
.art-open:focus-visible::after { background: rgba(255, 255, 255, 0.18); }
.art-open:hover img,
.art-open:focus-visible img { transform: scale(1.03); }
#wrapper_bottom a.art-open:focus-visible {
	outline: 2px solid var(--gal-accent-on-light);
	outline-offset: 3px;
}

.art-title {
	font-size: 15px;
	line-height: 1.3;
	margin: 11px 0 3px;
	color: #222;
}

/* #More info (native <details>)
================================================== */

.art-info summary {
	display: inline-block;
	list-style: none;
	cursor: pointer;
	padding: 3px 0;
	font: 500 11px/1 var(--gal-label);
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #5a5a5a;
	text-decoration: underline dotted 1px;
	text-underline-offset: 3px;
	transition: color .15s ease;
}
.art-info summary::-webkit-details-marker { display: none; }
.art-info summary::after { content: " +"; }
.art-info[open] summary::after { content: " \2212"; }
.art-info summary:hover {
	color: #000;
	text-decoration-style: solid;
	text-decoration-thickness: 2px;
	text-decoration-color: var(--gal-accent);
}
.art-info summary:focus-visible {
	outline: 2px solid var(--gal-accent-on-light);
	outline-offset: 2px;
	border-radius: 2px;
}
.art-info-body {
	margin-top: 8px;
	font-size: 13px;
	line-height: 1.5;
	color: #444;
}
.art-info-body p { margin: 0 0 6px; }
.art-info-body .res { border-top: 1px dotted #c5c5c6; padding-top: 6px; }

/* #Lightbox
================================================== */

body.lb-open { overflow: hidden; }

dialog.lightbox {
	position: fixed;
	inset: 0;
	width: 100vw;
	height: 100vh;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	color: #f2f2f2;
	overflow: hidden;
}
dialog.lightbox::backdrop {
	background: rgba(0, 0, 0, 0.88);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}
.lb-stage {
	position: absolute;
	inset: 0;
	margin: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 92px 100px;
	box-sizing: border-box;
}
.lb-image {
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
	opacity: 0;
	transform: scale(.97);
	transition: opacity .2s ease, transform .24s cubic-bezier(.2, .75, .2, 1);
	user-select: none;
	-webkit-user-drag: none;
}
.lb-image.ready { opacity: 1; transform: none; }

.lb-caption {
	position: absolute;
	left: 50%;
	bottom: 22px;
	transform: translateX(-50%);
	max-width: calc(100vw - 48px);
	box-sizing: border-box;
	display: grid;
	gap: 4px;
	text-align: center;
	padding: 10px 18px;
	background: rgba(0, 0, 0, 0.72);
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 2px;
}
.lb-title {
	font: 400 20px/1.15 "Play", "Cabin", sans-serif;
	color: #f2f2f2;
}
.lb-position {
	font: 500 11px/1 var(--gal-label);
	letter-spacing: .14em;
	color: #b4b4b4;
}

.lb-btn {
	position: absolute;
	z-index: 2;
	display: grid;
	place-items: center;
	padding: 0;
	font: 400 26px/1 var(--gal-label);
	color: #f2f2f2;
	background: rgba(0, 0, 0, 0.6);
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 2px;
	cursor: pointer;
	transition: color .15s ease, border-color .15s ease;
}
.lb-btn:hover { color: var(--gal-accent); border-color: var(--gal-accent); }
.lb-btn:focus-visible { outline: 2px solid var(--gal-accent); outline-offset: 2px; }
.lb-close { top: 18px; right: 18px; width: 44px; height: 44px; }
.lb-nav { top: 50%; transform: translateY(-50%); width: 48px; height: 64px; font-size: 30px; }
.lb-prev { left: 18px; }
.lb-next { right: 18px; }

@media only screen and (max-width: 767px) {
	.lb-stage { padding: 64px 12px 110px; }
	.lb-nav { top: auto; bottom: 24px; transform: none; width: 44px; height: 44px; }
	.lb-prev { left: 12px; }
	.lb-next { right: 12px; }
	.lb-caption { bottom: 22px; max-width: calc(100vw - 132px); padding: 8px 12px; }
	.lb-title { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
	.art-open img, .lb-image { transition: none; }
}
