/* Adetoyan Photography — loaded only on /photography/ pages.
   Colours and fonts come from the Adetoyan Design plugin's variables, with fallbacks. */

.adt-ph {
	--adt-paper: var(--paper, #f7f6f2);
	--adt-ink: var(--ink, #171916);
	--adt-muted: var(--muted, #73756f);
	--adt-line: var(--line, #deded7);
	--adt-accent: var(--accent, #1b75d0);
	--adt-head: Manrope, system-ui, sans-serif;
	--adt-ease: cubic-bezier(.2, .7, .2, 1);
	--row: 300px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 clamp(16px, 4vw, 40px);
	color: var(--adt-ink);
}
@media (max-width: 899px) { .adt-ph { --row: 230px; } }
@media (max-width: 559px) { .adt-ph { --row: 170px; } }

.adt-ph h1, .adt-ph h2 {
	font-family: var(--adt-head);
	font-weight: 700;
	letter-spacing: -.02em;
	line-height: 1.1;
	margin: 0;
	color: var(--adt-ink);
}

/* Page header */
.adt-ph-head { padding: clamp(40px, 8vw, 96px) 0 clamp(28px, 4vw, 44px); }
.adt-ph-eyebrow {
	font: 600 12px/1 var(--adt-head);
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--adt-muted);
	margin: 0 0 18px;
}
.adt-ph-head h1 { font-size: clamp(40px, 7vw, 84px); }
.adt-ph-sub { font-size: clamp(17px, 2vw, 20px); color: var(--adt-muted); margin: 16px 0 0; max-width: 40ch; }
.adt-ph-crumbs { font-size: 14px; color: var(--adt-muted); margin: 0 0 16px; }
.adt-ph-crumbs a { color: inherit; text-decoration: none; }
.adt-ph-crumbs a:hover { color: var(--adt-ink); }
.adt-ph-story { max-width: 62ch; margin: 22px 0 0; font-size: 18px; line-height: 1.7; }
.adt-ph-story > :first-child { margin-top: 0; }
.adt-ph-story > :last-child { margin-bottom: 0; }
.adt-ph-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 20px; font-size: 14px; color: var(--adt-muted); }

/* Black pill button, blue on hover (outlined variant) */
.adt-ph .adt-ph-share {
	box-shadow: none; text-transform: none; letter-spacing: normal; min-height: 0;
	display: inline-flex; align-items: center;
	font: 500 14px/1 inherit;
	padding: 11px 18px;
	border-radius: 999px;
	border: 1px solid var(--adt-ink);
	background: transparent;
	color: var(--adt-ink);
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.adt-ph .adt-ph-share:hover, .adt-ph .adt-ph-share:focus-visible { background: var(--adt-accent); border-color: var(--adt-accent); color: #fff; }

/* Section heading with filter tabs */
.adt-ph-sec {
	display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 12px 16px;
	margin: clamp(56px, 8vw, 96px) 0 22px;
	padding-top: 22px;
	border-top: 1px solid var(--adt-line);
}
.adt-ph-sec h2 { font-size: clamp(24px, 3vw, 32px); }
.adt-ph-tabs { display: flex; gap: 20px; font-size: 15px; }
.adt-ph-tabs a { color: var(--adt-muted); text-decoration: none; padding-bottom: 3px; border-bottom: 1px solid transparent; }
.adt-ph-tabs a:hover { color: var(--adt-ink); }
.adt-ph-tabs a.on { color: var(--adt-ink); border-color: var(--adt-ink); }

/* Justified gallery in pure CSS: each tile grows in proportion to its aspect
   ratio, so every photo in a row shares one height and keeps its true shape. */
.adt-ph-gallery { display: flex; flex-wrap: wrap; gap: 6px; }
.adt-ph-gallery::after { content: ""; flex-grow: 1000000; }
.adt-ph-tile {
	position: relative;
	display: block;
	flex-basis: calc(var(--ar) * var(--row));
	flex-shrink: 1;
	background: var(--c, #e8e7e0);
	overflow: hidden;
	cursor: zoom-in;
}
.adt-ph-tile::before { content: ""; display: block; padding-bottom: calc(100% / var(--ar)); }
.adt-ph-tile img {
	position: absolute; inset: 0;
	width: 100%; height: 100%;
	max-width: none;
	object-fit: cover;
	display: block;
}
.adt-ph-tile::after { content: ""; position: absolute; inset: 0; background: var(--adt-ink); opacity: 0; transition: opacity .3s; }
.adt-ph-tile:hover::after { opacity: .06; }
.adt-ph-tile:focus-visible { outline: 2px solid var(--adt-accent); outline-offset: 2px; }

/* Collection cards */
.adt-ph-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 36px) clamp(16px, 2.4vw, 28px); }
@media (max-width: 899px) { .adt-ph-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 559px) { .adt-ph-cards { grid-template-columns: 1fr; } }
.adt-ph-card { display: block; color: inherit; text-decoration: none; }
.adt-ph-cv { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--c, #e8e7e0); }
.adt-ph-cv img { width: 100%; height: 100%; max-width: none; object-fit: cover; display: block; transition: transform 1.2s var(--adt-ease); }
.adt-ph-card:hover .adt-ph-cv img { transform: scale(1.03); }
.adt-ph-card-t { display: block; font: 700 19px/1.25 var(--adt-head); letter-spacing: -.01em; margin: 14px 0 4px; }
.adt-ph-card-k { display: block; font-size: 14px; color: var(--adt-muted); }
.adt-ph-empty { color: var(--adt-muted); }

/* Next collection */
.adt-ph-next { margin: clamp(64px, 9vw, 110px) 0 0; padding-top: 24px; border-top: 1px solid var(--adt-line); }
.adt-ph-next-k { display: block; font: 600 13px/1 var(--adt-head); letter-spacing: .12em; text-transform: uppercase; color: var(--adt-muted); }
.adt-ph-next a { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 12px; color: inherit; text-decoration: none; }
.adt-ph-next-t { font: 700 clamp(26px, 4vw, 44px)/1.1 var(--adt-head); letter-spacing: -.02em; }
.adt-ph-arrow { font-size: 28px; transition: transform .3s var(--adt-ease); }
.adt-ph-next a:hover .adt-ph-arrow { transform: translateX(6px); }

/* Toast for "Link copied" */
.adt-ph-toast {
	position: fixed; left: 50%; bottom: 28px; z-index: 100;
	transform: translate(-50%, 20px);
	max-width: calc(100vw - 32px);
	background: var(--adt-ink); color: #fff;
	padding: 10px 18px; border-radius: 999px;
	font-size: 14px; text-align: center;
	opacity: 0; pointer-events: none;
	transition: opacity .25s, transform .25s var(--adt-ease);
}
.adt-ph-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* Full-screen viewer (PhotoSwipe). Theme button styles must not leak in. */
.pswp .pswp__button, .pswp .pswp__button:hover, .pswp .pswp__button:focus, .pswp .pswp__button:active {
	background: none !important; border: 0 !important; box-shadow: none !important;
	border-radius: 0; min-height: 0; text-transform: none; color: var(--pswp-icon-color);
}
.pswp .pswp__button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
.pswp { --pswp-bg: #121311; --pswp-icon-color: #e9e8e2; --pswp-icon-color-secondary: #121311; }
.adt-ph-counter {
	font: 500 13px/1 Manrope, system-ui, sans-serif;
	letter-spacing: .12em;
	color: #b9b8b1;
	padding: 0 22px;
	height: 60px; display: flex; align-items: center;
	font-variant-numeric: tabular-nums;
	margin-right: auto;
}
.adt-ph-caption {
	position: absolute; left: 0; right: 0; bottom: 0;
	padding: 16px 20px max(22px, env(safe-area-inset-bottom));
	text-align: center;
	font: 400 14.5px/1.5 "DM Sans", system-ui, sans-serif;
	color: #cfcec7;
	pointer-events: none;
	transition: opacity .3s;
}
.adt-ph-caption a { color: #fff; text-underline-offset: 3px; pointer-events: auto; }
.adt-ph-caption:empty { display: none; }
.pswp--ui-visible .adt-ph-caption { opacity: 1; }
.pswp:not(.pswp--ui-visible) .adt-ph-caption { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
	.adt-ph *, .adt-ph *::before, .adt-ph *::after { transition-duration: .01ms !important; }
}
