/*
 * Smith & Jones Roofing: site styles. Plain CSS, no build step.
 *
 * The light blue design: one clean grotesk (Switzer) for headings and text,
 * headings large and light with tight spacing. Sections open with a small
 * label with a dot beside a line set large. A sky from the logo's blue down to
 * light blue opens every page; duck egg panels, white cards, one dark grey for
 * how a job runs and the quote close, and a light blue footer with the logo
 * set large. Buttons carry an arrow in a box.
 *
 * Colour: the logo's blue and tints of it, duck egg, white and dark grey.
 *
 * Photos: never shown larger than they can carry. The firm's photos are phone
 * shots about 1200 x 1600; only photos at least 1600px wide run the width.
 *
 * Contents: fonts, tokens, base, layout, links and buttons, notice bar, header,
 * menu, shared, hero, who we are, features, service cards, work strip, leaks
 * band, quote close, photos, reviews, rows, areas, questions, quote form, page
 * opening, page body, contact, reviews page, footer, call bar, progress line,
 * light blue layer, motion.
 */

/* ------------------------------------------------------------------ fonts */

/* Text: Switzer 400 and 500 (ITF Free Font License), self-hosted. */
@font-face {
	font-family: "Switzer";
	src: url("../fonts/switzer-400.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Switzer";
	src: url("../fonts/switzer-500.woff2") format("woff2");
	font-weight: 500;
	font-style: normal;
	font-display: swap;
}

/* A fallback resized to Switzer, so the swap does not move the page. */
@font-face {
	font-family: "Switzer Fallback";
	src: local("Arial");
	size-adjust: 103.6%;
	ascent-override: 94.6%;
	descent-override: 24.1%;
	line-gap-override: 0%;
}

/* ------------------------------------------------------------------ tokens */

:root {
	--paper: oklch(100% 0 0);
	--ink: oklch(18% 0.012 265);
	--muted: oklch(48% 0.02 270);
	--line: oklch(18% 0.012 265 / 0.18);
	--blue: oklch(33.3% 0.147 270); /* the logo's blue, #1c2880 */
	--blue-soft: oklch(84% 0.045 272); /* small type on the blue panels */
	--logo-grey: oklch(61.3% 0.002 248); /* the logo's grey, #838485 */
	--tint: oklch(96.6% 0.012 272);
	--land: oklch(89% 0.034 272);
	--error: oklch(47% 0.19 27);
	--bar: oklch(93.4% 0.02 272);
	--card: oklch(95.2% 0.006 272);
	--edge: oklch(76% 0.005 90);

	/* Night: the logo's blue taken down for the dark sections, with a pale blue for lines and small type. */
	--night: oklch(19.5% 0.075 272); /* #0d1238 */
	--night-deep: oklch(14% 0.06 272);
	--pale: oklch(80% 0.06 274);
	--on-night: oklch(88% 0.03 274);
	--slate: oklch(26% 0.012 265);
	--on-slate: oklch(80% 0.01 265);

	/* Light blue design: a sky from the logo's blue, duck egg panels, one dark grey. */
	--sky: oklch(91% 0.045 272); /* #d9e1fb */
	--egg: oklch(96.7% 0.008 265); /* #f1f4f9 */
	--dark: oklch(21% 0.008 270); /* #17191f */
	--grey-on-dark: oklch(70% 0.015 270);

	--font: "Switzer", "Switzer Fallback", Arial, sans-serif;
	--display: var(--font); /* one clean grotesk for headings and text */


	--fs-hero: clamp(2.9rem, 1rem + 4.3vw, 7.25rem);
	--fs-statement: clamp(2.6rem, 0.6rem + 5vw, 7.75rem);
	--fs-page: clamp(3rem, 1rem + 6vw, 8rem);
	--fs-title: clamp(2.2rem, 1.2rem + 2.6vw, 4.4rem);
	--fs-lead: clamp(1.3125rem, 0.9rem + 0.95vw, 2.4rem);
	--fs-body: clamp(1.0625rem, 1rem + 0.1vw, 1.1875rem);
	--fs-small: 0.875rem;
	--fs-caps: 0.9375rem;

	--gutter: clamp(1.125rem, 2.77vw, 4.5rem);
	--x2: var(--gutter);
	--gap: clamp(1rem, 1.6vw, 2.5rem);
	--tile-gap: clamp(0.5rem, 0.9vw, 1rem);
	--space-xl: clamp(5rem, 11vw, 12.5rem);
	--space-l: clamp(4rem, 8vw, 8.75rem);
	--space-m: clamp(2.5rem, 5vw, 5rem);
	--space-s: clamp(1.5rem, 2.5vw, 2.5rem);

	--header-h: 4.5rem;
	--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
	--ease-out: cubic-bezier(0.16, 1, 0.3, 1);

	/* Where a sticky column stops: under the header when it is showing. */
	--stick-top: 2rem;

	interpolate-size: allow-keywords;
}

@media (min-width: 900px) {
	:root {
		--header-h: 5.25rem;
	}
}

.header-up {
	--stick-top: calc(var(--header-h) + 2rem);
}

/* ------------------------------------------------------------------ base */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
	margin: 0;
	background: var(--paper);
	color: var(--ink);
	font-family: var(--font);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: -0.011em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

html.menu-locked {
	overflow: hidden;
}

img,
svg {
	display: block;
	max-width: 100%;
}

img {
	height: auto;
}

h1,
h2,
h3,
p,
ul,
ol,
figure,
blockquote,
address {
	margin: 0;
}

ul,
ol {
	padding: 0;
}

address {
	font-style: normal;
}

p + p {
	margin-top: 1em;
}

a {
	color: inherit;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
	letter-spacing: inherit;
}

:focus-visible {
	outline: 2px solid var(--blue);
	outline-offset: 3px;
}

.urgent :focus-visible,
.site-footer :focus-visible,
.callbar :focus-visible {
	outline-color: #fff;
}

::selection {
	background: var(--blue);
	color: #fff;
}

.icon {
	width: 1.25em;
	height: 1.25em;
	flex: none;
}

.skip-link {
	position: absolute;
	left: var(--gutter);
	top: 0.5rem;
	z-index: 100;
	padding: 0.75rem 1rem;
	background: var(--ink);
	color: #fff;
	transform: translateY(-200%);
}

.skip-link:focus {
	transform: none;
}

.tel,
.site-header__num,
.way__value,
.row__n {
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ------------------------------------------------------------------ layout */

.wrap {
	padding-inline: var(--gutter);
}

.wrap--x2 {
	padding-inline: var(--x2);
}

.grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	row-gap: var(--space-s);
}

@media (min-width: 900px) {
	.grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
		row-gap: 0;
	}

	.zone-l {
		grid-column: 1 / span 4;
	}

	.zone-r {
		grid-column: 6 / span 7;
	}
}

.sec {
	padding-block: var(--space-l);
}

.rule {
	border: 0;
	border-top: 1px solid var(--ink);
	margin: 0;
}

.title {
	color: var(--blue);
	font-family: var(--display);
	font-size: var(--fs-title);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.lead {
	font-size: var(--fs-lead);
	font-weight: 400;
	line-height: 1.14;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

.sec-head {
	padding-bottom: var(--space-m);
}

.sec-foot {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2.5rem;
	margin-top: var(--space-m);
}

.ext {
	padding-block: var(--space-m);
}

.ext__intro {
	font-size: var(--fs-lead);
	line-height: 1.14;
	letter-spacing: -0.022em;
	max-width: 26ch;
	text-wrap: balance;
}

.ext__body > .lead {
	margin-bottom: 0.7em;
}

.ext__body > p:not(.lead) {
	max-width: 60ch;
}

.ext__body > .link,
.ext__links {
	margin-top: 1.25rem;
}

.ext__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2.5rem;
}

.ticks {
	list-style: none;
	display: grid;
	gap: 0.55rem;
	margin-top: 1.5rem;
}

.ticks li {
	display: flex;
	gap: 0.7rem;
	align-items: baseline;
}

.ticks .icon {
	width: 1em;
	height: 1em;
	color: var(--blue);
	transform: translateY(0.12em);
}

/* ------------------------------------------------------------------ links and buttons */

.link {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	min-height: 2.75rem;
	font-size: var(--fs-caps);
	font-weight: 500;
	letter-spacing: 0;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.3em;
	transition: color 0.2s;
}

.link__arrow {
	width: 1.05em;
	height: 1.05em;
	flex: none;
	transition: transform 0.3s var(--ease);
}

a:hover > .link__arrow {
	transform: translateX(0.3em);
}

.link:hover {
	color: var(--blue);
}

.link--light,
.link--light:hover {
	color: #fff;
}

.link--light:hover {
	text-decoration-thickness: 2px;
}

.link--strong {
	font-size: 1.0625rem;
	letter-spacing: 0;
	text-transform: none;
	text-underline-offset: 0.35em;
	font-variant-numeric: tabular-nums;
}

/* The second phone number, set quietly beside a call button or link: "or 07474 282446". */
.alt-phone,
.notice__alt {
	display: inline-flex;
	align-items: center;
	gap: 0.35em;
	min-height: 2.75rem;
	white-space: nowrap;
}

.alt-phone {
	font-size: 1rem;
}

.alt-phone a,
.notice__alt a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
}

.alt-phone a {
	text-underline-offset: 0.3em;
}

.alt-phone a:hover {
	color: var(--blue);
}

.site-footer .alt-phone a:hover,
.urgent .alt-phone a:hover {
	color: #fff;
	text-decoration-thickness: 2px;
}

.notice__alt a {
	text-decoration: none;
}

.notice__alt a:hover {
	text-decoration: underline;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 3.25rem;
	padding: 0 1.5rem;
	border: 0;
	border-radius: 0;
	background-color: var(--blue);
	background-image: linear-gradient(var(--ink), var(--ink));
	background-position: 0 0;
	background-repeat: no-repeat;
	background-size: 0% 100%;
	color: #fff;
	font-size: 1.0625rem;
	font-weight: 500;
	letter-spacing: 0;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
	cursor: pointer;
	transition: background-size 0.45s var(--ease-out), color 0.3s;
}

/* Hover: near-black sweeps in from the left. */
.btn:hover {
	background-size: 100% 100%;
}

.btn--light {
	background-color: #fff;
	color: var(--blue);
}

.btn--light:hover {
	color: #fff;
}

.btn--block {
	width: 100%;
}

.btn[aria-busy="true"] {
	opacity: 0.65;
	cursor: progress;
}

/* ------------------------------------------------------------------ notice bar */

.notice {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 2.75rem;
	padding: 0.25rem var(--gutter);
	background: var(--night-deep);
	color: var(--on-night);
	font-size: var(--fs-caps);
	line-height: 1.3;
	text-align: center;
}

.notice__text {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0 0.45rem;
}

.notice__msg {
	margin-right: 0.45rem;
}

.notice__call {
	color: #fff;
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	min-height: 2.75rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
}

.notice__call:hover span {
	text-decoration: underline;
}

@media (min-width: 900px) {
	.notice,
	.notice__call,
	.notice__alt,
	.notice__alt a {
		min-height: 2.25rem;
	}
}

/* ------------------------------------------------------------------ header */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	height: var(--header-h);
	margin-bottom: calc(var(--header-h) * -1);
	color: var(--ink);
	transition: transform 0.35s var(--ease), background-color 0.25s, box-shadow 0.25s;
}

.site-header.is-solid,
.menu-open .site-header {
	background: var(--paper);
	box-shadow: 0 1px 0 var(--line);
}

.site-header.is-hidden {
	transform: translateY(-100%);
}

.menu-open .site-header {
	transform: none;
}

.site-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	height: 100%;
	padding-inline: var(--gutter);
}

.logo {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--blue);
	text-decoration: none;
}

.logo__art {
	width: auto;
	height: 3.1rem;
	aspect-ratio: 3161 / 2255;
	overflow: visible;
	transform-origin: 0 50%;
	transition: transform 0.45s var(--ease-out);
}

/* The logo settles a little smaller once the page has moved. */
.site-header.is-solid .logo__art {
	transform: scale(0.86);
}


@media (min-width: 900px) {
	.site-header .logo__art {
		height: 3.9rem;
	}
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: clamp(0.25rem, 1.6vw, 2rem);
}

.site-header__call {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	min-width: 2.75rem;
	min-height: 2.75rem;
	font-weight: 500;
	text-decoration: none;
}

.site-header__call:hover {
	color: var(--blue);
}

.site-header__num {
	display: none;
}

@media (min-width: 600px) {
	.site-header__num {
		display: inline;
	}

	.site-header__call .icon {
		display: none;
	}
}

.menu-toggle {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	padding-inline: 0.25rem;
	font-size: 1.0625rem;
	text-decoration: none;
	cursor: pointer;
}

.menu-toggle:hover {
	color: var(--blue);
}

.menu-toggle__close,
.menu-toggle[aria-expanded="true"] .menu-toggle__open {
	display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__close {
	display: inline;
}

/* Over a dark section the header is white on night; over a light one, the logo's blue on white. */
.site-header[data-theme="dark"] {
	--logo-grey: var(--pale);
	color: #fff;
}

.site-header[data-theme="dark"] .logo {
	color: #fff;
}

.site-header[data-theme="dark"].is-solid {
	background: var(--night);
	box-shadow: 0 1px 0 oklch(100% 0 0 / 0.12);
}

.site-header[data-theme="dark"] .site-header__call:hover,
.site-header[data-theme="dark"] .menu-toggle:hover,
.site-header[data-theme="dark"] .site-nav a:hover {
	color: var(--pale);
}

.menu-open .site-header[data-theme] {
	--logo-grey: oklch(61.3% 0.002 248);
	color: var(--ink);
}

.menu-open .site-header[data-theme] .logo {
	color: var(--blue);
}

/* The pages, on a laptop, beside the phone number and the quote button. */
.site-nav {
	display: none;
	margin-left: auto;
}

.site-nav ul {
	display: flex;
	gap: clamp(1rem, 1.8vw, 2rem);
	list-style: none;
}

.site-nav a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-size: 0.9375rem;
	font-weight: 500;
	text-decoration: none;
	transition: color 0.2s;
}

.site-nav a:hover {
	color: var(--blue);
}

.site-header__quote {
	display: none;
}

.site-header[data-theme="dark"] .site-header__quote {
	background: #fff;
	color: var(--blue);
}

.btn--sm {
	min-height: 2.75rem;
	padding-inline: 1.1rem;
	font-size: 0.9375rem;
}

@media (min-width: 900px) {
	.site-header__quote {
		display: inline-flex;
	}
}

@media (min-width: 1200px) {
	.site-nav {
		display: block;
	}

	.site-header__bar {
		gap: clamp(1.5rem, 2.5vw, 3rem);
	}
}

/* ------------------------------------------------------------------ menu */

.menu {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	height: calc(100dvh - var(--header-h) - var(--header-top, 0px));
	overflow-y: auto;
	overscroll-behavior: contain;
	background: var(--paper);
	visibility: hidden;
	clip-path: inset(0 0 100% 0);
	transition: clip-path 0.55s var(--ease-out), visibility 0s 0.55s;
}

.menu-open .menu {
	visibility: visible;
	clip-path: inset(0);
	transition: clip-path 0.55s var(--ease-out), visibility 0s;
}

/* The menu's contents rise in one after another as it opens. */
.menu__pages li,
.menu__group,
.menu__foot {
	transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
	transition-delay: calc(var(--i, 0) * 45ms + 0.12s);
}

body:not(.menu-open) .menu__pages li,
body:not(.menu-open) .menu__group,
body:not(.menu-open) .menu__foot {
	opacity: 0;
	transform: translateY(1rem);
	transition-delay: 0s;
}

.menu__pages li:nth-child(2) { --i: 1; }
.menu__pages li:nth-child(3) { --i: 2; }
.menu__pages li:nth-child(4) { --i: 3; }
.menu__pages li:nth-child(5) { --i: 4; }
.menu__pages li:nth-child(6) { --i: 5; }
.menu__pages li:nth-child(7) { --i: 6; }
.menu__group { --i: 3; }
.menu__group:nth-child(2) { --i: 4; }
.menu__group:nth-child(3) { --i: 5; }
.menu__group:nth-child(4) { --i: 6; }
.menu__foot { --i: 7; }

.menu__inner {
	display: grid;
	gap: var(--space-m);
	padding: var(--space-s) var(--x2) var(--space-m);
}

.menu__pages {
	list-style: none;
}

.menu__pages a {
	display: block;
	padding: 0.12em 0;
	color: var(--blue);
	font-family: var(--display);
	font-size: var(--fs-title);
	font-weight: 400;
	line-height: 1.12;
	letter-spacing: -0.012em;
	text-decoration: none;
}

.menu__pages a:hover {
	text-decoration: underline;
	text-decoration-thickness: 2px;
	text-underline-offset: 0.12em;
}

.menu a:hover,
.menu a[aria-current="page"] {
	color: var(--blue);
}

.menu__services {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-s) var(--gap);
}

.menu__label {
	padding-bottom: 0.6rem;
	margin-bottom: 0.4rem;
	border-bottom: 1px solid var(--ink);
	font-size: var(--fs-caps);
	font-weight: 500;
	letter-spacing: 0;
}

.menu__group ul {
	list-style: none;
}

.menu__group a {
	display: flex;
	align-items: center;
	min-height: 2.75rem;
	line-height: 1.2;
	text-decoration: none;
}

.menu__foot {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 2rem;
}

.menu__hours {
	margin: 0;
	color: var(--muted);
}

@media (min-width: 900px) {
	.menu__inner {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
		padding-top: var(--space-m);
	}

	.menu__pages {
		grid-column: 1 / span 4;
	}

	.menu__services {
		grid-column: 6 / span 7;
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.menu__group a {
		min-height: 2.25rem;
	}

	.menu__foot {
		grid-column: 1 / -1;
		padding-top: var(--space-s);
		border-top: 1px solid var(--ink);
	}
}

/* ------------------------------------------------------------------ shared: labels, big lines, splits */

/* A small label with a dot: section headings sit in this, beside a line set large. */
.dot {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	color: var(--blue);
	font-family: var(--font);
	font-size: var(--fs-caps);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: 0;
}

.dot::before {
	content: "";
	flex: none;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: currentColor;
}

.big {
	font-size: clamp(1.5rem, 1.05rem + 1.35vw, 2.4rem);
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: -0.022em;
	text-wrap: pretty;
}

.split {
	display: grid;
	gap: 1.25rem;
	margin-bottom: var(--space-m);
}

.split .big {
	max-width: 32ch;
}

@media (min-width: 900px) {
	.split {
		grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
		align-items: start;
		gap: var(--gap);
	}

	.split > .dot {
		padding-top: 0.75rem;
	}
}

.sec--egg {
	background: var(--egg);
}

.sec--dark {
	background: var(--dark);
	color: #fff;
}

/* ------------------------------------------------------------------ hero */

/*
 * A sky from the logo's blue down to light blue, two short lines set very large
 * with the second split around one tall photo of the firm's own work, then the
 * H1 under a hairline beside the score and the call button. The photo is a
 * plain rectangle and is never hidden; it only settles as the page opens.
 */
.hero {
	--hero-y: 0px;
	--hero-p: 0;
	position: relative;
	overflow: hidden;
	padding: calc(var(--header-h) + clamp(1.5rem, 4vw, 3.5rem)) 0 clamp(2rem, 3vw, 3rem);
	background: linear-gradient(180deg, var(--blue) 0%, oklch(45% 0.14 272) 32%, oklch(76% 0.08 272) 68%, var(--sky) 100%);
	color: #fff;
}

.hero__words {
	position: relative;
	z-index: 2;
	font-size: clamp(4.2rem, 1rem + 10vw, 11rem);
	font-weight: 400;
	line-height: 0.92;
	letter-spacing: -0.05em;
	pointer-events: none;
}

.hero__l1 {
	display: block;
}

/* Each line rises out of its own mask as the page opens, then drifts down a little as you scroll. */
.hero__l1,
.hero__l2 > span {
	overflow: clip;
	overflow-clip-margin: 0.08em;
	padding-bottom: 0.12em;
	margin-bottom: -0.12em;
}

/* Scrolling away, the lines drift down and pull apart sideways: "Roofing" and "West" to the left, "London" to the right. */
.hero__words {
	opacity: calc(1 - var(--hero-p) * 0.85);
}

.hero__l1 {
	translate: calc(var(--hero-p) * -14vw) calc(var(--hero-y) * 0.22);
}

.hero__l2 {
	translate: calc(var(--hero-p) * -7vw) calc(var(--hero-y) * 0.12);
	rotate: calc(var(--hero-p) * -11deg);
}

.hero__l2 > span:first-child {
	translate: calc(var(--hero-p) * -9vw) 0;
}

.hero__l2 > span + span {
	translate: calc(var(--hero-p) * 16vw) 0;
}

.hero__in {
	display: inline-block;
	animation: word-in 1.15s var(--ease-out) 0.05s both;
}

.hero__l2 > span:first-child .hero__in {
	animation-delay: 0.2s;
}

.hero__l2 > span + span .hero__in {
	animation-delay: 0.32s;
}

/* A soft light drifts slowly across the sky, behind everything. */
.hero > .wrap,
.phero > .wrap {
	position: relative;
	z-index: 1;
}

.hero::before,
.phero::before {
	content: "";
	position: absolute;
	z-index: 0;
	top: -30%;
	left: -20%;
	width: 75%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(closest-side, oklch(88% 0.08 250 / 0.32), oklch(88% 0.08 250 / 0));
	pointer-events: none;
	animation: glow 22s ease-in-out infinite alternate;
}

@keyframes glow {
	from {
		transform: translate(0, 0) scale(1);
	}

	50% {
		transform: translate(45%, 18%) scale(1.15);
	}

	to {
		transform: translate(85%, -4%) scale(0.95);
	}
}

.hero__l2 {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0 0.3em;
}

/* On a phone the second line breaks onto two lines rather than running off the edge. */
@media (max-width: 599px) {
	.hero__words {
		font-size: clamp(3.6rem, 1rem + 14vw, 5rem);
	}

	.hero .hero__pics {
		margin-top: 2.25rem;
	}
}

/*
 * The main photo in the middle, three smaller ones around it. The words sit
 * above all of them. --hero-y is how far the page has scrolled through the
 * hero (site.js); each photo moves at its own rate, so they part as you scroll.
 */
.hero__pics {
	position: relative;
	z-index: 1;
	margin-top: -2.25rem;
}

.hero__pic {
	position: relative;
	z-index: 1;
	width: clamp(190px, 24vw, 360px);
	aspect-ratio: 4 / 5;
	margin: 0 auto;
	overflow: hidden;
	box-shadow: 0 50px 90px -40px oklch(20% 0.1 272 / 0.7);
	translate: 0 calc(var(--hero-y) * -0.08);
	scale: calc(1 - var(--hero-p) * 0.14);
}

.hero__more {
	position: absolute;
	z-index: 0;
	margin: 0;
	overflow: hidden;
	box-shadow: 0 40px 70px -35px oklch(20% 0.1 272 / 0.65);
	animation: uncover 1.3s var(--ease-out) both, bob 9s ease-in-out 1.6s infinite alternate;
}

.hero__more img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: settle 1.8s var(--ease-out) both;
}

/* Phones: the small photos tuck in round the corners of the main one. */
.hero__more--b {
	top: -1.25rem;
	right: 0;
	width: 34%;
	aspect-ratio: 4 / 3;
	translate: calc(var(--hero-p) * 6vw) calc(var(--hero-y) * -0.3);
	rotate: calc(var(--hero-p) * 9deg);
	animation-delay: 0.35s, 1.6s;
}

.hero__more--c {
	bottom: 2.5rem;
	left: 0;
	width: 36%;
	aspect-ratio: 4 / 3;
	translate: 0 calc(var(--hero-y) * 0.12);
	animation-delay: 0.55s, 2.4s;
}

.hero__more--d {
	right: 3%;
	bottom: -2rem;
	width: 24%;
	aspect-ratio: 3 / 4;
	translate: calc(var(--hero-p) * 5vw) calc(var(--hero-y) * -0.18);
	rotate: calc(var(--hero-p) * 14deg);
	animation-delay: 0.75s, 3.2s;
}

.hero__more--b img {
	animation-delay: 0.35s;
}

.hero__more--c img {
	animation-delay: 0.55s;
}

.hero__more--d img {
	animation-delay: 0.75s;
}

/* Tablets: the phone arrangement, scaled up, with the photos below the words. */
@media (min-width: 600px) and (max-width: 899px) {
	.hero .hero__pics {
		margin-top: 2.5rem;
	}

	.hero__pic {
		width: 40vw;
	}

	.hero__more--b {
		top: -1.5rem;
		right: 2%;
		width: 26%;
	}

	.hero__more--c {
		bottom: 3rem;
		left: 2%;
		width: 28%;
	}

	.hero__more--d {
		right: 6%;
		bottom: -2rem;
		width: 17%;
	}
}

@keyframes uncover {
	from {
		clip-path: inset(100% 0 0 0);
	}

	to {
		clip-path: inset(0 0 0 0);
	}
}

@keyframes bob {
	from {
		transform: translateY(-6px);
	}

	to {
		transform: translateY(6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.hero__pic,
	.hero__more,
	.hero__l1,
	.hero__l2,
	.hero__l2 > span {
		translate: none;
		rotate: none;
		scale: none;
	}

	.hero__words {
		opacity: 1;
	}

	.hero__more,
	.hero__more img {
		animation: none;
	}
}

.hero__pic img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	animation: settle 1.8s var(--ease-out) both;
}

.hero__base {
	position: relative;
	z-index: 3;
	display: grid;
	gap: 1.25rem;
	margin-top: 2.25rem;
	padding-top: 1.25rem;
	color: var(--ink);
}

/* The hairline draws from the left, then the H1 and the score rise in after it. */
.hero__base::before {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	left: 0;
	height: 1px;
	background: oklch(18% 0.05 272 / 0.35);
	transform-origin: 0 50%;
	animation: line-in 1.4s var(--ease-out) 0.5s both;
}

.hero__name {
	animation: rise 0.9s var(--ease-out) 0.75s both;
}

.hero__act {
	animation: rise 0.9s var(--ease-out) 0.9s both;
}

@keyframes line-in {
	from {
		transform: scaleX(0);
	}
}

.hero__title {
	max-width: 34ch;
	font-size: clamp(1.15rem, 1rem + 0.45vw, 1.45rem);
	font-weight: 500;
	line-height: 1.3;
	letter-spacing: -0.01em;
	display: inline;
}

.hero__text {
	display: inline;
	font-size: clamp(1.15rem, 1rem + 0.45vw, 1.45rem);
	line-height: 1.3;
	letter-spacing: -0.01em;
	color: var(--ink);
}

.hero__name {
	max-width: 40ch;
}

.hero__act {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 1rem 1.75rem;
}

.hero__score {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--muted);
	font-size: var(--fs-small);
}

.hero__score b {
	color: var(--blue);
	font-size: 1.75rem;
	font-weight: 500;
	letter-spacing: -0.02em;
}

@media (min-width: 900px) {
	.hero__pics {
		margin-top: -7rem;
	}

	/* Large screens: one up beside "Roofing", two low down either side. */
	.hero__more--b {
		top: -11.5rem;
		right: 7%;
		width: min(17%, 260px);
	}

	.hero__more--c {
		top: 13rem;
		bottom: auto;
		left: 5%;
		width: min(19%, 290px);
	}

	.hero__more--d {
		top: 12.5rem;
		right: 1%;
		bottom: auto;
		width: min(12%, 190px);
	}

	.hero__base {
		grid-template-columns: minmax(0, 1fr) auto;
		align-items: end;
	}
}

/* ------------------------------------------------------------------ who we are */

.who__more {
	max-width: 52ch;
	margin-top: 1.75rem;
	color: var(--muted);
	font-size: 1.0625rem;
}

.who__cta {
	margin-top: 2.25rem;
}

.about__side,
.phero__intro {
	font-size: clamp(1.125rem, 1rem + 0.35vw, 1.4375rem);
	font-weight: 400;
	line-height: 1.3;
	letter-spacing: -0.015em;
	text-wrap: pretty;
}

.about {
	padding-top: var(--space-s);
}

/* ------------------------------------------------------------------ features */

/* A photo with a white info card on it. Wide photos run the width with the card over a corner. */
.feature {
	padding-block: var(--space-s);
}

.feature__frame {
	position: relative;
	display: grid;
	gap: 0;
}

.feature__media {
	margin: 0;
	overflow: hidden;
}

.feature__media img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.feature--wide .feature__media img {
	aspect-ratio: 16 / 9;
}

.feature--side .feature__media img {
	aspect-ratio: 4 / 5;
}

.card {
	position: relative;
	z-index: 2;
	display: grid;
	gap: 1rem;
	padding: clamp(1.5rem, 2.2vw, 2.25rem);
	background: var(--paper);
	color: var(--ink);
}

.card__lead {
	font-size: clamp(1.25rem, 1rem + 0.6vw, 1.6rem);
	line-height: 1.2;
	letter-spacing: -0.02em;
}

.card p:not(.card__lead):not(.dot) {
	color: var(--muted);
}

.feature--wide .card {
	margin: -3rem 1rem 0;
	box-shadow: 0 20px 50px -30px oklch(20% 0.05 272 / 0.4);
}

@media (min-width: 900px) {
	.feature--wide .card {
		position: absolute;
		bottom: clamp(1.5rem, 3vw, 2.75rem);
		left: clamp(1.5rem, 3vw, 2.75rem);
		width: min(28rem, 40%);
		margin: 0;
	}

	.feature--f2.feature--wide .card {
		right: clamp(1.5rem, 3vw, 2.75rem);
		left: auto;
	}

	.feature--side .feature__frame {
		grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
		align-items: center;
		gap: var(--gap);
		background: var(--egg);
	}

	.feature--f2.feature--side .feature__media {
		order: 2;
	}

	.feature--side .card {
		background: transparent;
		padding: clamp(2rem, 4vw, 4rem);
	}
}

/* ------------------------------------------------------------------ service cards */

.cards {
	display: grid;
	gap: 1rem;
	list-style: none;
}

.scard {
	display: grid;
	grid-template-rows: auto 1fr;
	background: var(--paper);
}

.scard__media {
	margin: 0;
	overflow: hidden;
}

.scard__media img {
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	transition: transform 0.9s var(--ease-out);
}

.scard__body {
	display: grid;
	align-content: start;
	gap: 1rem;
	padding: 1.5rem 1.5rem 1.75rem;
}

.scard__text {
	margin-top: 1.5rem;
	font-size: 1.35rem;
	line-height: 1.18;
	letter-spacing: -0.02em;
}

.scard__links {
	margin-top: 0.5rem;
	border-top: 1px solid var(--line);
	list-style: none;
}

.scard__links a {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	min-height: 2.75rem;
	border-bottom: 1px solid var(--line);
	font-size: 0.9375rem;
	text-decoration: none;
	transition: color 0.2s;
}

.scard__links a:hover {
	color: var(--blue);
}

.scard__links .link__arrow {
	color: var(--blue);
}

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

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

@media (hover: hover) {
	.scard:hover .scard__media img {
		transform: scale(1.04);
	}
}

/* ------------------------------------------------------------------ work strip */

/* The firm's jobs at one height, drifting slowly sideways; still, and scrollable, for less motion. */
.strip {
	overflow: hidden;
}

.strip__track {
	display: flex;
	width: max-content;
	animation: drift 70s linear infinite;
}

.strip:hover .strip__track {
	animation-play-state: paused;
}

.strip__set {
	display: flex;
	gap: 1rem;
	padding-right: 1rem;
	list-style: none;
}

.strip__set figure {
	margin: 0;
}

.strip__set img {
	width: auto;
	height: clamp(220px, 24vw, 380px);
	max-width: none;
	aspect-ratio: auto;
	object-fit: cover;
}

.strip__set figcaption {
	padding-top: 0.6rem;
	color: var(--muted);
	font-size: var(--fs-small);
}

@keyframes drift {
	to {
		transform: translateX(-50%);
	}
}

@media (prefers-reduced-motion: reduce) {
	.strip {
		overflow-x: auto;
	}

	.strip__track {
		animation: none;
	}

	.strip__set[aria-hidden="true"] {
		display: none;
	}
}

/* ------------------------------------------------------------------ leaks band */

.urgent {
	background: var(--blue);
	color: #fff;
}

.urgent__panel {
	padding-block: var(--space-m);
}

.urgent__panel > .grid {
	align-items: center;
}

.urgent .title,
.urgent .lead {
	color: #fff;
}

.urgent p {
	color: var(--on-night);
}

.urgent .ext__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 2rem;
	margin-top: 1.75rem;
}

/* ------------------------------------------------------------------ quote close */

/* The quote section on dark grey: the heading runs on into the intro in grey, the form on the right. */
.quote {
	background: var(--dark);
	color: #fff;
}

.quote__big {
	max-width: 24ch;
	color: #fff;
}

.quote__big span {
	color: var(--grey-on-dark);
}

.quote .ticks {
	margin-top: 1.75rem;
	color: var(--on-night);
}

.quote .ticks .icon {
	color: var(--pale);
}

.quote__pics {
	position: relative;
	display: none;
	height: 360px;
	margin-top: var(--space-m);
}

.quote__pics img {
	position: absolute;
	object-fit: cover;
}

.quote__pic-a {
	top: 0;
	right: 0;
	width: 68%;
	height: 82%;
}

.quote__pic-b {
	bottom: 0;
	left: 0;
	width: 42%;
	height: 48%;
	outline: 10px solid var(--dark);
}

.quote__form {
	align-self: start;
	padding: clamp(1.25rem, 2.5vw, 2.25rem);
	background: var(--paper);
	color: var(--ink);
}

.quote__form .title {
	color: var(--blue);
}

@media (min-width: 900px) {
	.quote__pics {
		display: block;
	}
}

/* ------------------------------------------------------------------ photos */

.duo,
.tri {
	display: grid;
	gap: var(--space-m) 2%;
	list-style: none;
}

.shot__media {
	aspect-ratio: 4 / 3;
	margin-bottom: 1rem;
}

.shot__media img {
	transition: transform 0.9s var(--ease-out);
}

.shot:hover .shot__media img {
	transform: scale(1.04);
}

.shot__title {
	font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.75rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.022em;
}

.tri .shot__title {
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.375rem);
}

.shot__type {
	margin-top: 0.3rem;
	color: var(--muted);
	font-size: var(--fs-small);
}

.shot[hidden] {
	display: none;
}

@media (min-width: 600px) {
	.duo,
	.tri {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 900px) {
	.tri {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.filters {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	margin-bottom: var(--space-s);
}

.filters__btn {
	min-height: 2.75rem;
	padding: 0 1rem;
	border: 1px solid var(--ink);
	border-radius: 0;
	background: transparent;
	font-size: var(--fs-caps);
	font-weight: 500;
	letter-spacing: 0;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.filters__btn:hover {
	border-color: var(--blue);
	color: var(--blue);
}

.filters__btn[aria-pressed="true"] {
	border-color: var(--ink);
	background: var(--ink);
	color: #fff;
}

/* ------------------------------------------------------------------ reviews */

.stars {
	display: inline-flex;
	gap: 0.15rem;
	color: var(--blue);
}

.stars .icon {
	width: 1.05rem;
	height: 1.05rem;
}

.stars--sm .icon {
	width: 0.8rem;
	height: 0.8rem;
}

/* Quote cards on duck egg, and a light blue card with the score. */
.rcards {
	display: grid;
	gap: 1rem;
	list-style: none;
}

.rcard {
	display: grid;
	align-content: space-between;
	gap: 2.5rem;
	min-height: 16rem;
	padding: clamp(1.5rem, 2vw, 2rem);
	background: var(--egg);
}

.rcard__quote {
	font-size: clamp(1.2rem, 1rem + 0.4vw, 1.4rem);
	line-height: 1.28;
	letter-spacing: -0.015em;
	text-wrap: pretty;
}

.rcard__who {
	display: grid;
	justify-items: start;
	gap: 0.25rem;
}

.rcard__name {
	font-weight: 500;
}

.rcard__by {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	color: var(--muted);
	font-size: var(--fs-small);
}

.rcard .link {
	min-height: 2.25rem;
}

.rcard--score {
	background: var(--sky);
}

.rcard__num {
	color: var(--blue);
	font-size: clamp(4rem, 3rem + 3vw, 6rem);
	font-weight: 400;
	line-height: 0.9;
	letter-spacing: -0.05em;
}

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

@media (min-width: 1100px) {
	.rcards--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.rcards--4 {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Seven reviews on the home page: the score card sits at the end of the grid. */
.reviews .rcards:not(.rcards--2):not(.rcards--3) {
	grid-auto-flow: dense;
}

/* ------------------------------------------------------------------ rows */

.rows {
	position: relative;
	list-style: none;
}

.row {
	display: grid;
	grid-template-columns: 2.75rem minmax(0, 1fr);
	gap: 0.35rem 1rem;
	padding: 1.4rem 0;
	border-bottom: 1px solid var(--line);
}

.row__n {
	color: var(--muted);
	font-size: var(--fs-small);
	line-height: 2;
}

.row__title {
	font-size: clamp(1.1875rem, 1rem + 0.55vw, 1.625rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.022em;
}

.row__text {
	grid-column: 2;
	max-width: 46ch;
	margin: 0;
	color: var(--muted);
}

@media (min-width: 900px) {
	.row {
		grid-template-columns: 3.5rem minmax(0, 1fr) minmax(0, 1.25fr);
		gap: 1.5rem;
		align-items: baseline;
	}

	.row__text {
		grid-column: auto;
	}
}

.rows--links .row {
	display: block;
	padding: 0;
}

.rows--links a {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 1.25rem;
	gap: 0.35rem 1rem;
	align-items: baseline;
	padding: 1.4rem 0;
	text-decoration: none;
	transition: color 0.2s;
}

.rows--links .row__text {
	grid-column: 1;
	grid-row: 2;
}

.rows--links .link__arrow {
	grid-column: 2;
	grid-row: 1;
	align-self: center;
	width: 1.125rem;
	height: 1.125rem;
}

.rows--links a:hover,
.rows--links a:hover .row__text {
	color: var(--blue);
}

@media (min-width: 900px) {
	.rows--links a {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr) 1.25rem;
		gap: 1.5rem;
	}

	.rows--links .row__text {
		grid-column: 2;
		grid-row: 1;
	}

	.rows--links .link__arrow {
		grid-column: 3;
	}
}

/*
 * How a job runs, as a story. Phones and plain: a list of steps, each with its
 * drawing. Large screens with the script (html.story-on): the section holds
 * still, one step's words show on the left and its drawing on the right, and
 * scrolling moves through them.
 */
.story__copy > .title {
	margin-bottom: var(--space-s);
}

.story__steps {
	display: grid;
	gap: var(--space-m);
	list-style: none;
}

.story__n {
	margin-bottom: 0.6rem;
	color: var(--muted);
	font-size: var(--fs-small);
	font-variant-numeric: tabular-nums;
}

.story__n span {
	color: var(--blue);
	font-weight: 500;
}

.story__title {
	color: var(--blue);
	font-family: var(--display);
	font-size: clamp(1.75rem, 1rem + 2vw, 3rem);
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.012em;
	text-wrap: balance;
}

.story__text {
	max-width: 36ch;
	margin-top: 0.85rem;
	font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
	line-height: 1.45;
}

/* The drawings are 1000 x 1100; the band from 126 to 1000 is the picture. */
.story__pic {
	width: 100%;
	height: auto;
	margin-top: 1.25rem;
	aspect-ratio: 1000 / 874;
	object-fit: cover;
	object-position: 50% 55.75%;
}

.story__art {
	display: none;
}

@media (min-width: 900px) {
	.story-on .story {
		height: calc(var(--steps, 4) * 80svh + 20svh);
	}

	.story-on .story__stage {
		position: sticky;
		top: 0;
		display: grid;
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
		align-items: center;
		height: 100svh;
		padding-top: 3.5rem;
	}

	.story-on .story__copy {
		grid-column: 1 / span 4;
	}

	.story-on .story__steps {
		gap: 0;
	}

	.story-on .story__step {
		grid-area: 1 / 1;
		opacity: 0;
		transform: translateY(1.5rem);
		pointer-events: none;
		transition: opacity 0.5s var(--ease-out), transform 0.8s var(--ease-out);
	}

	.story-on .story__step.is-current {
		opacity: 1;
		transform: none;
		pointer-events: auto;
	}

	.story-on .story__pic {
		display: none;
	}

	.story-on .story__art {
		display: block;
		position: relative;
		grid-column: 5 / span 8;
		justify-self: end;
		width: min(100%, calc(80svh * 1.144));
		aspect-ratio: 1000 / 874;
		overflow: hidden;
		-webkit-mask-image: linear-gradient(to right, transparent, #000 12%), linear-gradient(to bottom, transparent, #000 8%, #000 90%, transparent);
		-webkit-mask-composite: source-in;
		mask-image: linear-gradient(to right, transparent, #000 12%), linear-gradient(to bottom, transparent, #000 8%, #000 90%, transparent);
		mask-composite: intersect;
	}

	/*
	 * Each drawing is the whole 1000 x 1100 canvas, lifted so the band from 126
	 * shows. The camera poses come from scripts/iso-gen.py: the street scene
	 * leaves by zooming in on the house, and the close scenes arrive and leave
	 * with a 5% push, so the house holds its place from scene to scene.
	 */
	.story__scene {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
		height: auto;
		margin-top: -12.6%;
		opacity: 0;
		transform: var(--in, none);
		transform-origin: 0 0;
		transition: opacity 0.7s var(--ease-out), transform 1.4s var(--ease-out);
	}

	.story__scene[data-cam="street"] {
		--out: translate(-42.97%, -38.036%) scale(1.959);
	}

	.story__scene[data-cam="close"] {
		--in: translate(-2.7%, -2.382%) scale(1.05);
		--out: translate(-2.7%, -2.382%) scale(1.05);
	}

	.story__scene.is-past {
		transform: var(--out, none);
	}

	.story__scene.is-current {
		opacity: 1;
		transform: none;
	}
}

/* Sticky columns: the heading stays in view while the right-hand column scrolls past. */
.stick__text {
	max-width: 30ch;
	margin-top: 1rem;
}

.stick__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 1.75rem;
	margin-top: 1.5rem;
}

@media (min-width: 900px) {
	.stick {
		position: sticky;
		top: var(--stick-top);
		align-self: start;
		transition: top 0.35s var(--ease);
	}

	.home .stick {
		top: calc(var(--stick-top) + 3.5rem);
	}
}

.price {
	padding-top: var(--space-l);
}

.ticks--big li {
	font-size: clamp(1.0625rem, 1rem + 0.25vw, 1.25rem);
}

.price__body > p {
	max-width: 60ch;
}

/* ------------------------------------------------------------------ areas */

.areas {
	padding-bottom: var(--space-m);
}

.areas__panel {
	padding: var(--space-m) var(--gutter);
	overflow: clip;
	background: var(--tint);
}

.areas__title {
	margin-bottom: var(--space-s);
	color: var(--blue);
	font-family: var(--display);
	font-size: var(--fs-page);
	font-weight: 400;
	line-height: 0.98;
	letter-spacing: -0.018em;
	text-wrap: balance;
}

.areas__grid {
	display: grid;
	gap: var(--space-s);
}

.areas__side > p {
	max-width: 40ch;
}

.areas__side > .link {
	margin-top: 1rem;
}

.areas__list {
	columns: 2;
	column-gap: var(--gap);
	margin: 1.5rem 0 0.5rem;
	list-style: none;
	font-family: var(--display);
	font-size: clamp(1.375rem, 1rem + 0.9vw, 2.125rem);
	font-weight: 400;
	line-height: 1.24;
	letter-spacing: -0.01em;
}

.areas__list li {
	break-inside: avoid;
	white-space: nowrap;
	transition: color 0.3s;
}

.areas__list li.is-on,
.areas__list a:hover {
	color: var(--blue);
}

.areas__list a {
	text-decoration-thickness: 1px;
	text-underline-offset: 0.12em;
}

@media (min-width: 900px) {
	.areas__grid {
		grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
		column-gap: var(--space-m);
		align-items: center;
	}
}

/* The map: five boroughs, the Thames left as a gap, a dot for each place. */
.map {
	margin: 0;
}

.map__art {
	position: relative;
}

.map__svg {
	width: 100%;
	height: auto;
	overflow: visible;
}

.map__borough {
	fill: var(--land);
	stroke: var(--tint);
	stroke-width: 2;
	stroke-linejoin: round;
}

.map__pin,
.map__ring {
	transform-box: fill-box;
	transform-origin: center;
}

.map__pin {
	fill: var(--blue);
	transition: transform 0.35s var(--ease-out);
}

.map__ring {
	fill: none;
	stroke: var(--blue);
	stroke-width: 2;
	opacity: 0;
	transition: opacity 0.3s;
}

.map__dot.is-on .map__pin {
	transform: scale(1.6);
}

.map__dot.is-on .map__ring {
	opacity: 1;
}

.map__dot.is-base .map__ring {
	opacity: 1;
	animation: pulse 2.6s var(--ease-out) infinite;
}

.map__label {
	position: absolute;
	padding: 0.25em 0.4em;
	color: var(--ink);
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	pointer-events: none;
	transform: translate(0.45rem, -50%);
	transition: color 0.3s, background-color 0.3s;
}

.map__label[data-town="shepherds-bush"],
.map__label[data-town="chiswick"] {
	transform: translate(calc(-100% - 0.45rem), -50%);
}

.map__label.is-base {
	font-weight: 500;
}

.map__label.is-on {
	background: var(--blue);
	color: #fff;
}

/* On phones only the base town and the place being pointed at are named. */
@media (max-width: 599px) {
	.map__label:not(.is-base):not(.is-on) {
		opacity: 0;
	}
}

/* ------------------------------------------------------------------ questions */

.acc {
	position: relative;
}

/* Answers open smoothly where the browser can animate to the content's height. */
.acc__item::details-content {
	block-size: 0;
	overflow: clip;
	transition: block-size 0.45s var(--ease-out), content-visibility 0.45s allow-discrete;
}

.acc__item[open]::details-content {
	block-size: auto;
}

.acc__item {
	border-bottom: 1px solid var(--line);
}

.acc__item summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	min-height: 3.5rem;
	padding: 1.1rem 0;
	font-size: clamp(1.125rem, 1rem + 0.5vw, 1.5rem);
	line-height: 1.2;
	letter-spacing: -0.022em;
	list-style: none;
	cursor: pointer;
	transition: color 0.2s;
}

.acc__item summary::-webkit-details-marker {
	display: none;
}

.acc__item summary:hover {
	color: var(--blue);
}

.acc__icon {
	width: 1.125rem;
	height: 1.125rem;
	flex: none;
	transition: transform 0.3s var(--ease);
}

.acc__item[open] .acc__icon {
	transform: rotate(45deg);
}

.acc__body {
	max-width: 58ch;
	padding-bottom: 1.5rem;
}

/* ------------------------------------------------------------------ quote form */

.quote {
	padding-top: 0;
}

.quote__grid {
	padding-top: var(--space-m);
}

.quote__copy > p {
	max-width: 36ch;
	margin-top: 1rem;
}

.quote__direct {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 2rem;
	margin-top: 1.5rem;
}

.field {
	margin-bottom: 1.6rem;
}

.field label {
	display: block;
	font-size: var(--fs-small);
	font-weight: 500;
}

.field__opt {
	color: var(--muted);
	font-weight: 400;
}

.field input,
.field textarea {
	display: block;
	width: 100%;
	min-height: 3.25rem;
	padding: 0.7rem 0;
	border: 0;
	border-bottom: 1px solid var(--ink);
	border-radius: 0;
	background: transparent;
	font-size: 1.125rem;
	line-height: 1.4;
	-webkit-appearance: none;
	appearance: none;
}

.field textarea {
	resize: vertical;
}

.field input:focus-visible,
.field textarea:focus-visible {
	outline: 0;
	border-bottom-color: var(--blue);
	box-shadow: 0 1px 0 var(--blue);
}

.field.is-invalid input,
.field.is-invalid textarea {
	border-bottom-color: var(--error);
	box-shadow: 0 1px 0 var(--error);
}

.field-hint,
.field-error,
.form-note {
	margin-top: 0.4rem;
	font-size: var(--fs-small);
}

.field-hint,
.form-note {
	color: var(--muted);
}

.field-error,
.form-error {
	color: var(--error);
}

.form-error {
	margin-bottom: 1.5rem;
	padding: 0.9rem 1rem;
	border: 1px solid var(--error);
	font-weight: 500;
}

.form-note a:hover {
	color: var(--blue);
}

.hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.form-success {
	padding-top: 1.5rem;
	border-top: 1px solid var(--ink);
}

.form-success:focus {
	outline: 0;
}

.form-success__icon {
	width: 2.75rem;
	height: 2.75rem;
	margin-bottom: 1rem;
	color: var(--blue);
}

.form-success .lead {
	margin-top: 0.8rem;
	color: var(--muted);
}

.form-success .tel {
	font-weight: 500;
}

[hidden] {
	display: none !important;
}

@media (min-width: 600px) {
	.field-row {
		display: grid;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: 6%;
	}
}

/* ------------------------------------------------------------------ page opening */

/* Every other page opens in the same sky as the home page: the H1 large in white, then the intro and the call on the light blue. */
.phero {
	position: relative;
	overflow: clip;
	padding-top: calc(var(--header-h) + var(--space-s));
	padding-bottom: var(--space-m);
	background: linear-gradient(180deg, var(--blue) 0%, oklch(45% 0.14 272) 38%, oklch(76% 0.08 272) 78%, var(--sky) 100%);
	color: #fff;
}

.phero__grid {
	display: grid;
	gap: var(--space-m);
}

.phero .rule {
	border-top-color: oklch(18% 0.05 272 / 0.35);
}

.phero__main > .about {
	color: var(--ink);
}

.phero--photo .phero__house {
	max-width: 20rem;
}

@media (min-width: 900px) {
	.phero--photo .phero__grid {
		grid-template-columns: repeat(12, minmax(0, 1fr));
		column-gap: var(--gap);
		align-items: end;
	}

	.phero--photo .phero__main {
		grid-column: 1 / span 8;
	}

	.phero--photo .phero__house {
		grid-column: 9 / span 4;
		max-width: min(24rem, calc((100svh - var(--header-h) - 8rem) * 0.8));
		margin: 0 0 0 auto;
	}
}

.hero__house {
	position: relative;
	margin: 0;
	box-shadow: 0 40px 80px -40px oklch(20% 0.1 272 / 0.6);
}

.hero__photo img {
	width: 100%;
	aspect-ratio: 4 / 5;
	object-fit: cover;
}

.hero__roof {
	display: none;
}

.crumbs ol {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.6rem;
	list-style: none;
	color: oklch(90% 0.03 272);
	font-size: var(--fs-caps);
}

.crumbs li {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	min-height: 2.75rem;
}

.crumbs li + li::before {
	content: "/";
}

.crumbs a {
	text-decoration: none;
}

.crumbs a:hover {
	color: #fff;
	text-decoration: underline;
}

.phero__head {
	padding: var(--space-s) 0;
}

.phero__over {
	margin-bottom: 0.75rem;
	color: oklch(90% 0.03 272);
	font-size: var(--fs-lead);
	line-height: 1.14;
	letter-spacing: -0.022em;
}

.phero__title {
	max-width: 15ch;
	color: #fff;
	font-family: var(--font);
	font-size: var(--fs-page);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: -0.045em;
	text-wrap: balance;
}

.phero__intro {
	color: var(--ink);
}

.phero__proof {
	margin-top: 1rem;
	color: var(--muted);
	font-size: 0.9375rem;
	font-weight: 500;
}

.phero__proof a:hover {
	color: var(--blue);
}

.phero .hero__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.75rem;
}

.phero .link--light,
.phero .link--light:hover {
	color: var(--ink);
}

@media (min-width: 900px) {
	.phero__intro {
		grid-column: 1 / span 4;
	}

	.phero--photo .phero__intro {
		grid-column: 1 / span 5;
	}

	.phero--photo .phero__cta {
		grid-column: 7 / span 6;
	}
}

.phero + .areas {
	margin-top: var(--space-m);
}

.lost {
	padding-bottom: var(--space-xl);
}

/* ------------------------------------------------------------------ page body */

.body__side .link {
	margin-top: 0.5rem;
}

.pull {
	color: var(--blue);
	font-size: clamp(1.375rem, 1rem + 1.1vw, 2.1rem);
	line-height: 1.12;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

@media (min-width: 900px) {
	.body__side {
		position: sticky;
		top: calc(var(--header-h) + 2rem);
		align-self: start;
	}
}

.prose {
	max-width: 68ch;
}

.prose > * + * {
	margin-top: 1em;
}

.prose h2 {
	margin-top: 2.1em;
	font-size: clamp(1.5rem, 1.1rem + 1vw, 2.2rem);
	font-weight: 400;
	line-height: 1.1;
	letter-spacing: -0.022em;
	text-wrap: balance;
}

.prose h3 {
	margin-top: 1.8em;
	font-size: clamp(1.1875rem, 1rem + 0.5vw, 1.5rem);
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: -0.022em;
}

.prose > :first-child {
	margin-top: 0;
}

.prose ul,
.prose ol {
	padding-left: 1.25em;
}

.prose li + li {
	margin-top: 0.4em;
}

.prose li::marker {
	color: var(--muted);
}

.prose a {
	color: var(--blue);
}

.prose a:hover {
	text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------ contact */

.ways {
	display: grid;
	gap: var(--tile-gap);
	list-style: none;
}

.way {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	min-height: clamp(11rem, 17vw, 17rem);
	padding: clamp(1.125rem, 1.5vw, 2rem);
	border: 1px solid var(--edge);
	text-decoration: none;
	transition: border-color 0.2s;
}

.way:hover {
	border-color: var(--blue);
}

.way__label {
	font-size: var(--fs-caps);
	font-weight: 500;
	letter-spacing: 0;
}

.way__value {
	margin-top: auto;
	font-size: clamp(1.5rem, 0.9rem + 1vw, 2.25rem);
	line-height: 1.05;
	letter-spacing: -0.022em;
}

.way__value--small {
	font-size: clamp(1.0625rem, 0.8rem + 0.8vw, 1.5rem);
	letter-spacing: -0.022em;
	white-space: normal;
	overflow-wrap: anywhere;
}

.way__note {
	color: var(--muted);
	font-size: 0.9375rem;
}

.way .link__arrow {
	position: absolute;
	top: clamp(1.125rem, 1.5vw, 2rem);
	right: clamp(1.125rem, 1.5vw, 2rem);
	width: 1.125rem;
	height: 1.125rem;
}

.contact__more {
	padding-top: var(--space-m);
}

.contact__more address {
	margin-top: 0.75rem;
	max-width: 22ch;
}

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

@media (min-width: 1100px) {
	.ways {
		grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
	}
}

/* ------------------------------------------------------------------ reviews page */

.fulls {
	border-top: 1px solid var(--ink);
	list-style: none;
}

.full {
	padding: var(--space-s) 0;
	border-bottom: 1px solid var(--line);
	row-gap: 0.9rem;
	scroll-margin-top: calc(var(--header-h) + 1rem);
}

.full__by {
	display: block;
	margin-top: 0.3rem;
	color: var(--muted);
	font-size: var(--fs-small);
}

.full__text {
	max-width: 68ch;
}

.full:target .lead {
	color: var(--blue);
}

/* ------------------------------------------------------------------ footer */

/* The footer's roofline is retired. */
.roofline {
	display: none;
	position: absolute;
	right: 0;
	bottom: calc(100% - 1px);
	left: 0;
	width: 100%;
	height: clamp(3.5rem, 8.5vw, 8rem);
	fill: var(--blue);
	pointer-events: none;
}

/* The logo's blue, with the logo in white and its grey parts lifted to stay visible. */
.site-footer {
	--logo-grey: oklch(80% 0.03 272);
	position: relative;
	padding: var(--space-m) 0 calc(6rem + env(safe-area-inset-bottom));
	background: var(--night-deep);
	color: #fff;
	font-size: 1rem;
}

.foot {
	display: grid;
	gap: var(--space-s) var(--gap);
}

.foot__brand p {
	max-width: 34ch;
	margin-top: 1rem;
	line-height: 1.4;
}

.foot__logo {
	display: inline-block;
	color: #fff;
}

.foot__logo .logo__art {
	height: 6rem;
}

.foot__title {
	padding-bottom: 0.6rem;
	margin-bottom: 0.35rem;
	border-bottom: 1px solid oklch(100% 0 0 / 0.45);
	font-size: var(--fs-caps);
	font-weight: 500;
	letter-spacing: 0;
}

.foot ul {
	list-style: none;
}

.foot__col li {
	line-height: 1.3;
}

.foot__col li > a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	text-decoration: none;
}

.foot__col li:not(:has(a)) {
	padding: 0.5rem 0;
}

.foot__col a:hover {
	text-decoration: underline;
}

.foot__email {
	overflow-wrap: anywhere;
}

.foot__split {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: var(--gap);
}

.foot__sig {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.25rem 2rem;
	margin-top: var(--space-m);
	padding-top: 1rem;
	border-top: 1px solid oklch(100% 0 0 / 0.45);
	font-size: var(--fs-caps);
}

.foot__sig p {
	margin: 0;
}

.foot__sig a:hover {
	text-decoration-thickness: 2px;
}

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

	.foot__brand,
	.foot__col--wide {
		grid-column: 1 / -1;
	}
}

@media (min-width: 900px) {
	.site-footer {
		padding-bottom: var(--space-s);
	}

	.foot {
		grid-template-columns: repeat(12, minmax(0, 1fr));
	}

	.foot__brand {
		grid-column: 1 / span 3;
	}

	.foot__col {
		grid-column: span 3;
	}

	.foot__col.foot__col--wide {
		grid-column: 4 / span 4;
	}

	.foot__col.foot__col--narrow {
		grid-column: span 2;
	}

	.foot__col li > a {
		min-height: 2rem;
	}

	.foot__col li:not(:has(a)) {
		padding: 0.3rem 0;
	}
}

/* ------------------------------------------------------------------ call bar (phones) */

.callbar {
	position: fixed;
	inset: auto 0 0;
	z-index: 40;
	display: grid;
	grid-template-columns: 1.5fr 1fr;
	padding-bottom: env(safe-area-inset-bottom);
	background: var(--ink);
	color: #fff;
	transform: translateY(100%);
	transition: transform 0.35s var(--ease);
}

.callbar.is-shown {
	transform: none;
}

.callbar a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.55rem;
	min-height: 3.5rem;
	font-weight: 500;
	font-variant-numeric: tabular-nums;
	text-decoration: none;
	white-space: nowrap;
}

.callbar__call {
	background: var(--blue);
}

@media (min-width: 900px) {
	.callbar {
		display: none;
	}
}

/* ------------------------------------------------------------------ progress line */

.progress {
	display: none;
}

@media (min-width: 900px) {
	.js .progress {
		display: block;
		position: fixed;
		inset: auto 0 0;
		z-index: 60;
		height: 5px;
		background: var(--blue);
		transform: scaleX(var(--progress, 0));
		transform-origin: 0 50%;
		pointer-events: none;
	}
}

/* ------------------------------------------------------------------ light blue layer */

/* Headings: large and light, tightly spaced. */
.title {
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.035em;
}

/* Buttons carry an arrow in a box on the left. */
.btn {
	justify-content: flex-start;
	padding: 0 1.4rem 0 0;
	font-size: 0.9375rem;
}

.btn::before {
	content: "\2192";
	display: grid;
	place-items: center;
	align-self: stretch;
	width: 3.25rem;
	margin-right: 1.4rem;
	border-right: 1px solid oklch(100% 0 0 / 0.22);
	font-size: 1.05rem;
	line-height: 1;
}

.btn > .link__arrow {
	display: none;
}

.btn.link {
	text-decoration: none;
}

.btn--sm::before {
	width: 2.75rem;
	margin-right: 1.1rem;
}

.btn--light::before,
.btn--line::before {
	border-right-color: var(--line);
}

.btn--line {
	background-color: transparent;
	box-shadow: inset 0 0 0 1px var(--line);
	color: var(--ink);
}

.btn--line:hover {
	color: #fff;
}

.btn--block {
	justify-content: flex-start;
}

/* The thin bar at the top, in the logo's blue. */
.notice {
	background: var(--blue);
	color: oklch(90% 0.03 272);
	border-bottom: 1px solid oklch(100% 0 0 / 0.12);
}

/* Solid header: white over light sections, the logo's blue over dark ones. */
.site-header[data-theme="dark"].is-solid {
	background: var(--blue);
}

.site-header__quote::before {
	border-right-color: var(--line);
}

/* Footer: light blue, the area line set large in the logo's blue, the logo set large at the foot. */
.site-footer {
	--logo-grey: oklch(61.3% 0.002 248);
	background: var(--sky);
	color: var(--ink);
}

.site-footer a:hover {
	color: var(--blue);
}

.foot__head {
	max-width: 16ch;
	color: var(--blue);
	font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.8rem);
	line-height: 1.05;
	letter-spacing: -0.03em;
}

.foot__brand p:not(.foot__head) {
	margin-top: 1rem;
	color: var(--muted);
}

.foot__title {
	border-bottom-color: oklch(18% 0.05 272 / 0.25);
	color: var(--blue);
}

.site-footer .foot__logo {
	display: block;
	width: min(100%, 34rem);
	margin-top: var(--space-l);
	color: var(--blue);
}

.site-footer .foot__logo .logo__art {
	width: 100%;
	height: auto;
}

.foot__sig {
	color: var(--muted);
	border-top-color: oklch(18% 0.05 272 / 0.25);
}

/* ------------------------------------------------------------------ motion */

/*
 * Motion, in three layers. Nothing here hides content unless it will show it
 * again: the page openings use CSS only, and the scroll reveals only apply
 * once site.js has tagged an element and put .motion on <html>. Anyone who has
 * asked their device for less motion gets the finished page, still.
 *
 * 1. Openings (CSS): the H1's words rise one after another, the roof line draws
 *    in over the photo and the photo settles. The photo itself is never hidden,
 *    as it is the page's LCP image.
 * 2. Scroll reveals (site.js tags; data-r): headings rise word by word, text and
 *    cards fade up in turn, photos open upwards, hairlines draw from the left,
 *    the map's boroughs, dots and names arrive in order.
 *    Section labels slide in behind a popping dot, the big lines rise word by
 *    word, service and review cards rise in turn, the Google score counts up.
 * 3. Ongoing: the base town on the map pulses, a soft light drifts across the
 *    sky at the top of every page, and the feature, service card and quote
 *    photos drift gently, each at its own rate, as the page scrolls.
 */

@keyframes word-in {
	from {
		transform: translateY(110%);
	}
}

@keyframes rise {
	from {
		opacity: 0;
		transform: translateY(1.25rem);
	}
}

@keyframes draw {
	from {
		stroke-dashoffset: 1;
	}
}

@keyframes settle {
	from {
		transform: scale(1.12);
	}
}

@keyframes flip {
	from {
		opacity: 0;
		transform: translateY(30%);
	}
}

@keyframes pop {
	from {
		transform: scale(0);
	}
}

@keyframes fade {
	from {
		opacity: 0;
	}
}

@keyframes pulse {
	0% {
		opacity: 0.9;
		transform: scale(0.6);
	}

	100% {
		opacity: 0;
		transform: scale(2.4);
	}
}

/* A word in its own mask, with room below for descenders. */
.w {
	display: inline-block;
	overflow: clip;
	overflow-clip-margin: 0.06em;
	padding-bottom: 0.14em;
	margin-bottom: -0.14em;
	vertical-align: top;
}

.w > span {
	display: inline-block;
}

/* 1. Openings: see the night hero and page opening sections. */
.phero__title .w > span {
	animation: word-in 1s var(--ease-out) both;
	animation-delay: calc(var(--i, 0) * 65ms + 0.1s);
}

.phero__over,
.phero__main > .rule,
.phero__main > .about,
.crumbs {
	animation: rise 0.9s var(--ease-out) 0.45s both;
}

/* 2. Scroll reveals */
.motion [data-r="up"] {
	transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
	transition-delay: var(--d, 0s);
}

.motion [data-r="up"]:not(.is-in) {
	opacity: 0;
	transform: translateY(1.75rem);
}

.motion [data-r="words"] .w > span {
	transition: transform 1s var(--ease-out);
	transition-delay: calc(var(--i, 0) * 55ms);
}

.motion [data-r="words"]:not(.is-in) .w > span {
	transform: translateY(110%);
}

.motion [data-r="img"] {
	clip-path: inset(0 0 0 0);
	transition: clip-path 1.2s var(--ease-out);
}

.motion [data-r="img"] img {
	transition: transform 1.6s var(--ease-out);
}

.motion [data-r="img"]:not(.is-in) {
	clip-path: inset(100% 0 0 0);
}

.motion [data-r="img"]:not(.is-in) img {
	transform: scale(1.18);
}

.rule {
	transform-origin: 0 50%;
	transition: transform 1.3s var(--ease-out);
}

.motion .rule[data-r]:not(.is-in),
.motion [data-r="line"]:not(.is-in)::before {
	transform: scaleX(0);
}

.motion .map:not(.is-in) .map__borough,
.motion .map:not(.is-in) .map__label {
	opacity: 0;
}

.motion .map:not(.is-in) .map__pin {
	transform: scale(0);
}

.motion .map.is-in .map__borough {
	animation: rise 0.9s var(--ease-out) backwards;
	animation-delay: calc(var(--b, 0) * 0.1s);
}

.map__borough:nth-child(2) { --b: 1; }
.map__borough:nth-child(3) { --b: 2; }
.map__borough:nth-child(4) { --b: 3; }
.map__borough:nth-child(5) { --b: 4; }

.motion .map.is-in .map__pin {
	animation: pop 0.6s var(--ease-out) backwards;
	animation-delay: calc(var(--i, 0) * 0.08s + 0.6s);
}

.motion .map.is-in .map__label {
	animation: fade 0.6s var(--ease-out) backwards;
	animation-delay: 1.3s;
}

/* Section labels: the dot pops, the words slide in after it. */
.motion [data-r="dot"] {
	transition: opacity 0.7s var(--ease-out), translate 0.8s var(--ease-out);
}

.motion [data-r="dot"]::before {
	transition: transform 0.6s var(--ease-out) 0.2s;
}

.motion [data-r="dot"]:not(.is-in) {
	opacity: 0;
	translate: -0.75rem 0;
}

.motion [data-r="dot"]:not(.is-in)::before {
	transform: scale(0);
}

/* The big lines rise word by word, quicker than headings as they run longer. */
.motion .big[data-r="words"] .w > span {
	transition-duration: 0.9s;
	transition-delay: calc(min(var(--i, 0), 18) * 30ms + 0.1s);
}

/* Cards rise in turn and their photos settle as they arrive. */
.motion .scard[data-r] .scard__media img {
	transition: transform 1.3s var(--ease-out);
}

.motion .scard[data-r]:not(.is-in) .scard__media img {
	transform: scale(1.15);
}

.motion .card[data-r="up"] {
	transition-delay: 0.2s;
}

/* The two photos by the quote form open upwards, one after the other. */
.motion .quote__pics[data-r] img {
	clip-path: inset(0 0 0 0);
	transition: clip-path 1.2s var(--ease-out);
}

.motion .quote__pics[data-r] .quote__pic-b {
	clip-path: inset(-10px);
	transition-delay: 0.25s;
}

.motion .quote__pics[data-r]:not(.is-in) .quote__pic-a {
	clip-path: inset(100% 0 0 0);
}

.motion .quote__pics[data-r]:not(.is-in) .quote__pic-b {
	clip-path: inset(100% -10px -10px -10px);
}

/* 3. Ongoing: photos beside the features drift as the page scrolls, where the browser can tie motion to scrolling. */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.feature__media img {
			scale: 1.12;
			animation: float linear both;
			animation-timeline: view();
		}

		/* The service card photos and the quote photos drift too, each at its own rate. */
		.scard__media img {
			animation: float-sm linear both;
			animation-timeline: view();
		}

		.quote__pic-a {
			animation: float-a linear both;
			animation-timeline: view();
		}

		.quote__pic-b {
			animation: float-b linear both;
			animation-timeline: view();
		}

		@keyframes float-sm {
			from {
				translate: 0 -3%;
				scale: 1.08;
			}

			to {
				translate: 0 3%;
				scale: 1.08;
			}
		}

		@keyframes float-a {
			from {
				translate: 0 1.5rem;
			}

			to {
				translate: 0 -1.5rem;
			}
		}

		@keyframes float-b {
			from {
				translate: 0 4rem;
			}

			to {
				translate: 0 -3rem;
			}
		}

		@keyframes float {
			from {
				translate: 0 -5%;
			}

			to {
				translate: 0 5%;
			}
		}
	}
}

/*
 * 4. Leaving: as things scroll off the top of the screen they do something on
 *    the way out. Labels slide off left, headings and big lines lift and blur,
 *    text lifts and fades, cards tip back and shrink away, fanning left and
 *    right in turn. Tied to the scroll, so scrolling back brings them home.
 *    Only where the browser can tie motion to scrolling, and never with
 *    reduced motion.
 */
@supports (animation-timeline: view()) {
	@media (prefers-reduced-motion: no-preference) {
		.dot,
		.title,
		.big,
		.areas__title,
		.statement__text,
		.phero__head,
		.lead,
		.who__more,
		.who__cta,
		.sec-foot,
		.acc__item,
		.row,
		.index__row,
		.ticks li,
		.scard,
		.rcard,
		.feature .card,
		.roofs__item,
		.shot,
		.voice {
			animation: out-lift linear both;
			animation-timeline: view();
			animation-range: exit -22vh exit 100%;
		}

		.dot {
			animation-name: out-side;
		}

		.title,
		.big,
		.areas__title,
		.statement__text,
		.phero__head {
			animation-name: out-blur;
		}

		.scard,
		.rcard,
		.feature .card,
		.roofs__item,
		.shot,
		.voice {
			animation-name: out-tip;
			transform-origin: 50% 100%;
		}

		.scard:nth-child(even),
		.rcard:nth-child(even),
		.feature--f2 .card,
		.roofs__item:nth-child(even),
		.shot:nth-child(even),
		.voice:nth-child(even) {
			animation-name: out-tip-r;
		}

		@keyframes out-lift {
			to {
				opacity: 0;
				translate: 0 -2.5rem;
			}
		}

		@keyframes out-side {
			to {
				opacity: 0;
				translate: -3rem 0;
			}
		}

		@keyframes out-blur {
			to {
				opacity: 0;
				translate: 0 -3rem;
				filter: blur(8px);
			}
		}

		@keyframes out-tip {
			to {
				opacity: 0.15;
				translate: -1.5rem -3rem;
				scale: 0.86;
				rotate: -4deg;
			}
		}

		@keyframes out-tip-r {
			to {
				opacity: 0.15;
				translate: 1.5rem -3rem;
				scale: 0.86;
				rotate: 4deg;
			}
		}
	}
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
	}

}

