/**
 * Photo genre pages and their editor pattern.
 * The evt/masonry-gallery component itself remains owned by evt-core.
 */

.evt-photo-page,
.evt-photo-page * {
	min-width: 0;
}

.evt-photo-page {
	--evt-photo-max: var(--evt-shell);
	background: var(--evt-color-paper);
	max-width: 100%;
	overflow: clip;
}

.evt-photo-masthead {
	border-bottom: 1px solid var(--evt-color-line);
	padding-block: clamp(4.5rem, 8vw, 9rem) clamp(3.5rem, 7vw, 7rem);
}

.evt-photo-masthead__inner {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: repeat(12, minmax(0, 1fr));
	max-width: none !important;
	width: var(--evt-shell) !important;
}

.evt-photo-masthead__eyebrow {
	align-self: start;
	grid-column: 1 / 3;
	margin: 0.7rem 0 0;
}

.evt-photo-masthead__title {
	font-size: clamp(3rem, 2rem + 3.8vw, 5.75rem) !important;
	grid-column: 3 / 8;
	letter-spacing: -0.02em !important;
	line-height: 0.9 !important;
	margin: 0;
	max-width: 12ch;
	overflow-wrap: normal;
	word-break: normal;
}

.evt-photo-masthead__summary {
	align-self: end;
	grid-column: 8 / -1;
	margin: clamp(1.5rem, 4vw, 4rem) 0 0;
	max-width: 31rem;
	width: 100%;
}

.evt-photo-masthead__summary .wp-block-post-excerpt {
	color: #383634;
	font-family: var(--wp--preset--font-family--display);
	font-size: clamp(1.2rem, 1.05rem + 0.6vw, 1.625rem);
	line-height: 1.5;
	margin: 0;
}

.evt-photo-masthead__summary .wp-block-post-excerpt__excerpt {
	margin: 0;
}

.evt-photo-masthead__summary .wp-block-post-excerpt__more-text {
	display: none;
}

.evt-photo-masthead__cue {
	font-size: 0.75rem;
	font-weight: 500;
	letter-spacing: 0.18em;
	margin: clamp(1.25rem, 3vw, 2.5rem) 0 0;
	text-transform: uppercase;
}

.evt-photo-masthead__cue a {
	align-items: center;
	display: inline-flex;
	gap: 0.8rem;
	min-height: 44px;
}

.evt-photo-masthead__cue span {
	font-size: 1rem;
	transition: transform var(--evt-transition);
}

.evt-photo-masthead__cue a:hover span,
.evt-photo-masthead__cue a:focus-visible span {
	transform: translateY(0.25rem);
}

.evt-photo-cover {
	background: var(--wp--preset--color--sand);
	height: clamp(30rem, 70vw, 58rem);
	margin: 0;
	max-height: 84svh;
	overflow: hidden;
	width: 100%;
}

.evt-photo-cover img {
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.evt-photo-stage {
	padding-block: clamp(4rem, 7vw, 8rem) clamp(5rem, 10vw, 11rem);
}

.evt-photo-content {
	max-width: none !important;
	width: 100%;
}

.evt-photo-content > * {
	max-width: 100%;
}

.evt-photo-content > .evt-photo-placeholder-gallery,
.evt-photo-content > .wp-block-evt-masonry-gallery,
.evt-photo-content > .evt-masonry-gallery {
	margin-inline: auto;
	width: var(--evt-photo-max);
}

.evt-photo-content > .evt-photo-intro {
	margin-inline: auto;
	max-width: var(--evt-content);
	width: var(--evt-shell);
}

.evt-photo-intro {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: repeat(12, minmax(0, 1fr));
	margin-block: 0 clamp(3.5rem, 7vw, 8rem);
}

.evt-photo-intro__eyebrow {
	grid-column: 1 / 3;
	margin: 0.6rem 0 0;
}

.evt-photo-intro__title {
	font-size: clamp(2.25rem, 1.55rem + 3vw, 5rem) !important;
	grid-column: 3 / 8;
	line-height: 0.92 !important;
	margin: 0;
	max-width: 10ch;
}

.evt-photo-intro__copy {
	align-self: end;
	grid-column: 8 / -1;
	margin: 0;
}

.evt-photo-intro__copy > :first-child {
	margin-top: 0;
}

.evt-photo-intro__copy > :last-child {
	margin-bottom: 0;
}

.evt-photo-editor-note {
	display: none;
}

.evt-photo-placeholder-gallery {
	column-count: 3;
	column-gap: clamp(0.5rem, 1vw, 1rem);
	line-height: 0;
	margin-block: 0;
}

.evt-photo-placeholder-gallery__item {
	break-inside: avoid;
	display: inline-block;
	margin: 0 0 clamp(0.5rem, 1vw, 1rem);
	width: 100%;
}

.evt-photo-placeholder-gallery__image {
	display: block;
	height: auto;
	max-width: 100%;
	width: 100%;
}

.evt-photo-placeholder-gallery__more-wrap {
	margin-inline: auto;
	width: var(--evt-photo-max);
}

/* Server-rendered EVT galleries replace this temporary theme-owned selection. */
.evt-photo-content:has(.evt-masonry-gallery) .evt-photo-placeholder-gallery {
	display: none;
}

.editor-styles-wrapper .evt-photo-editor-note {
	background: var(--wp--preset--color--sand);
	border-left: 2px solid var(--evt-color-ink);
	color: var(--evt-color-muted);
	display: block;
	font-family: var(--wp--preset--font-family--interface);
	font-size: 0.875rem;
	line-height: 1.55;
	padding: 0.875rem 1rem;
}

.evt-photo-content .evt-masonry-gallery {
	isolation: isolate;
}

.evt-photo-content .evt-masonry-gallery__items,
.evt-photo-content .evt-masonry-gallery__item,
.evt-photo-content .evt-masonry-gallery__link,
.evt-photo-content .evt-masonry-gallery__image {
	max-width: 100%;
}

.evt-photo-empty-state {
	border-block: 1px solid var(--evt-color-line);
	display: none;
	margin-inline: auto;
	max-width: var(--evt-reading);
	padding-block: clamp(3rem, 7vw, 6rem);
	text-align: center;
}

.evt-photo-empty-state h2 {
	font-size: clamp(1.8rem, 1.4rem + 2vw, 3.5rem);
	margin-inline: auto;
	max-width: 12ch;
}

@supports selector(:has(*)) {
	.evt-photo-stage:not(:has(.evt-masonry-gallery)) .evt-photo-empty-state {
		display: block;
	}

	.evt-photo-stage:has(.evt-photo-placeholder-gallery) .evt-photo-empty-state {
		display: none;
	}
}

@media (max-width: 1023px) {
	.evt-photo-placeholder-gallery {
		column-count: 2;
	}

	.evt-photo-masthead__eyebrow {
		grid-column: 1 / 4;
	}

	.evt-photo-masthead__title {
		grid-column: 4 / -1;
	}

	.evt-photo-masthead__summary {
		grid-column: 6 / -1;
	}

	.evt-photo-intro__eyebrow {
		grid-column: 1 / 4;
	}

	.evt-photo-intro__title {
		grid-column: 4 / -1;
	}

	.evt-photo-intro__copy {
		grid-column: 6 / -1;
	}
}

@media (max-width: 767px) {
	.evt-photo-page {
		--evt-photo-max: calc(100vw - (2 * var(--evt-gutter)));
	}

	.evt-photo-masthead {
		padding-block: clamp(3.5rem, 16vw, 5rem) clamp(2.75rem, 12vw, 4rem);
	}

	.evt-photo-masthead__inner,
	.evt-photo-intro {
		gap: 1.25rem;
		grid-template-columns: minmax(0, 1fr);
	}

	.evt-photo-masthead__eyebrow,
	.evt-photo-masthead__title,
	.evt-photo-masthead__summary,
	.evt-photo-intro__eyebrow,
	.evt-photo-intro__title,
	.evt-photo-intro__copy {
		grid-column: 1;
	}

	.evt-photo-masthead__eyebrow,
	.evt-photo-intro__eyebrow {
		margin-top: 0;
	}

	.evt-photo-masthead__title {
		font-size: clamp(2rem, 9vw, 3.25rem) !important;
		line-height: 0.92 !important;
		max-width: 100%;
	}

	.evt-photo-masthead__summary {
		margin-top: 1.25rem;
	}

	.evt-photo-cover {
		height: max(28rem, 72svh);
		max-height: 48rem;
	}

	.evt-photo-stage {
		padding-block: clamp(3.5rem, 14vw, 5rem) clamp(5rem, 20vw, 7rem);
	}

	.evt-photo-intro {
		margin-bottom: clamp(3rem, 14vw, 4.5rem);
	}

	.evt-photo-intro__title {
		font-size: clamp(2.2rem, 10vw, 3.6rem) !important;
		max-width: 100%;
	}

	.evt-photo-intro__copy {
		margin-top: 0.75rem;
	}

	.evt-photo-content .evt-masonry-gallery,
	.evt-photo-content .wp-block-evt-masonry-gallery {
		width: 100%;
	}

	.evt-photo-placeholder-gallery {
		column-count: 1;
		column-gap: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.evt-photo-masthead__cue span {
		transition: none;
	}
}
