/*
 * Version-gated project detail pages.
 *
 * Deployment target:
 * wp-content/themes/tverskiepotolki-child/assets/css/photo-detail-v01.css
 */

#main-content.tnp-photo-detail {
	--tnp-detail-ink: #171a1f;
	--tnp-detail-text: #343a42;
	--tnp-detail-muted: #69727d;
	--tnp-detail-brand: #f6c945;
	--tnp-detail-brand-dark: #d9a900;
	--tnp-detail-warm: #fff8dd;
	--tnp-detail-surface: #f6f7f9;
	--tnp-detail-border: #e1e6ea;
	--tnp-detail-white: #fff;
	--tnp-detail-shadow: 0 22px 60px rgb(23 26 31 / 10%);
	min-width: 0;
	overflow: hidden;
	background: var(--tnp-detail-white);
	color: var(--tnp-detail-text);
	font-family: "Manrope Local", Arial, sans-serif;
}

.tnp-photo-detail *,
.tnp-photo-detail *::before,
.tnp-photo-detail *::after {
	box-sizing: border-box;
}

.tnp-photo-detail :where(h1, h2, p, ul, figure) {
	margin: 0;
	padding: 0;
}

.tnp-photo-detail :where(a, button):focus-visible {
	outline: 3px solid var(--tnp-detail-ink);
	outline-offset: 4px;
	box-shadow: 0 0 0 7px var(--tnp-detail-brand);
}

.tnp-photo-detail__shell {
	width: min(1180px, calc(100% - 48px));
	margin-inline: auto;
}

.tnp-photo-detail__sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

.tnp-photo-detail__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: #8a6800;
	font-size: 0.76rem;
	font-weight: 800;
	line-height: 1.4;
	letter-spacing: 0.11em;
	text-transform: uppercase;
}

.tnp-photo-detail__eyebrow > span {
	width: 28px;
	height: 2px;
	border-radius: 999px;
	background: currentcolor;
}

.tnp-photo-detail__hero {
	position: relative;
	padding: clamp(32px, 5vw, 64px) 0 clamp(62px, 8vw, 106px);
	background:
		radial-gradient(circle at 8% 18%, rgb(246 201 69 / 20%), transparent 30%),
		linear-gradient(180deg, #fffdf5 0%, var(--tnp-detail-white) 100%);
}

.tnp-photo-detail__hero::after {
	position: absolute;
	top: 14%;
	right: -9rem;
	width: 26rem;
	height: 26rem;
	border: 1px solid rgb(23 26 31 / 5%);
	border-radius: 50%;
	box-shadow:
		0 0 0 3rem rgb(23 26 31 / 2.5%),
		0 0 0 7rem rgb(246 201 69 / 4%);
	content: "";
	pointer-events: none;
}

.tnp-photo-detail__breadcrumb {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: clamp(32px, 5vw, 58px);
	color: var(--tnp-detail-muted);
	font-size: 0.88rem;
	font-weight: 650;
	line-height: 1.5;
}

.tnp-photo-detail__breadcrumb a {
	color: var(--tnp-detail-text);
	text-decoration: underline;
	text-decoration-color: rgb(217 169 0 / 55%);
	text-underline-offset: 0.18em;
}

.tnp-photo-detail__breadcrumb span {
	min-width: 0;
	overflow-wrap: anywhere;
}

.tnp-photo-detail__breadcrumb svg {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
}

.tnp-photo-detail__hero-layout {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(245px, 0.3fr);
	gap: clamp(38px, 7vw, 96px);
	align-items: end;
}

.tnp-photo-detail__hero-copy {
	min-width: 0;
}

.tnp-photo-detail__hero-copy h1 {
	max-width: 960px;
	margin-top: 18px;
	padding: 0;
	color: var(--tnp-detail-ink);
	font-family: "Manrope Local", Arial, sans-serif;
	font-size: clamp(42px, 5.8vw, 70px);
	font-weight: 800;
	line-height: 1.02;
	letter-spacing: -0.048em;
	overflow-wrap: anywhere;
}

.tnp-photo-detail__lead {
	max-width: 720px;
	margin-top: 25px !important;
	color: #525b65;
	font-size: clamp(17px, 1.7vw, 20px);
	line-height: 1.65;
}

.tnp-photo-detail__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 9px;
	margin-top: 28px !important;
	list-style: none;
}

.tnp-photo-detail__tags li {
	padding: 8px 12px;
	border: 1px solid rgb(217 169 0 / 30%);
	border-radius: 999px;
	background: rgb(255 248 221 / 75%);
	color: #6f5700;
	font-size: 0.8rem;
	font-weight: 750;
	line-height: 1.25;
}

.tnp-photo-detail__summary {
	position: relative;
	display: grid;
	min-width: 0;
	padding: 29px;
	overflow: hidden;
	border-radius: 24px;
	background: var(--tnp-detail-ink);
	box-shadow: 0 24px 66px rgb(23 26 31 / 17%);
	color: var(--tnp-detail-white);
}

.tnp-photo-detail__summary::after {
	position: absolute;
	top: -42px;
	right: -42px;
	width: 122px;
	height: 122px;
	border-radius: 50%;
	background: var(--tnp-detail-brand);
	box-shadow: 0 0 0 26px rgb(246 201 69 / 8%);
	content: "";
}

.tnp-photo-detail__summary-icon {
	position: relative;
	z-index: 1;
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	border-radius: 14px;
	background: rgb(255 255 255 / 10%);
}

.tnp-photo-detail__summary-icon svg {
	width: 27px;
	height: 27px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.tnp-photo-detail__summary strong {
	margin-top: 24px;
	font-size: clamp(48px, 6vw, 68px);
	font-weight: 800;
	line-height: 0.9;
	letter-spacing: -0.055em;
}

.tnp-photo-detail__summary > span:not(.tnp-photo-detail__summary-icon) {
	margin-top: 10px;
	color: rgb(255 255 255 / 70%);
	font-size: 0.94rem;
	font-weight: 650;
}

.tnp-photo-detail__summary > a {
	width: fit-content;
	margin-top: 24px;
	color: var(--tnp-detail-brand);
	font-size: 0.86rem;
	font-weight: 800;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

.tnp-photo-detail__gallery-section {
	padding: clamp(70px, 9vw, 122px) 0;
	scroll-margin-top: 110px;
	background: var(--tnp-detail-surface);
}

.tnp-photo-detail__section-heading {
	display: flex;
	justify-content: space-between;
	gap: 30px;
	align-items: end;
	margin-bottom: clamp(32px, 5vw, 54px);
}

.tnp-photo-detail__section-heading h2,
.tnp-photo-detail__cta-copy h2 {
	margin-top: 13px;
	padding: 0;
	color: var(--tnp-detail-ink);
	font-family: "Manrope Local", Arial, sans-serif;
	font-size: clamp(32px, 4.2vw, 50px);
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.04em;
}

.tnp-photo-detail__section-heading > p {
	max-width: 360px;
	color: var(--tnp-detail-muted);
	font-size: 0.95rem;
	line-height: 1.6;
}

.tnp-photo-detail__gallery {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: clamp(14px, 2.2vw, 28px);
}

.tnp-photo-detail__gallery-item {
	position: relative;
	min-width: 0;
	overflow: hidden;
	border-radius: 21px;
	background: #dfe3e7;
	box-shadow: 0 14px 40px rgb(23 26 31 / 8%);
}

.tnp-photo-detail__gallery-item--featured {
	grid-column: 1 / -1;
}

.tnp-photo-detail__gallery-link {
	position: relative;
	display: block;
	min-height: 100%;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	color: var(--tnp-detail-white);
	text-decoration: none;
}

.tnp-photo-detail__gallery-item--featured .tnp-photo-detail__gallery-link {
	aspect-ratio: 16 / 9;
}

.tnp-photo-detail__gallery-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 350ms ease;
}

.tnp-photo-detail__gallery-link::after {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 58%, rgb(23 26 31 / 24%) 100%);
	content: "";
	pointer-events: none;
}

.tnp-photo-detail__gallery-link:hover .tnp-photo-detail__gallery-image {
	transform: scale(1.025);
}

.tnp-photo-detail__zoom {
	position: absolute;
	z-index: 1;
	right: 18px;
	bottom: 18px;
	display: grid;
	width: 48px;
	height: 48px;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 34%);
	border-radius: 15px;
	background: rgb(23 26 31 / 72%);
	backdrop-filter: blur(8px);
	box-shadow: 0 10px 28px rgb(23 26 31 / 18%);
}

.tnp-photo-detail__zoom svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.65;
}

.tnp-photo-detail__gallery-item figcaption {
	padding: 13px 17px 15px;
	background: var(--tnp-detail-white);
	color: var(--tnp-detail-muted);
	font-size: 0.84rem;
	line-height: 1.5;
}

.tnp-photo-detail__cta {
	padding: clamp(70px, 8vw, 110px) 0;
	background: var(--tnp-detail-white);
}

.tnp-photo-detail__cta-card {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: clamp(38px, 7vw, 92px);
	align-items: center;
	padding: clamp(34px, 5vw, 62px);
	overflow: hidden;
	border-radius: 28px;
	background:
		linear-gradient(145deg, rgb(255 255 255 / 7%), transparent 48%),
		var(--tnp-detail-ink);
	box-shadow: 0 30px 80px rgb(23 26 31 / 17%);
	color: var(--tnp-detail-white);
}

.tnp-photo-detail__cta-card::after {
	position: absolute;
	right: -76px;
	bottom: -96px;
	width: 240px;
	height: 240px;
	border-radius: 50%;
	background: rgb(246 201 69 / 10%);
	box-shadow: 0 0 0 46px rgb(246 201 69 / 4%);
	content: "";
	pointer-events: none;
}

.tnp-photo-detail__cta-copy,
.tnp-photo-detail__cta-actions {
	position: relative;
	z-index: 1;
}

.tnp-photo-detail__cta-copy .tnp-photo-detail__eyebrow {
	color: var(--tnp-detail-brand);
}

.tnp-photo-detail__cta-copy h2 {
	color: var(--tnp-detail-white);
}

.tnp-photo-detail__cta-copy > p:last-child {
	max-width: 690px;
	margin-top: 19px;
	color: rgb(255 255 255 / 70%);
	font-size: clamp(16px, 1.6vw, 19px);
	line-height: 1.65;
}

.tnp-photo-detail__cta-actions {
	display: grid;
	gap: 17px;
	justify-items: stretch;
	min-width: min(310px, 100%);
}

.tnp-photo-detail__button {
	display: inline-flex;
	min-height: 54px;
	padding: 14px 22px;
	align-items: center;
	justify-content: center;
	gap: 10px;
	border: 2px solid transparent;
	border-radius: 13px;
	font-size: 0.94rem;
	font-weight: 800;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		transform 160ms ease;
}

.tnp-photo-detail__button svg {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.tnp-photo-detail__button--primary {
	border-color: var(--tnp-detail-brand);
	background: var(--tnp-detail-brand);
	box-shadow: 0 13px 30px rgb(0 0 0 / 18%);
	color: var(--tnp-detail-ink);
}

.tnp-photo-detail__button--primary:hover {
	border-color: #ffd95f;
	background: #ffd95f;
	transform: translateY(-1px);
}

.tnp-photo-detail__phone {
	display: grid;
	gap: 2px;
	justify-items: center;
	color: var(--tnp-detail-white);
	text-align: center;
	text-decoration: none;
}

.tnp-photo-detail__phone span {
	color: rgb(255 255 255 / 58%);
	font-size: 0.76rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.tnp-photo-detail__phone strong {
	font-size: 1.02rem;
	font-weight: 800;
}

.tnp-photo-detail__project-nav {
	padding: clamp(26px, 4vw, 48px) 0 clamp(58px, 7vw, 92px);
	background: var(--tnp-detail-white);
}

.tnp-photo-detail__project-nav-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	gap: 14px;
	align-items: stretch;
}

.tnp-photo-detail__project-link {
	display: flex;
	min-width: 0;
	min-height: 112px;
	padding: 20px 22px;
	flex-direction: column;
	justify-content: center;
	gap: 7px;
	border: 1px solid var(--tnp-detail-border);
	border-radius: 18px;
	background: var(--tnp-detail-surface);
	color: var(--tnp-detail-ink);
	text-decoration: none;
	transition:
		background-color 160ms ease,
		border-color 160ms ease,
		transform 160ms ease;
}

.tnp-photo-detail__project-link:hover {
	border-color: rgb(217 169 0 / 48%);
	background: var(--tnp-detail-warm);
	transform: translateY(-1px);
}

.tnp-photo-detail__project-link--next {
	align-items: flex-end;
	text-align: right;
}

.tnp-photo-detail__project-direction {
	color: #806300;
	font-size: 0.76rem;
	font-weight: 800;
	line-height: 1.35;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.tnp-photo-detail__project-link strong {
	display: -webkit-box;
	overflow: hidden;
	font-size: 0.9rem;
	font-weight: 750;
	line-height: 1.45;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
}

.tnp-photo-detail__project-link--all {
	min-width: 150px;
	align-items: center;
	gap: 9px;
	background: var(--tnp-detail-ink);
	color: var(--tnp-detail-white);
	text-align: center;
}

.tnp-photo-detail__project-link--all:hover {
	border-color: var(--tnp-detail-ink);
	background: #292d34;
}

.tnp-photo-detail__project-link--all svg {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentcolor;
	stroke-width: 1.5;
}

.tnp-photo-detail__project-link--all span {
	font-size: 0.86rem;
	font-weight: 800;
}

.tnp-photo-detail__lightbox {
	width: min(1440px, calc(100% - 32px));
	max-width: none;
	height: min(940px, calc(100% - 32px));
	max-height: none;
	padding: 0;
	overflow: visible;
	border: 0;
	background: transparent;
	color: var(--tnp-detail-white);
}

.tnp-photo-detail__lightbox:not([open]) {
	display: none;
}

.tnp-photo-detail__lightbox::backdrop {
	background: rgb(10 12 15 / 94%);
	backdrop-filter: blur(5px);
}

.tnp-photo-detail__lightbox-panel {
	position: relative;
	display: grid;
	width: 100%;
	height: 100%;
	grid-template-rows: minmax(0, 1fr) auto;
	gap: 16px;
	padding: 18px 62px 14px;
}

.tnp-photo-detail__lightbox-stage {
	position: relative;
	display: grid;
	min-width: 0;
	min-height: 0;
	place-items: center;
}

.tnp-photo-detail__lightbox-stage img {
	display: block;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	filter: drop-shadow(0 22px 70px rgb(0 0 0 / 38%));
}

.tnp-photo-detail__lightbox-close,
.tnp-photo-detail__lightbox-nav {
	display: grid;
	width: 48px;
	height: 48px;
	padding: 0;
	place-items: center;
	border: 1px solid rgb(255 255 255 / 24%);
	border-radius: 50%;
	background: rgb(255 255 255 / 11%);
	color: var(--tnp-detail-white);
	cursor: pointer;
	transition:
		background-color 150ms ease,
		border-color 150ms ease;
}

.tnp-photo-detail__lightbox-close:hover,
.tnp-photo-detail__lightbox-nav:hover {
	border-color: rgb(255 255 255 / 48%);
	background: rgb(255 255 255 / 20%);
}

.tnp-photo-detail__lightbox-close svg,
.tnp-photo-detail__lightbox-nav svg {
	width: 23px;
	height: 23px;
	fill: none;
	stroke: currentcolor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.8;
}

.tnp-photo-detail__lightbox-close {
	position: absolute;
	z-index: 3;
	top: 0;
	right: 0;
}

.tnp-photo-detail__lightbox-nav {
	position: absolute;
	z-index: 2;
	top: 50%;
	transform: translateY(-50%);
}

.tnp-photo-detail__lightbox-nav--previous {
	left: -58px;
}

.tnp-photo-detail__lightbox-nav--next {
	right: -58px;
}

.tnp-photo-detail__lightbox-status {
	display: flex;
	min-height: 28px;
	justify-content: center;
	gap: 13px;
	align-items: baseline;
	color: rgb(255 255 255 / 72%);
	font-size: 0.86rem;
	line-height: 1.45;
	text-align: center;
}

.tnp-photo-detail__lightbox-status [data-tnp-photo-counter] {
	flex: 0 0 auto;
	color: var(--tnp-detail-brand);
	font-weight: 800;
}

.tnp-photo-detail__lightbox-status [data-tnp-photo-caption]:empty {
	display: none;
}

body.tnp-photo-detail-lightbox-open {
	overflow: hidden;
}

@media (max-width: 900px) {
	.tnp-photo-detail__hero-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.tnp-photo-detail__summary {
		grid-template-columns: auto auto minmax(0, 1fr) auto;
		gap: 8px 16px;
		align-items: center;
	}

	.tnp-photo-detail__summary-icon {
		grid-row: 1 / 3;
	}

	.tnp-photo-detail__summary strong {
		margin-top: 0;
		font-size: 42px;
	}

	.tnp-photo-detail__summary > span:not(.tnp-photo-detail__summary-icon) {
		grid-column: 2 / 4;
		margin-top: 0;
	}

	.tnp-photo-detail__summary > a {
		grid-column: 4;
		grid-row: 1 / 3;
		margin-top: 0;
	}

	.tnp-photo-detail__cta-card {
		grid-template-columns: minmax(0, 1fr);
	}

	.tnp-photo-detail__cta-actions {
		max-width: 430px;
	}

	.tnp-photo-detail__project-link strong {
		display: none;
	}

	.tnp-photo-detail__project-link {
		min-height: 86px;
	}
}

@media (max-width: 680px) {
	.tnp-photo-detail__shell {
		width: calc(100% - 36px);
	}

	.tnp-photo-detail__hero {
		padding-top: 25px;
	}

	.tnp-photo-detail__hero::after {
		display: none;
	}

	.tnp-photo-detail__breadcrumb {
		margin-bottom: 32px;
		font-size: 0.8rem;
	}

	.tnp-photo-detail__breadcrumb span[aria-current="page"] {
		display: none;
	}

	.tnp-photo-detail__breadcrumb svg:last-of-type {
		display: none;
	}

	.tnp-photo-detail__hero-copy h1 {
		font-size: clamp(36px, 11.5vw, 50px);
		letter-spacing: -0.04em;
	}

	.tnp-photo-detail__lead {
		font-size: 16px;
	}

	.tnp-photo-detail__tags {
		gap: 7px;
	}

	.tnp-photo-detail__tags li {
		font-size: 0.74rem;
	}

	.tnp-photo-detail__summary {
		grid-template-columns: auto minmax(0, 1fr);
		padding: 24px;
	}

	.tnp-photo-detail__summary strong {
		font-size: 38px;
	}

	.tnp-photo-detail__summary > span:not(.tnp-photo-detail__summary-icon) {
		grid-column: 2;
	}

	.tnp-photo-detail__summary > a {
		grid-column: 1 / -1;
		grid-row: auto;
		margin-top: 12px;
	}

	.tnp-photo-detail__section-heading {
		display: grid;
		gap: 16px;
	}

	.tnp-photo-detail__gallery {
		grid-template-columns: minmax(0, 1fr);
	}

	.tnp-photo-detail__gallery-item--featured {
		grid-column: auto;
	}

	.tnp-photo-detail__gallery-item--featured .tnp-photo-detail__gallery-link,
	.tnp-photo-detail__gallery-link {
		aspect-ratio: 4 / 3;
	}

	.tnp-photo-detail__zoom {
		right: 13px;
		bottom: 13px;
		width: 44px;
		height: 44px;
	}

	.tnp-photo-detail__cta-card {
		padding: 31px 24px;
		border-radius: 22px;
	}

	.tnp-photo-detail__cta-actions {
		width: 100%;
		min-width: 0;
	}

	.tnp-photo-detail__button {
		width: 100%;
	}

	.tnp-photo-detail__project-nav-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.tnp-photo-detail__project-link,
	.tnp-photo-detail__project-link--next {
		min-height: 68px;
		padding: 16px 18px;
		align-items: flex-start;
		text-align: left;
	}

	.tnp-photo-detail__project-link--all {
		min-width: 0;
		min-height: 68px;
		flex-direction: row;
		align-items: center;
		text-align: center;
	}

	.tnp-photo-detail__project-link--next {
		align-items: flex-end;
		text-align: right;
	}

	.tnp-photo-detail__lightbox {
		width: calc(100% - 16px);
		height: calc(100% - 20px);
	}

	.tnp-photo-detail__lightbox-panel {
		padding: 58px 8px 10px;
	}

	.tnp-photo-detail__lightbox-close {
		top: 0;
		right: 4px;
	}

	.tnp-photo-detail__lightbox-nav {
		top: auto;
		bottom: 9px;
		transform: none;
		background: rgb(10 12 15 / 72%);
	}

	.tnp-photo-detail__lightbox-nav--previous {
		left: 8px;
	}

	.tnp-photo-detail__lightbox-nav--next {
		right: 8px;
	}

	.tnp-photo-detail__lightbox-status {
		min-height: 48px;
		padding-inline: 62px;
		flex-direction: column;
		gap: 1px;
		justify-content: center;
		font-size: 0.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tnp-photo-detail *,
	.tnp-photo-detail *::before,
	.tnp-photo-detail *::after {
		scroll-behavior: auto !important;
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
	}
}

@media (forced-colors: active) {
	.tnp-photo-detail__gallery-item,
	.tnp-photo-detail__summary,
	.tnp-photo-detail__cta-card,
	.tnp-photo-detail__project-link,
	.tnp-photo-detail__lightbox-close,
	.tnp-photo-detail__lightbox-nav {
		border: 1px solid CanvasText;
	}
}
