/* HDL Portfolio Archive - image-led project index for /portfolio/. */
.hdl-pa {
	--hdl-pa-rule: rgba(0, 0, 0, .14);
	--hdl-pa-accent: #8c7b66;
	--hdl-pa-page-gutter: 24px;
	width: 100%;
	max-width: none;
	background: var(--primary-ultra-light, #f5f3f0);
	color: inherit;
	font-family: inherit;
	/* The intro surface itself is full width; the content remains constrained. */
	padding: 0 !important;
	margin: 0;
	display: block !important;
	gap: 0 !important;
}

.hdl-pa *,
.hdl-pa *::before,
.hdl-pa *::after { box-sizing: border-box; }

.hdl-pa__inner {
	width: min(calc(100% - 48px), var(--content-width, 1240px));
	margin-inline: auto;
}

.hdl-pa__inner--projects {
	/* Match the standard Bricks/ACSS content width used by the approved Services archive grid. */
	width: min(calc(100% - 48px), var(--content-width, 1240px));
}

.hdl-pa__intro-wrap {
	width: 100%;
	max-width: none;
	margin: 0;
	background: var(--primary-trans-10, rgba(0, 0, 0, .035));
}

.hdl-pa__intro-wrap > .hdl-pa__inner {
	width: min(calc(100% - 48px), 1380px);
	max-width: 1380px;
}

.hdl-pa__intro {
	width: 100%;
	max-width: none;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(420px, .85fr);
	gap: clamp(32px, 3vw, 48px);
	align-items: center;
	padding-block: clamp(56px, 5vw, 78px);
}

.hdl-pa__intro-content {
	min-width: 0;
	max-width: 760px;
}

.hdl-pa__eyebrow,
.hdl-pa__heading,
.hdl-pa__intro-copy,
.hdl-pa__card-title,
.hdl-pa__card-copy,
.hdl-pa__meta,
.hdl-pa__cta-eyebrow,
.hdl-pa__cta-heading,
.hdl-pa__cta-copy { margin: 0; }

.hdl-pa__eyebrow,
.hdl-pa__cta-eyebrow {
	margin-bottom: 18px;
	font-size: 14px;
	letter-spacing: .22em;
	text-transform: uppercase;
	color: #000;
}

.hdl-pa__heading {
	max-width: 720px;
	color: inherit;
	text-wrap: pretty;
}

.hdl-pa__intro-copy {
	max-width: 650px;
	margin-top: 22px;
	line-height: 1.65;
	color: inherit;
	text-wrap: pretty;
}

.hdl-pa__intro-media {
	width: 100%;
	max-width: 600px;
	margin: 0 0 0 auto;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: rgba(0, 0, 0, .04);
}

.hdl-pa__intro-image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.hdl-pa__filters-wrap {
	/* Keep the divider rules slightly inset from the viewport, matching the page gutter used elsewhere. */
	width: calc(100% - (var(--hdl-pa-page-gutter) * 2));
	margin-inline: auto;
	border-top: 1px solid var(--hdl-pa-rule);
	border-bottom: 1px solid var(--hdl-pa-rule);
	background: var(--primary-ultra-light, #f5f3f0);
}

.hdl-pa__filters {
	display: flex;
	flex-wrap: nowrap;
	justify-content: center;
	align-items: center;
	gap: clamp(18px, 2.2vw, 34px);
	min-width: 0;
	padding-block: 16px;
}

.hdl-pa__filter {
	appearance: none;
	flex: 0 0 auto;
	border: 0;
	border-bottom: 1px solid transparent;
	padding: 6px 0;
	background: transparent;
	color: inherit;
	font: inherit;
	font-size: 12px;
	letter-spacing: .1em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

.hdl-pa__filter:hover,
.hdl-pa__filter:focus-visible,
.hdl-pa__filter[aria-pressed="true"] {
	border-bottom-color: currentColor;
}

.hdl-pa__filter:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.hdl-pa__projects {
	/* Match the approved Services archive section rhythm without changing Portfolio structure. */
	padding-block: clamp(58px, 6vw, 82px) clamp(72px, 7vw, 96px);
}

.hdl-pa__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: clamp(3rem, 5vw, 7rem);
	row-gap: var(--space-xxl, 72px);
	align-items: stretch;
}

.hdl-pa__card {
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	/* Match the approved Services archive card separator and breathing room above imagery. */
	border-top: 1px solid rgba(77, 67, 55, .22);
	padding-top: var(--space-s, 24px);
}

.hdl-pa__card[hidden] { display: none !important; }

.hdl-pa__media {
	width: 100%;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: rgba(0, 0, 0, .04);
}

.hdl-pa__media--empty {
	background: var(--primary-trans-10, rgba(0, 0, 0, .035));
}

.hdl-pa__media-link {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	text-decoration: none;
}

.hdl-pa__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform .45s ease;
}

.hdl-pa__media-link:hover .hdl-pa__image,
.hdl-pa__media-link:focus-visible .hdl-pa__image { transform: scale(1.02); }

.hdl-pa__media-link:focus-visible {
	outline: 3px solid #000;
	outline-offset: -3px;
}

.hdl-pa__card-content {
	width: 100%;
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding-top: 24px;
}

.hdl-pa__card-title {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	/* Keep the semantically appropriate H2 markup, but match the Services card H3 visual scale. */
	min-height: 2.32em;
	font-size: var(--h3, 34px);
	font-weight: 600;
	line-height: 1.16;
	color: inherit;
	text-wrap: pretty;
}

.hdl-pa__card-title a {
	color: inherit;
	text-decoration: none;
}

.hdl-pa__meta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-content: flex-start;
	gap: 4px;
	min-height: 3.5em;
	margin-top: 12px;
	font-size: 12px;
	letter-spacing: .13em;
	line-height: 1.55;
	text-transform: uppercase;
	color: var(--hdl-pa-accent);
}

.hdl-pa__meta-location,
.hdl-pa__meta-services {
	display: block;
	width: 100%;
}

.hdl-pa__meta--empty { visibility: hidden; }

.hdl-pa__card-copy {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	overflow: hidden;
	width: 100%;
	max-width: 560px;
	min-height: 4.95em;
	margin-top: 14px;
	line-height: 1.65;
	color: inherit;
	text-wrap: pretty;
}

.hdl-pa__card-copy--empty { visibility: hidden; }

.hdl-pa__link {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin-top: auto;
	padding-top: 22px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(0, 0, 0, .25);
	color: var(--hdl-pa-accent);
	font-size: 13px;
	letter-spacing: .1em;
	text-decoration: none;
	text-transform: uppercase;
	transition: gap .2s ease, color .2s ease, border-color .2s ease;
}

.hdl-pa__link:hover,
.hdl-pa__link:focus-visible {
	gap: 16px;
	border-color: currentColor;
	color: inherit;
}

.hdl-pa__link:focus-visible,
.hdl-pa__load-more:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 4px;
}

.hdl-pa__load-more-wrap {
	display: flex;
	justify-content: center;
	padding-top: clamp(48px, 5vw, 66px);
}

.hdl-pa__load-more-wrap[hidden] { display: none !important; }

.hdl-pa__load-more {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	min-width: 280px;
	min-height: 52px;
	font-size: 13px;
	letter-spacing: .12em;
	text-transform: uppercase;
	cursor: pointer;
}

/* Keep the familiar white secondary-button proportions, but make the archive
 * control visibly outlined even when the global .btn--white class is stronger. */
.hdl-pa__load-more.btn--white {
	border: 1px solid #171717 !important;
	background: #fff !important;
	color: #171717 !important;
	box-shadow: none !important;
}

.hdl-pa__load-more.btn--white:hover,
.hdl-pa__load-more.btn--white:focus-visible {
	border-color: #171717 !important;
	background: #171717 !important;
	color: #fff !important;
}

.hdl-pa__load-more > span:last-child {
	font-size: 16px;
	line-height: 1;
	transition: transform .2s ease;
}

.hdl-pa__load-more:hover > span:last-child,
.hdl-pa__load-more:focus-visible > span:last-child {
	transform: translateY(3px);
}

/* Optional archive CTA. Left available in the element but blank by default on /portfolio/. */
.hdl-pa__cta {
	background: var(--primary-light, #e8e1d7);
	padding-block: clamp(62px, 7vw, 92px);
}

.hdl-pa__cta-inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 42px 72px;
	align-items: center;
}

.hdl-pa__cta-copy-wrap { max-width: 760px; }
.hdl-pa__cta-heading { text-wrap: pretty; }
.hdl-pa__cta-copy { max-width: 680px; margin-top: 18px; }
.hdl-pa__cta-button { min-width: 270px; justify-content: center; }

@media (max-width: 1100px) {
	.hdl-pa__filters {
		flex-wrap: wrap;
		gap: 8px 24px;
	}
}

@media (max-width: 800px) {
	.hdl-pa { --hdl-pa-page-gutter: 18px; }
	.hdl-pa__inner,
	.hdl-pa__inner--projects { width: min(calc(100% - 36px), var(--content-width, 1240px)); }
	.hdl-pa__intro-wrap > .hdl-pa__inner { width: min(calc(100% - 36px), 1380px); max-width: 1380px; }
	.hdl-pa__intro { grid-template-columns: minmax(0, 1fr); gap: 24px; padding-block: 44px; }
	.hdl-pa__intro-content { max-width: 680px; }
	.hdl-pa__intro-copy { max-width: 680px; margin-top: 20px; }
	.hdl-pa__intro-media { max-width: none; margin: 0; aspect-ratio: 16 / 9; }
	.hdl-pa__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-xxl, 58px); }
	.hdl-pa__card-title,
	.hdl-pa__meta,
	.hdl-pa__card-copy { min-height: 0; }
	.hdl-pa__card-title { -webkit-line-clamp: initial; }
	.hdl-pa__card-copy { -webkit-line-clamp: 3; }
	.hdl-pa__meta--empty,
	.hdl-pa__card-copy--empty { display: none; }
	.hdl-pa__cta-inner { grid-template-columns: minmax(0, 1fr); }
	.hdl-pa__cta-button { width: 100%; min-width: 0; }
}

@media (max-width: 560px) {
	.hdl-pa { --hdl-pa-page-gutter: 16px; }
	.hdl-pa__inner,
	.hdl-pa__inner--projects { width: min(calc(100% - 32px), var(--content-width, 1240px)); }
	.hdl-pa__intro-wrap > .hdl-pa__inner { width: min(calc(100% - 32px), 1380px); max-width: 1380px; }
	.hdl-pa__intro { gap: 20px; padding-block: 36px; }
	.hdl-pa__eyebrow { font-size: 12px; letter-spacing: .18em; }
	.hdl-pa__intro-copy { margin-top: 18px; }
	.hdl-pa__intro-media { aspect-ratio: 4 / 3; }
	.hdl-pa__filters { justify-content: flex-start; gap: 6px 18px; padding-block: 14px; }
	.hdl-pa__filter { font-size: 11px; }
	.hdl-pa__media { aspect-ratio: 4 / 3; }
	.hdl-pa__load-more-wrap { padding-top: 42px; }
	.hdl-pa__load-more { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.hdl-pa__image,
	.hdl-pa__link,
	.hdl-pa__load-more { transition: none; }
}
