/* ==========================================================================
   QHF&B — Gallery page (layout + page components only)
   Tokens, .qh-* shared components and reveal behavior live in style.css.
   ========================================================================== */

/* Page-hero content sits above the ::before overlay */
.qh-hero--page .qh-hero-inner {
	position: relative;
	z-index: 1;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Filter chips
   -------------------------------------------------------------------------- */
.qh-filters {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px;
	margin-bottom: clamp(2.25rem, 5vw, 3.25rem);
}

.qh-filter {
	font-family: var(--qh-font-body);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--qh-cream);
	background: transparent;
	border: 1px solid var(--qh-line);
	padding: 11px 22px;
	cursor: pointer;
	transition: color .3s ease, border-color .3s ease, background-color .3s ease;
}

.qh-filter:hover {
	color: var(--qh-gold);
	border-color: var(--qh-gold);
}

.qh-filter.active,
.qh-filter[aria-pressed="true"] {
	background: var(--qh-gold);
	border-color: var(--qh-gold);
	color: var(--qh-ink);
}

/* --------------------------------------------------------------------------
   Grid — clean 3-col, gap 14px, 4:5 covers (2-col ≤980px, 1-col ≤680px)
   -------------------------------------------------------------------------- */
.qh-ggrid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 14px;
}

@media (min-width: 681px) {
	.qh-ggrid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 981px) {
	.qh-ggrid {
		grid-template-columns: repeat(3, 1fr);
	}
}

.qh-gitem {
	position: relative;
	overflow: hidden;
	margin: 0;
	background: var(--qh-surface);
	border: 1px solid var(--qh-line-soft);
}

.qh-gitem img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	transition: transform .6s ease;
}

.qh-gitem:hover img {
	transform: scale(1.04);
}

/* JS filter hide state (any of the common hide hooks) */
.qh-gitem.is-hidden,
.qh-gitem.hide,
.qh-gitem[hidden] {
	display: none;
}

/* Hover caption overlay — bottom gradient, badge + Playfair caption */
.qh-gitem-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-end;
	gap: 10px;
	margin: 0;
	padding: 20px;
	background: linear-gradient(to top, rgba(8, 6, 4, .88) 0%, rgba(8, 6, 4, .42) 42%, rgba(8, 6, 4, 0) 72%);
	opacity: 0;
	transition: opacity .45s ease;
}

.qh-gitem:hover .qh-gitem-overlay,
.qh-gitem:focus-within .qh-gitem-overlay {
	opacity: 1;
}

.qh-gitem-caption {
	font-family: var(--qh-font-display);
	font-size: 17px;
	font-weight: 500;
	line-height: 1.35;
	color: var(--qh-cream);
	transform: translateY(8px);
	transition: transform .45s ease;
}

.qh-gitem:hover .qh-gitem-caption,
.qh-gitem:focus-within .qh-gitem-caption {
	transform: none;
}

/* Touch devices: captions always readable */
@media (hover: none) {
	.qh-gitem-overlay {
		opacity: 1;
	}

	.qh-gitem-caption {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qh-gitem img,
	.qh-gitem-overlay,
	.qh-gitem-caption {
		transition: none;
	}

	.qh-gitem:hover img {
		transform: none;
	}

	.qh-gitem-overlay {
		opacity: 1;
	}

	.qh-gitem-caption {
		transform: none;
	}
}
