.gallery-page {
	background: var(--paper);
	color: var(--ink);
}

.gallery-page-hero {
	position: relative;
	min-height: min(720px, 92svh);
	display: grid;
	align-items: end;
	overflow: hidden;
	background: var(--brand-ink);
	color: #fff;
}

.gallery-page-hero__media {
	position: absolute;
	inset: 0;
}

.gallery-page-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(180deg, rgba(5, 34, 29, 0.18), rgba(5, 34, 29, 0.72)),
		linear-gradient(90deg, rgba(5, 34, 29, 0.78), rgba(5, 34, 29, 0.18) 58%, rgba(5, 34, 29, 0.42));
}

.gallery-page-hero__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	transform: scale(1.02);
}

.gallery-page-hero__inner {
	position: relative;
	z-index: 1;
	width: 100%;
	display: grid;
	gap: 34px;
	padding-top: clamp(140px, 22vh, 230px);
	padding-bottom: clamp(48px, 8vw, 84px);
}

.gallery-page-hero__copy {
	max-width: 760px;
	display: grid;
	gap: 20px;
}

.gallery-page-hero .eyebrow {
	color: #e7c98a;
}

.gallery-page-hero h1 {
	margin: 0;
	max-width: 720px;
	color: #fff;
	font-family: var(--font-display);
	font-size: clamp(44px, 8vw, 104px);
	line-height: 0.92;
	font-weight: 520;
	letter-spacing: 0;
}

.gallery-page-hero h1 em {
	color: #e7c98a;
	font-style: italic;
}

.gallery-page-hero p {
	max-width: 560px;
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: clamp(17px, 2vw, 21px);
	line-height: 1.62;
}

.gallery-page-scroll {
	width: fit-content;
	min-height: 36px;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 0 14px;
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-radius: 999px;
	color: rgba(255, 255, 255, 0.86);
	background: rgba(255, 255, 255, 0.08);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	font-size: 12px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.gallery-page-scroll::before {
	content: "";
	width: 7px;
	height: 7px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(45deg) translateY(-2px);
}

.gallery-page-grid-section {
	padding: clamp(64px, 9vw, 118px) 0;
}

.gallery-page-head {
	display: grid;
	grid-template-columns: minmax(0, 0.9fr) minmax(280px, 0.65fr);
	gap: clamp(24px, 6vw, 88px);
	align-items: end;
	margin-bottom: clamp(28px, 5vw, 56px);
}

.gallery-page-head h2 {
	margin: 0;
	color: var(--brand-ink);
	font-family: var(--font-display);
	font-size: clamp(34px, 5vw, 64px);
	line-height: 1;
	font-weight: 520;
}

.gallery-page-head p {
	margin: 0;
	color: var(--muted);
	font-size: 16px;
	line-height: 1.7;
}

.gallery-page-grid {
	columns: 4 240px;
	column-gap: clamp(12px, 1.6vw, 20px);
}

.gallery-page-card {
	position: relative;
	margin: 0;
	margin-bottom: clamp(12px, 1.6vw, 20px);
	overflow: hidden;
	border-radius: 8px;
	background: var(--surface-2);
	box-shadow: 0 16px 38px rgba(7, 45, 39, 0.08);
	break-inside: avoid;
	transform: translateZ(0);
}

.gallery-page-card__button {
	position: relative;
	width: 100%;
	display: block;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: zoom-in;
	text-align: left;
}

.gallery-page-card img {
	width: 100%;
	display: block;
	height: auto;
	transition: transform 520ms ease, filter 520ms ease;
}

.gallery-page-card figcaption {
	position: absolute;
	inset: auto 12px 12px;
	max-width: calc(100% - 24px);
	border-radius: 999px;
	padding: 8px 11px;
	background: rgba(5, 34, 29, 0.74);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 220ms ease, transform 220ms ease;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.gallery-page-card:hover img,
.gallery-page-card:focus-within img {
	transform: scale(1.045);
	filter: saturate(1.05);
}

.gallery-page-card:hover figcaption,
.gallery-page-card:focus-within figcaption {
	opacity: 1;
	transform: translateY(0);
}

.gallery-page-card__button:focus-visible {
	outline: 3px solid var(--accent);
	outline-offset: -3px;
}

.gallery-page-empty {
	padding: 28px;
	border: 1px dashed rgba(7, 92, 80, 0.28);
	border-radius: 8px;
	background: var(--surface);
	color: var(--muted);
}

.gallery-lightbox[hidden] {
	display: none;
}

.gallery-lightbox {
	position: fixed;
	inset: 0;
	z-index: 10020;
	display: grid;
	place-items: center;
	padding: clamp(16px, 4vw, 40px);
}

.gallery-lightbox__backdrop {
	position: absolute;
	inset: 0;
	border: 0;
	background: rgba(4, 20, 17, 0.84);
	cursor: zoom-out;
}

.gallery-lightbox__panel {
	position: relative;
	z-index: 1;
	width: min(100%, 1120px);
	max-height: min(88vh, 900px);
	display: grid;
	gap: 12px;
	color: #fff;
}

.gallery-lightbox__panel img {
	width: 100%;
	max-height: 82vh;
	display: block;
	object-fit: contain;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.06);
	box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
}

.gallery-lightbox__panel p {
	margin: 0;
	color: rgba(255, 255, 255, 0.86);
	font-size: 14px;
	font-weight: 700;
}

.gallery-lightbox__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	width: 42px;
	height: 42px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(255, 255, 255, 0.24);
	border-radius: 50%;
	background: rgba(5, 34, 29, 0.72);
	color: #fff;
	font-size: 30px;
	line-height: 1;
	cursor: pointer;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

body.gallery-lightbox-open {
	overflow: hidden;
}

@media (max-width: 980px) {
	.gallery-page-head {
		grid-template-columns: 1fr;
	}

	.gallery-page-grid {
		columns: 3 200px;
	}
}

@media (max-width: 640px) {
	.gallery-page-hero {
		min-height: 86svh;
	}

	.gallery-page-hero__media::after {
		background: linear-gradient(180deg, rgba(5, 34, 29, 0.18), rgba(5, 34, 29, 0.84));
	}

	.gallery-page-hero__inner {
		padding-top: 118px;
		padding-bottom: 42px;
	}

	.gallery-page-hero h1 {
		font-size: clamp(42px, 15vw, 66px);
	}

	.gallery-page-grid {
		columns: 2 140px;
		column-gap: 10px;
	}

	.gallery-page-card {
		margin-bottom: 10px;
		border-radius: 7px;
	}

	.gallery-page-card figcaption {
		opacity: 1;
		transform: none;
		inset: auto 8px 8px;
		max-width: calc(100% - 16px);
		border-radius: 7px;
		font-size: 11px;
	}

	.gallery-lightbox {
		padding: 10px;
	}

	.gallery-lightbox__close {
		top: 10px;
		right: 10px;
	}
}

@media (max-width: 420px) {
	.gallery-page-grid {
		columns: 1;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gallery-page-card img,
	.gallery-page-card figcaption {
		transition: none;
	}
}
