/* The page canvas behind the cards is UI/Lightest Grey, not the body default. */
body:has(.nordemo-properties) {
	background-color: #fafafa;
}

.nordemo-properties {
	margin-block: 0 131px;
	display: flex;
	flex-direction: column;
	gap: 30px;
	width: 100%;
}

.nordemo-properties__filter {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nordemo-properties__label {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.0938em;
	text-transform: uppercase;
	color: var(--nordemo-text);
}

.nordemo-properties__pills {
	display: flex;
	gap: 16px;
}

.nordemo-properties__pill {
	flex: none;
	height: 44px;
	padding: 0 24px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 22px;
	color: var(--nordemo-text);
	background: var(--nordemo-surface-accent);
	border: 0;
	border-radius: var(--nordemo-radius-pill);
	cursor: pointer;
}

.nordemo-properties__pill[aria-pressed='true'] {
	color: var(--nordemo-on-primary);
	background: var(--nordemo-primary);
}

.nordemo-properties__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 40px 24px;
}

.nordemo-properties__card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 8px;
	font-family: inherit;
	text-align: left;
	background: var(--nordemo-on-primary);
	/* Figma strokes sit inside the frame. An inset shadow keeps the designed box height. */
	box-shadow: inset 0 0 0 1px #f6f6f6;
	border: 0;
	border-radius: var(--nordemo-radius);
	cursor: pointer;
}

.nordemo-properties__card[hidden] {
	display: none;
}

.nordemo-properties__media {
	display: block;
	height: 265px;
	overflow: hidden;
	background: #d9d9d9;
	border-radius: var(--nordemo-radius-sm);
}

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

.nordemo-properties__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 0 8px 4px;
}

.nordemo-properties__heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nordemo-properties__place {
	display: flex;
	align-items: center;
	gap: 4px;
	margin: 0;
	font-size: 16px;
	line-height: 25px;
	color: var(--nordemo-primary-deep);
}

.nordemo-properties__place img {
	flex: none;
	display: block;
	width: 24px;
	height: 24px;
}

.nordemo-properties__title {
	font-size: 24px;
	font-weight: 500;
	line-height: normal;
	color: var(--nordemo-text);
}

.nordemo-properties__excerpt {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	font-size: 16px;
	line-height: 24px;
	color: var(--nordemo-text-muted);
}

.nordemo-properties__facts {
	display: flex;
}

.nordemo-properties__fact {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 1px;
	min-width: 0;
}

.nordemo-properties__fact--year {
	flex: none;
	width: 116px;
}

.nordemo-properties__fact-label {
	display: block;
	font-size: 14px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.1071em;
	text-transform: uppercase;
	color: var(--nordemo-text-muted);
}

.nordemo-properties__fact-value {
	display: block;
	font-size: 15px;
	line-height: 24px;
	color: var(--nordemo-text);
}

.nordemo-lightbox {
	width: min(1112px, calc(100vw - 32px));
	max-width: none;
	max-height: calc(100vh - 32px);
	padding: 40px;
	background: var(--nordemo-on-primary);
	border: 0;
	border-radius: 16px;
}

.nordemo-lightbox::backdrop {
	background: rgba(0, 0, 0, 0.6);
}

.nordemo-lightbox__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 8px 8px 24px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	line-height: 24px;
	letter-spacing: 0.1071em;
	text-transform: uppercase;
	color: #000;
	background: var(--nordemo-surface);
	border: 0;
	border-radius: 6px;
	cursor: pointer;
}

.nordemo-lightbox__close svg {
	display: block;
	width: 30px;
	height: 30px;
}

.nordemo-lightbox__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.nordemo-lightbox__gallery {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.nordemo-lightbox__stage {
	position: relative;
	aspect-ratio: 1032 / 595;
	overflow: hidden;
	background: #d9d9d9;
	border-radius: var(--nordemo-radius-sm);
}

/* Imagify wraps images in <picture> on the server; contents keeps the img sized by stage/button. */
.nordemo-lightbox__stage > picture,
.nordemo-lightbox__thumb picture {
	display: contents;
}

.nordemo-lightbox__stage > img,
.nordemo-lightbox__stage > picture > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* display: block above would otherwise beat the user agent's [hidden] rule. */
.nordemo-lightbox__stage > img[hidden],
.nordemo-lightbox__stage > picture > img[hidden] {
	display: none;
}

/* Plain grey text drowns in the photos, so the credit sits on a soft scrim. */
.nordemo-lightbox__credit {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 3px 10px;
	font-size: 12px;
	line-height: 18px;
	color: #fff;
	background: rgba(0, 0, 0, 0.5);
	border-radius: 36px;
}

.nordemo-lightbox__nav {
	position: absolute;
	top: 50%;
	display: flex;
	padding: 8px;
	background: #e6f2ff;
	border: 0;
	border-radius: var(--nordemo-radius);
	transform: translateY(-50%);
	cursor: pointer;
}

.nordemo-lightbox__nav--prev {
	left: 8px;
}

.nordemo-lightbox__nav--prev .nordemo-icon {
	transform: rotate(180deg);
}

.nordemo-lightbox__nav--next {
	right: 8px;
}

.nordemo-lightbox__thumbs {
	display: flex;
	gap: 8px;
	width: 100%;
	height: 78px;
	overflow-x: auto;
}

/* Thumb size comes from the design's three-per-374px row; the full-width row scrolls only when they overflow. */
.nordemo-lightbox__thumb {
	flex: 0 0 calc((374px - 16px) / 3);
	padding: 0;
	overflow: hidden;
	background: none;
	border: 0;
	border-radius: var(--nordemo-radius-sm);
	cursor: pointer;
}

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

.nordemo-lightbox__thumb[aria-current='false'] {
	opacity: 0.6;
}

.nordemo-lightbox__info {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 56px;
}

.nordemo-lightbox__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	min-width: 0;
	max-width: 609px;
}

.nordemo-lightbox__heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.nordemo-lightbox__title {
	margin: 0;
	font-size: 48px;
	font-weight: 600;
	line-height: 56px;
	letter-spacing: -0.0042em;
	color: var(--nordemo-text);
}

.nordemo-lightbox__description {
	margin: 0;
	font-size: 17px;
	line-height: 25px;
	color: var(--nordemo-text-muted);
}

.nordemo-lightbox__info .nordemo-properties__facts {
	flex: none;
	flex-wrap: wrap;
	gap: 32px 0;
	width: 319px;
}

.nordemo-lightbox__info .nordemo-properties__fact {
	flex: none;
	width: 159px;
}

.nordemo-lightbox__info .nordemo-properties__fact--year {
	width: 116px;
}

.nordemo-lightbox__info .nordemo-properties__fact--address {
	gap: 4px;
	width: 100%;
}

.nordemo-lightbox__info .nordemo-properties__fact--address .nordemo-properties__fact-value {
	font-size: 17px;
	line-height: 25px;
	color: #000;
}

.nordemo-properties :focus-visible,
.nordemo-lightbox :focus-visible {
	outline: 2px solid var(--nordemo-primary);
	outline-offset: 2px;
}

@media (max-width: 991px) {
	.nordemo-properties {
		margin-block: 0 16px;
		gap: 24px;
	}

	/* The pill row is wider than the viewport in the design, so it scrolls past the gutter. */
	.nordemo-properties__pills {
		margin-inline: calc(var(--nordemo-gutter) * -1);
		padding-inline: var(--nordemo-gutter);
		overflow-x: auto;
		scrollbar-width: none;
	}

	.nordemo-properties__pills::-webkit-scrollbar {
		display: none;
	}

	.nordemo-properties__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 24px;
	}

	.nordemo-properties__media {
		height: 212px;
	}

	.nordemo-lightbox {
		width: calc(100vw - 32px);
		padding: 56px 16px 24px;
	}

	.nordemo-lightbox__title {
		font-size: 32px;
		line-height: 40px;
	}

	.nordemo-lightbox__info {
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
	}

	.nordemo-lightbox__info .nordemo-properties__facts {
		width: auto;
	}

	.nordemo-lightbox__thumbs {
		height: 62px;
	}
}
