/*
 * Homelab Projects — renovation project cards, single view and archive.
 * Uses the brand tokens from the homelab-polish layer (--hl-*) with
 * local fallbacks so the plugin also works if the layer is absent.
 */

.hlp-single,
.hlp-grid {
	--ink: var(--hl-ink, #1c150a);
	--ink-soft: var(--hl-ink-soft, #3a3126);
	--gold: var(--hl-gold, #b89f81);
	--gold-deep: var(--hl-gold-deep, #8a6d47);
	--paper: var(--hl-paper, #f8f8f7);
	--sand: var(--hl-sand, #ddd8cd);
	--muted: var(--hl-muted, #6b6357);
	--rule: 1px solid rgba(184, 159, 129, 0.38);
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--speed: 320ms;
}

/* ---------------------------------------------------------------
   Cards (shortcode + archive)
   --------------------------------------------------------------- */

.hlp-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 28px;
}

.hlp-card {
	display: block;
	text-decoration: none;
	color: var(--ink);
}

.hlp-card-img {
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 3 / 2;
	overflow: hidden;
	border-radius: 3px;
	border: var(--rule);
	background: var(--sand);
	margin-bottom: 18px;
}

.hlp-card-img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform 700ms var(--ease);
}

.hlp-card:hover .hlp-card-img img {
	transform: scale(1.04);
}

.hlp-card-noimg {
	font-size: 11px;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gold-deep);
}

.hlp-card-title {
	display: inline-block;
	position: relative;
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 400;
	font-size: 20px;
	line-height: 1.3;
	padding-bottom: 6px;
	margin-bottom: 6px;
}

.hlp-card-title::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 0;
	height: 1px;
	background: var(--gold);
	transition: width var(--speed) var(--ease);
}

.hlp-card:hover .hlp-card-title::after {
	width: 100%;
}

.hlp-card-meta {
	display: block;
	font-size: 11px;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--muted);
}

/* ---------------------------------------------------------------
   Single project + archive frame
   --------------------------------------------------------------- */

/* The theme header opens a boxed `.container.content_wrapper`;
   stretch our canvas back to the full viewport width. */
.hlp-single {
	font-family: "Montserrat", sans-serif;
	color: var(--ink);
	background: #fff;
	line-height: 1.8;
	margin-inline: calc(50% - 50vw);
}

.hlp-wrap {
	max-width: 1040px;
	margin: 0 auto;
	padding: 0 24px;
}

.hlp-single h1 {
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 400;
	font-size: 46px;
	line-height: 1.2;
	color: var(--ink);
	margin: 0 0 26px;
}

.hlp-hero {
	background: var(--paper);
	border-bottom: var(--rule);
	padding: 80px 0 56px;
	text-align: center;
	margin-bottom: 64px;
}

.hlp-archive .hlp-hero {
	padding-bottom: 72px;
}

.hlp-eyebrow,
.hlp-eyebrow a {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: var(--gold-deep);
	text-decoration: none;
	margin-bottom: 22px;
}

.hlp-eyebrow a:hover {
	color: var(--ink);
}

.hlp-hero-sub {
	max-width: 560px;
	margin: -6px auto 0;
	color: var(--muted);
}

/* Facts strip under the title */
.hlp-facts {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0;
	border-top: var(--rule);
	border-bottom: var(--rule);
}

.hlp-facts li {
	padding: 14px 20px;
	text-align: center;
}

.hlp-facts li + li {
	border-left: var(--rule);
}

.hlp-fact-label {
	display: block;
	font-size: 10px;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--muted);
	margin-bottom: 4px;
}

.hlp-fact-value {
	display: block;
	font-family: "Playfair Display", Georgia, serif;
	font-size: 19px;
	color: var(--ink);
}

/* ---------------------------------------------------------------
   Project content: text + galleries
   --------------------------------------------------------------- */

.hlp-content {
	padding-bottom: 24px;
}

.hlp-content > p {
	max-width: 720px;
	margin: 0 auto 1.4em;
	color: var(--ink-soft);
	font-size: 16px;
}

.hlp-content h2,
.hlp-content h3 {
	font-family: "Playfair Display", Georgia, serif;
	font-weight: 400;
	color: var(--ink);
	max-width: 720px;
	margin: 1.8em auto 0.8em;
	position: relative;
	padding-top: 18px;
}

.hlp-content h2::before,
.hlp-content h3::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 44px;
	height: 1px;
	background: var(--gold);
}

.hlp-content h2 {
	font-size: 30px;
}

.hlp-content h3 {
	font-size: 24px;
}

.hlp-content ul,
.hlp-content ol {
	max-width: 720px;
	margin: 0 auto 1.4em;
	color: var(--ink-soft);
}

/* Galleries — native Gutenberg gallery block */
.hlp-content .wp-block-gallery,
.hlp-content .gallery {
	margin: 40px 0 48px;
	gap: 14px;
}

.hlp-content .wp-block-image img,
.hlp-content .wp-block-gallery img,
.hlp-content .gallery img {
	border-radius: 3px;
	cursor: zoom-in;
}

.hlp-content > .wp-block-image {
	margin: 40px auto;
}

/* ---------------------------------------------------------------
   CTA band
   --------------------------------------------------------------- */

.hlp-cta {
	background: var(--ink);
	text-align: center;
	padding: 72px 0;
	margin-top: 56px;
}

.hlp-cta-quote {
	font-family: "Playfair Display", Georgia, serif;
	font-style: italic;
	font-size: 28px;
	line-height: 1.5;
	color: var(--paper);
	position: relative;
	max-width: 620px;
	margin: 0 auto 12px;
	padding-top: 24px;
}

.hlp-cta-quote::before {
	content: "";
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 56px;
	height: 1px;
	background: var(--gold);
}

.hlp-cta-sub {
	color: rgba(248, 248, 247, 0.75);
	font-size: 15px;
	margin: 0 0 32px;
}

.hlp-btn {
	display: inline-block;
	background-color: transparent;
	border: 1px solid var(--gold);
	color: var(--paper);
	border-radius: 2px;
	padding: 16px 36px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color var(--speed) var(--ease),
		color var(--speed) var(--ease),
		transform var(--speed) var(--ease);
}

.hlp-btn:hover,
.hlp-btn:focus-visible {
	background-color: var(--gold);
	color: var(--ink);
	transform: translateY(-2px);
}

/* Archive body + pagination */
.hlp-archive-body {
	padding-bottom: 32px;
}

.hlp-empty {
	text-align: center;
	color: var(--muted);
	padding: 24px 0 48px;
}

.hlp-archive .pagination,
.hlp-archive .nav-links {
	margin-top: 40px;
	text-align: center;
}

/* ---------------------------------------------------------------
   Footer bar
   --------------------------------------------------------------- */

.hlp-footbar {
	background: var(--ink, #1c150a);
	border-top: 1px solid rgba(184, 159, 129, 0.38);
	padding: 30px 5%;
	display: flex;
	flex-wrap: wrap;
	gap: 14px 32px;
	align-items: center;
	justify-content: space-between;
}

.hlp-footbar p,
.hlp-footbar nav {
	margin: 0;
	font-size: 11px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(248, 248, 247, 0.72);
}

.hlp-footbar nav {
	display: flex;
	gap: 22px;
	flex-wrap: wrap;
}

.hlp-footbar a {
	color: rgba(248, 248, 247, 0.72);
	text-decoration: none;
	padding-bottom: 2px;
	border-bottom: 1px solid rgba(184, 159, 129, 0.45);
	transition: color 300ms ease;
}

.hlp-footbar a:hover {
	color: var(--gold, #b89f81);
}

@media (max-width: 767px) {
	.hlp-footbar {
		flex-direction: column;
		text-align: center;
		justify-content: center;
	}
}

/* The dark CTA sits directly above the footer bar — remove the gap. */
.hlp-single .hlp-cta {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------
   Lightbox
   --------------------------------------------------------------- */

.hlp-lightbox {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(20, 15, 7, 0.94);
	display: flex;
	align-items: center;
	justify-content: center;
}

.hlp-lightbox img {
	max-width: 92vw;
	max-height: 88vh;
	border-radius: 3px;
}

.hlp-lightbox button {
	position: absolute;
	background: transparent;
	border: var(--rule, 1px solid rgba(184, 159, 129, 0.38));
	border-radius: 50%;
	width: 46px;
	height: 46px;
	color: #f8f8f7;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 200ms ease;
}

.hlp-lightbox button:hover {
	background: rgba(184, 159, 129, 0.35);
}

.hlp-lightbox .hlp-lb-close {
	top: 20px;
	right: 20px;
}

.hlp-lightbox .hlp-lb-prev {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
}

.hlp-lightbox .hlp-lb-next {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
}

/* ---------------------------------------------------------------
   Small screens
   --------------------------------------------------------------- */

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

@media (max-width: 767px) {
	.hlp-grid {
		grid-template-columns: 1fr;
	}

	.hlp-single h1 {
		font-size: 32px;
	}

	.hlp-hero {
		padding: 56px 0 40px;
		margin-bottom: 44px;
	}

	.hlp-facts li {
		padding: 12px 16px;
	}

	.hlp-cta-quote {
		font-size: 22px;
	}
}
