/* Hansen Projects Grid — front-end styles */

.hb-projects-wrap {
	--hb-ground: #F5F3F0;
	--hb-charcoal: #1C1B18;
	--hb-bronze: #B8935A;

	background: var(--hb-ground);
}

/* Header row: eyebrow + heading on the left, filter pills on the right */
.hb-projects-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 20px 32px;
	padding-top: 48px;
}

.hb-projects-eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	font-family: 'DM Mono', monospace;
	font-size: 12px;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--hb-bronze);
	margin-bottom: 14px;
}

.hb-projects-eyebrow::before {
	content: '';
	display: inline-block;
	width: 28px;
	height: 1px;
	background: var(--hb-bronze);
}

.hb-projects-title-main {
	font-family: 'Barlow Condensed', sans-serif;
	font-weight: 500;
	font-size: var(--hb-heading-font-size, 42px);
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--hb-charcoal);
	margin: 0;
}

.hb-projects-title-main strong,
.hb-projects-title-main b {
	font-weight: 700;
}

/* Filter pills */
.hb-projects-filter {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

/* When there's no eyebrow/title, the header row holds only the filter
   bar — push it to the right so there's room for a heading on the left. */
.hb-projects-header--filter-only {
	justify-content: flex-end;
}

.hb-filter-btn {
	appearance: none;
	cursor: pointer;
	background: transparent;
	border: 1px solid rgba(28, 27, 24, 0.25);
	border-radius: 0; /* sharp corners */
	padding: 12px 20px;
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	font-weight: 500;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--hb-charcoal);
	transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hb-filter-btn:hover {
	border-color: var(--hb-charcoal);
}

.hb-filter-btn.is-active {
	background: var(--hb-charcoal);
	border-color: var(--hb-charcoal);
	color: #ffffff;
}

.hb-projects-grid {
	display: grid;
	grid-template-columns: repeat(var(--hb-columns, 3), 1fr);
	gap: var(--hb-gap-row, 48px) var(--hb-gap-col, 32px);
	padding: 40px 0;
	box-sizing: border-box;
}

@media (max-width: 900px) {
	.hb-projects-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 600px) {
	.hb-projects-grid {
		grid-template-columns: 1fr;
		gap: 36px;
	}
}

.hb-project-card {
	opacity: 0;
	transform: translateY(24px);
	transition: opacity 0.6s ease, transform 0.6s ease;
}

.hb-project-card.hb-in-view {
	opacity: 1;
	transform: translateY(0);
}

/* Category filtering (JS toggles this) */
.hb-project-card.hb-filter-hide {
	opacity: 0 !important;
	transform: scale(0.96) !important;
	pointer-events: none;
	transition: opacity 0.35s ease, transform 0.35s ease !important;
}

/* Cards re-entering the grid after a filter change should transition at
   the same snappier speed rather than the slower initial scroll-reveal. */
.hb-project-card[data-in-limit] {
	transition: opacity 0.35s ease, transform 0.35s ease;
}

/* Applied once the fade-out transition above finishes — actually
   removes the card from the grid so the remaining visible cards
   reflow together instead of leaving an empty slot behind. */
.hb-project-card.hb-filter-hidden {
	display: none !important;
}

.hb-projects-filter-message {
	font-family: 'Inter', sans-serif;
	color: var(--hb-charcoal);
	padding: 0 0 40px;
	display: none;
}

.hb-projects-filter-message.is-visible {
	display: block;
}

@media (max-width: 700px) {
	.hb-projects-header {
		flex-direction: column;
		align-items: flex-start;
	}
}

.hb-project-link {
	display: block;
	color: inherit;
	text-decoration: none;
	cursor: pointer;
}

.hb-project-media {
	position: relative;
	display: block;
	overflow: hidden;
	aspect-ratio: 4 / 3;
	background: #d8d5cf;
	border-radius: 0; /* sharp corners */
}

.hb-project-img,
.hb-project-img--placeholder {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transform: scale(1);
	transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.hb-project-link:hover .hb-project-img {
	transform: scale(1.06);
}

/* Smooth black gradient overlay, hidden until hover */
.hb-project-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 20px 22px;
	background: linear-gradient(
		180deg,
		rgba(28, 27, 24, 0) 45%,
		rgba(28, 27, 24, 0.85) 100%
	);
	opacity: 0;
	transition: opacity 0.45s ease;
	pointer-events: none;
}

.hb-project-link:hover .hb-project-overlay {
	opacity: 1;
}

.hb-project-meta-top {
	font-family: 'DM Mono', monospace;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: rgba(245, 243, 240, 0.85);
	transform: translateY(8px);
	opacity: 0;
	transition: transform 0.45s ease 0.05s, opacity 0.45s ease 0.05s;
}

.hb-project-meta-bottom {
	font-family: 'DM Mono', monospace;
	font-size: 14px;
	font-weight: 500;
	letter-spacing: 0.04em;
	color: #ffffff;
	margin-top: 6px;
	transform: translateY(8px);
	opacity: 0;
	transition: transform 0.45s ease 0.1s, opacity 0.45s ease 0.1s;
}

.hb-project-link:hover .hb-project-meta-top,
.hb-project-link:hover .hb-project-meta-bottom {
	transform: translateY(0);
	opacity: 1;
}

.hb-dot {
	color: var(--hb-bronze);
}

.hb-project-caption {
	margin-top: 18px;
}

.hb-project-category {
	display: block;
	font-family: 'DM Mono', monospace;
	font-size: var(--hb-category-font-size, 11px);
	letter-spacing: 0.1em;
	color: var(--hb-bronze);
	margin-bottom: 6px;
}

.hb-project-title {
	font-family: 'Barlow Condensed', sans-serif;
	font-weight: 700;
	font-size: var(--hb-title-font-size, 22px);
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: var(--hb-charcoal);
	margin: 0;
}

.hb-projects-empty {
	font-family: 'Inter', sans-serif;
	color: var(--hb-charcoal);
	padding: 40px 0;
}
