/*
Theme Name: Dual Studio
Theme URI: https://dualstudio.co.uk
Author: Dual Studio Ltd
Description: Custom block theme for Dual Studio, architecture and interior design in Surrey and South London.
Requires at least: 6.5
Tested up to: 6.8
Requires PHP: 7.4
Version: 1.0.6
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dual-studio
*/

/* ---------- Paper background and drawing-grid guide lines ---------- */

:root {
	--ds-pad: clamp(16px, 4vw, 56px);
	--ds-red: #97472E;
	--ds-charcoal: #323232;
	--ds-black: #040707;
	--ds-warm-grey: #F1EEEA;
	--ds-line-light: rgba(50, 50, 50, 0.09);
	--ds-line-dark: rgba(255, 255, 255, 0.1);
}

body {
	background-color: var(--ds-warm-grey);
	background-image: url("assets/images/paper-grain.png");
	background-size: 320px 320px;
}

/* Three vertical guide lines: left edge, centre, right edge of the content area */
body::before {
	content: "";
	position: fixed;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: min(100%, 1920px);
	padding: 0 var(--ds-pad);
	box-sizing: border-box;
	pointer-events: none;
	z-index: 0;
	background-origin: content-box;
	background-clip: content-box;
	background-image:
		linear-gradient(var(--ds-line-light), var(--ds-line-light)),
		linear-gradient(var(--ds-line-light), var(--ds-line-light)),
		linear-gradient(var(--ds-line-light), var(--ds-line-light));
	background-size: 1px 100%, 1px 100%, 1px 100%;
	background-position: left top, center top, right top;
	background-repeat: no-repeat;
}

.wp-site-blocks {
	position: relative;
	z-index: 1;
}

/* ---------- Header ---------- */

.ds-header {
	border-bottom: 1px solid var(--ds-charcoal);
	padding-top: 20px;
	padding-bottom: 20px;
}

.ds-header .wp-block-image img {
	height: 48px;
	width: auto;
	display: block;
}

.ds-header .wp-block-navigation a {
	text-decoration: none;
	padding: 12px 0;
}

.ds-header .wp-block-navigation .current-menu-item > a,
.ds-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-underline-offset: 6px;
}

@media (max-width: 600px) {
	.ds-header .wp-block-image img {
		height: 32px;
	}
}

/* ---------- Section rhythm ---------- */

.ds-section {
	padding-top: clamp(80px, 10vw, 144px);
}

.ds-section-sm {
	padding-top: clamp(48px, 6vw, 88px);
}

.ds-page-top {
	padding-top: clamp(64px, 8vw, 120px);
}

.ds-pad-bottom {
	padding-bottom: clamp(80px, 10vw, 144px);
}

/* Fine rule above a block */
.ds-rule {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px;
}

/* ---------- Text styles ---------- */

.is-style-label,
p.ds-label {
	font-size: 13px !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ds-red);
	font-weight: 500;
	margin: 0;
}

.ds-statement {
	font-size: var(--wp--preset--font-size--x-large);
	line-height: 1.22;
	letter-spacing: -0.015em;
	color: var(--ds-black);
	font-weight: 300;
	padding-left: min(25%, 340px);
}

@media (max-width: 781px) {
	.ds-statement {
		padding-left: 0;
	}
}

.ds-strong {
	color: var(--ds-black);
	font-weight: 400;
}

.ds-muted {
	color: #5E5B55;
}

.ds-small {
	font-size: var(--wp--preset--font-size--small);
}

.ds-measure {
	max-width: 56ch;
}

.ds-quote {
	font-size: var(--wp--preset--font-size--large);
	line-height: 1.4;
	letter-spacing: -0.01em;
	color: var(--ds-black);
	font-weight: 300;
}

.ds-link {
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.ds-link a {
	display: inline-block;
	padding: 12px 0;
}

/* ---------- Buttons ---------- */

.wp-block-button.is-style-outline .wp-block-button__link {
	background: transparent;
	color: var(--ds-black);
	border: 1px solid var(--ds-black);
	border-radius: 0;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ds-black);
	color: var(--ds-warm-grey);
}

/* ---------- Dark bands (charcoal) and footer (black) ---------- */

.is-style-dark,
.is-style-black {
	position: relative;
	color: #E4E8E6;
	background-image: url("assets/images/paper-grain.png");
	background-size: 320px 320px;
}

.is-style-dark {
	background-color: var(--ds-charcoal);
}

.is-style-black {
	background-color: var(--ds-black);
	color: #CFCAC2;
}

.is-style-dark::before,
.is-style-black::before {
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: min(100%, 1920px);
	padding: 0 var(--ds-pad);
	box-sizing: border-box;
	pointer-events: none;
	background-origin: content-box;
	background-clip: content-box;
	background-image:
		linear-gradient(var(--ds-line-dark), var(--ds-line-dark)),
		linear-gradient(var(--ds-line-dark), var(--ds-line-dark)),
		linear-gradient(var(--ds-line-dark), var(--ds-line-dark));
	background-size: 1px 100%, 1px 100%, 1px 100%;
	background-position: left top, center top, right top;
	background-repeat: no-repeat;
}

.is-style-dark > *,
.is-style-black > * {
	position: relative;
}

.is-style-dark h1,
.is-style-dark h2,
.is-style-dark h3,
.is-style-dark h4,
.is-style-black h1,
.is-style-black h2,
.is-style-black h3,
.is-style-black h4 {
	color: #FFFFFF;
}

.is-style-dark a,
.is-style-black a {
	color: var(--ds-warm-grey);
}

.is-style-dark a:hover,
.is-style-black a:hover {
	color: #E3B7A6;
}

.is-style-dark .ds-rule,
.is-style-black .ds-rule {
	border-top-color: var(--ds-warm-grey);
}

.is-style-dark,
.is-style-black {
	padding-top: clamp(72px, 9vw, 128px);
	padding-bottom: clamp(72px, 9vw, 128px);
}

.ds-footer {
	padding-bottom: 40px;
}

.ds-footer .ds-email {
	font-size: clamp(30px, 4.4vw, 64px);
	font-weight: 300;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin: 0;
}

.ds-footer .ds-email a {
	text-decoration: none;
}

.ds-footer .ds-footer-head {
	color: var(--ds-warm-grey);
	font-weight: 400;
}

.ds-footer .wp-block-column p {
	margin: 0 0 6px;
	font-size: var(--wp--preset--font-size--small);
}

.ds-footer .ds-copy {
	font-size: 14px;
	color: #A9A49B;
	margin-top: 48px;
}

/* ---------- Hero ---------- */

.ds-hero.wp-block-cover {
	padding: clamp(24px, 4vw, 56px);
}

.ds-hero h1 {
	color: #FFFFFF;
	max-width: 15ch;
}

.ds-hero .is-style-label {
	color: var(--ds-warm-grey);
	margin-bottom: 16px;
}

/* ---------- Project cards ---------- */

.ds-cards .wp-block-post-featured-image {
	margin-bottom: 16px;
}

.ds-cards .wp-block-post-featured-image img {
	aspect-ratio: 4 / 3;
	object-fit: cover;
	width: 100%;
	background: #D6D1C7;
}

.ds-cards .wp-block-post-template {
	column-gap: var(--ds-pad) !important;
	row-gap: 56px !important;
}

.ds-card-meta {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px;
}

.ds-card-meta .wp-block-post-title {
	font-size: var(--wp--preset--font-size--medium);
	letter-spacing: 0;
	line-height: 1.4;
	margin: 0;
}

.ds-card-meta .wp-block-post-title a {
	text-decoration: none;
}

.ds-card-meta .wp-block-post-terms {
	color: #5E5B55;
	margin: 0;
}

.ds-card-meta .wp-block-post-terms a {
	color: inherit;
	text-decoration: none;
}

/* Filter chips on the Projects page */
.ds-chips {
	list-style: none;
	padding: 0;
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ds-chips li {
	margin: 0;
}

.ds-chips a {
	display: inline-block;
	min-height: 44px;
	box-sizing: border-box;
	padding: 10px 16px;
	border: 1px solid var(--ds-black);
	text-decoration: none;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

.ds-chips a:hover,
.ds-chips .current-cat a {
	background: var(--ds-black);
	color: var(--ds-warm-grey);
}

/* ---------- Single project details strip ---------- */

.ds-details > .wp-block-column {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px;
}

.ds-details .ds-detail-label {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #5E5B55;
	font-weight: 500;
	margin: 0 0 6px;
}

.ds-details .wp-block-post-terms,
.ds-details .wp-block-post-date {
	color: var(--ds-black);
	font-weight: 400;
	margin: 0;
}

.ds-details a {
	color: inherit;
	text-decoration: none;
}

.single-project .wp-block-post-featured-image img {
	width: 100%;
	max-height: 780px;
	object-fit: cover;
}

.single-project .wp-block-post-content .wp-block-columns > .wp-block-column {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 24px;
}

.ds-post-nav {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px;
	font-size: var(--wp--preset--font-size--small);
	font-weight: 400;
}

/* ---------- Columns with a rule above each ---------- */

.ds-ruled-columns > .wp-block-column {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 20px;
}

.is-style-dark .ds-ruled-columns > .wp-block-column,
.is-style-black .ds-ruled-columns > .wp-block-column {
	border-top-color: var(--ds-warm-grey);
}

.ds-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.ds-list li {
	border-top: 1px solid var(--ds-charcoal);
	padding: 16px 0;
	color: var(--ds-black);
	font-weight: 400;
}

.ds-list li:last-child {
	border-bottom: 1px solid var(--ds-charcoal);
}

/* Portrait sitting against the centre guide line */
.ds-snap {
	gap: 0 !important;
}

.ds-snap > .wp-block-column:last-child {
	padding-left: clamp(24px, 5vw, 72px);
}

.ds-snap .wp-block-image img {
	width: 100%;
	max-height: 640px;
	object-fit: cover;
}

@media (max-width: 781px) {
	.ds-snap {
		gap: 32px !important;
	}

	.ds-snap > .wp-block-column:last-child {
		padding-left: 0;
	}
}

/* Instagram tiles in 3:4 */
.wp-block-jetpack-instagram-gallery img {
	aspect-ratio: 3 / 4;
	object-fit: cover;
}

/* ---------- Forms (Jetpack contact form) ---------- */

.wp-block-jetpack-contact-form input[type="text"],
.wp-block-jetpack-contact-form input[type="email"],
.wp-block-jetpack-contact-form input[type="tel"],
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea {
	font: inherit;
	min-height: 50px;
	padding: 10px 14px;
	border: 1px solid var(--ds-charcoal);
	border-radius: 0;
	background: #FAF8F5;
	box-sizing: border-box;
}

.wp-block-jetpack-contact-form label {
	font-size: 14px;
	font-weight: 400;
	color: var(--ds-charcoal);
}

/* ---------- Accessibility ---------- */

a:focus-visible,
button:focus-visible,
.wp-block-button__link:focus-visible {
	outline: 2px solid var(--ds-red);
	outline-offset: 3px;
}

/* ---------- Additions ---------- */

.ds-hero-wrap {
	padding-top: clamp(24px, 3vw, 40px);
}

.ds-hero.wp-block-cover {
	min-height: clamp(460px, 52vw, 780px) !important;
}

.ds-gap-top {
	margin-top: clamp(48px, 6vw, 88px) !important;
}

.ds-heading-gap {
	margin-top: 24px !important;
	margin-bottom: clamp(40px, 4vw, 56px) !important;
}

.wp-block-post-terms.ds-label,
.wp-block-post-terms.ds-label a {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ds-red);
	font-weight: 500;
	text-decoration: none;
}

/* Keep measured text and hero heading aligned left inside constrained sections */
.ds-measure,
.ds-hero h1 {
	margin-left: 0 !important;
	margin-right: auto !important;
}

/* Bands sit flush against each other and the footer */
.wp-site-blocks > footer,
.wp-site-blocks > main {
	margin-block-start: 0;
}

main > .wp-block-pattern + *,
main .is-style-dark + .is-style-dark {
	margin-block-start: 0;
}

/* Studio portrait: columns split exactly at the centre line, portrait photo set against it */
.ds-snap > .wp-block-column {
	box-sizing: border-box;
	flex-shrink: 0;
	align-self: flex-end;
}

.ds-snap .wp-block-image {
	display: flex;
	justify-content: flex-end;
	margin: 0;
}

.ds-snap .wp-block-image img {
	width: 100%;
	max-width: none;
	max-height: none;
	height: auto;
	aspect-ratio: 200 / 171;
	object-fit: cover;
	object-position: center top;
}

/* ---------- Spacing corrections to match the mock-up ---------- */

/* Sections sit directly on top of each other; their own padding sets the rhythm */
.wp-block-post-content > .alignfull,
main > .alignfull,
main > .wp-block-group > .alignfull {
	margin-block-start: 0 !important;
	margin-block-end: 0 !important;
}

.wp-block-post-content > .alignfull.ds-gap-top {
	margin-block-start: clamp(80px, 10vw, 144px) !important;
}

.ds-hero h1 {
	font-size: clamp(38px, 5.6vw, 80px);
	line-height: 1.04;
}

.wp-block-button.is-style-outline .wp-block-button__link {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 28px;
	padding: 12px 20px;
}

.ds-hero .is-style-label {
	margin-bottom: 16px !important;
}

.ds-hero h1 {
	margin-top: 0 !important;
}

.ds-measure {
	max-width: 58ch;
}

/* Section headings wrap like the mock-up and sit flush to what follows */
h2.ds-heading-gap,
h1.ds-heading-gap {
	max-width: 20ch;
	margin-left: 0 !important;
	margin-right: auto !important;
}

.ds-heading-gap + * {
	margin-block-start: 0 !important;
}

.ds-rule + .wp-block-columns.ds-heading-gap {
	margin-top: 40px !important;
}

.ds-footer.is-style-black {
	padding-top: clamp(64px, 8vw, 112px);
}

.ds-footer .is-style-label {
	margin-bottom: 12px !important;
}

.ds-footer .ds-email {
	margin-top: 0 !important;
}

.ds-header .wp-block-image,
.ds-header .wp-block-buttons,
.ds-header .wp-block-navigation {
	margin: 0;
}

.ds-header .wp-block-image a {
	display: block;
}

.ds-header .wp-block-button__link {
	height: 48px;
	box-sizing: border-box;
}

.ds-ruled-columns > .wp-block-column > * {
	margin-block-start: 12px;
	margin-block-end: 0;
}

.ds-ruled-columns > .wp-block-column > *:first-child {
	margin-block-start: 0;
}

.is-style-dark h2.ds-heading-gap {
	margin-bottom: 64px !important;
}

.is-style-dark .ds-ruled-columns > .wp-block-column {
	padding-top: 24px;
}

.is-style-dark .ds-ruled-columns > .wp-block-column > h3 + p {
	margin-block-start: 14px;
}

.is-style-dark .ds-ruled-columns > .wp-block-column > p + p {
	margin-block-start: 20px;
}

.ds-ruled-columns p {
	max-width: 48ch;
}

.ds-ruled-columns:has(> .wp-block-column:nth-child(3)) p {
	max-width: 36ch;
}

.ds-snap h2.ds-heading-gap {
	margin-bottom: 24px !important;
}

.ds-strong.ds-small + .ds-muted.ds-small {
	margin-block-start: 2px;
}

.ds-pad-bottom > .wp-block-buttons {
	margin-block-start: 48px;
}

/* Inner page openings */
.ds-page-top > .is-style-label:first-child {
	padding-top: 14px;
}

h1.ds-heading-gap {
	max-width: 16ch;
	margin-bottom: 40px !important;
}

.ds-heading-gap + .ds-gap-top {
	margin-block-start: clamp(48px, 6vw, 80px) !important;
}

/* Headings inside columns run full width with tighter spacing */
.wp-block-column > h2.ds-heading-gap {
	max-width: none;
	margin-top: 24px !important;
	margin-bottom: 20px !important;
}

/* Image proportions from the mock-up */
.wp-block-columns.ds-gap-top .wp-block-image img {
	aspect-ratio: 3 / 2;
	object-fit: cover;
	width: 100%;
}

.ds-rule + .wp-block-columns.ds-heading-gap .wp-block-image img {
	aspect-ratio: 4 / 5;
	max-height: 620px;
	object-fit: cover;
	width: 100%;
}

/* Contact details */
.ds-rule > .ds-muted.ds-small:first-child {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	margin: 0;
}

.ds-rule > .ds-muted.ds-small:first-child + p {
	margin-block-start: 4px;
}

.wp-block-column > .ds-rule {
	padding-top: 16px;
	margin-block-start: 32px;
}

.ds-page-top > .is-style-label:first-child {
	padding-bottom: 8px;
}

.wp-block-column > h2.ds-heading-gap + p {
	max-width: 48ch;
}

.ds-page-top > .wp-block-image img {
	width: 100%;
	height: clamp(380px, 44vw, 680px);
	object-fit: cover;
}

.ds-gap-top > .wp-block-column:first-child > p:first-child {
	max-width: 40ch;
}

.ds-rule > .ds-strong a {
	display: inline-block;
	padding: 6px 0;
}

/* ---------- Typography corrections to match the mock-up ---------- */

.ds-header .wp-block-navigation a,
.ds-header .wp-block-navigation .wp-block-navigation-item__content {
	color: #040707 !important;
}

.ds-hero h1 {
	font-weight: 500;
}

h3,
.wp-block-heading:is(h3) {
	font-size: 24px;
	line-height: 1.55;
	letter-spacing: normal;
}

.is-style-dark .ds-ruled-columns:not(:has(> .wp-block-column:nth-child(3))) h3,
.wp-block-columns.ds-gap-top h3 {
	font-size: 26px;
}

.ds-ruled-columns > .wp-block-column:has(> ul) > h3 {
	font-size: 28px;
}

.ds-rule + .wp-block-columns.ds-heading-gap h2 {
	font-size: 26px !important;
	line-height: 1.55;
	letter-spacing: normal;
}

h2.has-x-large-font-size {
	font-size: clamp(26px, 2.8vw, 40px) !important;
	line-height: 1.15;
	letter-spacing: -0.015em;
}

.ds-quote ~ .ds-strong.ds-small {
	font-weight: 500;
}

.wp-block-jetpack-contact-form input,
.wp-block-jetpack-contact-form select,
.wp-block-jetpack-contact-form textarea {
	color: #040707;
}

/* ---------- Single project header, as in the mock-up ---------- */

.single-project .ds-page-top > .wp-block-group:first-child {
	padding-top: 14px;
}

.single-project .ds-page-top h1.wp-block-post-title {
	max-width: 18ch;
	margin-top: 24px !important;
	margin-bottom: 0 !important;
}

.single-project .ds-page-top .wp-block-columns.ds-details {
	margin-top: 48px !important;
	gap: 24px !important;
}

.single-project .ds-details > .wp-block-column {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px;
}

.single-project .ds-details .ds-detail-label {
	font-size: 13px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #5E5B55;
	font-weight: 500;
	line-height: 1.55;
	margin: 0;
}

.single-project .ds-details .wp-block-post-terms {
	font-size: 18px;
	font-weight: 400;
	line-height: 1.55;
	color: #040707;
	margin: 6px 0 0;
}

.single-project .ds-details a {
	color: inherit;
	text-decoration: none;
	pointer-events: none;
}

.single-project .ds-page-top .wp-block-post-featured-image {
	margin-top: clamp(40px, 5vw, 64px) !important;
}

.single-project .ds-page-top .wp-block-post-featured-image img {
	width: 100%;
	height: clamp(420px, 50vw, 760px);
	max-height: none;
	object-fit: cover;
}

@media (min-width: 600px) and (max-width: 781px) {
	.single-project .ds-details {
		flex-wrap: wrap !important;
	}

	.single-project .ds-details > .wp-block-column {
		flex-basis: calc(50% - 12px) !important;
	}
}

.single-project .ds-page-top {
	padding-top: clamp(48px, 6vw, 88px);
}

/* Instagram tiles spaced to match the page margins */
.wp-block-jetpack-instagram-gallery__grid {
	grid-gap: var(--wp--style--root--padding-left) !important;
	gap: var(--wp--style--root--padding-left) !important;
}

/* Home page section labels all sit the same distance below their line */
.home .ds-rule.is-layout-flow:has(> .is-style-label:first-child) {
	padding-top: 28px !important;
}

.home .ds-rule.is-layout-flow > .is-style-label:first-child {
	padding-bottom: 13px;
}

/* Footer: Dual Studio Ltd spans two columns, Follow sits under Contact */
.ds-footer .ds-ruled-columns > .wp-block-column.ds-footer-wide {
	flex-basis: calc(50% - 12px) !important;
	flex-grow: 0 !important;
}

.ds-footer .ds-footer-sub {
	padding-top: 21px;
	margin-top: 40px !important;
}

/* Footer base: copyright level with Instagram, bottom padding matches the side margins */
.ds-footer.is-style-black {
	padding-bottom: var(--wp--style--root--padding-left) !important;
}

@media (min-width: 782px) {
	.ds-footer .ds-copy {
		margin-top: -29px !important;
	}
}

/* Every paragraph under a column heading wraps at the same width */
.wp-block-column > h2.ds-heading-gap ~ p {
	max-width: 48ch;
}

/* How we work in the charcoal band keeps the phase spacing from the mock-up */
.is-style-dark h2.ds-heading-gap:has(+ .ds-ruled-columns > .wp-block-column:nth-child(3)) {
	margin-bottom: 56px !important;
}

.is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column {
	padding-top: 20px;
}

.is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column > h3 + p {
	margin-block-start: 12px;
}

/* No line above the How we work label in the charcoal band */
.home .is-style-dark > .ds-rule.is-layout-flow:first-child:has(> .is-style-label) {
	border-top: 0;
	padding-top: 0 !important;
}

/* Intro row text sits the same distance below its line as the section labels */
.ds-statement ~ .ds-rule.ds-gap-top {
	padding-top: 27px;
}

/* Intro row in the charcoal band */
.ds-intro > .ds-rule {
	padding-top: 27px;
}

.ds-intro .ds-strong {
	color: #FFFFFF;
}

/* Text pages such as the privacy and cookie policies */
.page-template-default .wp-block-post-content h2 {
	font-size: 24px;
	line-height: 1.3;
	letter-spacing: normal;
	margin-top: 48px;
	margin-bottom: 12px;
}

.page-template-default .wp-block-post-content h2 + * {
	margin-top: 0;
}

.page-template-default .wp-block-post-content ul {
	padding-left: 1.2em;
}

.page-template-default .wp-block-post-content li + li {
	margin-top: 8px;
}

/* Project page body, laid out as in the mock-up with gaps matching the page margins */
.single-project .wp-block-post-content > .ds-project-intro {
	gap: var(--wp--style--root--padding-left) !important;
	margin-top: 0;
}

.single-project .ds-project-intro > .wp-block-column {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 24px;
}

.single-project .ds-project-intro h2 {
	font-size: 28px !important;
	line-height: 1.3;
	letter-spacing: -0.01em;
	max-width: none;
	margin: 0 0 16px !important;
}

.single-project .ds-project-intro p {
	max-width: 52ch;
	margin: 0;
}

.single-project .wp-block-gallery[class*="ds-gallery-"] {
	--wp--style--unstable-gallery-gap: var(--wp--style--root--padding-left);
	gap: var(--wp--style--root--padding-left) !important;
	margin-top: var(--wp--style--root--padding-left) !important;
	margin-bottom: 0 !important;
}

.single-project .ds-project-intro + .wp-block-gallery {
	margin-top: clamp(72px, 9vw, 128px) !important;
}

.single-project .wp-block-gallery[class*="ds-gallery-"] .wp-block-image img {
	width: 100%;
	height: auto !important;
	object-fit: cover;
}

.single-project .ds-gallery-pair .wp-block-image img {
	aspect-ratio: 4 / 5;
}

.single-project .ds-gallery-wide .wp-block-image img {
	aspect-ratio: 16 / 9;
}

.single-project .ds-gallery-trio .wp-block-image img {
	aspect-ratio: 4 / 5;
}

/* Project page end row: previous and next on the left, back to all projects on the right */
.ds-post-nav > .ds-link {
	margin: 0 0 0 auto;
}

.ds-post-nav .ds-post-nav-links {
	gap: 32px;
}

.ds-post-nav .wp-block-post-navigation-link a {
	display: inline-block;
	padding: 12px 0;
}

.single-project .ds-post-nav {
	border-top: 0;
}

.ds-post-nav .ds-nav-empty span {
	display: inline-block;
	padding: 12px 0;
	color: #8A867E;
}

.single-project .ds-details .ds-detail-label {
	color: #97472e;
}

/* Projects pages: three portrait cards across */
.post-type-archive-project .ds-cards .wp-block-post-featured-image img,
.tax-project_type .ds-cards .wp-block-post-featured-image img,
.tax-project_area .ds-cards .wp-block-post-featured-image img {
	aspect-ratio: 4 / 5;
}

.post-type-archive-project .ds-cards .wp-block-post-template,
.tax-project_type .ds-cards .wp-block-post-template,
.tax-project_area .ds-cards .wp-block-post-template {
	row-gap: var(--ds-pad) !important;
}

.home .ds-cards .wp-block-post-featured-image img {
	aspect-ratio: 4 / 5;
}

.home .ds-cards .wp-block-post-template {
	row-gap: var(--ds-pad) !important;
}

/* How we work band: no centre guide line through the phases */
.is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3)) {
	position: relative;
}

.is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3))::after {
	content: "";
	position: absolute;
	top: 1px;
	bottom: calc(-1 * clamp(72px, 9vw, 128px));
	left: 50%;
	width: 4px;
	transform: translateX(-50%);
	background: var(--ds-charcoal);
	pointer-events: none;
	z-index: 0;
}

.is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column {
	position: relative;
	z-index: 1;
}

/* Intro band: no centre guide line below the rule */
.ds-intro > .ds-rule::after {
	content: "";
	position: absolute;
	top: 0;
	bottom: calc(-1 * clamp(72px, 9vw, 128px));
	left: 50%;
	width: 4px;
	transform: translateX(-50%);
	background: var(--ds-charcoal);
	pointer-events: none;
	z-index: 0;
}

.ds-intro > .ds-rule > * {
	position: relative;
	z-index: 1;
}

/* Opening statement lines up with the paragraph in the band below, and the centre guide line is hidden behind it */
@media (min-width: 782px) {
	.ds-statement {
		padding-left: calc((100% - 24px) / 3 + 24px) !important;
	}
}

.ds-statement {
	position: relative;
	z-index: 0;
}

.ds-statement::after {
	content: "";
	position: absolute;
	top: -48px;
	bottom: -56px;
	left: 50%;
	width: 4px;
	transform: translateX(-50%);
	background: var(--ds-warm-grey) url("assets/images/paper-grain.png");
	background-size: 320px 320px;
	pointer-events: none;
	z-index: -1;
}

/* Image style: Show whole image (no crop) */
.single-project .wp-block-gallery .wp-block-image.is-style-whole img {
	aspect-ratio: auto !important;
	height: auto !important;
	object-fit: contain;
}

.single-project .wp-block-gallery[class*="ds-gallery-"] {
	align-items: flex-start;
}

.single-project .wp-block-gallery .wp-block-image.is-style-whole img {
	flex: 0 0 auto !important;
}

/* Project main photograph shows the whole image at every screen size */
.single-project .ds-page-top .wp-block-post-featured-image img {
	height: auto !important;
	max-height: none !important;
	aspect-ratio: auto !important;
	object-fit: contain;
}

/* Project cards: no line between image and title */
.ds-card-meta {
	border-top: 0;
}

/* ---------- Services page, as in the mock-up ---------- */

.ds-svc-intro .ds-measure {
	max-width: 56ch;
	margin-top: 0;
}

main .is-style-dark.ds-svc-phases {
	margin-block-start: clamp(80px, 10vw, 144px) !important;
}

.ds-svc-phases > .ds-svc-phase {
	gap: 48px var(--ds-pad) !important;
	margin: 0 !important;
}

.ds-svc-phases > .ds-svc-phase + .ds-svc-phase {
	margin-top: clamp(72px, 9vw, 128px) !important;
}

.ds-svc-phase.ds-svc-reverse {
	flex-direction: row-reverse;
}

.ds-svc-phase h2.wp-block-heading {
	margin: 24px 0 20px !important;
	max-width: none;
}

.ds-svc-phase p:not(.is-style-label) {
	max-width: 48ch;
	margin: 0;
}

.ds-svc-phase p:not(.is-style-label) + p {
	margin-top: 20px;
}

.ds-svc-phase .wp-block-image {
	margin: 0;
}

.ds-svc-phase .wp-block-image img {
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
}

.ds-svc-brochure .ds-rule {
	padding-top: 24px;
	gap: 24px 48px;
}

.ds-svc-brochure-text {
	flex: 1 1 420px;
}

.ds-svc-brochure-text p:not(.is-style-label) {
	margin: 12px 0 0;
	max-width: 52ch;
}

.ds-svc-brochure .wp-block-buttons {
	margin: 0;
}

.ds-svc-packages h2.ds-svc-big {
	font-size: var(--wp--preset--font-size--huge);
	line-height: 1.05;
	letter-spacing: -0.025em;
	max-width: 18ch;
	margin: 24px 0 32px !important;
}

.ds-svc-packages .ds-svc-lead {
	max-width: 56ch;
	margin: 0 0 56px;
}

.ds-svc-tiers {
	gap: 40px var(--ds-pad) !important;
	flex-wrap: wrap !important;
	margin: 0 !important;
}

.ds-svc-tiers > .wp-block-column {
	flex: 1 1 320px !important;
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 20px;
}

.ds-svc-tiers h3.wp-block-heading {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 10px 0 20px;
}

.ds-svc-tiers p {
	max-width: 46ch;
	margin: 0;
}

.ds-svc-packages .ds-svc-note {
	margin: 56px 0 0;
	max-width: 64ch;
	font-size: 16px;
	color: #5E5B55;
}

@media (max-width: 781px) {
	.ds-svc-phase.ds-svc-reverse {
		flex-direction: column;
	}
}

.ds-svc-intro h1.ds-heading-gap {
	max-width: 18ch;
}

.ds-svc-packages > .ds-svc-lead,
.ds-svc-packages > .ds-svc-note,
.ds-svc-packages > h2.ds-svc-big {
	margin-left: 0 !important;
	margin-right: 0 !important;
}

.ds-svc-cta .wp-block-columns.ds-heading-gap h2.wp-block-heading {
	font-size: var(--wp--preset--font-size--xx-large) !important;
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin: 0 0 16px;
}

/* Services: brochure download inside the closing band */
.ds-svc-cta .ds-svc-brochure-row {
	margin-top: clamp(56px, 7vw, 96px) !important;
	padding-top: 24px;
	gap: 24px 48px;
}

.ds-svc-brochure-row .ds-svc-brochure-text {
	flex: 1 1 420px;
}

.ds-svc-brochure-row .ds-svc-brochure-text p:not(.is-style-label) {
	margin: 12px 0 0;
	max-width: 52ch;
}

.ds-svc-brochure-row .wp-block-buttons {
	margin: 0;
}

.ds-svc-cta .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--ds-warm-grey);
	border-color: var(--ds-warm-grey);
}

.ds-svc-cta .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ds-warm-grey);
	color: var(--ds-black);
}

/* Services phases: image snaps to the centre line, text column stops one margin short of it */
.ds-svc-phases > .ds-svc-phase {
	gap: 0 !important;
}

.ds-svc-phase > .wp-block-column {
	flex: 0 0 50% !important;
	box-sizing: border-box;
}

.ds-svc-phase > .wp-block-column:first-child {
	padding-right: var(--ds-pad);
}

.ds-svc-phase.ds-svc-reverse > .wp-block-column:first-child {
	padding-right: 0;
	padding-left: var(--ds-pad);
}

@media (max-width: 781px) {
	.ds-svc-phases > .ds-svc-phase {
		row-gap: 48px !important;
	}

	.ds-svc-phase > .wp-block-column,
	.ds-svc-phase.ds-svc-reverse > .wp-block-column:first-child {
		flex-basis: 100% !important;
		padding-left: 0;
		padding-right: 0;
	}
}

/* Rules draw across as they scroll into view (switched on per page by the ds-draw class) */
.ds-draw main .ds-rule,
.ds-draw main .ds-svc-tiers > .wp-block-column,
.ds-draw main .ds-ruled-columns > .wp-block-column {
	position: relative;
	border-top-color: transparent !important;
}

.ds-draw main .ds-rule::before,
.ds-draw main .ds-svc-tiers > .wp-block-column::before,
.ds-draw main .ds-ruled-columns > .wp-block-column::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 1px;
	background: var(--ds-charcoal);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1);
	pointer-events: none;
}

.ds-draw main .is-style-dark .ds-rule::before,
.ds-draw main .is-style-dark .ds-ruled-columns > .wp-block-column::before {
	background: var(--ds-warm-grey);
}

/* Lines side by side draw one after another, left to right */
.ds-draw main .ds-svc-tiers > .wp-block-column:nth-child(2)::before,
.ds-draw main .ds-ruled-columns > .wp-block-column:nth-child(2)::before {
	transition-delay: 1.4s;
}

.ds-draw main .ds-svc-tiers > .wp-block-column:nth-child(3)::before,
.ds-draw main .ds-ruled-columns > .wp-block-column:nth-child(3)::before {
	transition-delay: 2.8s;
}

.ds-draw main .ds-drawn::before,
.ds-draw main .ds-svc-tiers > .wp-block-column.ds-drawn::before,
.ds-draw main .ds-ruled-columns > .wp-block-column.ds-drawn::before {
	transform: scaleX(1);
}

/* Places that have no line (such as How we work on the home page) stay without one */
.ds-draw main .ds-noline::before,
.ds-draw main .ds-svc-tiers > .wp-block-column.ds-noline::before,
.ds-draw main .ds-ruled-columns > .wp-block-column.ds-noline::before {
	content: none;
}

/* Home: Planning, Technical and Construction headings match the band heading in size */
.home .is-style-dark .ds-ruled-columns:has(> .wp-block-column:nth-child(3)) > .wp-block-column > h3 {
	font-size: var(--wp--preset--font-size--xx-large);
	line-height: 1.1;
	letter-spacing: -0.02em;
	margin-top: 16px !important;
	margin-bottom: 20px !important;
}

/* ---------- Home: mosaic collage hero (from Rob's 02b concept) ---------- */

.ds-mosaic {
	--ds-mosaic-red: #354E55;
	background-color: var(--ds-mosaic-red);
	background-image:
		linear-gradient(rgba(255, 255, 255, 0.081) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, 0.081) 1px, transparent 1px);
	background-size: 40px 40px;
	color: #FBF3EC;
	margin-block-start: 0 !important;
	padding: 0 !important;
	overflow: hidden;
}

.ds-mosaic-stage {
	position: relative;
	max-width: 1440px;
	margin: 0 auto !important;
	aspect-ratio: 1440 / 820;
}

.ds-mosaic-stage > * {
	position: absolute;
	margin: 0 !important;
}

.ds-mosaic-stage .wp-block-image {
	overflow: hidden;
	background: rgba(255, 255, 255, 0.12);
}

.ds-mosaic-stage .wp-block-image:not(.ds-mosaic-logo) img {
	width: 100%;
	height: 100% !important;
	object-fit: cover;
	display: block;
}

.ds-mosaic-stage .ds-m1 { left: 11.11%; top: 14.63%; width: 10.42%; height: 10.98%; }
.ds-mosaic-stage .ds-m2 { left: 11.11%; top: 25.61%; width: 21.53%; height: 39.02%; }
.ds-mosaic-stage .ds-m3 { left: 32.64%; top: 25.61%; width: 21.53%; height: 39.02%; }
.ds-mosaic-stage .ds-m4 { left: 11.11%; top: 64.63%; width: 10.42%; height: 18.29%; }
.ds-mosaic-stage .ds-m5 { left: 54.17%; top: 4.88%; width: 41.67%; height: 80.49%; }

.ds-mosaic-stage .ds-mosaic-logo {
	left: 15.97%;
	top: 38.05%;
	width: 56.94%;
	background: none;
	overflow: visible;
	z-index: 2;
	pointer-events: none;
}

.ds-mosaic-stage .ds-mosaic-logo img {
	width: 100%;
	height: auto;
	display: block;
	filter: brightness(0) invert(1);
}

.ds-mosaic-stage .ds-mosaic-tag {
	left: 11.39%;
	top: 86.5%;
	font-size: 13px !important;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 500;
	color: #FBF3EC;
}

.ds-mosaic-stage .ds-mosaic-foot {
	left: 54.17%;
	right: 4.17%;
	top: 87.5%;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
}

.ds-mosaic-foot p {
	margin: 0;
	max-width: 380px;
	font-size: 18px;
	line-height: 1.4;
	color: #FBF3EC;
}

.ds-mosaic-foot .wp-block-buttons {
	margin: 0;
	flex-shrink: 0;
}

.ds-mosaic-btn .wp-block-button__link {
	background: #B4502F !important;
	color: #FBF3EC !important;
	border-radius: 0;
}

.ds-mosaic-btn .wp-block-button__link:hover {
	background: #FBF3EC !important;
	color: #1C1A19 !important;
}

/* Smaller screens: the collage becomes a simple stacked grid */
@media (max-width: 900px) {
	.ds-mosaic-stage {
		aspect-ratio: auto;
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
		padding: 40px var(--ds-pad) 48px;
	}

	.ds-mosaic-stage > * {
		position: static;
	}

	.ds-mosaic-stage .ds-mosaic-logo {
		grid-column: 1 / -1;
		order: -2;
		width: 100%;
		margin-bottom: 24px !important;
	}

	.ds-mosaic-stage .ds-m5 {
		grid-column: 1 / -1;
		order: -1;
		width: 100%;
		height: auto;
		aspect-ratio: 4 / 3;
	}

	.ds-mosaic-stage .ds-m1,
	.ds-mosaic-stage .ds-m2,
	.ds-mosaic-stage .ds-m3,
	.ds-mosaic-stage .ds-m4 {
		width: 100%;
		height: auto;
		aspect-ratio: 1;
	}

	.ds-mosaic-stage .ds-mosaic-tag,
	.ds-mosaic-stage .ds-mosaic-foot {
		grid-column: 1 / -1;
		margin-top: 16px !important;
	}

	.ds-mosaic-stage .ds-mosaic-foot {
		flex-wrap: wrap;
	}
}

/* Placeholder tiles get a fine edge so they read as separate images until real photos go in */
.ds-mosaic-stage img[src*="placeholder"] {
	outline: 1px solid rgba(53, 78, 85, 0.55);
	outline-offset: -1px;
}

/* Mosaic grid lines up with the site's three guide lines: left edge, centre and right edge of the content area */
.ds-mosaic {
	position: relative;
	container-type: inline-size;
	background-image: none;
	--ds-grid-cells: 40;
}

.ds-mosaic::before {
	--ds-grid-w: calc(min(100cqw, 1920px) - 2 * var(--ds-pad));
	--ds-grid-cell: calc(var(--ds-grid-w) / var(--ds-grid-cells));
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50cqw - var(--ds-grid-w) / 2 - 4 * var(--ds-grid-cell));
	width: calc(var(--ds-grid-w) + 8 * var(--ds-grid-cell) + 1px);
	pointer-events: none;
	z-index: 0;
	background-image:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.081) 0 1px, transparent 1px var(--ds-grid-cell)),
		repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.081) 0 1px, transparent 1px var(--ds-grid-cell));
}

.ds-mosaic-stage {
	z-index: 1;
}

@media (max-width: 900px) {
	.ds-mosaic {
		--ds-grid-cells: 16;
	}
}

/* Mosaic spans from four grid squares in from the left edge to the right edge of the content area */
.ds-mosaic-stage {
	--ds-grid-w: calc(min(100cqw, 1920px) - 2 * var(--ds-pad));
	--ds-grid-cell: calc(var(--ds-grid-w) / var(--ds-grid-cells));
	max-width: none;
	width: calc(var(--ds-grid-w) - 4 * var(--ds-grid-cell));
	margin: 0 0 0 calc(50cqw - var(--ds-grid-w) / 2 + 4 * var(--ds-grid-cell)) !important;
	aspect-ratio: 1220 / 820;
}

.ds-mosaic-stage .ds-m1 { left: 0; width: 12.3%; }
.ds-mosaic-stage .ds-m2 { left: 0; width: 25.41%; }
.ds-mosaic-stage .ds-m3 { left: 25.41%; width: 25.41%; }
.ds-mosaic-stage .ds-m4 { left: 0; width: 12.3%; }
.ds-mosaic-stage .ds-m5 { left: 50.82%; width: 49.18%; }
.ds-mosaic-stage .ds-mosaic-logo { left: 5.74%; width: 67.21%; }
.ds-mosaic-stage .ds-mosaic-tag { left: 0; }
.ds-mosaic-stage .ds-mosaic-foot { left: 50.82%; right: 0; }

@media (max-width: 900px) {
	.ds-mosaic-stage {
		width: auto;
		margin: 0 !important;
		aspect-ratio: auto;
	}

	.ds-mosaic-stage > .wp-block-image {
		width: 100%;
	}
}

/* Mosaic tiles snap to the background grid: every position and size is a whole number of squares */
.ds-mosaic-stage {
	--c: var(--ds-grid-cell);
	aspect-ratio: auto;
	height: calc(22 * var(--c));
}

.ds-mosaic-stage .ds-m1 { left: 0; top: calc(3 * var(--c)); width: calc(4 * var(--c)); height: calc(3 * var(--c)); }
.ds-mosaic-stage .ds-m2 { left: 0; top: calc(6 * var(--c)); width: calc(9 * var(--c)); height: calc(9 * var(--c)); }
.ds-mosaic-stage .ds-m3 { left: calc(9 * var(--c)); top: calc(6 * var(--c)); width: calc(9 * var(--c)); height: calc(9 * var(--c)); }
.ds-mosaic-stage .ds-m4 { left: 0; top: calc(15 * var(--c)); width: calc(4 * var(--c)); height: calc(4 * var(--c)); }
.ds-mosaic-stage .ds-m5 { left: calc(18 * var(--c)); top: var(--c); width: calc(18 * var(--c)); height: calc(18 * var(--c)); }

.ds-mosaic-stage .ds-mosaic-logo {
	left: calc(2 * var(--c));
	top: calc(10.5 * var(--c));
	width: calc(24 * var(--c));
	transform: translateY(-50%);
}

.ds-mosaic-stage .ds-mosaic-tag,
.ds-mosaic-stage .ds-mosaic-foot {
	top: calc(19 * var(--c) + 20px);
}

.ds-mosaic-stage .ds-mosaic-tag {
	left: 0;
	line-height: 48px;
}

.ds-mosaic-stage .ds-mosaic-foot {
	left: calc(18 * var(--c));
	right: 0;
}

@media (max-width: 900px) {
	.ds-mosaic-stage {
		height: auto;
	}

	.ds-mosaic-stage > .wp-block-image {
		height: auto;
	}

	.ds-mosaic-stage .ds-mosaic-logo {
		transform: none;
	}

	.ds-mosaic-stage .ds-mosaic-tag {
		line-height: 1.4;
	}
}

/* ---------- Home page header: on the red grid, running straight into the mosaic ---------- */

.home .ds-header {
	container-type: inline-size;
	position: relative;
	overflow-x: clip;
	background-color: #354E55;
	border-bottom-color: transparent;
	color: #FBF3EC;
	--ds-grid-cells: 40;
}

.home .ds-header::before {
	/* The header has side padding, so add it back to get the full width the mosaic grid uses */
	--ds-grid-w: calc(min(100cqw + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right), 1920px) - 2 * var(--ds-pad));
	--ds-grid-cell: calc(var(--ds-grid-w) / var(--ds-grid-cells));
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50% - var(--ds-grid-w) / 2 - 4 * var(--ds-grid-cell));
	width: calc(var(--ds-grid-w) + 8 * var(--ds-grid-cell) + 1px);
	pointer-events: none;
	z-index: 0;
	/* Rows are measured up from the bottom, so they carry on evenly into the mosaic below */
	background-image:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.081) 0 1px, transparent 1px var(--ds-grid-cell)),
		repeating-linear-gradient(0deg, transparent 0 calc(var(--ds-grid-cell) - 1px), rgba(255, 255, 255, 0.081) calc(var(--ds-grid-cell) - 1px) var(--ds-grid-cell));
}

.home .ds-header > * {
	position: relative;
	z-index: 1;
}

.home .ds-header .wp-block-image img {
	filter: brightness(0) invert(1);
}

.home .ds-header .wp-block-navigation__responsive-container:not(.is-menu-open) a,
.home .ds-header .wp-block-navigation__responsive-container-open {
	color: #FBF3EC !important;
}

.home .ds-header .wp-block-navigation__responsive-container:not(.is-menu-open) a:hover {
	color: #1C1A19 !important;
}

.home .ds-header .wp-block-button__link {
	background: transparent !important;
	color: #FBF3EC !important;
	box-shadow: inset 0 0 0 1px #FBF3EC;
}

.home .ds-header .wp-block-button__link:hover {
	background: #FBF3EC !important;
	color: #354E55 !important;
}

@media (max-width: 900px) {
	.home .ds-header {
		--ds-grid-cells: 16;
	}
}

/* Home header: plain colour, no grid behind the logo and menu (grid starts below it) */
.home .ds-header::before {
	content: none;
}

/* Menu links and buttons in capitals, site-wide */
.ds-header .wp-block-navigation .wp-block-navigation-item__content,
.wp-block-button__link {
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

/* Blue header with light logo and menu on every page, matching the home page */
.ds-header {
	background-color: #354E55;
	border-bottom-color: transparent;
	color: #FBF3EC;
}

.ds-header .wp-block-image img {
	filter: brightness(0) invert(1);
}

.ds-header .wp-block-navigation__responsive-container:not(.is-menu-open) a,
.ds-header .wp-block-navigation__responsive-container-open {
	color: #FBF3EC !important;
}

.ds-header .wp-block-navigation__responsive-container:not(.is-menu-open) a:hover {
	color: #1C1A19 !important;
}

.ds-header .wp-block-button__link {
	background: transparent !important;
	color: #FBF3EC !important;
	box-shadow: inset 0 0 0 1px #FBF3EC;
}

.ds-header .wp-block-button__link:hover {
	background: #FBF3EC !important;
	color: #354E55 !important;
}

/* Narrower windows: keep the stacked collage inside the page margins */
@media (max-width: 900px) {
	.ds-mosaic-stage {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}

	.ds-mosaic-stage > * {
		min-width: 0;
	}

	.ds-mosaic-stage .ds-m2,
	.ds-mosaic-stage .ds-m3,
	.ds-mosaic-stage .ds-m4,
	.ds-mosaic-stage .ds-m5 {
		width: 100% !important;
		height: auto !important;
	}

	.ds-mosaic-stage .ds-m4 {
		grid-column: 1 / -1;
		aspect-ratio: 3 / 2;
	}

	.ds-mosaic-stage .wp-block-image img {
		max-width: 100%;
	}
}

/* Leave room under the collage for the text and button when the window is narrower */
@media (min-width: 901px) {
	.ds-mosaic-stage {
		height: max(calc(22 * var(--c)), calc(19 * var(--c) + 160px));
	}
}

/* ---------- Home page v2: StoryBrand order and copy aligned to the hero images ---------- */

/* Copy starts on the line of the hero images, four grid squares in; the thin rules still run full width */
@media (min-width: 782px) {
	.home .ds-home-ind.is-layout-constrained > :not(.ds-rule) {
		margin-left: 10% !important;
	}

	.home .ds-home-ind .ds-band-close > :first-child {
		margin-left: 10%;
	}
}

.ds-mosaic-foot p {
	max-width: 460px;
}

.ds-mosaic-foot strong {
	font-weight: 500;
}

@media (min-width: 901px) {
	.ds-mosaic-stage {
		height: max(calc(22 * var(--c)), calc(19 * var(--c) + 200px));
	}
}

/* Before you start */
.ds-problem-cols {
	margin-top: 24px !important;
	gap: 24px var(--ds-pad) !important;
}

.ds-problem-cols h2 {
	margin: 0;
	max-width: 18ch;
}

.ds-problem-cols p {
	margin: 0;
	max-width: 42ch;
}

/* How we help */
.home .ds-solution .ds-statement {
	padding-left: 0 !important;
	margin-top: 40px !important;
}

/* How we work band */
.home .ds-home-ind h2.ds-heading-gap:has(+ .ds-band-intro) {
	margin-bottom: 20px !important;
}

.ds-band-intro {
	max-width: 52ch;
	margin-top: 0 !important;
	margin-bottom: 56px !important;
}

.ds-band-intro + .ds-ruled-columns {
	margin-top: 0 !important;
}

.ds-band-close {
	margin-top: 64px !important;
	padding-top: 24px !important;
	gap: 16px 40px;
}

.ds-band-close p {
	margin: 0;
	max-width: 52ch;
}

.ds-band-links a {
	font-size: 15px;
	font-weight: 400;
	padding: 12px 0;
}

.ds-band-links a + a {
	margin-left: 32px;
}

/* Closing call to action */
.ds-cta-cols {
	margin-top: 24px !important;
	gap: 32px var(--ds-pad) !important;
}

.ds-cta-cols h2 {
	margin: 0 0 16px !important;
	max-width: 20ch;
}

.ds-cta-cols p {
	margin: 0;
	max-width: 60ch;
}

.ds-cta-cols .wp-block-buttons {
	gap: 12px;
}

.is-style-dark .wp-block-button.is-style-outline .wp-block-button__link {
	color: var(--ds-warm-grey);
	border-color: var(--ds-warm-grey);
}

.is-style-dark .wp-block-button.is-style-outline .wp-block-button__link:hover {
	background: var(--ds-warm-grey);
	color: var(--ds-black);
}

/* Questions */
.ds-faq-cols {
	margin-top: 24px !important;
	gap: 40px var(--ds-pad) !important;
}

.ds-faq-cols h2 {
	margin: 0 0 20px;
}

.ds-faq-item {
	border-top: 1px solid var(--ds-charcoal);
	margin: 0 !important;
}

.ds-faq-item:last-child {
	border-bottom: 1px solid var(--ds-charcoal);
}

.ds-faq-item summary {
	list-style: none;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 22px 0;
	font-size: 22px;
	font-weight: 400;
	line-height: 1.3;
	color: var(--ds-black);
}

.ds-faq-item summary::-webkit-details-marker {
	display: none;
}

.ds-faq-item summary::after {
	content: "+";
	flex-shrink: 0;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	transition: transform 0.2s ease;
}

.ds-faq-item[open] summary::after {
	transform: rotate(45deg);
}

.ds-faq-item p {
	margin: 0 0 24px;
	max-width: 60ch;
}

/* Section labels wrap within the margin, keeping clear space before the copy */
@media (min-width: 782px) {
	.home .ds-home-ind > .ds-rule > .is-style-label {
		max-width: min(100px, calc(10% - 32px));
	}
}

/* Home: no line above Before you start, straight after the hero */
.home .ds-problem > .ds-rule {
	border-top: 0;
}

/* Home: tighter space between the hero and Before you start, now there is no line */
.home .ds-problem {
	padding-top: clamp(40px, 5vw, 72px) !important;
}

.home .ds-problem > .ds-rule {
	padding-top: 0;
}

/* Red section labels in the warmer terracotta, site-wide */
.is-style-label,
p.ds-label,
.wp-block-post-terms.ds-label,
.wp-block-post-terms.ds-label a {
	color: #B4502F !important;
}

/* Home: space at the top of each section matches the side margin */
.home .ds-home-ind {
	padding-top: var(--ds-pad) !important;
}

.home .ds-home-ind.ds-gap-top {
	margin-top: var(--ds-pad) !important;
}

/* Home: space between the projects and the Start a project band, and the line back above its label */
.home .ds-home-cta {
	margin-top: var(--ds-pad) !important;
}

.home .ds-home-cta.is-style-dark > .ds-rule.is-layout-flow:first-child:has(> .is-style-label) {
	border-top: 1px solid var(--ds-warm-grey);
	padding-top: 28px !important;
}

/* Home: no line above the packages line at the foot of How we work */
.home .ds-band-close {
	border-top: 0 !important;
}

/* Home: one spacing step everywhere. Section edges, gaps above the dark bands and the footer all match the side margin */
.home .ds-home-ind.is-style-dark,
.home .ds-home-ind.ds-pad-bottom {
	padding-bottom: var(--ds-pad) !important;
}

.ds-footer {
	padding-top: var(--ds-pad) !important;
}

/* Start a project page: no lines above Email, Phone and Where we work */
.page-id-9 main .ds-rule {
	border-top: 0;
}

/* Start a project page: What happens next band and the gap above it use the same 56px step as the home page */
.page-id-9 main .is-style-dark {
	padding-top: var(--ds-pad) !important;
	padding-bottom: var(--ds-pad) !important;
}

.page-id-9 main .ds-page-top.ds-pad-bottom {
	padding-bottom: var(--ds-pad) !important;
}

.page-id-9 main .is-style-dark > :last-child {
	margin-bottom: 0 !important;
}

/* ---------- Home: How we help intro (option C) ---------- */
.home .ds-intro-c > .ds-rule:first-child {
	border-top: 0;
	padding-top: 0;
}

.ds-intro-c h2.ds-intro-big {
	font-size: var(--wp--preset--font-size--huge);
	line-height: 1.04;
	letter-spacing: -0.025em;
	max-width: 20ch;
	margin-top: 32px !important;
	margin-bottom: 0 !important;
}

.ds-intro-c .ds-intro-split {
	margin-top: 72px !important;
	padding-top: 24px !important;
}

.ds-intro-split-cols {
	gap: 0 !important;
	margin: 0 !important;
}

.ds-intro-split-cols > .wp-block-column:first-child p {
	margin: 0;
	max-width: 34ch;
}

.ds-intro-split-cols p.ds-intro-guide {
	margin: 0 0 28px;
	max-width: 32ch;
	font-weight: 300;
	font-size: 28px;
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--ds-black);
}

.ds-intro-link {
	margin: 0;
}

.ds-intro-link a {
	font-size: 15px;
	font-weight: 400;
}

@media (min-width: 782px) {
	.ds-intro-split-cols > .wp-block-column:first-child {
		padding-left: 10%;
		padding-right: var(--ds-pad);
	}
}

@media (max-width: 781px) {
	.ds-intro-split-cols {
		gap: 24px !important;
	}

	.ds-intro-split-cols p.ds-intro-guide {
		font-size: 24px;
	}
}

@media (min-width: 782px) {
	.ds-intro-split-cols > .wp-block-column {
		flex: 0 0 50% !important;
		box-sizing: border-box;
	}
}

/* ---------- Services: How we work as stacked rows with bold numbers ---------- */
main .is-style-dark.ds-svc-rows {
	margin-block-start: clamp(80px, 10vw, 144px) !important;
}

.ds-svc-rows > .ds-rule:first-child {
	border-top: 0;
	padding-top: 0;
}

.ds-svc-rows-head {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: flex-end;
	gap: 24px 64px;
	margin-top: 24px !important;
}

.ds-svc-rows-head h2 {
	margin: 0 !important;
	max-width: 18ch;
	color: #FFFFFF;
}

.ds-svc-rows-head p {
	margin: 0 !important;
	max-width: 46ch;
}

.ds-svc-row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 32px 0;
	border-top: 1px solid rgba(241, 238, 234, 0.5);
	padding: 40px 0;
	margin: 0 !important;
}

.ds-svc-rows-head + .ds-svc-row {
	margin-top: 64px !important;
}

.ds-svc-row:last-child {
	padding-bottom: 0;
}

.ds-svc-row-text {
	flex: 1 1 420px;
	display: flex;
	gap: 32px;
	padding-right: var(--ds-pad);
	box-sizing: border-box;
	margin: 0 !important;
}

.ds-svc-row-text > .ds-row-num {
	flex-shrink: 0;
	width: 1.3em;
	margin: 0 !important;
	font-weight: 500;
	font-size: 120px !important;
	line-height: 0.82;
	letter-spacing: -0.05em;
	color: #B4502F;
}

.ds-svc-row-copy {
	display: flex;
	flex-direction: column;
	gap: 14px;
	padding-top: 6px;
	margin: 0 !important;
}

.ds-svc-row-copy > * {
	margin: 0 !important;
	max-width: 38ch;
}

.ds-svc-row-copy h3 {
	font-size: 44px;
	line-height: 1.05;
	letter-spacing: -0.02em;
	font-weight: 400;
	color: #FFFFFF;
}

.ds-svc-row-copy .ds-row-outcome {
	font-weight: 400;
	color: #FFFFFF;
}

.ds-svc-row > .wp-block-image {
	flex: 1 1 420px;
	margin: 0 !important;
}

.ds-svc-row > .wp-block-image img {
	width: 100%;
	height: auto !important;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	display: block;
}

@media (max-width: 781px) {
	.ds-svc-row-text {
		padding-right: 0;
		gap: 20px;
	}

	.ds-svc-row-text > .ds-row-num {
		font-size: 72px !important;
	}

	.ds-svc-row-copy h3 {
		font-size: 34px;
	}
}

/* ---------- Studio page (option C): blue grid hero with portraits, home page details ---------- */
.page-id-8 .ds-studio-hero,
.page-id-8 main .ds-home-ind {
	margin-block-start: 0 !important;
}

.ds-studio-hero {
	position: relative;
	container-type: inline-size;
	--ds-grid-cells: 40;
	background-color: #354E55;
	color: #FBF3EC;
	padding-top: var(--ds-pad) !important;
	padding-bottom: var(--ds-pad) !important;
	overflow-x: clip;
}

.ds-studio-hero::before {
	--ds-grid-w: calc(min(100cqw, 1920px) - 2 * var(--ds-pad));
	--ds-grid-cell: calc(var(--ds-grid-w) / var(--ds-grid-cells));
	content: "";
	position: absolute;
	top: 0;
	bottom: 0;
	left: calc(50cqw - var(--ds-grid-w) / 2 - 4 * var(--ds-grid-cell));
	width: calc(var(--ds-grid-w) + 8 * var(--ds-grid-cell) + 1px);
	pointer-events: none;
	z-index: 0;
	background-image:
		repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.081) 0 1px, transparent 1px var(--ds-grid-cell)),
		repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.081) 0 1px, transparent 1px var(--ds-grid-cell));
}

@media (max-width: 900px) {
	.ds-studio-hero {
		--ds-grid-cells: 16;
	}
}

.ds-studio-hero > * {
	position: relative;
	z-index: 1;
}

.ds-studio-hero-cols {
	gap: 40px 0 !important;
	margin: 0 !important;
}

.ds-studio-hero .is-style-label {
	color: #F1C3B0 !important;
	margin: 0;
}

.ds-studio-hero h1 {
	margin: 24px 0 24px !important;
	max-width: 12ch;
	font-size: var(--wp--preset--font-size--huge);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.025em;
	color: #FFFFFF;
}

.ds-studio-hero-cols p:not(.is-style-label) {
	margin: 0;
	max-width: 40ch;
	color: #E4E8E6;
}

.ds-studio-portraits {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}

.ds-studio-portraits .wp-block-image {
	margin: 0 !important;
	background: rgba(255, 255, 255, 0.12);
}

.ds-studio-portraits .wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

@media (min-width: 782px) {
	.ds-studio-hero-cols > .wp-block-column {
		flex: 0 0 50% !important;
		box-sizing: border-box;
	}

	.ds-studio-hero-cols > .wp-block-column:first-child {
		padding-right: var(--ds-pad);
	}

	.ds-studio-hero-cols > .wp-block-column:first-child > :not(.is-style-label) {
		margin-left: calc((100% + var(--ds-pad)) * 0.2) !important;
	}
}

/* Studio: copy indented to the same line as the home page, labels on the guide line */
@media (min-width: 782px) {
	.page-id-8 .ds-home-ind.is-layout-constrained > :not(.ds-rule) {
		margin-left: 10% !important;
	}

	.page-id-8 .ds-home-ind > .ds-rule > .is-style-label {
		max-width: min(100px, calc(10% - 32px));
	}
}

.page-id-8 .ds-home-ind {
	padding-top: var(--ds-pad) !important;
}

.page-id-8 .ds-home-ind.is-style-dark,
.page-id-8 .ds-home-ind.ds-pad-bottom {
	padding-bottom: var(--ds-pad) !important;
}

.page-id-8 .ds-intro-c > .ds-rule:first-child {
	border-top: 0;
	padding-top: 0;
}

/* Studio: the team */
.ds-studio-team-cols {
	margin-top: 24px !important;
	gap: 32px var(--ds-pad) !important;
}

.ds-studio-team-cols h3 {
	margin: 0 0 4px;
	font-size: 28px;
	font-weight: 400;
	line-height: 1.15;
}

.ds-studio-team-cols .is-style-label {
	margin: 0;
}

.ds-studio-team-cols p:not(.is-style-label) {
	margin: 12px 0 0;
	max-width: 42ch;
}

/* Studio: What to expect uses the Services rows without images; one spacing step above it */
.page-id-8 main .is-style-dark.ds-svc-rows {
	margin-block-start: 0 !important;
}

.ds-studio-expect .ds-svc-row-copy > * {
	max-width: 44ch;
}

/* Studio: Where we work */
.ds-studio-where-cols {
	margin-top: 24px !important;
	gap: 24px var(--ds-pad) !important;
}

.ds-studio-where-cols h2 {
	margin: 0;
	max-width: 16ch;
}

.ds-studio-where-cols p {
	margin: 0 0 20px;
	max-width: 46ch;
}

.ds-studio-where-cols p.ds-intro-link {
	margin: 0;
}

/* Studio: closing call to action, with its line above the label */
.page-id-8 .ds-home-cta {
	margin-top: 0 !important;
}

.page-id-8 .ds-home-cta.is-style-dark > .ds-rule:first-child {
	border-top: 1px solid var(--ds-warm-grey);
	padding-top: 14px !important;
}

/* Studio hero: portraits snap to the background grid, as on the home page (8 x 10 squares each, so 4:5) */
@media (min-width: 901px) {
	.ds-studio-hero {
		padding-top: 0 !important;
		padding-bottom: 0 !important;
	}

	.ds-studio-hero > .ds-studio-hero-cols {
		--c: calc((min(100cqw, 1920px) - 2 * var(--ds-pad)) / var(--ds-grid-cells));
		margin-top: calc(2 * var(--c)) !important;
		margin-bottom: calc(2 * var(--c)) !important;
	}

	.ds-studio-portraits {
		grid-template-columns: repeat(2, calc(8 * var(--c)));
		gap: var(--c);
		margin-left: calc(2 * var(--c));
	}
}

/* Studio hero: the section has side padding, so add it back so the grid matches the guide lines and the home page */
.ds-studio-hero::before {
	--ds-grid-w: calc(min(100cqw + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right), 1920px) - 2 * var(--ds-pad));
	left: calc(50% - var(--ds-grid-w) / 2 - 4 * var(--ds-grid-cell));
}

@media (min-width: 901px) {
	.ds-studio-hero > .ds-studio-hero-cols {
		--c: calc((min(100cqw + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right), 1920px) - 2 * var(--ds-pad)) / var(--ds-grid-cells));
	}

	/* Portraits hang from a grid line; the text sits on the bottom of the row */
	.ds-studio-hero-cols > .wp-block-column:last-child {
		align-self: flex-start;
	}
}

/* Studio hero: heading breaks after the comma, so "Two perspectives," stays on one line */
.ds-studio-hero h1 {
	max-width: none;
}

@media (min-width: 782px) {
	/* Scale the heading down on smaller screens so "Two perspectives," still fits on one line */
	.ds-studio-hero h1 {
		font-size: min(var(--wp--preset--font-size--huge), 4.5cqw);
	}
}

/* ---------- Services: How we work as a scroll reveal (sketch, clay model, render) ---------- */
/* Without the script, and in the editor, the three phases simply stack */
.ds-reveal-track {
	margin-top: 64px !important;
}

.ds-reveal-stage,
.ds-reveal-frame {
	margin: 0 !important;
}

.ds-reveal-layer {
	display: flex;
	flex-direction: column;
	background-color: var(--ds-charcoal);
	margin: 0 !important;
}

.ds-reveal-layer + .ds-reveal-layer {
	margin-top: 48px !important;
}

.ds-reveal-layer > .wp-block-image {
	margin: 0 !important;
}

.ds-reveal-layer > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ds-reveal-text {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding-top: 24px;
	margin: 0 !important;
}

.ds-reveal-text > * {
	margin: 0 !important;
	max-width: 46ch;
}

.ds-reveal-text > .ds-row-num {
	font-weight: 500;
	font-size: 56px !important;
	line-height: 0.9;
	letter-spacing: -0.05em;
	color: #B4502F;
}

.ds-reveal-text h3 {
	font-size: 34px;
	line-height: 1.05;
	letter-spacing: -0.02em;
	font-weight: 400;
	color: #FFFFFF;
}

.ds-reveal-text .ds-row-outcome {
	font-weight: 400;
	color: #FFFFFF;
}

/* With the script: the frame pins in place while each phase wipes up over the last */
.ds-reveal-on .ds-reveal-track {
	position: relative;
	height: 320vh;
}

.ds-reveal-on .ds-reveal-stage {
	position: sticky;
	top: 0;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.ds-reveal-on .ds-reveal-frame {
	position: relative;
	width: 100%;
	height: min(calc(100vh - 48px), 960px);
	overflow: hidden;
}

.ds-reveal-on .ds-reveal-layer {
	position: absolute;
	inset: 0;
	margin: 0 !important;
}

.ds-reveal-on .ds-reveal-layer:not(:first-child) {
	clip-path: inset(100% 0 0 0);
}

.ds-reveal-on .ds-reveal-layer > .wp-block-image {
	flex-shrink: 0;
}

.ds-reveal-on .ds-reveal-text {
	padding-top: 20px;
	gap: 8px;
}

.ds-reveal-wipe {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 1px;
	background-color: #B4502F;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
}

@media (max-width: 781px) {
	.ds-reveal-text > .ds-row-num {
		font-size: 44px !important;
	}

	.ds-reveal-text h3 {
		font-size: 28px;
	}

	.ds-reveal-on .ds-reveal-text {
		font-size: 16px;
	}
}

/* Large screens: a landscape frame with the words laid over the left-hand side of each image */
@media (min-width: 1100px) {
	.ds-reveal-on .ds-reveal-frame {
		width: min(100%, calc((100vh - 48px) * 16 / 9));
		height: auto;
		aspect-ratio: 16 / 9;
	}

	.ds-reveal-on .ds-reveal-layer > .wp-block-image,
	.ds-reveal-on .ds-reveal-layer > .wp-block-image img {
		position: absolute;
		inset: 0;
		width: 100%;
		height: 100% !important;
		aspect-ratio: auto;
	}

	.ds-reveal-on .ds-reveal-text {
		position: absolute;
		left: 4%;
		top: 0;
		bottom: 0;
		width: min(32%, 440px);
		justify-content: center;
		padding: 0;
		gap: 14px;
		color: #323232;
	}

	.ds-reveal-on .ds-reveal-text > .ds-row-num {
		font-size: clamp(56px, 6vw, 96px) !important;
	}

	.ds-reveal-on .ds-reveal-text h3 {
		font-size: clamp(30px, 3vw, 44px);
		color: #040707;
	}

	.ds-reveal-on .ds-reveal-text .ds-row-outcome {
		color: #040707;
	}
}

/* ---------- Services: the reveal as its own full-width section, images only ---------- */
/* The images carry the ds-m5 class so they load at the larger 2400px size */
.ds-reveal-wipe {
	margin: 0 !important;
}

main .ds-reveal-section {
	padding: 0 !important;
	margin-block-start: 0 !important;
	background-color: var(--ds-charcoal);
}

.ds-reveal-section > .ds-reveal-track {
	max-width: none !important;
	width: 100%;
	margin: 0 !important;
}

.ds-reveal-section .ds-reveal-layer + .ds-reveal-layer {
	margin-top: 0 !important;
}

.ds-reveal-on .ds-reveal-section .ds-reveal-frame,
.ds-reveal-on .ds-reveal-section .ds-reveal-frame[class] {
	width: 100%;
	height: min(100vh, 56.25vw);
	aspect-ratio: auto;
}

.ds-reveal-on .ds-reveal-section .ds-reveal-layer > .wp-block-image,
.ds-reveal-on .ds-reveal-section .ds-reveal-layer > .wp-block-image img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100% !important;
	aspect-ratio: auto;
	object-fit: cover;
}

/* No gap between How we work and the images */
main .ds-svc-rows-text {
	padding-bottom: var(--ds-pad) !important;
}

/* Services: the reveal sits under the intro, one spacing step below the text, and runs straight into the How we work band */
main .ds-svc-intro {
	padding-bottom: var(--ds-pad) !important;
}

main .ds-reveal-section + .ds-svc-rows {
	margin-block-start: 0 !important;
	padding-top: var(--ds-pad) !important;
}

/* Services reveal: the pinned area is only as tall as the image, held in the middle of the screen, so no dark bands appear on narrower screens or phones */
main .ds-reveal-section {
	background-color: transparent;
}

.ds-reveal-on .ds-reveal-section .ds-reveal-track {
	height: calc(min(100vh, 56.25vw) + 220vh);
}

.ds-reveal-on .ds-reveal-section .ds-reveal-stage {
	display: block;
	height: min(100vh, 56.25vw);
	top: calc((100vh - min(100vh, 56.25vw)) / 2);
}

/* ---------- Services: How we work with the phase images held beside the text ---------- */
/* Each phase's top line runs across the image as you scroll, wiping from sketch to clay model to render */
.ds-phase-split {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	margin-top: 64px !important;
}

.ds-phase-rows,
.ds-phase-media {
	flex: 1 1 100%;
	min-width: 0;
	margin: 0 !important;
}

.ds-phase-rows > .ds-svc-row {
	margin: 0 !important;
}

.ds-phase-frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin: 0 !important;
}

.ds-phase-layer,
.ds-phase-layer > .wp-block-image {
	margin: 0 !important;
}

.ds-phase-layer > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100% !important;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ds-phase-on .ds-phase-layer {
	position: absolute;
	inset: 0;
}

.ds-phase-on .ds-phase-layer:not(:first-child) {
	clip-path: inset(100% 0 0 0);
}

.ds-phase-wipe {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 1px;
	margin: 0 !important;
	background-color: #B4502F;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
}

/* Phones and small tablets: the image sits above the phases and stays at the top of the screen */
@media (max-width: 781px) {
	.ds-phase-media {
		order: -1;
		position: sticky;
		top: 0;
		z-index: 3;
		padding-block: 16px;
		background-color: var(--ds-charcoal);
	}
}

/* Larger screens: phases on the left, the image held from the centre line to the right edge */
@media (min-width: 782px) {
	.ds-phase-split {
		--ds-phase-h: calc((min(100vw, 1920px) - 2 * var(--ds-pad)) * 0.28125);
	}

	.ds-phase-rows,
	.ds-phase-media {
		flex: 0 0 50%;
	}

	.ds-phase-rows > .ds-svc-row {
		min-height: var(--ds-phase-h);
		box-sizing: border-box;
	}

	.ds-phase-frame {
		position: sticky;
		top: max(24px, calc(50vh - var(--ds-phase-h) / 2));
	}
}

/* Services: keep the same gap above How we work now the intro has its own bottom padding */
main .ds-svc-intro + .ds-svc-rows {
	margin-block-start: calc(clamp(80px, 10vw, 144px) - var(--ds-pad)) !important;
}

/* ---------- Services intro: sketch, clay model and render wipe through beside the heading as you scroll ---------- */
.ds-ir-pin,
.ds-ir-cols,
.ds-ir-copy,
.ds-ir-media {
	margin: 0 !important;
}

.ds-ir-cols {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 40px 0;
}

.ds-ir-copy,
.ds-ir-media {
	flex: 1 1 100%;
	min-width: 0;
}

.ds-ir-frame {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	margin: 0 !important;
	background-color: #FFFFFF;
}

.ds-ir-layer,
.ds-ir-layer > .wp-block-image {
	margin: 0 !important;
}

.ds-ir-layer > .wp-block-image img {
	display: block;
	width: 100%;
	height: 100% !important;
	aspect-ratio: 16 / 9;
	object-fit: cover;
}

.ds-ir-on .ds-ir-layer {
	position: absolute;
	inset: 0;
}

.ds-ir-on .ds-ir-layer:not(:first-child) {
	clip-path: inset(100% 0 0 0);
	will-change: clip-path;
}

.ds-ir-on .ds-ir-pin {
	position: sticky;
}

.ds-ir-wipe {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	height: 1px;
	margin: 0 !important;
	background-color: #B4502F;
	opacity: 0;
	pointer-events: none;
	z-index: 5;
	will-change: top;
}

/* Larger screens: heading on the left, the image from the centre line to the right edge */
@media (min-width: 782px) {
	.ds-ir-copy,
	.ds-ir-media {
		flex: 0 0 50%;
	}

	.ds-ir-copy {
		padding-right: var(--ds-pad);
		box-sizing: border-box;
	}
}

/* Smooth scrolling (Lenis) */
html.lenis,
html.lenis body {
	height: auto;
}

.lenis.lenis-smooth {
	scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
	overscroll-behavior: contain;
}

.lenis.lenis-stopped {
	overflow: hidden;
}

/* Services: How we work rows with the picture on the left, from the left edge to the centre line, and the words on the right */
.ds-svc-rows-flip .ds-svc-row > .wp-block-image {
	order: -1;
}

@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row {
		flex-wrap: nowrap;
		gap: 0;
	}

	.ds-svc-rows-flip .ds-svc-row > .wp-block-image,
	.ds-svc-rows-flip .ds-svc-row > .ds-svc-row-text {
		flex: 0 0 50%;
		box-sizing: border-box;
	}

	.ds-svc-rows-flip .ds-svc-row > .wp-block-image {
		padding-right: var(--ds-pad);
	}

	.ds-svc-rows-flip .ds-svc-row > .ds-svc-row-text {
		padding-right: 0;
	}
}

/* Services: How we work intro text starts on the same line as the phase headings (centre line plus the number column) */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-rows-head {
		display: grid;
		grid-template-columns: 50% 50%;
		align-items: end;
		gap: 0;
	}

	.ds-svc-rows-flip .ds-svc-rows-head > p {
		margin-left: calc(1.3 * 120px + 32px) !important;
	}
}

/* Services: phase text never runs past the right edge; smaller numbers on small laptops and tablets */
.ds-svc-rows-flip .ds-svc-row-copy {
	min-width: 0;
}

@media (min-width: 782px) and (max-width: 1199px) {
	.ds-svc-rows-flip .ds-svc-row-text > .ds-row-num {
		font-size: 72px !important;
	}

	.ds-svc-rows-flip .ds-svc-row-copy h3 {
		font-size: 34px;
	}

	.ds-svc-rows-flip .ds-svc-rows-head > p {
		margin-left: calc(1.3 * 72px + 32px) !important;
	}
}

/* Services: phase number stays level with the top of the image, centred between the centre line and the words; the words sit on the base of the image */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row {
		align-items: stretch;
	}

	.ds-svc-rows-flip .ds-svc-row-text {
		align-items: stretch;
		gap: 0;
	}

	.ds-svc-rows-flip .ds-svc-row-text > .ds-row-num {
		align-self: flex-start;
		width: calc(1.3em + 32px);
		text-align: center;
	}

	.ds-svc-rows-flip .ds-svc-row-copy {
		align-self: flex-end;
		padding-top: 0;
	}

	.ds-svc-rows-flip .ds-svc-row-copy > :last-child {
		margin-bottom: 0 !important;
	}
}

/* Services: where the words run taller than the picture (small laptops and tablets), the picture grows to match so the words still sit on its base */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row > .wp-block-image img {
		height: 100% !important;
		min-height: 0;
	}
}

/* Services: phase number moves down to sit level with the top of the phase heading; both sit on the base of the image */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row-text {
		display: grid;
		grid-template-columns: auto minmax(0, 1fr);
		align-content: end;
		align-items: start;
	}

	.ds-svc-rows-flip .ds-svc-row-text > .ds-row-num,
	.ds-svc-rows-flip .ds-svc-row-copy {
		align-self: start;
	}
}

/* Services: Start a project and the brochure side by side at the end of the page */
.ds-cta-split {
	gap: 40px 0 !important;
	margin: 0 !important;
}

.ds-cta-split > .wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: 32px;
}

.ds-cta-split-copy > * {
	margin: 0 !important;
}

.ds-cta-split-copy h2 {
	margin-top: 32px !important;
	max-width: 16ch;
}

.ds-cta-split-copy h2 + p {
	margin-top: 16px !important;
	max-width: 46ch;
}

.ds-cta-split .wp-block-buttons {
	margin: 0 !important;
}

@media (min-width: 782px) {
	.ds-cta-split > .wp-block-column {
		flex: 0 0 50% !important;
		box-sizing: border-box;
	}

	.ds-cta-split > .wp-block-column:first-child {
		padding-right: var(--ds-pad);
	}

	.ds-cta-split > .wp-block-column:first-child::before {
		right: var(--ds-pad);
		width: auto;
	}
}

/* Services: the line above Start a project stops short of the centre line, leaving a gap before the brochure */
@media (min-width: 782px) {
	.ds-draw main .ds-cta-split.ds-ruled-columns > .wp-block-column:first-child::before {
		width: calc(100% - var(--ds-pad)) !important;
		right: auto !important;
	}
}

/* Services: more space between the three packages and the payment note below them */
main .ds-svc-packages .ds-svc-note {
	margin-top: clamp(64px, 7vw, 112px) !important;
}

/* Services: more breathing room in the Start a project and brochure blocks */
.ds-cta-split > .wp-block-column {
	gap: clamp(40px, 4vw, 64px);
}

.ds-cta-split-copy h2 + p {
	margin-top: 28px !important;
}

/* Services: no line above Packages, and one spacing step between the How we work band and the Packages label */
main .ds-svc-packages {
	margin-block-start: 0 !important;
	padding-top: var(--ds-pad) !important;
}

main .ds-svc-packages > .ds-rule:first-child {
	border-top: 0 !important;
	padding-top: 0 !important;
}

.ds-draw main .ds-svc-packages > .ds-rule:first-child::before {
	display: none;
}

/* Services: one spacing step from the top of the How we work band to its label */
main .ds-svc-rows-text {
	padding-top: var(--ds-pad) !important;
}

/* Services: one spacing step (the side margin) at the top and bottom of every section, as on the home page */
.page-id-7 main section.alignfull {
	margin-block-start: 0 !important;
	padding-top: var(--ds-pad) !important;
	padding-bottom: var(--ds-pad) !important;
}

/* Home hero: the collage now runs the full content width, the same padding both sides as the rest of the site (40 grid squares) */
@media (min-width: 901px) {
	.ds-mosaic .ds-mosaic-stage {
		width: var(--ds-grid-w);
		margin: 0 0 0 calc(50cqw - var(--ds-grid-w) / 2) !important;
	}

	.ds-mosaic .ds-mosaic-stage .ds-m2 { left: 0; top: calc(5 * var(--c)); width: calc(10 * var(--c)); height: calc(10 * var(--c)); }
	.ds-mosaic .ds-mosaic-stage .ds-m3 { left: calc(10 * var(--c)); top: calc(5 * var(--c)); width: calc(10 * var(--c)); height: calc(10 * var(--c)); }
	.ds-mosaic .ds-mosaic-stage .ds-m4 { left: 0; top: calc(15 * var(--c)); width: calc(4 * var(--c)); height: calc(4 * var(--c)); }
	.ds-mosaic .ds-mosaic-stage .ds-m5 { left: calc(20 * var(--c)); top: var(--c); width: calc(20 * var(--c)); height: calc(18 * var(--c)); }

	.ds-mosaic .ds-mosaic-stage .ds-mosaic-foot {
		left: calc(20 * var(--c));
	}
}

/* Home: the collage now spans the full width, so the copy goes back to the left guide line (no 10% indent) */
@media (min-width: 782px) {
	.home .ds-home-ind.is-layout-constrained > :not(.ds-rule) {
		margin-left: 0 !important;
	}

	.home .ds-home-ind > .ds-rule > .is-style-label,
	.home .ds-home-ind .ds-band-close > :first-child {
		margin-left: 0;
	}

	.home .ds-home-ind > .ds-rule > .is-style-label {
		max-width: none;
	}

	.home .ds-intro-split-cols > .wp-block-column:first-child {
		padding-left: 0;
	}
}

/* Home only: a larger logo, 18 grid squares wide, overlapping the header and the grid below it. Other pages keep the standard logo */
@media (min-width: 901px) {
	.home .ds-header {
		position: relative;
		z-index: 3;
	}

	.home .ds-header .ds-logo {
		position: relative;
	}

	.home .ds-header .ds-logo img {
		position: absolute;
		top: 0;
		left: 0;
		width: calc((min(100cqw + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right), 1920px) - 2 * var(--ds-pad)) / 40 * 18);
		max-width: none;
		height: auto;
		z-index: 5;
	}
}

/* Home: the logo's space in the header stays the standard size, so the header doesn't change height and the larger logo starts where the standard one does */
@media (min-width: 901px) {
	.home .ds-header .ds-logo {
		width: 310px;
		height: 48px;
		flex-shrink: 0;
	}
}

/* Home: the large logo drops down into the grid, its top on the first grid line (level with the top of the house picture) */
@media (min-width: 901px) {
	.home .ds-header .ds-logo img {
		top: calc(100% + 21px + (min(100cqw + var(--wp--style--root--padding-left) + var(--wp--style--root--padding-right), 1920px) - 2 * var(--ds-pad)) / 40);
	}
}

/* ---------- Home hero: each collage tile is a small gallery that cross-fades (1 second) every 3 seconds, tiles out of step ---------- */
.ds-mosaic-stage > .wp-block-gallery.ds-slides {
	display: block !important;
	overflow: hidden;
	padding: 0 !important;
	gap: 0 !important;
	background: rgba(255, 255, 255, 0.12);
}

.ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image:not(#individual-image) {
	position: absolute !important;
	inset: 0;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	opacity: 0;
	z-index: 1;
	transition: opacity 2s ease;
}

.ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image:not(#individual-image):first-child,
.ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image:not(#individual-image).is-on {
	opacity: 1;
}

.ds-slides-on .ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image:not(#individual-image):first-child:not(.is-on) {
	opacity: 0;
}

.ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image:not(#individual-image).is-next {
	z-index: 2;
}

.ds-mosaic-stage .wp-block-gallery.has-nested-images.ds-slides figure.wp-block-image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: none;
	object-fit: cover;
}

/* Phones and tablets: the stacked tiles keep their shape */
@media (max-width: 900px) {
	.ds-mosaic-stage > .wp-block-gallery.ds-slides.ds-m2,
	.ds-mosaic-stage > .wp-block-gallery.ds-slides.ds-m3 {
		aspect-ratio: 1 / 1;
	}

	.ds-mosaic-stage > .wp-block-gallery.ds-slides.ds-m5 {
		aspect-ratio: 10 / 9;
	}
}

/* Home: with the large logo down on the grid, the header's left side carries the studio line, styled like the menu */
@media (min-width: 901px) {
	.home .ds-header .ds-logo::after {
		content: "Architecture & Interiors - Est. 2023";
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);
		white-space: nowrap;
		font-family: "Fira Sans", "Helvetica Neue", Arial, sans-serif;
		font-size: 15px;
		font-weight: 400;
		line-height: 23.25px;
		letter-spacing: 0.08em;
		text-transform: uppercase;
		color: #FBF3EC;
	}
}

/* Home hero: the strapline and button under the house drop down to line up with Planning, Technical, Interiors on the left */
@media (min-width: 901px) {
	.ds-mosaic .ds-mosaic-stage .ds-mosaic-foot {
		top: calc(19 * var(--c) + 34px);
	}
}

/* Home: closing call to action split at the centre line, like the Services page. Heading and Tell us about your project on the left, the words and brochure on the right */
.ds-cta-cols.ds-cta-home-split {
	gap: 40px 0 !important;
	align-items: stretch !important;
}

.ds-cta-home-split > .wp-block-column {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	gap: clamp(40px, 4vw, 64px);
}

.ds-cta-cols.ds-cta-home-split h2 {
	max-width: none;
	margin: 0 !important;
}

.ds-cta-cols.ds-cta-home-split p {
	margin: 0 !important;
	max-width: 46ch;
}

.ds-cta-home-split .wp-block-buttons {
	margin: 0 !important;
}

@media (min-width: 782px) {
	.ds-cta-home-split > .wp-block-column {
		flex: 0 0 50% !important;
		box-sizing: border-box;
	}

	.ds-cta-home-split > .wp-block-column:first-child {
		padding-right: var(--ds-pad);
	}
}

/* ---------- Home: client quotes as a slideshow, one at a time, with previous and next buttons ---------- */
.ds-quotes-on .ds-quotes {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr);
	gap: 0 !important;
}

.ds-quotes-on .ds-quotes > .wp-block-column {
	grid-area: 1 / 1;
	max-width: min(100%, 1000px);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.6s ease, visibility 0s linear 0.6s;
}

.ds-quotes-on .ds-quotes > .wp-block-column .ds-quote {
	max-width: none;
}

.ds-quotes-on .ds-quotes > .wp-block-column.is-on {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.6s ease, visibility 0s linear 0s;
}

.ds-quotes-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px 40px;
	margin-top: clamp(40px, 4vw, 64px);
}

.ds-quotes-foot > .wp-block-buttons {
	margin: 0 !important;
	justify-content: flex-start !important;
}

.ds-quotes-nav {
	display: flex;
	align-items: center;
	gap: 12px;
}

.ds-quotes-count {
	min-width: 5.5em;
	text-align: center;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.14em;
	color: #B4502F;
	font-variant-numeric: tabular-nums;
}

.ds-quotes-nav button {
	width: 48px;
	height: 48px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 1px solid var(--ds-charcoal);
	border-radius: 0;
	background: transparent;
	color: var(--ds-charcoal);
	font: inherit;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease;
}

.ds-quotes-nav button:hover,
.ds-quotes-nav button:focus-visible {
	background: var(--ds-charcoal);
	color: #F1EEEA;
}

.ds-quotes-nav button:focus-visible {
	outline: 2px solid #B4502F;
	outline-offset: 2px;
}

/* Home: each review sits in the centre of the page, centred text */
.ds-quotes-on .ds-quotes > .wp-block-column {
	justify-self: center;
	text-align: center;
}

.ds-quotes-on .ds-quotes > .wp-block-column > * {
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Studio: copy back on the left guide line, matching the home page (no indent) */
@media (min-width: 782px) {
	.page-id-8 .ds-home-ind.is-layout-constrained > :not(.ds-rule) {
		margin-left: 0 !important;
	}

	.page-id-8 .ds-home-ind > .ds-rule > .is-style-label {
		max-width: none;
	}

	.page-id-8 .ds-intro-split-cols > .wp-block-column:first-child {
		padding-left: 0;
	}

	.page-id-8 .ds-studio-hero-cols > .wp-block-column:first-child > :not(.is-style-label) {
		margin-left: 0 !important;
	}
}

/* Studio: Where we work and Start a project share one dark band, one spacing step between them */
.page-id-8 .ds-studio-close > .ds-rule.ds-studio-close-cta {
	margin-top: var(--ds-pad) !important;
}

/* Studio: Rob and Sam's names, roles and bios sit under their portraits in the blue band */
.ds-studio-portraits > .ds-person {
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	min-width: 0;
}

.ds-studio-portraits > .ds-person > * {
	margin: 0 !important;
}

.ds-studio-portraits > .ds-person h3 {
	margin-top: 24px !important;
	font-size: 28px;
	font-weight: 400;
	line-height: 1.15;
	color: #FFFFFF;
}

.ds-studio-portraits > .ds-person .is-style-label {
	margin-top: 4px !important;
	color: #F1C3B0 !important;
}

.ds-studio-portraits > .ds-person p:not(.is-style-label) {
	margin-top: 12px !important;
	max-width: 42ch;
	color: #E4E8E6;
}

@media (min-width: 901px) {
	.ds-studio-hero-cols > .wp-block-column:first-child {
		align-self: flex-start;
	}
}

@media (max-width: 600px) {
	.ds-studio-portraits {
		grid-template-columns: minmax(0, 1fr);
		gap: 40px;
	}
}

/* Services: each phase's number and words sit centred on the height of its picture */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row-text {
		align-content: center;
	}
}

/* Services: the lines between the three phases draw across as they scroll into view, like the other rules */
.ds-draw main .ds-svc-row {
	position: relative;
	border-top-color: transparent !important;
}

.ds-draw main .ds-svc-row::before {
	content: "";
	position: absolute;
	top: -1px;
	left: 0;
	right: 0;
	height: 1px;
	background: rgba(241, 238, 234, 0.5);
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform 1.4s cubic-bezier(0.65, 0, 0.35, 1);
	pointer-events: none;
}

.ds-draw main .ds-svc-row.ds-drawn::before {
	transform: scaleX(1);
}

.ds-draw main .ds-svc-row.ds-noline::before {
	content: none;
}

/* Studio: Rob and Sam each have their own section under the blue hero, portrait beside name and bio */
.ds-founder-cols {
	margin: 24px 0 0 !important;
	gap: 32px var(--ds-pad) !important;
}

.ds-founder-media .wp-block-image {
	margin: 0 !important;
}

.ds-founder-media .wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.ds-founder-copy > * {
	margin: 0 !important;
}

.ds-founder-copy h2 {
	font-size: clamp(32px, 3.2vw, 52px);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.02em;
}

.ds-founder-copy p {
	margin-top: 20px !important;
	max-width: 44ch;
}

@media (min-width: 782px) {
	.ds-founder-cols {
		align-items: center !important;
	}

	.ds-founder-cols > .ds-founder-media {
		flex: 0 0 min(40%, 560px) !important;
	}

	.ds-founder-cols > .ds-founder-copy {
		flex: 1 1 0 !important;
		min-width: 0;
	}

	.ds-founder-flip .ds-founder-cols > .ds-founder-media {
		order: 2;
	}
}

@media (max-width: 781px) {
	.ds-founder-media .wp-block-image {
		max-width: 420px;
	}
}

/* Studio hero: the intro sits in the right half, level with the top of the heading, like the split sections elsewhere */
.ds-studio-hero-intro p {
	margin: 0;
	max-width: 46ch;
	color: #E4E8E6;
}

@media (min-width: 782px) {
	.ds-studio-hero-cols {
		align-items: flex-start !important;
	}

	.ds-studio-hero-cols > .ds-studio-hero-intro {
		padding-top: 50px;
	}
}

@media (max-width: 781px) {
	.ds-studio-hero-cols {
		gap: 0 !important;
	}
}

/* Studio: no line above Rob's section, straight under the blue hero */
.page-id-8 .ds-founder:not(.ds-founder-flip) > .ds-rule:first-child {
	border-top: 0;
	padding-top: 0;
}

/* Studio: Rob and Sam side by side in one section, each portrait with its name and bio beside it */
.ds-founders-grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: var(--ds-pad);
	margin-top: 24px !important;
}

.ds-founder-person {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 24px;
	align-items: center;
	margin: 0 !important;
}

.ds-founder-person > .wp-block-image {
	margin: 0 !important;
	max-width: 420px;
}

.ds-founder-person > .wp-block-image img {
	display: block;
	width: 100%;
	height: auto !important;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

@media (min-width: 782px) {
	.ds-founder-person {
		grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
		gap: 32px;
	}

	.ds-founder-person > .wp-block-image {
		max-width: none;
	}
}

@media (min-width: 1440px) {
	.ds-founders-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ds-founder-person {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	}
}

/* Studio: no line above the co-founders, straight under the blue hero */
.page-id-8 .ds-founders > .ds-rule:first-child {
	border-top: 0;
	padding-top: 0;
}

/* Studio co-founders: spacing follows the site step at every width.
   Photo to words is one step, Rob to Sam is two steps when they stack */
.ds-founders-grid > .ds-founder-person > .ds-founder-copy {
	margin: 0 !important;
}

.ds-founders-grid {
	gap: max(48px, 2 * var(--ds-pad));
}

.ds-founder-person {
	gap: 24px;
}

@media (min-width: 782px) {
	.ds-founder-person {
		gap: var(--ds-pad);
	}
}

@media (min-width: 1440px) {
	.ds-founders-grid {
		gap: var(--ds-pad);
	}
}

/* Studio hero: the intro sentence is now the heading, across the full width, with the label in the site's red */
.ds-studio-hero .is-style-label {
	color: #B4502F !important;
}

.ds-studio-hero-cols > .wp-block-column:first-child {
	flex: 0 0 100% !important;
	padding-right: 0 !important;
}

.ds-studio-hero h1 {
	max-width: 30ch;
	margin-bottom: 0 !important;
}

/* Studio: How we work gets its line back, drawn in like the others */
.page-id-8 .ds-studio-how > .ds-rule:first-child {
	border-top: 1px solid var(--ds-charcoal);
	padding-top: 14px !important;
}

/* Studio: the two How we work paragraphs sit in their own section, line at the top like every other section */
.page-id-8 .ds-studio-how-more > .ds-intro-split {
	margin-top: 0 !important;
	padding-top: 24px !important;
}

/* Studio: more room between sections, the same as Services (one step above and below each section, so two between them) */
.page-id-8 main section.alignfull.ds-home-ind {
	padding-bottom: var(--ds-pad) !important;
}

.page-id-8 .ds-founders-grid {
	margin-top: 32px !important;
}

.page-id-8 .ds-studio-how-more > .ds-intro-split {
	padding-top: 32px !important;
}

/* Services: phase numbers now live in the pictures, so the words start on the centre line and the intro lines up with them */
@media (min-width: 782px) {
	.ds-svc-rows-flip .ds-svc-row-text {
		grid-template-columns: minmax(0, 1fr);
	}

	.ds-svc-rows-flip .ds-svc-rows-head > p {
		margin-left: 0 !important;
	}
}

/* FAQ: an open answer gets the same space below it as the question has above it */
.ds-faq-item[open] {
	padding-bottom: 22px;
}

/* Studio: Where we work and the call to action are one block, the ask and button follow the towns */
.ds-studio-where-cols p.ds-studio-close-ask {
	margin: var(--ds-pad) 0 0;
}

.ds-studio-where-cols .ds-studio-close-btn {
	margin-top: var(--ds-pad) !important;
}

/* Studio: in the merged block the heading and the words beside it start on the same line */
.ds-studio-close .ds-studio-where-cols {
	align-items: flex-start !important;
}

.ds-studio-close .ds-studio-where-cols > .wp-block-column {
	align-self: flex-start !important;
}

/* Studio co-founders on wide screens: four equal columns (photo, words, photo, words) with one spacing step between each, the same as the page edges */
@media (min-width: 1440px) {
	.ds-founders-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--ds-pad);
		align-items: center;
	}

	.ds-founders-grid > .ds-founder-person {
		display: contents;
	}

	.ds-founders-grid .ds-founder-copy p {
		max-width: none;
	}
}

/* Studio closing block: no line along the top; one line on the right between the towns and the call to action, one spacing step either side of it */
.page-id-8 .ds-home-cta.is-style-dark.ds-studio-close > .ds-rule:first-child {
	border-top: 0 !important;
	padding-top: 0 !important;
}

.ds-studio-close .ds-studio-close-split {
	margin-top: var(--ds-pad) !important;
	padding-top: var(--ds-pad) !important;
}

.ds-studio-where-cols .ds-studio-close-split p.ds-studio-close-ask {
	margin: 0;
}

/* Services: the header stays at the top while the intro image is pinned, then scrolls away with it */
.ds-ir-hdr .wp-site-blocks > header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 50;
	will-change: transform;
}

/* Services: more room between the phase heading and its paragraphs, and between the paragraphs */
.ds-svc-rows-flip .ds-svc-row-copy {
	gap: 24px !important;
}

/* Services: each tier opens with a bold summary, with a little more room before the detail */
.ds-svc-tiers p.ds-tier-lead {
	color: var(--ds-black);
	font-weight: 500;
}

.ds-svc-tiers p.ds-tier-lead + p {
	margin-top: 20px;
}

/* Services: the gap under each tier name matches the gap above the tier lines (one spacing step) */
.ds-svc-tiers h3.wp-block-heading {
	margin-bottom: var(--ds-pad) !important;
}

/* Services: no line above Common questions, straight under the dark band */
.page-id-7 main .ds-faq > .ds-rule:first-child {
	border-top: 0 !important;
	padding-top: 0 !important;
}

/* Home: Construction partners, four linked logos at the foot of the How we work band */
main .ds-partners {
	margin-top: var(--ds-pad) !important;
}

main .ds-partners > * {
	margin: 0 !important;
}

main .ds-partners .ds-partners-intro {
	margin-top: 24px !important;
	color: #E4E8E6;
}

main .ds-partners-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	margin-top: 32px !important;
}

@media (min-width: 782px) {
	main .ds-partners-grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
		gap: var(--ds-pad);
	}
}

main .ds-partners-grid > .ds-partner,
main .ds-partners-grid > .wp-block-image {
	margin: 0 !important;
}

main .ds-partners-grid a {
	display: flex;
	align-items: center;
	justify-content: center;
	height: clamp(96px, 9vw, 140px);
	padding: 16px 24px;
	box-sizing: border-box;
	border: 1px solid rgba(241, 238, 234, 0.25);
	color: #E4E8E6;
	font-size: 14px;
	text-decoration: none;
	transition: border-color 0.3s ease, background-color 0.3s ease;
}

main .ds-partners-grid a:hover,
main .ds-partners-grid a:focus-visible {
	border-color: rgba(241, 238, 234, 0.7);
	background-color: rgba(241, 238, 234, 0.04);
}

main .ds-partners-grid img {
	display: block;
	max-width: 80%;
	max-height: 64px;
	width: auto !important;
	height: auto !important;
	object-fit: contain;
}

/* Home: a little more room above the partners line and below the logos */
main .ds-partners {
	margin-top: calc(1.5 * var(--ds-pad)) !important;
}

html body.home main section.alignfull.ds-home-ind.is-style-dark:has(> .ds-partners) {
	padding-bottom: calc(1.5 * var(--ds-pad)) !important;
}

main .ds-partners-grid svg {
	display: block;
	height: 64px;
	max-width: 80%;
	width: auto;
}

/* Home partners: no box outlines, logos fill more of their space, and dim slightly on hover */
main .ds-partners-grid a {
	border: 0 !important;
	background: none !important;
	height: clamp(110px, 10vw, 160px);
	padding: 0;
	transition: opacity 0.3s ease;
}

main .ds-partners-grid a:hover,
main .ds-partners-grid a:focus-visible {
	opacity: 0.7;
}

main .ds-partners-grid img {
	max-width: 85%;
	max-height: 100%;
}

main .ds-partners-grid svg {
	height: 72%;
	max-width: 85%;
}

/* Home partners: the logo row is only as tall as the logos, with the same space above it as below */
main .ds-partners-grid {
	align-items: center;
	margin-top: calc(1.5 * var(--ds-pad)) !important;
}

main .ds-partners-grid a {
	height: auto;
}

main .ds-partners-grid img {
	max-height: clamp(80px, 8vw, 150px);
}

main .ds-partners-grid svg {
	height: clamp(64px, 6vw, 115px);
}

/* Home partners on phones: one logo per row, kept large, with even space between them */
@media (max-width: 781px) {
	main .ds-partners-grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 48px;
	}

	main .ds-partners-grid a {
		justify-content: flex-start;
	}

	main .ds-partners-grid img {
		max-width: min(100%, 320px);
		max-height: 120px;
	}

	main .ds-partners-grid svg {
		height: 96px;
		max-width: 100%;
	}
}

/* Home partners on phones: the same 48px above, between and below the logos */
@media (max-width: 781px) {
	main .ds-partners-grid {
		margin-top: 48px !important;
	}

	html body.home main section.alignfull.ds-home-ind.is-style-dark:has(> .ds-partners) {
		padding-bottom: 48px !important;
	}
}

/* Headings with set line breaks: allow the longer middle line on larger screens; on phones the text wraps naturally */
main h2.ds-h-breaks {
	max-width: none !important;
}

@media (max-width: 781px) {
	main h2.ds-h-breaks br {
		display: none;
	}
}

/* Home: client quotes a step bolder */
main .ds-quotes .ds-quote {
	font-weight: 400 !important;
}

/* Home: more room between each quote and the reviewer's name */
main .ds-quotes .ds-quote + .ds-strong {
	margin-top: 52px !important;
}

/* Keep short phrases in headings on one line on larger screens; phones wrap freely */
@media (min-width: 600px) {
	.ds-nowrap {
		white-space: nowrap;
	}
}

/* Home hero on small laptops and tablets: the strapline wraps onto more lines, so the collage area is taller to fit it */
@media (min-width: 901px) and (max-width: 1199px) {
	.ds-mosaic .ds-mosaic-stage {
		height: max(calc(22 * var(--c)), calc(19 * var(--c) + 300px));
	}
}

/* Footer: a line's space before the area served */
.ds-footer p.ds-footer-area {
	margin-top: 24px !important;
}

/* Project pages: two landscape images side by side */
.single-project .ds-gallery-pair-wide .wp-block-image img {
	aspect-ratio: 4 / 3;
}

/* Home partners: with three logos, three equal columns; goes back to four when a fourth is added */
@media (min-width: 782px) {
	main .ds-partners-grid:not(:has(> :nth-child(4))) {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

/* Home partners: a logo without a link yet stays still on hover */
main .ds-partners-grid a.ds-partner-nolink {
	cursor: default;
}

main .ds-partners-grid a.ds-partner-nolink:hover {
	opacity: 1;
}

/* Home partners: each logo sits in its own white box, so every logo shows in its own colours */
main .ds-partners-grid a {
	background: #FFFFFF !important;
	height: clamp(120px, 10vw, 170px);
	padding: clamp(16px, 2vw, 32px);
	justify-content: center;
}

main .ds-partners-grid img {
	max-width: 80%;
	max-height: 100%;
}

main .ds-partners-grid svg {
	height: 70%;
	max-width: 80%;
}

@media (max-width: 781px) {
	main .ds-partners-grid {
		gap: 16px;
	}

	main .ds-partners-grid a {
		height: 140px;
		justify-content: center;
	}

	main .ds-partners-grid img {
		max-width: 70%;
		max-height: 100%;
	}

	main .ds-partners-grid svg {
		height: 70%;
	}
}

/* Home partners: logos 20% larger inside the same boxes */
main .ds-partners-grid a > img,
main .ds-partners-grid a > svg {
	transform: scale(1.2);
}

/* Home hero on phones and tablets: each slideshow tile holds its own images (they were spilling over the whole hero) */
@media (max-width: 900px) {
	.ds-mosaic-stage > .wp-block-gallery.ds-slides {
		position: relative !important;
	}
}

/* Home hero on phones and tablets: tiles sit in the grid with the page margins, ignoring the desktop positions */
@media (max-width: 900px) {
	.ds-mosaic .ds-mosaic-stage {
		height: auto !important;
	}

	.ds-mosaic .ds-mosaic-stage > * {
		left: auto !important;
		top: auto !important;
		right: auto !important;
		bottom: auto !important;
	}
}

/* Phones: every section gets the same 48px top and bottom, matching the space under the home hero */
@media (max-width: 781px) {
	html body .wp-site-blocks main section.alignfull:not(.ds-mosaic):not(.ds-intro-reveal) {
		padding-top: 48px !important;
		padding-bottom: 48px !important;
		margin-top: 0 !important;
		margin-block-start: 0 !important;
	}

	html body .wp-site-blocks main section.ds-intro-reveal {
		padding-top: 48px !important;
	}
}

/* Home Instagram on phones: three larger posts in a row (five on tablet and desktop) */
@media (max-width: 600px) {
	main .wp-block-jetpack-instagram-gallery.wp-block-jetpack-instagram-gallery__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
	}

	main .wp-block-jetpack-instagram-gallery__grid > .wp-block-jetpack-instagram-gallery__grid-post:nth-child(n+4) {
		display: none !important;
	}
}

/* Header (and its phone menu) always sits above the page, including the home slideshow */
.wp-site-blocks > header {
	position: relative;
	z-index: 100;
}

/* Phone menu: dark blue background, links stacked on the left in the site's type, Contact included */
.ds-header .wp-block-navigation__responsive-container:not(.is-menu-open) .ds-nav-contact {
	display: none !important;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open {
	background-color: #354E55 !important;
	color: #FFFFFF !important;
	padding: 24px var(--ds-pad) 48px !important;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content {
	align-items: flex-start !important;
	padding-top: 72px !important;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	align-items: flex-start !important;
	justify-content: flex-start !important;
	gap: 0 !important;
	width: 100%;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item {
	width: 100%;
	border-top: 1px solid rgba(255, 255, 255, 0.25);
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item:last-child {
	border-bottom: 1px solid rgba(255, 255, 255, 0.25);
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	display: block;
	width: 100%;
	padding: 18px 0 !important;
	border: 0 !important;
	outline: 0;
	color: #FFFFFF !important;
	font-size: 28px !important;
	font-weight: 400;
	letter-spacing: 0 !important;
	text-transform: none !important;
	text-align: left;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:hover,
.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content:focus-visible {
	color: #F1C3B0 !important;
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close {
	color: #FFFFFF !important;
	top: 24px;
	right: var(--ds-pad);
}

.ds-header .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-close svg {
	width: 32px;
	height: 32px;
}

/* Phones: two-paragraph splits (home How we help, Studio How we work) use the same 48px step above, between and below */
@media (max-width: 781px) {
	html body main .ds-intro-split {
		padding-top: 48px !important;
	}

	html body main .ds-intro-split-cols {
		gap: 48px !important;
	}

	html body main .ds-intro-split-cols p:last-child {
		margin-bottom: 0 !important;
	}
}

@media (max-width: 781px) {
	html body main section > .ds-rule.ds-intro-split.ds-intro-split {
		padding-top: 48px !important;
	}
}

/* Phones: Studio closing block and the footer use the 48px step around the line, button and edges */
@media (max-width: 781px) {
	html body main .ds-studio-close .ds-studio-close-split {
		margin-top: 48px !important;
		padding-top: 48px !important;
	}

	html body main .ds-studio-where-cols .ds-studio-close-btn {
		margin-top: 48px !important;
	}

	html body main .ds-studio-where-cols p.ds-intro-link {
		margin-top: 24px !important;
	}

	html body .wp-site-blocks footer .ds-footer {
		padding-top: 48px !important;
		padding-bottom: 48px !important;
	}
}

/* Phones and tablets: the header stays at the top of the screen while scrolling */
@media (max-width: 900px) {
	html body .wp-site-blocks > header {
		position: sticky !important;
		top: 0;
		z-index: 100;
		transform: none !important;
	}
}
