/* ============================================================
   Anderson Landscape — GALLERY PAGE BLOCK
   ============================================================ */

.gallery-page-block__kicker {
	font-family: var(--gp-font-sans);
	font-size: clamp(0.75rem, 1vw, 0.88rem);
	letter-spacing: 0.24em;
	font-weight: 500;
	text-transform: uppercase;
	color: var(--gp-forest);
}

/* ----- Hero ----- */
.gallery-page-block__hero {
	position: relative;
	width: 100%;
	height: 440px;
	overflow: hidden;
	background: #0c1410;
}

.gallery-page-block__hero-media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center 55%;
	animation: galleryPageHeroKenBurns 16s ease-out forwards;
}

.gallery-page-block__hero-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(7, 15, 11, 0.5) 0%,
		rgba(7, 15, 11, 0.3) 45%,
		rgba(7, 15, 11, 0.78) 100%
	);
}

.gallery-page-block__hero-content {
	position: absolute;
	left: 96px;
	bottom: 68px;
	max-width: 820px;
	z-index: 2;
	color: var(--gp-white);
}

.gallery-page-block__hero-kicker {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-bottom: 22px;
	font-family: var(--gp-font-sans);
	font-size: 12px;
	letter-spacing: 0.26em;
	text-transform: uppercase;
	color: var(--gp-stone);
}

.gallery-page-block__hero-kicker-line {
	width: 36px;
	height: 1px;
	background: var(--gp-stone);
	flex-shrink: 0;
}

.gallery-page-block__hero-heading {
	font-family: var(--gp-font-serif);
	font-size: clamp(2.5rem, 5.5vw, 4.125rem);
	line-height: 1.15;
	font-weight: 400;
	letter-spacing: -0.014em;
	color: var(--gp-white);
	text-wrap: balance;
}

.gallery-page-block__hero-heading p {
	line-height: 1.15;
}

.gallery-page-block__hero-heading em,
.gallery-page-block__hero-heading i {
	font-style: italic;
	color: var(--gp-white);
}

/* ----- Intro ----- */
.gallery-page-block__intro {
	background: var(--gp-paper);
	padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 6vw, 6rem) clamp(2rem, 4vw, 3.5rem);
}

.gallery-page-block__intro-inner {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: minmax(140px, 220px) minmax(0, 1fr);
	gap: clamp(1.5rem, 3vw, 2.5rem);
	align-items: start;
}

.gallery-page-block__intro-lede {
	font-family: var(--gp-font-serif);
	font-size: clamp(1.35rem, 2.2vw, 1.75rem);
	line-height: 1.45;
	font-weight: 400;
	color: var(--gp-forest-deep);
	max-width: 860px;
	text-wrap: pretty;
}

/* ----- Gallery grid ----- */
.gallery-page-block__gallery {
	background: var(--gp-paper);
	padding: 1rem clamp(1.5rem, 6vw, 6rem) clamp(5rem, 10vw, 8.125rem);
}

.gallery-page-block__filters {
	max-width: 1280px;
	margin: 0 auto 2.25rem;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.gallery-page-block__filter {
	font-family: var(--gp-font-sans);
	font-size: 12px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	font-weight: 500;
	color: var(--gp-forest);
	background: transparent;
	border: 1px solid rgba(26, 61, 43, 0.25);
	border-radius: 999px;
	padding: 11px 22px;
	cursor: pointer;
	transition: background 220ms ease, border-color 220ms ease, color 220ms ease;
}

.gallery-page-block__filter:hover,
.gallery-page-block__filter:focus-visible {
	border-color: var(--gp-forest);
}

.gallery-page-block__filter.is-active {
	background: var(--gp-forest);
	border-color: var(--gp-forest);
	color: var(--gp-white);
}

.gallery-page-block__grid {
	max-width: 1280px;
	margin: 0 auto;
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	grid-auto-rows: 220px;
	gap: 18px;
}

.gallery-page-block__item {
	position: relative;
	margin: 0;
	overflow: hidden;
	border-radius: 14px;
	grid-column: span 2;
	grid-row: span 1;
}

.gallery-page-block__item--tall {
	grid-row: span 2;
}

.gallery-page-block__item--wide {
	grid-column: span 2;
}

.gallery-page-block__item-trigger {
	position: relative;
	display: block;
	width: 100%;
	height: 100%;
	min-height: 220px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	text-align: left;
	color: inherit;
}

.gallery-page-block__item--tall .gallery-page-block__item-trigger {
	min-height: 100%;
}

.gallery-page-block__item-media {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;
	transition: transform 600ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.gallery-page-block__item-trigger:hover .gallery-page-block__item-media,
.gallery-page-block__item-trigger:focus-visible .gallery-page-block__item-media {
	transform: scale(1.06);
}

.gallery-page-block__item-overlay {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(7, 15, 11, 0) 40%, rgba(7, 15, 11, 0.72) 100%);
	transition: background 320ms ease;
}

.gallery-page-block__item-trigger:hover .gallery-page-block__item-overlay,
.gallery-page-block__item-trigger:focus-visible .gallery-page-block__item-overlay {
	background: linear-gradient(180deg, rgba(26, 61, 43, 0.12) 30%, rgba(7, 15, 11, 0.82) 100%);
}

.gallery-page-block__item-caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 22px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	transform: translateY(6px);
	opacity: 0.92;
	transition: transform 320ms ease, opacity 320ms ease;
}

.gallery-page-block__item-trigger:hover .gallery-page-block__item-caption,
.gallery-page-block__item-trigger:focus-visible .gallery-page-block__item-caption {
	transform: translateY(0);
	opacity: 1;
}

.gallery-page-block__item-subtitle {
	font-family: var(--gp-font-sans);
	font-size: 10px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gp-stone);
}

.gallery-page-block__item-title {
	font-family: var(--gp-font-serif);
	font-size: clamp(1.1rem, 1.6vw, 1.375rem);
	font-weight: 500;
	color: var(--gp-white);
	line-height: 1.15;
}

/* ----- Lightbox ----- */
.gallery-page-block__lightbox {
	position: fixed;
	inset: 0;
	z-index: 10050;
}

.gallery-page-block__lightbox-backdrop {
	position: absolute;
	inset: 0;
	border: none;
	background: rgba(7, 15, 11, 0.92);
	cursor: pointer;
}

.gallery-page-block__lightbox-inner {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100%;
	padding: clamp(4rem, 8vw, 5rem) clamp(1rem, 4vw, 3rem);
	box-sizing: border-box;
}

.gallery-page-block__lightbox-figure {
	position: relative;
	width: min(100%, 1100px);
	margin: 0;
}

.gallery-page-block__lightbox-image {
	display: block;
	width: 100%;
	max-height: min(72vh, 760px);
	object-fit: contain;
	border-radius: 8px;
	background: #0c1410;
}

.gallery-page-block__lightbox-caption {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	margin-top: 1rem;
	color: var(--gp-white);
}

.gallery-page-block__lightbox-subtitle {
	font-family: var(--gp-font-sans);
	font-size: 11px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--gp-stone);
}

.gallery-page-block__lightbox-subtitle:empty {
	display: none;
}

.gallery-page-block__lightbox-title {
	font-family: var(--gp-font-serif);
	font-size: clamp(1.35rem, 2.5vw, 1.75rem);
	font-weight: 500;
	line-height: 1.2;
}

.gallery-page-block__lightbox-title:empty {
	display: none;
}

.gallery-page-block__lightbox-count {
	font-family: var(--gp-font-sans);
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.65);
}

.gallery-page-block__lightbox-count:empty {
	display: none;
}

.gallery-page-block__lightbox-close,
.gallery-page-block__lightbox-prev,
.gallery-page-block__lightbox-next {
	position: absolute;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	border-radius: 999px;
	background: rgba(6, 40, 29, 0.55);
	color: var(--gp-white);
	font-size: 1.25rem;
	line-height: 1;
	cursor: pointer;
	transition: background 220ms ease, border-color 220ms ease;
}

.gallery-page-block__lightbox-close:hover,
.gallery-page-block__lightbox-close:focus-visible,
.gallery-page-block__lightbox-prev:hover,
.gallery-page-block__lightbox-prev:focus-visible,
.gallery-page-block__lightbox-next:hover,
.gallery-page-block__lightbox-next:focus-visible {
	background: rgba(6, 40, 29, 0.85);
	border-color: rgba(255, 255, 255, 0.65);
}

.gallery-page-block__lightbox-close {
	top: 1rem;
	right: 1rem;
	font-size: 1.75rem;
}

.gallery-page-block__lightbox-prev {
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

.gallery-page-block__lightbox-next {
	right: 1rem;
	top: 50%;
	transform: translateY(-50%);
}

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

/* ----- Responsive ----- */
@media (max-width: 1100px) {
	.gallery-page-block__hero-content {
		left: 48px;
		right: 48px;
		max-width: none;
	}

	.gallery-page-block__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-auto-rows: 200px;
	}

	.gallery-page-block__item,
	.gallery-page-block__item--wide {
		grid-column: span 1;
	}

	.gallery-page-block__item--tall {
		grid-row: span 2;
	}
}

@media (max-width: 768px) {
	.gallery-page-block__hero {
		height: min(100vh, 560px);
		min-height: 380px;
	}

	.gallery-page-block__hero-overlay {
		background: linear-gradient(
			180deg,
			rgba(15, 31, 22, 0.78) 0%,
			rgba(6, 40, 29, 0.58) 38%,
			rgba(4, 33, 22, 0.72) 100%
		);
	}

	.gallery-page-block__hero-content {
		left: 24px;
		right: 24px;
		bottom: 56px;
	}

	.gallery-page-block__intro-inner {
		grid-template-columns: 1fr;
	}

	.gallery-page-block__grid {
		grid-template-columns: 1fr;
		grid-auto-rows: auto;
	}

	.gallery-page-block__item,
	.gallery-page-block__item--wide,
	.gallery-page-block__item--tall {
		grid-column: span 1;
		grid-row: span 1;
	}

	.gallery-page-block__item-trigger {
		min-height: 240px;
	}

	.gallery-page-block__lightbox-prev {
		left: 0.5rem;
	}

	.gallery-page-block__lightbox-next {
		right: 0.5rem;
	}
}
