/* Photos hero uses the shared high-contrast dark treatment. */
.ef-page-hero--dark {
	background: #0b281f;
}

/* ---- Chapter index ---- */
.ef-photo-index-section {
	background: #f2f0e8;
}

.ef-photo-index {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	margin: 2rem 0;
	border-top: 1px solid #cdd0bf;
	border-left: 1px solid #cdd0bf;
}

.ef-photo-index > a {
	min-height: 230px;
	padding: 1.6rem;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	border-right: 1px solid #cdd0bf;
	border-bottom: 1px solid #cdd0bf;
	color: #18231b;
	text-decoration: none;
	transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.ef-photo-index > a span {
	color: #4f6958;
	font: 400 1.2rem var(--serif, Georgia, serif);
}

.ef-photo-index > a strong {
	margin-top: auto;
	font: 400 1.55rem/1.15 var(--serif, Georgia, serif);
}

.ef-photo-index > a small {
	color: #526059;
	line-height: 1.55;
}

.ef-photo-index > a:hover,
.ef-photo-index > a:focus-visible {
	position: relative;
	z-index: 1;
	transform: translateY(-4px);
	background: #fff;
	box-shadow: 0 14px 32px #0b281f1f;
}

.ef-photo-index > a:focus-visible {
	outline: 3px solid #d1b743;
	outline-offset: 3px;
}

/* ---- Chapter sections ---- */
.ef-photo-story {
	scroll-margin-top: 90px;
}

.ef-photo-story--paper {
	background: #f2f0e8;
}

.ef-photo-story--dark {
	background: #0b281f;
	color: #fff;
}

.ef-photo-story--dark .ef-section-heading > p {
	color: #ffffffb3;
}

.ef-chapter-count {
	margin-top: .35rem;
	font-size: .8rem;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: #53604c;
}

.ef-photo-story--dark .ef-chapter-count {
	color: #ffffff8a;
}

/* ---- Gallery grid (many photos, chronological order preserved) ---- */
.ef-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 10px;
	margin-top: 2rem;
}

.ef-shot {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border-radius: 3px;
	background: #12362a;
	cursor: zoom-in;
	text-decoration: none;
}

/* first shot in each chapter reads as the lead image */
.ef-shot--lead {
	grid-column: span 2;
	grid-row: span 2;
}

.ef-shot img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .4s ease, filter .4s ease;
}

.ef-shot--video {
	cursor: default;
	background: #04120d;
}

.ef-shot--video video {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	background: #04120d;
}

.ef-shot--video::after {
	display: none;
}

.ef-shot--video figcaption {
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	z-index: 1;
	padding: .8rem .85rem 2.75rem;
	pointer-events: none;
	background: linear-gradient(#02110cdb, transparent);
	color: #fff;
}

.ef-shot--video figcaption strong,
.ef-shot--video figcaption span {
	display: block;
}

.ef-shot--video figcaption strong {
	font: 400 1rem/1.25 var(--serif, Georgia, serif);
}

.ef-shot--video figcaption span {
	margin-top: .35rem;
	color: #ffffffc7;
	font-size: .7rem;
	line-height: 1.4;
}

.ef-shot::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(transparent 55%, #02110c99);
	opacity: 0;
	transition: opacity .3s ease;
}

.ef-shot__tag {
	position: absolute;
	left: .6rem;
	right: .6rem;
	bottom: .55rem;
	z-index: 1;
	color: #fff;
	font-size: .74rem;
	line-height: 1.35;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .3s ease, transform .3s ease;
	pointer-events: none;
}

.ef-shot:hover img,
.ef-shot:focus-visible img {
	transform: scale(1.05);
	filter: brightness(1.05);
}

.ef-shot:hover::after,
.ef-shot:focus-visible::after,
.ef-shot:hover .ef-shot__tag,
.ef-shot:focus-visible .ef-shot__tag {
	opacity: 1;
	transform: translateY(0);
}

.ef-shot:focus-visible {
	outline: 4px solid #d1b743;
	outline-offset: -4px;
}

/* ---- Long-page navigation ---- */
.ef-back-to-top {
	position: fixed;
	right: clamp(14px, 2.5vw, 28px);
	bottom: clamp(14px, 2.5vw, 28px);
	z-index: 40;
	min-width: 48px;
	min-height: 48px;
	padding: 0 16px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	border: 2px solid #ffffffcc;
	border-radius: 999px;
	background: #0b281f;
	color: #fff;
	box-shadow: 0 10px 28px #03120d52;
	font-size: .75rem;
	font-weight: 800;
	letter-spacing: .05em;
	text-decoration: none;
	text-transform: uppercase;
}

.ef-back-to-top:hover,
.ef-back-to-top:focus-visible {
	border-color: #0b281f;
	background: #d1b743;
	color: #0b281f;
}

.ef-back-to-top:focus-visible {
	outline: 3px solid #d1b743;
	outline-offset: 3px;
}

/* ---- Lightbox ---- */
body.ef-lightbox-open {
	overflow: hidden;
}

.ef-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(.75rem, 3vw, 2.5rem);
}

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

.ef-lightbox__backdrop {
	position: absolute;
	inset: 0;
	background: #04120df2;
	cursor: zoom-out;
}

.ef-lightbox__stage {
	position: relative;
	z-index: 1;
	margin: 0;
	max-width: min(1100px, 96vw);
	display: flex;
	flex-direction: column;
	gap: .7rem;
}

.ef-lightbox__img {
	max-width: 100%;
	max-height: 76vh;
	object-fit: contain;
	border-radius: 4px;
	box-shadow: 0 24px 60px #000000a6;
	background: #0b281f;
}

.ef-lightbox__cap {
	color: #fff;
	display: flex;
	flex-direction: column;
	gap: .3rem;
	max-width: 70ch;
}

.ef-lightbox__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .2rem 1rem;
}

.ef-lightbox__title {
	font: 400 1.25rem var(--serif, Georgia, serif);
}

.ef-lightbox__date {
	color: #ffffff9e;
	font-size: .8rem;
	letter-spacing: .03em;
}

.ef-lightbox__note {
	color: #e7efdb;
	font-size: .92rem;
	line-height: 1.5;
}

.ef-lightbox__bar {
	display: flex;
	flex-wrap: wrap;
	gap: .55rem;
}

.ef-lightbox__btn {
	appearance: none;
	border: 1px solid #ffffff40;
	background: #ffffff14;
	color: #fff;
	padding: .5rem .95rem;
	border-radius: 999px;
	font: inherit;
	font-size: .85rem;
	cursor: pointer;
	text-decoration: none;
	transition: background .2s ease, border-color .2s ease;
}

.ef-lightbox__btn:hover,
.ef-lightbox__btn:focus-visible {
	background: #ffffff2b;
	border-color: #ffffff85;
}

.ef-lightbox__btn:focus-visible {
	outline: 3px solid #d1b743;
	outline-offset: 2px;
}

.ef-lightbox__btn--close {
	margin-left: auto;
}

.ef-lightbox__status {
	min-height: 1.1em;
	margin: 0;
	color: #d9e6c9;
	font-size: .8rem;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
	.ef-photo-index {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.ef-photo-index {
		grid-template-columns: 1fr;
	}

	.ef-photo-index > a {
		min-height: 160px;
	}

	.ef-gallery {
		grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
		gap: 7px;
	}

	.ef-shot--lead {
		grid-column: 1 / -1;
		grid-row: auto;
	}

	.ef-lightbox__btn--close {
		margin-left: 0;
	}

	.ef-back-to-top {
		right: 12px;
		bottom: 12px;
	}
}
