/*
 * Projects and site updates. Layout only; colours and fonts come from the theme (Kadence palette),
 * so a redesign restyles these along with the rest of the site. Override the --bn-* variables to tune.
 */
:root {
	--bn-accent: var(--global-palette1, #2b6cb0);
	--bn-accent-strong: var(--global-palette2, #215387);
	--bn-text: var(--global-palette3, #1a202c);
	--bn-muted: var(--global-palette5, #4a5568);
	--bn-border: var(--global-palette7, #edf2f7);
	--bn-surface: var(--global-palette8, #f7fafc);
	--bn-white: var(--global-palette9, #fff);
	--bn-radius: 8px;
	--bn-gap: clamp(16px, 2.5vw, 28px);
}

/* ------------------------------------------------------------ buttons and badges */

.bn-button {
	background: var(--bn-accent);
	border-radius: 4px;
	color: var(--bn-white) !important;
	display: inline-block;
	font-weight: 600;
	padding: 0.75em 1.5em;
	text-decoration: none !important;
}

.bn-button:hover,
.bn-button:focus-visible {
	background: var(--bn-accent-strong);
}

.bn-status {
	background: var(--bn-white);
	border-radius: 999px;
	color: var(--bn-text);
	display: inline-block;
	font-size: 0.8125rem;
	font-weight: 600;
	line-height: 1;
	padding: 0.45em 0.8em;
}

.bn-status::before {
	background: var(--bn-muted);
	border-radius: 50%;
	content: "";
	display: inline-block;
	height: 0.55em;
	margin-right: 0.45em;
	vertical-align: 0.05em;
	width: 0.55em;
}

.bn-status--ongoing::before { background: #f5a524; }
.bn-status--completed::before { background: #13612e; }
.bn-status--design::before { background: var(--bn-accent); }

.bn-eyebrow {
	color: var(--bn-accent);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.06em;
	margin: 0 0 0.35em;
	text-transform: uppercase;
}

.bn-location {
	align-items: center;
	color: var(--bn-muted);
	display: inline-flex;
	gap: 0.3em;
}

.bn-location svg {
	color: var(--bn-accent);
	flex: none;
}

/* ------------------------------------------------------------ project grid */

.bn-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0 0 var(--bn-gap);
}

.bn-filters[hidden] {
	display: none;
}

.bn-filter {
	background: transparent;
	border: 1px solid var(--bn-border);
	border-radius: 999px;
	color: var(--bn-text);
	cursor: pointer;
	font: inherit;
	font-size: 0.875rem;
	padding: 0.5em 1.1em;
}

.bn-filter[aria-pressed="true"] {
	background: var(--bn-text);
	border-color: var(--bn-text);
	color: var(--bn-white);
}

.bn-project-grid {
	display: grid;
	gap: var(--bn-gap);
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
}

.bn-card {
	background: var(--bn-white);
	border: 1px solid var(--bn-border);
	border-radius: var(--bn-radius);
	overflow: hidden;
	transition: box-shadow 0.2s, transform 0.2s;
}

.bn-card[hidden] {
	display: none;
}

.bn-card:hover,
.bn-card:focus-within {
	box-shadow: 0 10px 30px rgba(26, 32, 44, 0.12);
	transform: translateY(-2px);
}

.bn-card__link {
	color: inherit !important;
	display: flex;
	flex-direction: column;
	height: 100%;
	text-decoration: none !important;
}

.bn-card__media {
	aspect-ratio: 4 / 3;
	background: var(--bn-surface);
	position: relative;
}

.bn-card__media img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.bn-card__media .bn-status {
	left: 12px;
	position: absolute;
	top: 12px;
}

.bn-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.4em;
	padding: 18px 20px 20px;
}

.bn-card__title {
	font-size: 1.15rem;
	line-height: 1.3;
	margin: 0;
}

.bn-card__text {
	color: var(--bn-muted);
	margin: 0;
}

.bn-card__cta {
	color: var(--bn-accent);
	font-weight: 600;
	margin-top: auto;
	padding-top: 0.5em;
}

.bn-more {
	margin: var(--bn-gap) 0 0;
	text-align: center;
}

/* ------------------------------------------------------------ single project */

.bn-project {
	padding: clamp(24px, 4vw, 48px) 0 clamp(48px, 6vw, 80px);
}

.bn-back {
	margin: 0 0 1.5rem;
}

.bn-project__header {
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
	margin-bottom: 2rem;
}

.bn-project__header .bn-status {
	align-self: flex-start;
	border: 1px solid var(--bn-border);
}

.bn-project__title {
	margin: 0;
}

.bn-project__intro {
	align-items: start;
	display: grid;
	gap: clamp(24px, 4vw, 48px);
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

.bn-project__cover {
	margin: 0;
}

.bn-project__cover img {
	border-radius: var(--bn-radius);
	display: block;
	height: auto;
	width: 100%;
}

.bn-facts {
	border-top: 1px solid var(--bn-border);
	margin: 0 0 1.5rem;
}

.bn-facts > div {
	border-bottom: 1px solid var(--bn-border);
	display: grid;
	gap: 1rem;
	grid-template-columns: 9rem 1fr;
	padding: 0.75rem 0;
}

.bn-facts dt {
	color: var(--bn-muted);
	font-weight: 400;
}

.bn-facts dd {
	font-weight: 600;
	margin: 0;
}

.bn-quote {
	background: var(--bn-surface);
	border-left: 4px solid var(--bn-accent);
	border-radius: 0 var(--bn-radius) var(--bn-radius) 0;
	margin: 0 0 1.5rem;
	padding: 1rem 1.25rem;
}

.bn-quote blockquote {
	border: 0;
	font-size: 1.05rem;
	font-style: italic;
	margin: 0;
	padding: 0;
}

.bn-quote blockquote p:last-child {
	margin-bottom: 0;
}

.bn-quote figcaption {
	color: var(--bn-muted);
	margin-top: 0.5rem;
}

.bn-project__progress,
.bn-project__photos {
	margin-top: clamp(40px, 6vw, 72px);
}

.bn-timeline {
	list-style: none;
	margin: 1.5rem 0 0;
	padding: 0;
}

.bn-timeline__item {
	border-left: 2px solid var(--bn-border);
	margin: 0;
	padding: 0 0 2.25rem 1.75rem;
	position: relative;
}

.bn-timeline__item:last-child {
	padding-bottom: 0;
}

.bn-timeline__item::before {
	background: var(--bn-accent);
	border: 3px solid var(--bn-white);
	border-radius: 50%;
	box-shadow: 0 0 0 2px var(--bn-accent);
	content: "";
	height: 14px;
	left: -9px;
	position: absolute;
	top: 0.3em;
	width: 14px;
}

.bn-timeline__meta {
	align-items: center;
	color: var(--bn-muted);
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0 0 0.5rem;
}

.bn-stage {
	color: var(--bn-text);
	font-size: 1.1rem;
	font-weight: 700;
}

.bn-timeline__note p {
	margin: 0 0 0.75rem;
	max-width: 70ch;
}

.bn-photos {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 140px), 1fr));
	list-style: none;
	margin: 0.75rem 0 0;
	padding: 0;
}

.bn-photos li {
	margin: 0;
}

.bn-photos a {
	border-radius: 6px;
	display: block;
	overflow: hidden;
}

.bn-photos img {
	aspect-ratio: 4 / 3;
	display: block;
	height: auto;
	object-fit: cover;
	transition: transform 0.25s;
	width: 100%;
}

.bn-photos a:hover img,
.bn-photos a:focus-visible img {
	transform: scale(1.04);
}

.bn-video {
	margin: 0.75rem 0 0;
	max-width: 720px;
}

.bn-video iframe {
	aspect-ratio: 16 / 9;
	border-radius: var(--bn-radius);
	height: auto;
	width: 100%;
}

.bn-video-link {
	margin: 0.75rem 0 0;
}

.bn-project__nav {
	border-top: 1px solid var(--bn-border);
	display: flex;
	gap: 1rem;
	justify-content: space-between;
	margin-top: clamp(40px, 6vw, 72px);
	padding-top: 1.5rem;
}

.bn-project__nav-next {
	margin-left: auto;
	text-align: right;
}

@media (max-width: 860px) {
	.bn-project__intro {
		grid-template-columns: 1fr;
	}
}

@media (min-width: 700px) {
	.bn-photos {
		grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	}
}

/* ------------------------------------------------------------ photo viewer */

.bn-lightbox {
	background: rgba(10, 12, 16, 0.96);
	border: 0;
	height: 100vh;
	max-height: none;
	max-width: none;
	padding: 0;
	width: 100vw;
}

.bn-lightbox::backdrop {
	background: rgba(10, 12, 16, 0.96);
}

.bn-lightbox__img {
	height: 100%;
	object-fit: contain;
	padding: 3.5rem 1rem;
	width: 100%;
}

.bn-lightbox__count {
	color: #fff;
	font-size: 0.875rem;
	left: 50%;
	margin: 0;
	position: absolute;
	top: 1rem;
	transform: translateX(-50%);
}

.bn-lightbox__btn {
	background: rgba(255, 255, 255, 0.12);
	border: 0;
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	font-size: 2rem;
	height: 48px;
	line-height: 1;
	padding: 0;
	position: absolute;
	width: 48px;
}

.bn-lightbox__btn:hover,
.bn-lightbox__btn:focus-visible {
	background: rgba(255, 255, 255, 0.28);
}

.bn-lightbox__close { right: 1rem; top: 0.75rem; }
.bn-lightbox__prev { left: 1rem; top: 50%; transform: translateY(-50%); }
.bn-lightbox__next { right: 1rem; top: 50%; transform: translateY(-50%); }

.bn-lightbox--single .bn-lightbox__prev,
.bn-lightbox--single .bn-lightbox__next,
.bn-lightbox--single .bn-lightbox__count {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.bn-card,
	.bn-photos img {
		transition: none;
	}
}
