:root {
	/* Colours */
	--color-primary: #0d8c17;
	--color-dark: #181b20;
	--color-light: #f5f5f3;
	--color-white: #ffffff;
	--color-text: #181b20;
	--color-text-muted: #6b6f75;
	--color-border: #dadcdc;

	/* Fonts */
	--font-family-base: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	/* Spacing */
	--space-xs: 0.5rem;
	--space-sm: 1rem;
	--space-md: 4rem;
	--space-lg: 8rem;
	--space-xl: 10rem;
	--space-section: 16rem;

	--container-max-width: 95rem;
	--container-gutter: 1.5rem;

	/* Font sizes */
	--font-size-base: 1rem;
	--font-size-md: 1.25rem;
	--font-size-lg: 1.5rem;
	--font-size-xl: 2rem;
	--font-size-xxl: 2.75rem;
	--font-size-hero: 4.3125rem;
}

@media (width >= 768px) {
	:root {
		--container-gutter: var(--space-md);
	}
}

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

* {
	margin: 0;
}

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}

/* Breathing room above anything jumped to via an in-page link */
:target {
	scroll-margin-top: var(--space-md);
}

body {
	min-height: 100vh;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

img,
picture,
video,
canvas,
svg {
	display: block;
	max-width: 100%;
	height: auto;
}

/* PhotoSwipe sizes lightbox videos itself inside a zero-width wrapper, so the
   max-width above would collapse them to 0px wide */
.pswp video {
	max-width: none;
}

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

button {
	cursor: pointer;
}

a {
	color: inherit;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-weight: inherit;
	line-height: 1.2;
	overflow-wrap: break-word;
}

p {
	overflow-wrap: break-word;
}

ul[role="list"],
ol[role="list"] {
	list-style: none;
	padding: 0;
}

/* Utilities */

.container {
	max-width: var(--container-max-width);
	margin-left: auto;
	margin-right: auto;
	padding-left: var(--container-gutter);
	padding-right: var(--container-gutter);
}

.section {
	padding-top: var(--space-md);
	padding-bottom: var(--space-md);
}

.row {
	display: grid;
	gap: var(--space-md);
}

@media (width >= 768px) {
	.section {
		padding-top: var(--space-lg);
		padding-bottom: var(--space-lg);
	}

	.row {
		grid-template-columns: 1fr 1fr;
	}
}

/* Spaced grid: row gaps while stacked, column gaps from md (899px) up.
   A wide column gap on the 12-col .grid would overflow small screens (11 gaps). */
.grid.grid--spaced {
	row-gap: var(--space-md);
	column-gap: 0;
}

@media (min-width: 899px) {
	.grid.grid--spaced {
		column-gap: var(--space-md);
	}
}

/* Typography */

h1,
.heading-1 {
	font-size: var(--font-size-hero);
	line-height: 1.1;
}

h2,
.heading-2 {
	font-size: var(--font-size-xl);
	line-height: 1.2;
}

@media (width >= 768px) {
	h2,
	.heading-2 {
		font-size: var(--font-size-xxl);
	}
}

:is(h1, h2, .heading-1, .heading-2) + p,
p + p {
	margin-top: 1.5rem;
}

p {
	line-height: 1.75;
}

.text-label {
	font-size: 0.75rem;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.eyebrow {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-weight: 500;

	&::before {
		content: "";
		width: 0.75rem;
		height: 1px;
		background-color: var(--color-primary);
	}

	+ :is(h1, h2, .heading-1, .heading-2) {
		margin-top: 1rem;
	}
}

.text-muted {
	color: var(--color-text-muted);

	/* Headings inside a muted block keep the main text colour */
	:is(h1, h2, h3, .heading-1, .heading-2) {
		color: var(--color-text);
	}
}

/* Logo */

.logo img {
	width: clamp(10rem, 40vw, 19rem);
	/* Don't let flex/grid squash it: the normalise's max-width: 100% makes it collapsible */
	max-width: none;
}

/* Buttons */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.1rem 1.5rem;
	border: 0;
	background-color: var(--color-primary);
	color: var(--color-white);
	font-size: 0.875rem;
	font-weight: 500;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease;

	&:hover,
	&:focus-visible {
		background-color: var(--color-dark);
	}

	/* Text link with arrow, e.g. "Learn more ↓" */
	&.button--text {
		gap: 0.5rem;
		padding: 0;
		background-color: transparent;
		color: inherit;

		&:hover,
		&:focus-visible {
			background-color: transparent;
			color: var(--color-primary);
		}
	}
}

/* Sections */

body {
	font-family: var(--font-family-base);
}




header {
	background-color: var(--color-white);
	.container {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--space-sm);
		padding-top: var(--space-sm);
		padding-bottom: var(--space-sm);
	}

	.logo {
		flex-shrink: 0;
	}

	/* Burger: mobile only, menu behaviour to be scaffolded */
	.burger {
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 6px;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0.625rem;
		border: 0;
		background: transparent;

		span {
			display: block;
			height: 2px;
			background-color: var(--color-text);
		}
	}

	nav.navigation {
		display: none;
	}

	@media (width >= 1024px) {
		.burger {
			display: none;
		}

		nav.navigation {
			display: flex;
		}
	}

	nav.navigation {
		align-items: center;
		gap: 2rem;

		ul {
			display: flex;
			align-items: center;
			gap: 2rem;
			list-style: none;

			a {
				display: block;
				padding: 0.5rem 0;
				border-bottom: 2px solid transparent;
				text-decoration: none;
				color: var(--color-text);
				font-weight: 400;

				&:hover,
				&:focus-visible {
					color: var(--color-primary);
				}

				&[aria-current="page"] {
					font-weight: 600;
					border-bottom-color: var(--color-primary);

					&:hover,
					&:focus-visible {
						color: var(--color-text);
					}
				}
			}
		}
	}
}



section.section--hero {
	container-type: inline-size;
	background-color: var(--color-dark);
	color: var(--color-white);
	padding-top: 0;
	padding-bottom: 0;

	/* Full-bleed: image runs to the edge, text lines up with the container */
	.container {
		max-width: none;
		padding-left: 0;
		padding-right: 0;
	}

	.grid {
		--gap: 0;
	}

	.hero__content {
		padding: var(--space-lg) var(--container-gutter);
		padding-left: max(var(--container-gutter), calc((100cqw - var(--container-max-width)) / 2 + var(--container-gutter)));
	}

	.hero__media video {
		width: 100%;
		height: 100%;
		aspect-ratio: 4 / 3;
		object-fit: cover;
	}

	p {
		color: rgb(255 255 255 / 0.75);
	}

	a {
		display: inline-block;
		margin-top: 2rem;
		font-size: 0.875rem;
		text-decoration: none;
	}

	/* Matches the grid's md breakpoint */
	@media (min-width: 899px) {
		.grid {
			align-items: center;
			min-height: 45rem;
		}

		/* Image fills its half without its own size stretching the row */
		.hero__media {
			position: relative;
			align-self: stretch;
		}

		.hero__media video {
			position: absolute;
			inset: 0;
			aspect-ratio: auto;
		}
	}
}

section.section--intro {
	/* Text comes first in the markup (stacks above the photos on mobile);
	   grid classes swap the photos to the left from md up */
	.grid img {
		width: 100%;
	}

	.logos {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: var(--space-sm) var(--space-md);
		margin-top: var(--space-md);
		padding-top: var(--space-md);
		border-top: 1px solid var(--color-border);
	}

	@media (width >= 768px) {
		.logos {
			flex-direction: row;
			flex-wrap: wrap;
			justify-content: space-between;
		}
	}
}

footer.footer {
	background-color: var(--color-dark);
	color: var(--color-white);
	font-size: var(--font-size-base);

	.container {
		display: grid;
		gap: var(--space-sm) var(--space-lg);
		padding-top: var(--space-md);
		padding-bottom: var(--space-sm);
	}

	p {
		margin: 0;
		line-height: 1.5;
	}

	a {
		text-decoration: none;

		&:hover,
		&:focus-visible {
			color: var(--color-primary);
		}
	}

	.text-label {
		color: rgb(255 255 255 / 0.6);
	}

	/* Temporary: whiten the header logo until a footer version is supplied */
	.footer__logo img {
		width: clamp(10rem, 40vw, 18rem);
		filter: brightness(0) invert(1);
	}

	.footer__logo {
		margin-bottom: var(--space-sm);
	}

	.footer__address {
		margin-top: 1rem;
		font-size: var(--font-size-md);
	}

	.footer__details {
		display: grid;
		gap: 0.5rem;
		margin-top: 1.25rem;
		color: rgb(255 255 255 / 0.8);

		li {
			display: flex;
			align-items: center;
			gap: 0.75rem;
		}

		svg {
			flex-shrink: 0;
			color: var(--color-primary);
		}
	}

	/* Mobile: links in one ruled row */
	.footer__nav ul {
		display: flex;
		justify-content: space-between;
		gap: 1rem;
		margin-top: var(--space-sm);
		padding: 1rem 0;
		border-top: 1px solid rgb(255 255 255 / 0.12);
		border-bottom: 1px solid rgb(255 255 255 / 0.12);
	}

	/* Mobile: label left, link right */
	.footer__social {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		padding: 1rem 0;

		a {
			display: inline-flex;
			align-items: center;
			gap: 0.75rem;
		}
	}

	.footer__bottom {
		display: grid;
		gap: 1rem;
		margin-top: var(--space-sm);
		padding-top: var(--space-md);
		border-top: 1px solid rgb(255 255 255 / 0.12);
		font-size: 0.75rem;
		color: rgb(255 255 255 / 0.7);
	}

	/* Tablet landscape: logo on its own row, three columns below */
	@media (width >= 1024px) {
		.container {
			grid-template-columns: 1.4fr auto auto;
			align-items: start;
			column-gap: var(--space-md);
		}

		.footer__logo {
			grid-column: 1 / -1;
		}

		.footer__nav ul {
			flex-direction: column;
			gap: 0.75rem;
			margin-top: 0;
			padding: 0;
			border: 0;
		}

		.footer__social {
			flex-direction: column;
			align-items: flex-start;
			padding: 0;
		}

		.footer__bottom {
			grid-column: 1 / -1;
			display: flex;
			justify-content: space-between;
			margin-top: var(--space-md);
			padding-top: var(--space-sm);
		}
	}

	/* Desktop: logo joins the row as its own column */
	@media (width >= 1280px) {
		.container {
			grid-template-columns: 1fr 1.4fr auto auto;
		}

		.footer__logo {
			grid-column: auto;
			margin-bottom: 0;
		}
	}

	@media (width >= 1440px) {
		.container {
			column-gap: var(--space-lg);
		}
	}
}

section.section--gallery {
	background-color: var(--color-light);

	.button {
		margin-top: 2rem;
	}

	.grid-2 img {
		width: 100%;
		aspect-ratio: 1;
		object-fit: cover;
	}

	@media (min-width: 899px) {
		> .container > .grid {
			align-items: center;
		}
	}
}

section.section--services {
	background-color: var(--color-dark);
	color: var(--color-white);
	/* Lets carousel slides peek to the screen edge without a horizontal scrollbar */
	overflow-x: clip;

	p {
		color: rgb(255 255 255 / 0.85);
	}

	.services {
		margin-top: var(--space-md);
		overflow: visible;
	}

	.service {
		height: auto;
		padding-top: 2rem;
		border-top: 1px solid rgb(255 255 255 / 0.12);
	}

	.service__icon {
		width: 3.5rem;
		height: 3.5rem;
		stroke-width: 1;
		color: var(--color-primary);
	}

	.service__title {
		margin-top: 1.5rem;
		font-size: var(--font-size-md);
		font-weight: 500;
		line-height: 1.3;
	}

	.service__text {
		margin-top: 1rem;
		font-size: 0.875rem;
		color: rgb(255 255 255 / 0.6);
	}

	.services__controls {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 1rem;
		margin-top: var(--space-md);
	}

	.services__prev,
	.services__next {
		display: grid;
		place-items: center;
		width: 3rem;
		height: 3rem;
		border: 1px solid rgb(255 255 255 / 0.2);
		border-radius: 50%;
		background-color: transparent;
		color: var(--color-white);
		transition: opacity 0.2s ease;

		svg {
			width: 1.25rem;
			height: 1.25rem;
		}

		&.swiper-button-disabled {
			opacity: 0.4;
			cursor: default;
		}
	}

	.services__next {
		border-color: var(--color-primary);
		background-color: var(--color-primary);
	}

	.services__pagination {
		position: static;
		display: flex;
		justify-content: center;
		gap: 0.375rem;
		width: auto;

		.swiper-pagination-bullet {
			width: 0.375rem;
			height: 0.375rem;
			margin: 0;
			border-radius: 0.25rem;
			background-color: rgb(255 255 255 / 0.3);
			opacity: 1;
			transition: width 0.2s ease, background-color 0.2s ease;
		}

		.swiper-pagination-bullet-active {
			width: 1rem;
			background-color: var(--color-primary);
		}
	}

	/* md up: carousel is destroyed, slides become a 3-column grid */
	@media (min-width: 899px) {
		.swiper-wrapper {
			display: grid;
			grid-template-columns: repeat(3, 1fr);
			gap: var(--space-md) 2rem;
		}

		.service {
			padding-top: 0;
			border-top: 0;
		}

		.services__controls {
			display: none;
		}
	}
}

section.section--about {
	.grid {
		align-items: start;
	}
}

section.section--cta {
	background-color: var(--color-light);
	border-top: 1px solid var(--color-border);

	h2 + p {
		margin-top: 0.5rem;
	}

	@media (min-width: 899px) {
		padding-top: var(--space-md);
		padding-bottom: var(--space-md);

		.grid {
			align-items: center;
		}

		.cta__action {
			justify-self: end;
		}
	}
}

/* Contact: homepage section and the archived contact page */

section.section--contact {
	.contact__button {
		margin-top: 2rem;
	}

	/* Homepage: details sit beside the heading on desktop */
	&.section--cta .contact-details {
		@media (min-width: 899px) {
			margin-top: 0;
		}
	}

	.contact-details {
		display: grid;
		gap: 0.75rem;
		margin-top: 2rem;

		li {
			display: flex;
			align-items: center;
			gap: 0.75rem;
		}

		a {
			text-decoration: none;

			&:hover,
			&:focus-visible {
				color: var(--color-primary);
			}
		}
	}

	.contact-details__icon {
		flex-shrink: 0;
		width: 1.25rem;
		height: 1.25rem;
		stroke-width: 1.5;
		color: var(--color-primary);
	}

	.contact-form {
		padding: 2rem var(--container-gutter);
		margin-left: calc(var(--container-gutter) * -1);
		margin-right: calc(var(--container-gutter) * -1);
		background-color: var(--color-light);

		h2 {
			font-size: var(--font-size-lg);
			font-weight: 500;
		}

		form {
			margin-top: 1.5rem;
		}

		.g-recaptcha {
			margin-top: 1.5rem;
		}

		.button {
			margin-top: 1.5rem;
		}

		@media (min-width: 899px) {
			padding: var(--space-md);
			margin-left: 0;
			margin-right: 0;
		}
	}
}

/* Form fields (reusable) */

.field {
	display: grid;
	gap: 0.375rem;

	label {
		font-size: 0.875rem;
		font-weight: 500;
		color: var(--color-text);
	}

	input,
	textarea {
		width: 100%;
		padding: 0.875rem 1rem;
		border: 1px solid var(--color-border);
		border-radius: 0;
		background-color: var(--color-white);
		color: var(--color-text);
		transition: border-color 0.2s ease;

		&:focus {
			outline: 2px solid var(--color-primary);
			outline-offset: -1px;
			border-color: var(--color-primary);
		}

		&[aria-invalid="true"] {
			border-color: #c62828;
		}
	}

	textarea {
		resize: vertical;
	}
}

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

.field__error {
	font-size: 0.8125rem;
	color: #c62828;
}

.alert {
	margin-top: 1rem;
	padding: 0.875rem 1rem;
	border-left: 3px solid;
	font-size: 0.875rem;

	&.alert--success {
		border-color: var(--color-primary);
		background-color: rgb(13 140 23 / 0.08);
		color: var(--color-text);
	}

	&.alert--error {
		border-color: #c62828;
		background-color: rgb(198 40 40 / 0.08);
		color: var(--color-text);
	}
}
