/* Solid Road — Cinema reel viewer for .sr-cinema-target galleries */

.sr-cinema-overlay {
	position: fixed;
	inset: 0;
	z-index: 9999;
	background: rgba(8, 8, 10, 0.95);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(1rem, 4vw, 3rem);
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
	color: #f5f1e8;
	-webkit-font-smoothing: antialiased;
	clip-path: circle(0% at var(--sr-cinema-x, 50%) var(--sr-cinema-y, 50%));
	transition: clip-path 600ms cubic-bezier(0.65, 0, 0.35, 1);
	will-change: clip-path;
}

.sr-cinema-overlay.is-open {
	clip-path: circle(150% at var(--sr-cinema-x, 50%) var(--sr-cinema-y, 50%));
}

.sr-cinema-overlay[hidden] {
	display: none;
}

.sr-cinema-stage {
	margin: 0;
	max-width: 90vw;
	max-height: 85vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.sr-cinema-stage img {
	max-width: 90vw;
	max-height: 85vh;
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
	transition: opacity 160ms ease;
	cursor: default;
}

.sr-cinema-stage img.is-swap {
	opacity: 0;
}

.sr-cinema-counter,
.sr-cinema-meta,
.sr-cinema-caption,
.sr-cinema-close {
	position: absolute;
	font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, monospace;
	font-size: 0.7rem;
	letter-spacing: 0.25em;
	text-transform: uppercase;
	color: rgba(245, 241, 232, 0.7);
}

.sr-cinema-counter {
	top: clamp(1rem, 3vw, 2rem);
	left: clamp(1rem, 3vw, 2rem);
}

.sr-cinema-close {
	top: clamp(1rem, 3vw, 2rem);
	right: clamp(1rem, 3vw, 2rem);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	background: transparent;
	border: 0;
	padding: 0.4rem 0.6rem;
	cursor: pointer;
	color: rgba(245, 241, 232, 0.85);
	transition: color 200ms ease, transform 200ms ease;
}

.sr-cinema-close:hover,
.sr-cinema-close:focus-visible {
	color: #f5f1e8;
	transform: translateX(-2px);
	outline: none;
}

.sr-cinema-meta {
	bottom: clamp(1rem, 3vw, 2rem);
	left: clamp(1rem, 3vw, 2rem);
	max-width: 45vw;
}

.sr-cinema-caption {
	bottom: clamp(1rem, 3vw, 2rem);
	right: clamp(1rem, 3vw, 2rem);
	max-width: 45vw;
	text-align: right;
	letter-spacing: 0.18em;
	color: rgba(245, 241, 232, 0.85);
}

.sr-cinema-nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	color: rgba(245, 241, 232, 0.6);
	font-size: clamp(2rem, 5vw, 3.5rem);
	line-height: 1;
	font-family: 'Fraunces', 'Times New Roman', serif;
	font-weight: 300;
	width: clamp(3rem, 6vw, 4.5rem);
	height: clamp(3rem, 6vw, 4.5rem);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	transition: color 200ms ease, transform 200ms ease;
}

.sr-cinema-nav:hover,
.sr-cinema-nav:focus-visible {
	color: #f5f1e8;
	outline: none;
}

.sr-cinema-prev {
	left: clamp(0.5rem, 2vw, 1.5rem);
}

.sr-cinema-prev:hover { transform: translateY(-50%) translateX(-3px); }

.sr-cinema-next {
	right: clamp(0.5rem, 2vw, 1.5rem);
}

.sr-cinema-next:hover { transform: translateY(-50%) translateX(3px); }

@media (max-width: 720px) {
	.sr-cinema-meta,
	.sr-cinema-caption {
		max-width: calc(100vw - 2rem);
		font-size: 0.65rem;
		letter-spacing: 0.18em;
	}

	.sr-cinema-meta {
		bottom: 3.5rem;
	}

	.sr-cinema-caption {
		bottom: 1rem;
		left: 1rem;
		right: 1rem;
		text-align: left;
	}

	.sr-cinema-stage img {
		max-height: 70vh;
	}
}

@media (prefers-reduced-motion: reduce) {
	.sr-cinema-overlay {
		transition: opacity 200ms ease;
		clip-path: none;
		opacity: 0;
	}
	.sr-cinema-overlay.is-open {
		opacity: 1;
	}
}
