/* ==========================================================================
   VARIANT 5 — black-pebble charcoal, Aegean blue, Mesta stone and whitewash;
   EB Garamond and Commissioner; full-screen hero (the shared layout, as on
   variant 1: the text over the photo, with the overlay token). Loaded after the shared stylesheets,
   so it only overrides. Colours come from tokens.css.
   ========================================================================== */

/* ---- Header: whitewash ---------------------------------------------------- */
.da-header {
	background: rgba(250, 248, 244, 0.97);
}

@supports (backdrop-filter: blur(8px)) {
	.da-header {
		background: rgba(250, 248, 244, 0.9);
	}
}

/* ---- Headings: EB Garamond at a regular weight ---------------------------- */
h1,
h2,
h3,
.da-hero__title {
	font-weight: 500;
	letter-spacing: -0.01em;
	font-variation-settings: normal;
}

/* ---- Full-screen hero ------------------------------------------------------
   The shared layout (text over the photo), with the photo kept as light as the
   text allows: instead of the flat overlay over the whole photo, a gradient that
   is dark only behind the text (left on wide screens, bottom on phones). The
   headline is a full sentence, one size below the display size. Wide screens:
   the text block stays in the left third and the chapel sits to its right (the
   hero crop in photos.py starts at the left edge of the photo). Phones: the text
   sits low over the walkway; the photo is taller than the hero and anchored at
   the bottom, so the chapel rises into the clear area above the text. */
.da-hero__title {
	max-width: 19ch;
	font-size: var(--da-fs-2xl);
	line-height: 1.08;
	letter-spacing: -0.01em;
}

.da-hero__media::after {
	background: linear-gradient(to top, rgba(21, 25, 28, 0.76) 0%, rgba(21, 25, 28, 0.68) 62%, rgba(21, 25, 28, 0.24) 74%, rgba(21, 25, 28, 0.05) 86%);
}

@media (max-width: 599.98px) {
	.da-hero__media .da-media--cover {
		top: auto;
		height: 135%;
	}

	.da-hero__media .da-media__img {
		object-position: 52% 50% !important; /* over the focus attribute: the whole chapel in view */
	}

	/* The two buttons side by side when both labels fit on one line with the
	   standard padding (at 390 px they do); on narrower screens each takes a
	   full row, as stacked. */
	.da-hero .da-actions {
		display: flex;
	}

	.da-hero .da-actions .da-btn {
		flex: 1 1 auto;
		white-space: nowrap;
	}
}

@media (min-width: 600px) {
	.da-hero__media::after {
		background: linear-gradient(90deg, rgba(21, 25, 28, 0.66) 0%, rgba(21, 25, 28, 0.5) 30%, rgba(21, 25, 28, 0.16) 44%, rgba(21, 25, 28, 0.04) 58%);
	}

	.da-hero__content {
		/* the left third of the screen, measured from the text's own left edge */
		max-width: max(22rem, calc(100vw / 3 - max(var(--da-gutter), (100vw - var(--da-container)) / 2)));
	}

	.da-hero__title {
		max-width: none;
	}
}

/* ---- Homepage sections that would leave an empty half (as on variant 2) 
   Two sections have no photo slot ("The practical side of a new life", and
   "New developments" while no project is published): their text uses the
   full width. Two have a photo slot ("What could your life … look like?",
   "A budget in context"): while the slot has no photo, the text takes its
   place; once a photo is set, the shared two-column layout applies again by
   itself (the rules below only match a figure without an image). */

/* "The practical side of a new life": heading and introduction across the
   top, the guides in two columns below. */
@media (min-width: 960px) {
	.da-teasers .da-teasers__layout {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--da-space-7);
	}

	.da-teasers .da-teasers__head {
		position: static;
		display: grid;
		grid-template-columns: 7fr 5fr;
		gap: var(--da-grid-gap);
		align-items: end;
	}

	.da-teasers .da-teasers__head .da-heading {
		margin-bottom: 0;
	}

	.da-teasers .da-teasers__list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		column-gap: var(--da-grid-gap);
	}
}

/* "What could your life … look like?" without a photo: heading and
   introduction on the left, the guides on the right. */
.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__figure {
	display: none;
}

@media (min-width: 960px) {
	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) {
		grid-template-columns: minmax(0, 1fr);
	}

	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__body {
		display: grid;
		grid-template-columns: 5fr 7fr;
		column-gap: var(--da-space-9);
		align-items: start;
	}

	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__body > .da-heading,
	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__body > .da-lede {
		grid-column: 1;
	}

	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__body > .da-teasers__list {
		grid-column: 2;
		grid-row: 1 / span 2;
	}

	.da-propertyed__grid:not(:has(.da-propertyed__figure img)) .da-propertyed__body > .da-propertyed__more {
		grid-column: 2;
	}
}

/* "A budget in context" without a photo: the heading, €300,000 and
   introduction on the left, centred against the list of areas on the right;
   the note and the button under the list. The two flexible rows above and
   below the left block share the list's spare height equally. */
.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__figure {
	display: none;
}

@media (min-width: 960px) {
	.da-budget__grid:not(:has(.da-budget__figure img)) {
		grid-template-columns: minmax(0, 1fr);
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body {
		display: grid;
		grid-template-columns: 5fr 6fr;
		grid-template-rows: 1fr auto auto auto 1fr auto auto;
		column-gap: var(--da-space-9);
		align-items: start;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-eyebrow {
		grid-column: 1;
		grid-row: 2;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-budget__title {
		grid-column: 1;
		grid-row: 3;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-budget__intro {
		grid-column: 1;
		grid-row: 4;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-budget__types {
		grid-column: 2;
		grid-row: 1 / 6;
		margin-top: 0;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-budget__footnote {
		grid-column: 2;
		grid-row: 6;
	}

	.da-budget__grid:not(:has(.da-budget__figure img)) .da-budget__body > .da-btn {
		grid-column: 2;
		grid-row: 7;
		justify-self: start;
	}
}

/* "New developments" while no project is published: heading across the top,
   then the text and the list of details in three columns. */
@media (min-width: 960px) {
	.da-dev-pending {
		grid-template-columns: minmax(0, 1fr);
		gap: var(--da-space-6);
	}

	.da-dev-pending .da-heading__title {
		max-width: none;
	}

	.da-dev-pending__body > .da-lede {
		max-width: 60ch;
	}

	.da-dev-pending__list {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ---- Key figures (Living page): four figures in a row --------------------
   The list keeps every word of the text; the value is set large above its
   description, and the dash between them is kept for screen readers only. */
.da-keyfigures {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--da-space-5);
	margin: var(--da-space-7) 0;
	padding: var(--da-space-6) 0;
	list-style: none;
	border-top: 1px solid var(--da-rule);
	border-bottom: 1px solid var(--da-rule);
}

.da-keyfigures > li {
	margin: 0;
	padding: 0;
	color: var(--da-text-muted);
	font-size: var(--da-fs-sm);
	line-height: 1.45;
}

.da-keyfigures > li::before {
	content: none;
}

.da-prose .da-keyfigures {
	padding-left: 0; /* aligned with the text column (no list indent) */
}

.da-keyfigures > li + li {
	margin-top: 0; /* the grid gap spaces the figures (no list spacing from .da-prose) */
}

.da-keyfigures__value {
	display: block;
	margin-bottom: var(--da-space-2);
	color: var(--da-ink);
	font-family: var(--da-font-serif);
	font-size: var(--da-fs-lg);
	font-weight: 500;
	line-height: 1.05;
}

.da-keyfigures__sep {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

@media (min-width: 960px) {
	.da-keyfigures {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}
