/* Hero band */
.mod-project-hero {
	/* solid fallback first so white title never lands on cream if gradient fails */
	background-color: var(--mod-primary-strong);
	background-image: linear-gradient(135deg, var(--mod-primary-strong) 0%, var(--mod-ink) 100%);
	color: #fff;
	padding: clamp(60px, 7vw, 110px) 6vw clamp(50px, 6vw, 90px);
	position: relative;
	overflow: hidden;
}
.mod-project-hero::before {
	content: "";
	position: absolute;
	right: -120px; top: -100px;
	width: 380px; height: 380px;
	background: radial-gradient(circle, rgba(176, 137, 72, .22) 0%, transparent 70%);
	pointer-events: none;
}
.mod-project-hero-inner {
	max-width: 1180px;
	margin: 0 auto;
	position: relative;
}
.mod-project-hero .mod-eyebrow {
	color: var(--mod-accent-soft);
	display: block;
	margin-bottom: 8px;
}
.mod-project-title {
	font-family: var(--mod-font-display);
	color: #fff !important;
	font-size: clamp(40px, 6vw, 80px) !important;
	font-weight: 500;
	line-height: 1.05;
	margin: 0 0 18px !important;
	letter-spacing: -.01em;
}
.mod-project-tagline {
	color: rgba(255,253,247,.86) !important;
	font-size: clamp(18px, 1.6vw, 22px) !important;
	max-width: 720px;
	margin: 0 0 28px !important;
	line-height: 1.55;
}
.mod-project-chips {
	list-style: none;
	margin: 0; padding: 0;
	display: grid;
	/* auto-fit so long chip values ("Plated · family-style · stations") reflow by content
	   instead of cramming into rigid thirds; collapses to 1 column on its own on phones. */
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 10px;
	max-width: 920px;
}
.mod-project-chips li {
	background: rgba(255,253,247,.06);
	border: 1px solid rgba(255,253,247,.14);
	border-radius: var(--mod-radius);
	padding: 14px 18px;
	list-style: none !important;
}
/* stray markers/bullet-pseudos from list resets elsewhere (seen as tiny dots
   beside the chips on the dark hero) */
.mod-project-chips li::before { content: none !important; }
.mod-project-chips li::marker { content: none; }
.mod-project-chips .mod-chip-label {
	display: block;
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: rgba(255,253,247,.6);
	margin-bottom: 4px;
}
.mod-project-chips .mod-chip-value {
	display: block;
	font-family: var(--mod-font-display);
	color: #fff;
	font-size: 17px;
	line-height: 1.35;
}
.mod-project-archive-note {
	color: rgba(255,253,247,.72) !important;
	font-size: 14px !important;
	margin: 22px 0 0 !important;
	max-width: 720px;
}

/* Hide Divi's own duplicate title on project singulars — the mod hero is the title now.
   Divi 5 renders the project title as a BARE <h1> inside .et_main_title (no class on the
   h1), which my earlier .entry-title/.post-title selectors never matched — leaving TWO
   identical H1s on every project page. .et_main_title is the load-bearing fix. */
.single-project .et_main_title,
.single-project .et_pb_section:first-of-type .et_pb_post_title,
.single-project .et_pb_section:first-of-type .et_pb_title_meta_container,
.single-project article > h1.entry-title,
.single-project .post-title { display: none !important; }

/* Other projects strip */
.mod-other-projects {
	background: var(--mod-ink);
	color: #fff;
	padding: clamp(64px, 8vw, 110px) 6vw;
}
.mod-other-projects-inner { max-width: 1180px; margin: 0 auto; }
.mod-other-projects-head { text-align: center; margin-bottom: 36px; }
.mod-other-projects-head .mod-eyebrow { color: var(--mod-accent-soft); }
.mod-other-projects-head h2 {
	font-family: var(--mod-font-display);
	color: #fff !important;
	font-size: clamp(28px, 3vw, 40px) !important;
	margin: 0 !important;
	font-weight: 500;
}
.mod-other-projects-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 20px;
}
/* two steps down, not a 3→1 cliff at 980px (the old collapse produced ~600px-tall
   full-width cover images across the whole tablet band — launch audit 2026-07) */
@media (max-width: 980px) { .mod-other-projects-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .mod-other-projects-grid { grid-template-columns: 1fr; } }

/* ── Project body content (launch audit 2026-07: featured image rendered at
      intrinsic size flush against the viewport edge, and the WP gallery kept
      its 2005-era float-33% inline styles) ── */
.single-project .et_pb_code_inner > picture,
.single-project .et_pb_code_inner > img {
	display: block;
	max-width: 1180px;
	margin: clamp(28px, 4vw, 56px) auto 0;
	padding: 0 6vw;
}
.single-project .et_pb_code_inner > picture img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--mod-radius);
	box-shadow: var(--mod-shadow-card);
}
.single-project .entry-content {
	max-width: 1180px;
	margin: 0 auto;
	padding: clamp(20px, 3vw, 36px) 6vw clamp(40px, 5vw, 72px);
}
.single-project .gallery {
	display: grid !important;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	margin: 0 !important;
}
/* WP's classic gallery emits <br style="clear:both"> row-breaks as DIRECT children;
   in a grid container each one blockifies into an item and eats a cell — the holes/
   stair-stepping seen on 3 of 4 project pages (design regression pass 2026-07). */
.single-project .gallery br { display: none !important; }
.single-project .gallery .gallery-item {
	float: none !important;
	width: auto !important;
	margin: 0 !important;
}
.single-project .gallery .gallery-icon { margin: 0; height: 100%; }
.single-project .gallery .gallery-icon a,
.single-project .gallery .gallery-icon picture { display: block; height: 100%; }
.single-project .gallery img {
	border: 0 !important;
	display: block;
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: var(--mod-shadow-card);
	transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
}
.single-project .gallery .gallery-icon a:hover img {
	transform: scale(1.03);
	box-shadow: var(--mod-shadow-card-hover);
}
@media (max-width: 640px) {
	.single-project .gallery { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* Progressive Buffet stores its photos as loose <p><a><img class="alignnone"> runs
   (no .gallery wrapper) — give them the same grid treatment (design pass 2026-07). */
.single-project .entry-content > p:has(img.alignnone) {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
	gap: 14px;
	margin: 0;
}
.single-project .entry-content > p:has(img.alignnone) > a,
.single-project .entry-content > p:has(img.alignnone) picture { display: block; height: 100%; }
.single-project .entry-content p img.alignnone {
	display: block;
	width: 100% !important;
	height: 100% !important;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: 8px;
	box-shadow: var(--mod-shadow-card);
	transition: transform .3s ease, box-shadow .3s ease, filter .3s ease;
}
.single-project .entry-content > p:has(img.alignnone) > a:hover img {
	transform: scale(1.03);
	box-shadow: var(--mod-shadow-card-hover);
}
@media (max-width: 640px) {
	.single-project .entry-content > p:has(img.alignnone) { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* One unifying grade for the archival photography — hover restores full color.
   (The lightbox image stays ungraded for fidelity.) */
.single-project .gallery img,
.single-project .entry-content p img.alignnone,
.single-project .et_pb_code_inner > picture img,
.mod-other-cover { filter: saturate(.86) contrast(1.05) brightness(1.01) sepia(.06); }
.single-project .gallery .gallery-icon a:hover img,
.single-project .entry-content > p:has(img.alignnone) > a:hover img { filter: saturate(1) contrast(1.04); }
.mod-other-card {
	display: flex;
	flex-direction: column;
	background: rgba(255,253,247,.04);
	border: 1px solid rgba(255,253,247,.10);
	border-radius: var(--mod-radius);
	overflow: hidden;
	text-decoration: none;
	color: #fff;
	transition: transform .25s ease, border-color .25s ease, background .25s ease;
}
.mod-other-card:hover {
	transform: translateY(-3px);
	border-color: var(--mod-accent);
	background: rgba(255,253,247,.07);
	color: #fff;
}
.mod-other-cover {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}
.mod-other-cover picture { display: block; width: 100%; height: 100%; }
.mod-other-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mod-other-body {
	padding: 18px 20px 22px;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.mod-other-eyebrow {
	font-size: 11px;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--mod-accent-soft);
}
.mod-other-name {
	font-family: var(--mod-font-display);
	font-size: 22px;
	line-height: 1.2;
	color: #fff;
}
.mod-other-arrow {
	margin-top: 6px;
	color: var(--mod-accent);
	font-size: 20px;
	transition: transform .2s ease;
}
.mod-other-card:hover .mod-other-arrow { transform: translateX(4px); }
.mod-other-projects-back { text-align: center; margin-top: 32px; }
.mod-back-link {
	color: rgba(255,253,247,.78);
	font-family: var(--mod-font-body);
	font-size: 14px;
	letter-spacing: .04em;
	text-transform: uppercase;
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color .15s ease, border-color .15s ease;
}
.mod-back-link:hover {
	color: #fff;
	border-bottom-color: rgba(255,253,247,.55);
}

@media (prefers-reduced-motion: reduce) {
	.single-project .gallery img,
	.single-project .entry-content p img.alignnone,
	.mod-other-card,
	.mod-other-arrow { transition: none; }

	.single-project .gallery .gallery-icon a:hover img,
	.single-project .entry-content > p:has(img.alignnone) > a:hover img,
	.mod-other-card:hover,
	.mod-other-card:hover .mod-other-arrow { transform: none; }
}
