/* =========================================================================
   BZORG — fine-art photography theme
   A near-black, gallery-grade canvas. Photographs are grayscale and reveal
   their colour on hover. Typography stays quiet; the images speak.
   ========================================================================= */

:root {
	--bg:        #0b0b0c;
	--bg-alt:    #101012;
	--bg-elev:   #161618;
	--text:      #ededee;
	--muted:     #8c8c93;
	--faint:     #5a5a60;
	--line:      rgba(255, 255, 255, 0.12);
	--line-soft: rgba(255, 255, 255, 0.06);
	--accent:    #f4f4f4;

	--serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
	--sans:  "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	--ease:   cubic-bezier(0.22, 1, 0.36, 1);
	--gut:    clamp(16px, 4vw, 56px);
	--maxw:   1480px;
}

/* ---------- reset / base ------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--sans);
	font-weight: 300;
	font-size: 16px;
	line-height: 1.65;
	letter-spacing: 0.01em;
	-webkit-font-smoothing: antialiased;
	text-rendering: optimizeLegibility;
	overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: inherit; text-decoration: none; transition: color 0.3s var(--ease), opacity 0.3s var(--ease); }
a:hover { color: #fff; }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: 0.01em; line-height: 1.1; margin: 0; }

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

.skip-link {
	position: absolute; left: -9999px; top: 0; z-index: 1000;
	background: #fff; color: #000; padding: 10px 16px;
}
.skip-link:focus { left: 12px; top: 12px; }

/* ---------- the signature interaction: grayscale → colour --------------- */
.bw-hover img {
	filter: grayscale(1) contrast(1.03) brightness(0.96);
	transition: filter 0.7s var(--ease), transform 1.1s var(--ease), opacity 0.7s var(--ease);
	will-change: filter, transform;
}
.bw-hover:hover img,
.bw-hover:focus-within img { filter: grayscale(0) contrast(1) brightness(1); }

/* On touch devices, colour the tile the visitor taps / scrolls onto. */
body.is-touch .bw-hover.is-active img { filter: grayscale(0); }

/* ---------- header / nav ------------------------------------------------ */
.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	padding: clamp(14px, 2.2vw, 26px) var(--gut);
	display: flex;
	background: linear-gradient(to bottom, rgba(8,8,9,0.95) 0%, rgba(8,8,9,0.55) 50%, rgba(8,8,9,0) 100%);
	transition: background 0.4s var(--ease);
}
.site-header.is-scrolled { background: rgba(9,9,10,0.86); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }

.site-header__inner {
	width: 100%;
	max-width: var(--maxw);
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.site-brand { display: flex; align-items: baseline; gap: 14px; min-width: 0; }
.site-title {
	font-family: var(--serif);
	font-size: clamp(20px, 2.4vw, 28px);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 1px 18px rgba(0,0,0,0.85), 0 1px 3px rgba(0,0,0,0.7);
}
.site-tagline { color: #d2d2d6; font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; text-shadow: 0 1px 12px rgba(0,0,0,0.85); }
.custom-logo { max-height: 48px; width: auto; }

.site-nav .nav-list {
	list-style: none; margin: 0; padding: 0;
	display: flex; align-items: center; gap: clamp(16px, 2vw, 34px);
}
.nav-item a {
	color: #e7e7ea;
	font-size: 12px;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	position: relative;
	text-shadow: 0 1px 14px rgba(0,0,0,0.9), 0 1px 2px rgba(0,0,0,0.7);
}
.nav-item a::after {
	content: ""; position: absolute; left: 0; bottom: -6px;
	width: 0; height: 1px; background: currentColor; transition: width 0.4s var(--ease);
}
.nav-item a:hover { color: #fff; }
.nav-item a:hover::after,
.nav-item.current-menu-item a::after { width: 100%; }
.current_page_item > a, .current-menu-item > a { color: #fff; }

.nav-toggle {
	display: none;
	width: 40px; height: 32px;
	background: none; border: 0; cursor: pointer; padding: 6px;
	z-index: 110;
}
.nav-toggle span { display: block; height: 1.5px; background: #fff; margin: 6px 0; transition: transform 0.4s var(--ease), opacity 0.3s var(--ease); filter: drop-shadow(0 1px 3px rgba(0,0,0,0.85)); }

/* ---------- hero mosaic ------------------------------------------------- */
.hero { position: relative; min-height: 100svh; padding-top: 0; }
.hero__mosaic {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	grid-auto-rows: minmax(0, 1fr);
	gap: 6px;
	height: 100svh;
}
.hero__tile { margin: 0; overflow: hidden; position: relative; background: var(--bg-alt); }
.hero__tile img { width: 100%; height: 100%; object-fit: cover; }
.hero__tile:hover img { transform: scale(1.04); }

/* editorial spans for a non-uniform mosaic */
.hero__mosaic .hero__tile:nth-child(1) { grid-column: span 2; grid-row: span 2; }
.hero__mosaic .hero__tile:nth-child(6) { grid-row: span 2; }
.hero__mosaic .hero__tile:nth-child(8) { grid-column: span 2; }

.hero__overlay {
	position: absolute; left: 0; right: 0; bottom: clamp(28px, 6vw, 64px);
	text-align: center; pointer-events: none; padding: 0 var(--gut);
	mix-blend-mode: difference;
}
.hero__title {
	font-size: clamp(40px, 9vw, 132px);
	font-weight: 500;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #fff;
	text-shadow: 0 2px 40px rgba(0,0,0,0.5);
}
.hero__tagline { color: #d8d8d8; letter-spacing: 0.3em; text-transform: uppercase; font-size: 12px; margin-top: 10px; }

.hero__hint {
	position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
	width: 1px; height: 40px; background: linear-gradient(to bottom, transparent, rgba(255,255,255,0.6));
	animation: hint 2.4s var(--ease) infinite;
}
@keyframes hint { 0%,100% { opacity: 0.2; transform: translateX(-50%) scaleY(0.6); } 50% { opacity: 1; transform: translateX(-50%) scaleY(1); } }

/* ---------- poem -------------------------------------------------------- */
.poem-section {
	padding: clamp(80px, 16vh, 200px) var(--gut);
	display: flex; justify-content: center;
	border-bottom: 1px solid var(--line-soft);
}
.poem { text-align: center; }
.poem .poem-line {
	display: block;
	font-family: var(--serif);
	font-style: italic;
	font-size: clamp(20px, 3vw, 34px);
	line-height: 1.7;
	color: #e9e9ea;
	letter-spacing: 0.01em;
}
.poem .poem-break { display: block; height: 1.2em; }
.project__poem .poem .poem-line { font-size: clamp(18px, 2.4vw, 28px); }

/* poem trigger (the tiny "i") + modal */
.poem-trigger {
	display: inline-flex; flex-direction: column; align-items: center; gap: 14px;
	background: none; border: 0; cursor: pointer; color: var(--muted);
	transition: color 0.4s var(--ease);
}
.poem-trigger:hover, .poem-trigger:focus-visible { color: #fff; outline: none; }
.poem-trigger__mark {
	position: relative;
	display: flex; align-items: center; justify-content: center;
	width: 46px; height: 46px; border-radius: 50%;
	border: 1px solid var(--line);
	font-family: var(--serif); font-style: italic; font-size: 22px; line-height: 1;
	transition: border-color 0.4s var(--ease), transform 0.6s var(--ease);
}
.poem-trigger__mark::after {
	content: ""; position: absolute; inset: -7px; border-radius: 50%;
	border: 1px solid var(--line-soft);
	animation: poemPulse 3.2s var(--ease) infinite;
}
@keyframes poemPulse { 0% { transform: scale(0.85); opacity: 0.6; } 70% { transform: scale(1.3); opacity: 0; } 100% { opacity: 0; } }
.poem-trigger:hover .poem-trigger__mark, .poem-trigger:focus-visible .poem-trigger__mark { border-color: #fff; transform: translateY(-2px); }
.poem-trigger__hint { font-size: 11px; letter-spacing: 0.32em; text-transform: uppercase; opacity: 0.55; transition: opacity 0.4s var(--ease); }
.poem-trigger:hover .poem-trigger__hint, .poem-trigger:focus-visible .poem-trigger__hint { opacity: 1; }

.poem-modal {
	position: fixed; inset: 0; z-index: 1000;
	display: flex; align-items: center; justify-content: center; padding: var(--gut);
	opacity: 0; visibility: hidden; transition: opacity 0.5s var(--ease), visibility 0.5s;
}
.poem-modal.is-open { opacity: 1; visibility: visible; }
.poem-modal__backdrop { position: absolute; inset: 0; background: rgba(6,6,7,0.94); backdrop-filter: blur(6px); }
.poem-modal__box {
	position: relative; z-index: 1; width: 100%; max-width: 660px;
	background: #0e0e10; border: 1px solid var(--line);
	padding: clamp(44px, 7vw, 88px) clamp(28px, 6vw, 76px);
	box-shadow: 0 40px 140px rgba(0,0,0,0.6);
	transform: translateY(18px) scale(0.98); transition: transform 0.6s var(--ease);
}
.poem-modal.is-open .poem-modal__box { transform: none; }
.poem-modal .poem .poem-line { font-size: clamp(19px, 3vw, 29px); }
.poem-modal__close {
	position: absolute; top: 10px; right: 16px;
	background: none; border: 0; color: var(--muted); font-size: 30px; line-height: 1; cursor: pointer; transition: color 0.3s;
}
.poem-modal__close:hover { color: #fff; }

/* ---------- homepage project sections ----------------------------------- */
.projects { display: block; }
.project-section {
	border-bottom: 1px solid var(--line-soft);
}
.project-section__link {
	display: grid;
	grid-template-columns: 1.15fr 0.85fr;
	align-items: stretch;
	min-height: clamp(420px, 70vh, 760px);
}
.project-section.is-right .project-section__link { grid-template-columns: 0.85fr 1.15fr; }
.project-section.is-right .project-section__media { order: 2; }
.project-section.is-right .project-section__caption { order: 1; }

.project-section__media { position: relative; overflow: hidden; background: var(--bg-alt); }
.project-section__cover { width: 100%; height: 100%; object-fit: cover; }
.project-section:hover .project-section__cover { transform: scale(1.03); }

.project-section__strip {
	position: absolute; right: 16px; bottom: 16px;
	display: flex; gap: 8px;
	opacity: 0; transform: translateY(10px);
	transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.project-section:hover .project-section__strip { opacity: 1; transform: translateY(0); }
.project-section__strip img { width: 64px; height: 64px; object-fit: cover; border: 1px solid rgba(255,255,255,0.4); }

.project-section__caption {
	display: flex; flex-direction: column; justify-content: center;
	gap: 14px; padding: clamp(28px, 6vw, 90px);
	background: var(--bg);
}
.project-section__index { color: var(--faint); font-size: 13px; letter-spacing: 0.3em; }
.project-section__title {
	font-size: clamp(40px, 7vw, 92px);
	line-height: 0.98;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}
.project-section__subtitle { color: var(--muted); letter-spacing: 0.28em; text-transform: uppercase; font-size: 12px; }
.project-section__cta {
	margin-top: 12px; font-size: 12px; letter-spacing: 0.22em; text-transform: uppercase;
	color: var(--muted); display: inline-flex; align-items: center; gap: 10px; width: max-content;
}
.project-section__cta::after { content: "→"; transition: transform 0.4s var(--ease); }
.project-section:hover .project-section__cta { color: #fff; }
.project-section:hover .project-section__cta::after { transform: translateX(8px); }

/* ---------- works archive grid ------------------------------------------ */
.archive-head { padding: calc(72px + var(--gut)) var(--gut) 0; max-width: var(--maxw); margin: 0 auto; }
.archive-title { font-size: clamp(40px, 8vw, 96px); text-transform: uppercase; letter-spacing: 0.04em; }
.works-grid {
	max-width: var(--maxw); margin: 0 auto; padding: var(--gut);
	display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px;
}
.work-card { display: block; background: var(--bg-alt); }
.work-card__media { aspect-ratio: 4 / 5; overflow: hidden; }
.work-card__media img { width: 100%; height: 100%; object-fit: cover; }
.work-card:hover .work-card__media img { transform: scale(1.04); }
.work-card__caption { padding: 16px 4px 28px; }
.work-card__title { font-size: 26px; text-transform: uppercase; letter-spacing: 0.03em; }
.work-card__subtitle { color: var(--muted); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; }

/* ---------- single project --------------------------------------------- */
.project { padding-top: calc(64px + 6vh); }
.project__header { text-align: center; padding: clamp(48px, 10vh, 120px) var(--gut) clamp(24px, 4vh, 48px); }
.project__title { font-size: clamp(48px, 11vw, 150px); text-transform: uppercase; letter-spacing: 0.03em; line-height: 0.95; }
.project__subtitle { color: var(--muted); letter-spacing: 0.32em; text-transform: uppercase; font-size: 13px; margin-top: 18px; }

.project__poem { padding: clamp(20px, 5vh, 60px) var(--gut); display: flex; justify-content: center; }

.project__statement { padding: clamp(20px, 5vh, 56px) var(--gut) clamp(40px, 8vh, 90px); display: flex; justify-content: center; }
.project__statement-text {
	max-width: 760px;
	font-family: var(--serif);
	font-size: clamp(19px, 2.1vw, 25px);
	line-height: 1.85;
	color: #d9d9db;
	text-align: center;
}
.project__statement-text p { margin: 0 0 1.1em; }

/* progress bar */
.project__progress { padding: clamp(10px, 3vh, 30px) var(--gut) clamp(40px, 7vh, 80px); display: flex; justify-content: center; }
.progress { width: min(760px, 100%); }
.progress__meta { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 14px; }
.progress__label { font-size: 12px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--muted); }
.progress__count { font-size: 13px; letter-spacing: 0.1em; color: #cfcfd2; font-variant-numeric: tabular-nums; }
.progress__track { position: relative; height: 2px; background: var(--line); overflow: hidden; }
.progress__bar {
	position: absolute; left: 0; top: 0; height: 100%;
	width: 0; background: #fff;
	transition: width 1.6s var(--ease);
}
.progress__track::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,0.04)); }
.progress__percent { display: block; margin-top: 10px; text-align: right; color: var(--faint); font-size: 12px; letter-spacing: 0.1em; font-variant-numeric: tabular-nums; }

/* gallery */
.project__gallery { padding: clamp(20px, 4vh, 48px) var(--gut) clamp(40px, 8vh, 90px); }
.gallery {
	columns: 4 260px;
	column-gap: 8px;
	max-width: var(--maxw); margin: 0 auto;
}
.gallery__item { margin: 0 0 8px; break-inside: avoid; background: var(--bg-alt); overflow: hidden; }
.gallery__item img { width: 100%; height: auto; }
.gallery__link { display: block; cursor: zoom-in; }
.gallery__item:hover img { transform: scale(1.02); }

/* purchase / NFT */
.project__purchase { padding: clamp(30px, 8vh, 120px) var(--gut); display: flex; justify-content: center; border-top: 1px solid var(--line-soft); }
.purchase-btn {
	display: inline-flex; align-items: center; gap: 14px;
	font-family: var(--serif); font-style: italic;
	font-size: clamp(22px, 3.4vw, 40px);
	color: #fff;
	padding: 18px 8px;
	position: relative;
}
.purchase-btn::after {
	content: ""; position: absolute; left: 0; bottom: 10px; height: 1px; width: 100%;
	background: currentColor; transform: scaleX(0.18); transform-origin: left; transition: transform 0.6s var(--ease);
}
.purchase-btn:hover::after { transform: scaleX(1); }
.purchase-btn--ghost { font-size: 14px; font-style: normal; letter-spacing: 0.2em; text-transform: uppercase; }

/* ---------- generic content -------------------------------------------- */
.content-narrow { max-width: 760px; margin: 0 auto; padding: calc(96px + 6vh) var(--gut) 120px; }
.entry__title { font-size: clamp(34px, 6vw, 64px); margin-bottom: 24px; }
.entry__content p { margin: 0 0 1.2em; }
.error-404 { text-align: center; }
.error-404 .entry__title { font-size: clamp(80px, 20vw, 200px); }

/* ---------- footer ------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line-soft); padding: clamp(40px, 8vh, 96px) var(--gut); }
.site-footer__inner {
	max-width: var(--maxw); margin: 0 auto;
	display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
}
.footer-contact { display: flex; gap: 28px; }
.footer-contact a { color: var(--muted); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; }
.footer-contact a:hover { color: #fff; }
.footer-copy { color: var(--faint); font-size: 12px; letter-spacing: 0.14em; margin: 0; }

/* ---------- lightbox ---------------------------------------------------- */
.lightbox {
	position: fixed; inset: 0; z-index: 1000;
	background: rgba(6,6,7,0.96);
	display: flex; align-items: center; justify-content: center;
	opacity: 0; visibility: hidden; transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__img { max-width: 92vw; max-height: 88vh; object-fit: contain; box-shadow: 0 30px 120px rgba(0,0,0,0.6); }
.lightbox__btn {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: none; border: 0; color: #fff; cursor: pointer;
	font-size: 40px; line-height: 1; padding: 20px; opacity: 0.6; transition: opacity 0.3s;
}
.lightbox__btn:hover { opacity: 1; }
.lightbox__prev { left: 8px; }
.lightbox__next { right: 8px; }
.lightbox__close { top: 18px; right: 18px; transform: none; font-size: 30px; }
.lightbox__count { position: absolute; bottom: 22px; left: 0; right: 0; text-align: center; color: var(--muted); font-size: 12px; letter-spacing: 0.2em; }

/* ---------- reveal on scroll ------------------------------------------- */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- responsive -------------------------------------------------- */
@media (max-width: 1024px) {
	.hero__mosaic { grid-template-columns: repeat(3, 1fr); }
	.hero__mosaic .hero__tile:nth-child(8) { grid-column: auto; }
	.gallery { columns: 3 220px; }
}

@media (max-width: 760px) {
	.nav-toggle { display: block; }
	.site-nav {
		position: fixed; inset: 0; z-index: 105;
		background: #0a0a0b;
		display: flex; align-items: center; justify-content: center;
		transform: translateY(-100%);
		visibility: hidden; opacity: 0; pointer-events: none;
		transition: transform 0.5s var(--ease), opacity 0.4s var(--ease), visibility 0.4s;
	}
	.site-nav.is-open { transform: translateY(0); visibility: visible; opacity: 1; pointer-events: auto; }
	.nav-item a { text-shadow: none; }
	/* A scrolled header's backdrop-filter would make it the containing block for
	   the fixed drawer, clipping it to the header when opened mid-page. Disable
	   it on mobile so the drawer always covers the full viewport. */
	.site-header.is-scrolled { backdrop-filter: none; -webkit-backdrop-filter: none; }
	.site-nav .nav-list { flex-direction: column; gap: 26px; text-align: center; }
	.nav-item a { font-size: 18px; letter-spacing: 0.2em; }
	body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
	body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
	body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

	.hero__mosaic { grid-template-columns: repeat(2, 1fr); }
	.hero__mosaic .hero__tile:nth-child(1) { grid-column: span 2; }
	.hero__mosaic .hero__tile:nth-child(6),
	.hero__mosaic .hero__tile:nth-child(8) { grid-column: auto; grid-row: auto; }

	.project-section__link,
	.project-section.is-right .project-section__link { grid-template-columns: 1fr; }
	.project-section__media { min-height: 56vh; order: 1 !important; }
	.project-section__caption { order: 2 !important; padding: 36px var(--gut) 56px; }
	.project-section__strip { display: none; }

	.gallery { columns: 2 150px; column-gap: 6px; }
	.gallery__item { margin-bottom: 6px; }
	.lightbox__btn { font-size: 30px; padding: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	* { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
	.reveal { opacity: 1; transform: none; }
}
