/* ==========================================================================
   Zoran Portfolio — theme styles
   Colours/fonts come from theme.json presets; layout options from
   Appearance → Zoran theme (CSS variables --zp-*).
   ========================================================================== */

:root {
	--zp-ink: var(--wp--preset--color--ink, #23212F);
	--zp-paper: var(--wp--preset--color--paper, #F6F5FA);
	--zp-cream: var(--wp--preset--color--cream, #F6F0E1);
	--zp-muted: var(--wp--preset--color--muted, #5B5868);
	--zp-slate: var(--wp--preset--color--slate, #2E4057);
	--zp-terra: var(--wp--preset--color--terracotta, #E07A5F);
	--zp-ochre: var(--wp--preset--color--ochre, #F2CC8F);
	--zp-sage: var(--wp--preset--color--sage, #81B29A);
	--zp-mono: var(--wp--preset--font-family--courier, 'Courier Prime', monospace);
	--zp-sans: var(--wp--preset--font-family--roboto, Roboto, sans-serif);
	--zp-ease: cubic-bezier(.2, .8, .2, 1);
	--zp-sheet-cols: 6;
	--zp-sheet-gap: 6px;
	--zp-ideas-cols: 4;
	--zp-video-gap: 72px;
}

.zp-mono,
.zp-intro,
.zp-back,
.zp-more,
.zp-sub { font-family: var(--zp-mono); }

/* ---------- Header & menu ---------- */
.zp-header { padding-top: 28px; padding-bottom: 28px; }
.zp-header__bar { gap: 16px; }
.zp-site-title {
	margin: 0;
	font-family: var(--zp-mono);
	font-size: 15px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.zp-site-title a { text-decoration: none; color: var(--zp-ink); }
.zp-nav { gap: 4px !important; }
.zp-nav .wp-block-navigation-item__content {
	display: inline-block;
	padding: 12px 14px;
	text-decoration: none;
	color: var(--zp-ink);
	transition: background .2s ease, color .2s ease;
}
.zp-nav .wp-block-navigation-item__content:hover { background: rgba(35, 33, 47, .07); }

/* Active section = its own colour (matched by link address, so it also
   works on single posts and photo topic pages). */
.zp-section-motion .zp-nav a[href*="/multimedia"],
.zp-section-motion .zp-nav a[href*="/motion"] { background: var(--zp-slate); color: var(--zp-cream); }
.zp-section-photography .zp-nav a[href*="/photography"] { background: var(--zp-terra); color: var(--zp-ink); }
.zp-section-ideas .zp-nav a[href*="/floating-ideas"] { background: var(--zp-ochre); color: var(--zp-ink); }
.zp-section-about .zp-nav a[href*="/about-me"] { background: var(--zp-sage); color: var(--zp-ink); }

/* ---------- Footer ---------- */
.zp-footer { margin-top: 96px; }
.zp-footer__bar {
	border-top: 3px solid #000;
	padding: 24px 0 40px;
	font-family: var(--zp-mono);
	font-size: 14px;
}
.zp-footer__bar p { margin: 0; }

/* ---------- Shared page head ---------- */
.zp-main h1 { margin: 24px 0 0; }
.zp-page-head { gap: 16px; margin: 24px 0 48px; }
.zp-page-head h1 { margin: 0; }
.zp-intro,
.zp-page-head .wp-block-post-excerpt {
	max-width: 380px;
	margin: 0;
	font-family: var(--zp-mono);
	font-size: 16px;
	line-height: 1.5;
}
.zp-page-head .wp-block-post-excerpt__excerpt { margin: 0; }
.zp-back { margin: 16px 0 0; font-size: 14px; font-weight: 700; }
.zp-more { margin: 0; font-size: 15px; font-weight: 700; }

/* ---------- Home ---------- */
.zp-headline {
	margin: 24px 0 40px !important;
	font-size: clamp(40px, 7.4vw, 96px) !important;
	font-weight: 900;
	line-height: .92;
	letter-spacing: -.035em;
}
.zp-headline strong { font-weight: 900; }
.zp-tiles { gap: 12px !important; }
.zp-tile {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: clamp(200px, 22vw, 280px);
	margin: 0 !important;
	padding: clamp(16px, 2.4vw, 28px);
	border-radius: var(--wp--custom--tile-radius, 4px);
}
.zp-tile__title {
	margin: 0;
	font-size: clamp(20px, 5vw, 64px) !important;
	letter-spacing: -.04em;
	line-height: 1;
}
.zp-tile__title a { color: inherit; text-decoration: none; }
.zp-tile__title a::after { content: ""; position: absolute; inset: 0; } /* whole tile clickable */
.zp-tile .zp-sub { margin: 0; font-size: 17px; }
@media (max-width: 600px) {
	.zp-tile { min-height: 150px; padding: 14px; }
	.zp-tile .zp-sub { font-size: 13px; line-height: 1.35; }
}

@keyframes zpSwipe  { from { clip-path: inset(0 100% 0 0); transform: translateX(-24px); opacity: 0; } to { clip-path: inset(0 0 0 0); transform: none; opacity: 1; } }
@keyframes zpSwipe2 { from { clip-path: inset(0 100% 0 0); transform: translateX(-24px); opacity: 0; } to { clip-path: inset(0 0 0 0); transform: none; opacity: 1; } }
.zp-animate .zp-tile .zp-sub { animation: zpSwipe .7s var(--zp-ease) both; }
.zp-animate .zp-tile:nth-child(1) .zp-sub { animation-delay: .30s; }
.zp-animate .zp-tile:nth-child(2) .zp-sub { animation-delay: .45s; }
.zp-animate .zp-tile:nth-child(3) .zp-sub { animation-delay: .60s; }
.zp-animate .zp-tile:nth-child(4) .zp-sub { animation-delay: .75s; }
.zp-animate .zp-tile:hover .zp-sub { animation-name: zpSwipe2; animation-delay: 0s; }

.zp-section-head { margin: 72px 0 20px !important; gap: 12px; }
.zp-section-head h2 { margin: 0; }

.zp-notes .wp-block-post-template { list-style: none; margin: 0; padding: 0; }
.zp-notes .wp-block-post {
	position: relative;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 8px 32px;
	margin: 0 !important;
	padding: 18px 28px 18px 0;
	border-bottom: 1px solid var(--zp-ink);
}
.zp-notes .wp-block-post::after { content: "→"; position: absolute; right: 0; top: 18px; font-family: var(--zp-mono); font-size: 18px; }
.zp-notes .wp-block-post-date { flex: 0 0 120px; }
.zp-notes__title {
	flex: 1 1 300px;
	margin: 0 !important;
	font-family: var(--zp-mono) !important;
	font-size: 20px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.25 !important;
	transition: padding .25s ease;
}
.zp-notes__title a { text-decoration: none; }
.zp-notes__title a::after { content: ""; position: absolute; inset: 0; }
.zp-notes .wp-block-post:hover .zp-notes__title { padding-left: 8px; }

/* ---------- Motion ---------- */
.zp-videos > * + * { margin-block-start: var(--zp-video-gap) !important; }
.zp-videos .wp-block-embed { margin-left: 0; margin-right: 0; }
.zp-lite__frame {
	position: relative;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #1B1A24;
	border-radius: 4px;
}
.zp-lite__frame img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.zp-lite__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.zp-lite__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 96px;
	height: 96px;
	margin: -48px 0 0 -48px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 0;
	border-radius: 50%;
	background: var(--zp-slate);
	color: var(--zp-cream);
	cursor: pointer;
	transition: transform .25s ease, background .25s ease;
}
.zp-lite__play:hover,
.zp-lite__play:focus-visible { transform: scale(1.08); background: var(--zp-terra); }
.zp-videos .wp-block-embed figcaption {
	margin: 14px 0 0;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--zp-ink);
	text-align: left;
	font-family: var(--zp-mono);
	font-size: 14px;
	color: var(--zp-ink);
}

/* ---------- Photography: topic list ---------- */
.zp-topics { display: flex; flex-direction: column; gap: 72px; }
.zp-topic { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 32px; text-decoration: none; color: var(--zp-ink); }
.zp-topic__text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 8px; }
.zp-topic__title { font-size: 40px; font-weight: 900; letter-spacing: -.03em; line-height: 1; }
.zp-topic__meta { font-family: var(--zp-mono); font-size: 14px; }
.zp-topic__strip { flex: 3 1 480px; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 6px; }
.zp-topic__thumb img { display: block; width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; transition: opacity .25s ease; }
.zp-topic:hover .zp-topic__thumb img { opacity: .85; }

/* ---------- Photography: contact sheet ---------- */
.zp-sheet .wp-block-gallery,
.zp-sheet .wp-block-gallery.has-nested-images {
	display: grid !important;
	grid-template-columns: repeat(var(--zp-sheet-cols), minmax(0, 1fr));
	gap: var(--zp-sheet-gap) !important;
	max-width: 100%;
}
.zp-sheet .wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	width: auto !important;
	margin: 0 !important;
	flex: none;
}
.zp-sheet .wp-block-gallery figure.wp-block-image img {
	width: 100% !important;
	height: auto !important;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	cursor: zoom-in;
	transition: opacity .25s ease;
}
.zp-sheet .wp-block-gallery figure.wp-block-image img:hover { opacity: .85; }
.zp-sheet .wp-block-gallery figcaption { display: none; }
.zp-sheet .wp-block-image img { cursor: zoom-in; }
@media (max-width: 782px) {
	.zp-sheet .wp-block-gallery,
	.zp-sheet .wp-block-gallery.has-nested-images { grid-template-columns: repeat(min(var(--zp-sheet-cols), 3), minmax(0, 1fr)); }
}

/* ---------- Lightbox ---------- */
.zp-lb {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: rgba(246, 245, 250, .97);
	opacity: 0;
	transition: opacity .3s ease;
	touch-action: pan-y;
}
.zp-lb.is-open { opacity: 1; }
.zp-lb__img {
	position: fixed;
	object-fit: contain;
	transform-origin: 0 0;
	transition: transform .45s var(--zp-ease), opacity .25s ease;
	will-change: transform;
	user-select: none;
}
.zp-lb__btn {
	position: fixed;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--zp-ink);
	opacity: .6;
	cursor: pointer;
	transition: opacity .2s ease;
}
.zp-lb__btn:hover,
.zp-lb__btn:focus-visible { opacity: 1; }
.zp-lb__close { top: 16px; right: 16px; }
.zp-lb__prev { left: 12px; top: 50%; margin-top: -26px; }
.zp-lb__next { right: 12px; top: 50%; margin-top: -26px; }
.zp-lb__count {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 20px;
	text-align: center;
	font-family: var(--zp-mono);
	font-size: 13px;
	color: var(--zp-muted);
}

/* ---------- Floating ideas: filter + grid ---------- */
.zp-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 4px;
	padding: 14px 0;
	margin-bottom: 40px;
	border-top: 3px solid #000;
	border-bottom: 1px solid var(--zp-ink);
}
.zp-filter__tag {
	padding: 10px 16px;
	border: 0;
	background: transparent;
	color: var(--zp-ink);
	font-family: var(--zp-mono);
	font-size: 28px;
	font-weight: 700;
	text-decoration-thickness: 3px;
	text-transform: capitalize;
	cursor: pointer;
	transition: color .2s ease, background .2s ease;
}
.zp-filter__tag:hover { background: var(--zp-ochre); }
.zp-filter__tag[aria-pressed="true"] { background: var(--zp-slate); color: var(--zp-cream); }
.zp-filter__tag.is-off { color: #8A8796; text-decoration: line-through; }
.zp-filter__clear {
	margin-left: auto;
	padding: 10px 12px;
	border: 0;
	background: none;
	font-family: var(--zp-mono);
	font-size: 14px;
	font-weight: 700;
	text-decoration: underline;
	color: var(--zp-ink);
	cursor: pointer;
}
.zp-filter__status { margin: -20px 0 20px; font-family: var(--zp-mono); font-size: 14px; font-weight: 700; }
.zp-filter__status:empty { display: none; }

.zp-ideas-query .zp-grid {
	display: grid !important;
	grid-template-columns: repeat(var(--zp-ideas-cols), minmax(0, 1fr));
	gap: 40px 20px;
	list-style: none;
	margin: 0;
	padding: 0;
}
@media (max-width: 1000px) { .zp-ideas-query .zp-grid { grid-template-columns: repeat(min(var(--zp-ideas-cols), 2), minmax(0, 1fr)); } }
@media (max-width: 560px)  { .zp-ideas-query .zp-grid { grid-template-columns: 1fr; } }
.zp-grid > .wp-block-post { display: flex; flex-direction: column; gap: 12px; margin: 0 !important; animation: zpIn .4s ease both; }
@keyframes zpIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.zp-card__img,
.zp-grid .wp-block-post-featured-image { margin: 0 !important; overflow: hidden; border-radius: 2px; }
.zp-grid .wp-block-post-featured-image img,
.zp-card__img img,
.zp-noimg {
	display: block;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 5;
	object-fit: cover;
	background: #CFCDD6;
	transition: filter .35s ease, opacity .35s ease, transform .3s ease;
}
.zp-grayscale .zp-grid .wp-block-post-featured-image img,
.zp-grayscale .zp-related .zp-card__img img { filter: grayscale(1); }
.zp-grid .wp-block-post:hover .wp-block-post-featured-image img,
.zp-related .zp-card:hover .zp-card__img img { filter: none; transform: translateY(-4px); }

.zp-card__title,
.zp-grid .wp-block-post-title {
	margin: 0 !important;
	font-family: var(--zp-mono) !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	letter-spacing: 0 !important;
	line-height: 1.2 !important;
}
.zp-grid .wp-block-post-title a { text-decoration: none; }
.zp-grid .wp-block-post:hover .wp-block-post-title a,
.zp-card:hover .zp-card__title {
	text-decoration: underline;
	text-decoration-color: var(--zp-terra);
	text-decoration-thickness: 3px;
}
.zp-card__meta { gap: 6px 10px !important; font-family: var(--zp-mono); font-size: 13px; color: var(--zp-muted); }
.zp-card__meta .wp-block-post-date,
.zp-card__meta .wp-block-post-terms { margin: 0; font-size: 13px; }
.zp-card__meta .wp-block-post-date + .wp-block-post-terms::before { content: "· "; }
.zp-card__meta a { color: var(--zp-muted); text-decoration: none; }

/* Filter states (set by zoran.js) */
.zp-grid .is-match .wp-block-post-featured-image img { filter: none !important; }
.zp-grid .is-dim { color: var(--zp-muted); }
.zp-grid .is-dim .wp-block-post-featured-image img { filter: grayscale(1) brightness(1.25) contrast(.55) !important; opacity: .6; }
.zp-grid .zp-divider {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 16px;
	margin: 24px 0 0 !important;
	font-family: var(--zp-mono);
	font-size: 14px;
	font-weight: 700;
	color: var(--zp-muted);
	list-style: none;
}
.zp-grid .zp-divider::after { content: ""; flex: 1; height: 1px; background: var(--zp-ink); }

/* ---------- Single post ---------- */
.zp-post-layout { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 56px; margin-top: 20px; }
.zp-article { flex: 999 1 560px; min-width: 0; max-width: 720px; }
.zp-article > .wp-block-post-title {
	margin: 0 0 20px;
	font-size: clamp(40px, 6vw, 80px);
	line-height: .95;
	letter-spacing: -.035em;
}
.zp-post-meta {
	gap: 8px 20px !important;
	align-items: center;
	padding-bottom: 20px;
	border-bottom: 3px solid #000;
	font-family: var(--zp-mono);
	font-size: 14px;
}
.zp-post-meta > * { margin: 0 !important; }
.zp-post-meta .wp-block-post-date { color: var(--zp-ink); }
.zp-tags a,
.zp-chip {
	display: inline-block;
	margin-right: 6px;
	padding: 2px 8px;
	background: var(--zp-ochre);
	color: var(--zp-ink);
	font-weight: 700;
	text-decoration: none;
}
.zp-tags .wp-block-post-terms__separator { display: none; }
.zp-readtime { color: var(--zp-muted); }
.zp-featured { margin: 40px 0 !important; }
.zp-featured img { width: 100%; height: auto; border-radius: 2px; }
.zp-content { font-size: 19px; line-height: 1.65; }
.zp-content > p:first-child { font-size: 24px; line-height: 1.45; font-weight: 700; }
.zp-content h2 { font-size: 34px; margin-top: 1.4em; }
.zp-content .wp-block-image img,
.zp-content .wp-block-gallery img { border-radius: 2px; }
.zp-content figcaption { font-family: var(--zp-mono); font-size: 13px; color: var(--zp-muted); text-align: left; }

.zp-prevnext { gap: 12px !important; margin-top: 64px; }
.zp-prevnext .wp-block-post-navigation-link {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 20px;
	border: 2px solid var(--zp-ink);
	color: var(--zp-ink);
	transition: background .2s ease, color .2s ease;
}
.zp-prevnext .wp-block-post-navigation-link:empty { display: none; }
.zp-prevnext .wp-block-post-navigation-link a {
	color: inherit;
	text-decoration: none;
	font-size: 20px;
	font-weight: 900;
	letter-spacing: -.02em;
	line-height: 1.1;
}
.zp-prevnext .wp-block-post-navigation-link a::after { content: ""; position: absolute; inset: 0; }
.zp-prevnext .wp-block-post-navigation-link:hover { background: var(--zp-slate); color: var(--zp-cream); }
.zp-prevnext__next { text-align: right; grid-column: 2; }
.zp-prevnext .post-navigation-link__label { font-family: var(--zp-mono); font-size: 13px; }

.zp-aside { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 20px; padding-top: 12px; }
.zp-aside > * { margin: 0 !important; }
.zp-aside__title { font-size: 28px; }
.zp-aside__sub { margin-top: -14px !important; padding-bottom: 14px; border-bottom: 3px solid #000; font-family: var(--zp-mono); font-size: 13px; color: var(--zp-muted); }
.zp-related { display: flex; flex-direction: column; gap: 20px; }
.zp-related .zp-card {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--zp-ink);
	text-decoration: none;
	color: var(--zp-ink);
}
.zp-related .zp-card__img img,
.zp-related .zp-noimg { aspect-ratio: 3 / 2; }
.zp-related .zp-card__title { font-size: 17px !important; }
.zp-related .zp-card__meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.zp-empty { font-family: var(--zp-mono); color: var(--zp-muted); }

/* ---------- Respect "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}
