/* ============================================================
   Hamburger nav (Cravotta-style) + branded footer band
   Staging 2026-08-08
   ============================================================ */

/* --- Hide Kadence navigation; the custom overlay is shared across breakpoints. --- */
.header-navigation,
.header-navigation .primary-menu-container {
	display: none !important;
}
#mobile-toggle,
#mobile-drawer {
	display: none !important;
}

/* Hide the header social icon so only logo + hamburger remain (Cravotta style) */
.header-social-wrap {
	display: none !important;
}

/* --- Homepage header: no solid/gradient band over the hero image --- */
.usd-home-scrim {
	display: none !important;
}
body.home .usd-home-scrim {
	display: none !important;
}

body.usd-menu-open {
	overflow: hidden;
}

/* --- Hamburger button: top of the document, above the overlay when open. --- */
.usd-nav-toggle {
	position: absolute;
	top: 28px;
	right: 30px;
	z-index: 99990;
	width: 46px;
	height: 46px;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	background: transparent;
	border: none;
	cursor: pointer;
}
.usd-nav-toggle:hover,
.usd-nav-toggle:focus,
.usd-nav-toggle:active {
	background: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}
.usd-nav-toggle:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}
.usd-nav-toggle span {
	display: block;
	width: 30px;
	height: 2px;
	background: #fff;
	border-radius: 1px;
	transition: transform .25s ease, opacity .25s ease;
}
body.usd-menu-open .usd-nav-toggle span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
body.usd-menu-open .usd-nav-toggle span:nth-child(2) { opacity: 0; }
body.usd-menu-open .usd-nav-toggle span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* --- Overlay --- */
.usd-nav-overlay {
	position: fixed;
	inset: 0;
	z-index: 99980;
	background: #101010;
	color: #fff;
	display: flex;
	flex-direction: column;
	padding: 0 46px 38px;
	opacity: 0;
	visibility: hidden;
	will-change: opacity;
	transition: opacity .34s cubic-bezier(.22,.61,.36,1), visibility 0s linear .34s;
	overflow-y: auto;
}
body.usd-menu-open .usd-nav-overlay {
	opacity: 1;
	visibility: visible;
	transition-delay: 0s;
}

/* Keep the real header above the overlay. This preserves the exact same logo,
   size, and coordinates when the menu opens. */
body.usd-menu-open #masthead {
	position: absolute !important;
	top: 0;
	left: 0;
	right: 0;
	z-index: 99985 !important;
	background: transparent !important;
	border-bottom: none !important;
	box-shadow: none !important;
	pointer-events: none;
}
body.usd-menu-open #masthead .site-header-row-container-inner {
	background: transparent !important;
}
body.usd-menu-open #masthead a.brand {
	pointer-events: auto;
}

/* Project pages keep their in-flow header while the overlay fades in. Changing
   it to absolute removed a 150px block mid-transition and caused a logo jump. */
body:not(.home) #masthead {
	transition: background-color .34s cubic-bezier(.22,.61,.36,1);
}
body:not(.home).usd-menu-open #masthead {
	position: relative !important;
	background: #101010 !important;
}

.usd-nav-overlay__top {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 150px;
}
.usd-brand {
	color: #fff;
	text-decoration: none;
	line-height: 1;
}
.usd-brand__word {
	display: block;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: -.5px;
}
.usd-brand__tag {
	display: block;
	margin-top: 5px;
	font-size: 9px;
	letter-spacing: 5px;
	text-transform: uppercase;
	opacity: .9;
}
.usd-nav-overlay__nav {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 34px 0 30px;
	max-width: 1100px;
	width: 100%;
	margin: 0 auto;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity .36s cubic-bezier(.16,1,.3,1), transform .36s cubic-bezier(.16,1,.3,1);
}
body.usd-menu-open .usd-nav-overlay__nav {
	opacity: 1;
	transform: translateY(0);
	transition-delay: .06s;
}

.usd-overlay-menu {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	/* Grow the menu rhythm on taller desktop viewports, without crowding short ones. */
	gap: clamp(20px, 3.5vh, 42px);
	text-align: center;
}
.usd-overlay-menu > .menu-item {
	list-style: none;
	margin: 0;
	padding: 0;
}
.usd-overlay-menu > .menu-item > a {
	display: inline-block;
	color: rgba(255,255,255,.88);
	font-size: clamp(24px, 3vw, 40px);
	line-height: 1.05;
	letter-spacing: -.5px;
	text-decoration: none;
	padding: 2px 0;
}

.usd-overlay-instagram {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: clamp(28px, 3.5vh, 46px);
	color: #fff;
	text-decoration: none;
}
.usd-overlay-instagram svg {
	display: block;
	width: 28px;
	height: 28px;
	fill: currentColor;
}
.usd-overlay-instagram:hover,
.usd-overlay-instagram:focus-visible {
	color: #fff;
	opacity: .72;
}
.usd-overlay-menu > .menu-item > a:hover,
.usd-overlay-menu > .current-menu-item > a,
.usd-overlay-menu > .current-menu-ancestor > a {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 7px;
}

/*
 * WordPress adds a later :visited color rule to project-nav links. Reassert
 * the inverted color for the entire previous/next card so hovering any part
 * of it, not only its text, gives consistent feedback.
 */
.single-project .project-nav-link:hover,
.single-project .project-nav-link:hover:visited,
.single-project .project-nav-link:focus-visible,
.single-project .project-nav-link:focus-visible:visited {
	background: #000;
	border-color: #000;
	color: #fff !important;
}
.single-project .project-nav-link:hover .project-nav-label,
.single-project .project-nav-link:hover .project-nav-title,
.single-project .project-nav-link:hover .project-nav-arrow,
.single-project .project-nav-link:focus-visible .project-nav-label,
.single-project .project-nav-link:focus-visible .project-nav-title,
.single-project .project-nav-link:focus-visible .project-nav-arrow {
	color: #fff !important;
}

.usd-nav-overlay__bottom {
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	border-top: 1px solid rgba(255,255,255,.15);
	padding-top: 22px;
	color: rgba(255,255,255,.55);
	font-size: 12px;
	letter-spacing: .4px;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity .3s cubic-bezier(.16,1,.3,1), transform .3s cubic-bezier(.16,1,.3,1);
}
.usd-nav-overlay__bottom a {
	color: inherit;
	text-decoration: none;
}
.usd-nav-overlay__bottom a:hover,
.usd-nav-overlay__bottom a:focus-visible {
	color: #fff;
	text-decoration: underline;
	text-underline-offset: 4px;
}
body.usd-menu-open .usd-nav-overlay__bottom {
	opacity: 1;
	transform: translateY(0);
	transition-delay: .1s;
}

/* --- Homepage: transparent header, centered logo (mockup page 1) --- */
body.home #masthead {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 20;
	background: transparent !important;
	border-bottom: none !important;
	box-shadow: none !important;
}
body.home #main-header .site-header-main-section-right {
	display: none !important;
}
body.home #masthead .custom-logo,
body.home #mobile-toggle .menu-toggle-icon {
	filter: drop-shadow(0 1px 5px rgba(0,0,0,.55));
}
body.home .usd-nav-toggle span {
	box-shadow: 0 1px 5px rgba(0,0,0,.55);
}
/* The homepage deliberately has no header logo. Subpages retain their logo. */
body.home #mobile-header .site-branding {
	display: none !important;
}
/* Kadence inserts an invisible 96px arrow row before the slider track. Keep
   the controls available without allowing that row to create a top gap. */
body.home .homepage-slider .splide__arrows {
	position: absolute !important;
	inset: 0;
	z-index: 3;
	height: 100%;
	pointer-events: none;
}
body.home .homepage-slider .splide__arrows button {
	pointer-events: auto;
}
@media (min-width: 1025px) {
	/* Kadence's desktop logo was removed from Header Builder. Render the same
	   configured logo without changing the editor's header setup. */
	.usd-subpage-logo {
		position: absolute;
		top: 34px;
		left: 50%;
		z-index: 99986;
		display: flex;
		align-items: center;
		justify-content: center;
		width: 220px;
		transform: translateX(-50%);
	}
	.usd-subpage-logo img {
		display: block;
		width: 220px;
		height: auto;
	}
	/* The Home header stays logo-free until its overlay is open. */
	body.home .usd-subpage-logo {
		opacity: 0;
		pointer-events: none;
	}
	body.home.usd-menu-open .usd-subpage-logo {
		opacity: 1;
		pointer-events: auto;
	}
	#main-header .site-main-header-wrap .site-header-row-container-inner > .site-container {
		padding-top: 0;
		padding-bottom: 0;
	}
	#main-header .site-main-header-inner-wrap {
		position: relative;
		min-height: 150px;
		align-items: center;
	}
	#main-header .site-header-main-section-left {
		position: absolute;
		left: 50%;
		max-width: none;
		transform: translateX(-50%);
	}
	#main-header .site-header-main-section-left > .site-header-item:first-child {
		margin-right: 0 !important;
	}
	#main-header .site-branding {
		padding: 0;
	}
	#main-header .site-branding .custom-logo {
		width: 220px;
		max-width: 220px;
		height: auto;
	}
	body.home #main-header .site-branding .custom-logo {
		width: 236px;
		max-width: 236px;
	}
	.usd-nav-toggle { top: 52px; }
}

/* --- Branded footer band (mockup page 3) --- */
#colophon.site-footer {
	display: none !important;
}
.usd-footer {
	background: #111;
	color: #fff;
	margin-top: 0 !important;
	padding: 46px 46px 0;
	/* Override legacy custom.css `footer { display:none }` desktop rule */
	display: block !important;
}
.usd-footer__inner {
	max-width: 1240px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px;
	flex-wrap: wrap;
	padding-bottom: 34px;
}
.usd-footer__logo {
	max-width: 150px;
	height: auto;
	display: block;
}
.usd-footer__brand .usd-brand__word { font-size: 22px; }
.usd-footer__contact {
	text-align: right;
	font-size: 12px;
	line-height: 1.9;
	letter-spacing: .4px;
}
.usd-footer__contact a { color: #fff !important; }
.usd-footer__copy {
	text-align: center;
	padding: 0 0 20px;
	color: rgba(255,255,255,.5);
	font-size: 10px;
	letter-spacing: 1.5px;
}

/* Project-category archives use the same hover-card treatment as Portfolio. */
body.tax-project_category #archive-container,
body.tax-project-category #archive-container {
	box-sizing: border-box;
	width: 100%;
	max-width: 1250px;
	margin-right: auto;
	margin-left: auto;
	column-gap: 12px;
	row-gap: 12px;
}
body.tax-project_category #archive-container > .entry-list-item,
body.tax-project-category #archive-container > .entry-list-item {
	min-width: 0;
}
body.tax-project_category #archive-container article.loop-entry,
body.tax-project-category #archive-container article.loop-entry {
	position: relative;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #e8e6e2;
	box-shadow: none;
}
body.tax-project_category #archive-container .post-thumbnail,
body.tax-project-category #archive-container .post-thumbnail {
	position: absolute;
	inset: 0;
	display: block;
	height: 100%;
	padding-bottom: 0 !important;
}
body.tax-project_category #archive-container .post-thumbnail-inner,
body.tax-project-category #archive-container .post-thumbnail-inner,
body.tax-project_category #archive-container .post-thumbnail img,
body.tax-project-category #archive-container .post-thumbnail img {
	width: 100%;
	height: 100%;
}
body.tax-project_category #archive-container .post-thumbnail img,
body.tax-project-category #archive-container .post-thumbnail img {
	object-fit: cover;
	transition: transform .35s ease;
}
body.tax-project_category #archive-container .entry-content-wrap,
body.tax-project-category #archive-container .entry-content-wrap {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px !important;
	background: rgba(0, 0, 0, .42);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
}
body.tax-project_category #archive-container .entry-header,
body.tax-project-category #archive-container .entry-header {
	width: 100%;
}
body.tax-project_category #archive-container .entry-title,
body.tax-project-category #archive-container .entry-title,
body.tax-project_category #archive-container .entry-title a,
body.tax-project-category #archive-container .entry-title a {
	margin: 0;
	color: #fff;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.25;
	letter-spacing: 1px;
	text-align: center;
	text-transform: uppercase;
}
body.tax-project_category #archive-container .entry-summary,
body.tax-project-category #archive-container .entry-summary,
body.tax-project_category #archive-container .entry-footer,
body.tax-project-category #archive-container .entry-footer {
	display: none;
}
body.tax-project_category #archive-container article.loop-entry:hover .entry-content-wrap,
body.tax-project-category #archive-container article.loop-entry:hover .entry-content-wrap,
body.tax-project_category #archive-container article.loop-entry:focus-within .entry-content-wrap,
body.tax-project-category #archive-container article.loop-entry:focus-within .entry-content-wrap {
	opacity: 1;
}
body.tax-project_category #archive-container article.loop-entry:hover .post-thumbnail img,
body.tax-project-category #archive-container article.loop-entry:hover .post-thumbnail img,
body.tax-project_category #archive-container article.loop-entry:focus-within .post-thumbnail img,
body.tax-project-category #archive-container article.loop-entry:focus-within .post-thumbnail img {
	transform: scale(1.025);
}

@media (max-width: 1068px) {
	body.tax-project_category #archive-container,
	body.tax-project-category #archive-container {
		padding-right: 32px !important;
		padding-left: 32px !important;
	}
	body.tax-project_category #archive-container > .entry-list-item,
	body.tax-project-category #archive-container > .entry-list-item {
		min-width: 0;
	}
}

/* Center the mobile logo and keep the shared overlay trigger at the right. */
@media (max-width: 1024px) {
	/* This is the desktop-only injected logo. Without this rule it becomes an
	   in-flow image on tablet and creates the large blank band above the header. */
	.usd-subpage-logo {
		display: none !important;
	}
	/* Keep Home logo-free until its overlay is open, then reveal the native
	   centered mobile logo in the same header position. */
	body.home.usd-menu-open #mobile-header .site-branding {
		display: block !important;
		opacity: 1;
		visibility: visible;
	}
	#mobile-header .site-main-header-wrap .site-header-row-container-inner > .site-container {
		padding: 0 24px !important;
	}
	#mobile-header .site-main-header-inner-wrap {
		position: relative;
		min-height: 100px !important;
		align-items: center;
	}
	#mobile-header .site-header-main-section-left {
		position: absolute;
		left: 50%;
		max-width: none;
		transform: translateX(-50%);
	}
	#mobile-header .site-header-main-section-left > .site-header-item:first-child {
		margin-right: 0 !important;
	}
	#mobile-header .site-header-main-section-right {
		display: none !important;
	}
	#mobile-header .site-header-item-mobile-navigation {
		padding-bottom: 0 !important;
	}
	#mobile-header .site-branding {
		padding: 0;
	}
	#mobile-header .site-branding .custom-logo {
		width: 160px;
		max-width: 160px;
		height: auto;
	}
	.usd-nav-toggle {
		top: 27px;
		right: 24px;
	}
	.usd-nav-overlay {
		padding: 0 24px 28px;
	}
	.usd-nav-overlay__top { flex-basis: 100px; }
	.usd-nav-overlay__nav {
		padding: 26px 0 22px;
	}
	.usd-overlay-menu {
		gap: 14px;
	}
	.usd-overlay-menu > .menu-item > a {
		font-size: clamp(28px, 5vw, 36px);
	}
	.usd-overlay-instagram {
		margin-top: 20px;
	}
	.usd-nav-overlay__bottom {
		justify-content: center;
		gap: 7px 18px;
		text-align: center;
	}
}

@media (max-width: 782px) {
	#mobile-header .site-main-header-wrap .site-header-row-container-inner > .site-container {
		padding: 0 20px !important;
	}
	#mobile-header .site-main-header-inner-wrap {
		min-height: 86px !important;
	}
	#mobile-header .site-branding .custom-logo {
		width: 132px;
		max-width: 132px;
	}
	.usd-nav-toggle {
		top: 20px;
		right: 18px;
		width: 42px;
		height: 42px;
	}
	.usd-nav-overlay {
		padding: 0 20px 24px;
	}
	.usd-nav-overlay__top { flex-basis: 86px; }
	.usd-nav-overlay__nav {
		padding: 22px 0 18px;
	}
	.usd-overlay-menu {
		gap: 12px;
	}
	.usd-overlay-menu > .menu-item > a {
		font-size: 29px;
	}
	.usd-overlay-instagram {
		width: 40px;
		height: 40px;
		margin-top: 14px;
	}
	.usd-nav-overlay__bottom {
		padding-top: 16px;
		font-size: 10px;
	}
	body.tax-project_category #archive-container,
	body.tax-project-category #archive-container {
		padding-right: 20px !important;
		padding-left: 20px !important;
	}
	.usd-footer { padding: 34px 24px 0; }
	.usd-footer__inner { justify-content: center; text-align: center; }
	.usd-footer__contact { text-align: center; }
}

@media (hover: none) {
	body.tax-project_category #archive-container .entry-content-wrap,
	body.tax-project-category #archive-container .entry-content-wrap {
		opacity: 1;
		background: rgba(0, 0, 0, .28);
	}
}

@media (prefers-reduced-motion: reduce) {
	.usd-nav-overlay,
	.usd-nav-overlay__nav,
	.usd-nav-overlay__bottom,
	.usd-nav-toggle span,
	body:not(.home) #masthead {
		transition: none !important;
		transform: none !important;
	}
}
