/*
 * HandiSoft Solution: theme styles.
 *
 * Mobile first, from 360 px. Type and spacing step up at 768 px; the header
 * switches from a menu button to a navigation bar at 1024 px.
 *
 * 1. Tokens      2. Base        3. Layout      4. Components
 * 5. Header      6. Footer      7. Case studies
 *
 * Section 1 holds the tokens of Design System v1.2. Since v2.0 the look on
 * every page comes from editorial.css, which gives many of these tokens new
 * values on the .theme-editorial body class; 02-design/Design-System.md,
 * section 12, says which token is read from which file. Nothing below section 1
 * holds a raw colour, font, or spacing value.
 */

/* 0. Fonts: self-hosted, Latin subset, variable. `swap` shows text at once in
   the fallback font and switches when the file arrives. */

@font-face {
	font-family: Inter;
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
}

@font-face {
	font-family: Manrope;
	font-style: normal;
	font-weight: 200 800;
	font-display: swap;
	src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
}

/* 1. Tokens --------------------------------------------------------------- */

:root {
	/* Colour: brand */
	--color-navy: #0B2545;
	--color-navy-pressed: #12335E;
	--color-navy-raised: #12335E;
	--color-navy-line: #2A4468;
	--color-teal: #0F766E;
	--color-teal-hover: #0B5F58;
	--color-teal-active: #094D48;
	--color-mint: #5EEAD4;
	--color-teal-tint: #D7F0EC;

	/* Colour: neutrals */
	--color-ink: #1B2A3A;
	--color-muted: #556575;
	--color-field-border: #6B7C8F;
	--color-border: #D9E1E8;
	--color-bg: #F7F9FB;
	--color-surface: #FFFFFF;
	--color-on-navy-muted: #B8C4D1;
	--color-disabled-bg: #E9EEF3;

	/* Colour: status */
	--color-error: #B42318;
	--color-error-bg: #FEF3F2;
	--color-success: #067647;
	--color-success-bg: #ECFDF3;
	--color-warning: #93370D;
	--color-warning-bg: #FFFAEB;
	--color-whatsapp: #0E7A5F;

	/* Type */
	--font-heading: Manrope, "Segoe UI", system-ui, sans-serif;
	--font-body: Inter, "Segoe UI", system-ui, sans-serif;
	--text-h1: 2.375rem;
	--text-h2: 1.875rem;
	--text-h3: 1.375rem;
	--text-h4: 1.0625rem;
	--text-lead: 1.125rem;
	--text-body: 1rem;
	--text-small: 0.875rem;
	--text-eyebrow: 0.75rem;
	--leading-h1: 1.06;
	--leading-h2: 1.1;
	--leading-h3: 1.2;
	--leading-h4: 1.35;
	--leading-body: 1.6;
	--tracking-heading: -0.03em;
	--tracking-eyebrow: 0.14em;

	/* Space */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-7: 3rem;
	--space-8: 4rem;
	--space-9: 6rem;
	--section-padding: var(--space-8);
	--page-margin: var(--space-4);
	--container-max: 75rem;

	/* Shape and depth */
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 12px;
	--radius-pill: 999px;
	--shadow-card: 0 1px 2px rgba(11, 37, 69, 0.06);
	--shadow-raised: 0 8px 24px rgba(11, 37, 69, 0.12);

	/* Components */
	--control-height: 3rem;
	--header-height: 4rem;
	--focus-ring: 3px solid var(--color-teal);
	--focus-offset: 2px;
}

@media (min-width: 48rem) {
	:root {
		--text-h1: 3.5rem;
		--text-h2: 2.75rem;
		--text-h3: 1.625rem;
		--text-h4: 1.125rem;
		--text-lead: 1.25rem;
		--text-body: 1.0625rem;
		--text-eyebrow: 0.8125rem;
		--section-padding: var(--space-9);
		--page-margin: var(--space-6);
	}
}

@media (min-width: 64rem) {
	:root {
		--header-height: 4.5rem;
		/* 60 px; Home and service pages raise it to 72 px. */
		--text-h1: 3.75rem;
	}
}

/* Motion tokens (Design System 14.2). */
:root {
	--motion-fast: 120ms;
	--motion-base: 200ms;
	--motion-panel: 280ms;
	--motion-enter: 480ms;
	--motion-hero: 900ms;
	--ease-out: cubic-bezier(0.22, 1, 0.36, 1);
	--ease-in: cubic-bezier(0.4, 0, 1, 1);
	--ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
	/* Slower start than --ease-out, so the hero artwork is still moving when the eye arrives. */
	--ease-hero: cubic-bezier(0.33, 1, 0.68, 1);
	--motion-rise-sm: 8px;
	--motion-rise: 16px;
	--motion-rise-lg: 48px;
	--motion-stagger: 80ms;
	--transition: 200ms var(--ease-out);
}

/* 2. Base ----------------------------------------------------------------- */

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

html {
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
	/* In-page links such as #enquiry must not land under the sticky header. */
	scroll-padding-top: calc(var(--header-height) + var(--space-4));
}

body {
	margin: 0;
	background: var(--color-bg);
	color: var(--color-ink);
	font-family: var(--font-body);
	font-size: var(--text-body);
	line-height: var(--leading-body);
	overflow-wrap: break-word;
}

h1,
h2,
h3,
h4 {
	margin: 0 0 var(--space-4);
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-weight: 700;
	letter-spacing: var(--tracking-heading);
}

h1 { font-size: var(--text-h1); line-height: var(--leading-h1); }
h2 { font-size: var(--text-h2); line-height: var(--leading-h2); }
h3 { font-size: var(--text-h3); line-height: var(--leading-h3); letter-spacing: -0.02em; }
h4 { font-family: var(--font-body); font-size: var(--text-h4); font-weight: 600; line-height: var(--leading-h4); letter-spacing: 0; }

/* One phrase in a headline may carry the accent: teal on light, mint on navy. */
h1 em,
h2 em {
	color: var(--color-teal);
	font-style: normal;
}

.on-navy h1 em,
.on-navy h2 em {
	color: var(--color-mint);
}

p,
ul,
ol,
dl,
figure,
blockquote {
	margin: 0 0 var(--space-4);
}

img,
svg {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

a {
	color: var(--color-teal);
	text-underline-offset: 4px;
	transition: color var(--transition);
}

a:hover {
	color: var(--color-teal-hover);
}

a:active {
	color: var(--color-teal-active);
}

:focus-visible {
	outline: var(--focus-ring);
	outline-offset: var(--focus-offset);
}

/* Teal on navy fails contrast, so dark sections use mint for the ring. */
.on-navy :focus-visible {
	outline-color: var(--color-mint);
}

/* <main> takes focus from the skip link; it needs no ring of its own. */
.site-main:focus {
	outline: none;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.skip-link {
	position: absolute;
	top: var(--space-2);
	left: var(--space-2);
	z-index: 100;
	padding: var(--space-3) var(--space-4);
	background: var(--color-navy);
	color: var(--color-surface);
	border-radius: var(--radius-md);
	transform: translateY(-200%);
}

.skip-link:focus {
	color: var(--color-surface);
	transform: none;
}

/* 3. Layout --------------------------------------------------------------- */

.container {
	width: 100%;
	max-width: calc(var(--container-max) + 2 * var(--page-margin));
	margin-inline: auto;
	padding-inline: var(--page-margin);
}

.section {
	padding-block: var(--section-padding);
}

.section--alt {
	background: var(--color-surface);
	border-block: 1px solid var(--color-border);
}

.section--compact {
	padding-block: var(--space-7);
}

.reading,
.prose.reading {
	max-width: 53.75rem;
	margin-inline: auto;
}

.reading p,
.reading li {
	max-width: 65ch;
}

.site-main {
	min-height: 50vh;
}


.lead {
	max-width: 65ch;
	font-size: var(--text-lead);
	line-height: 1.55;
}

.eyebrow {
	margin-bottom: var(--space-2);
	color: var(--color-teal);
	font-size: var(--text-eyebrow);
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: var(--tracking-eyebrow);
	text-transform: uppercase;
}

.eyebrow::before {
	content: "";
	display: inline-block;
	width: 8px;
	height: 8px;
	margin-right: 10px;
	background: currentColor;
	vertical-align: 1px;
}

.on-navy .eyebrow {
	color: var(--color-mint);
}

.breadcrumb {
	margin-bottom: var(--space-4);
	color: var(--color-muted);
	font-size: var(--text-small);
}

.breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	padding: 0;
	list-style: none;
}

.breadcrumb li + li::before {
	content: "/";
	margin-inline: var(--space-2);
}

.breadcrumb a {
	color: inherit;
}

.prose {
	max-width: 65ch;
}

.prose > * + h2 {
	margin-top: var(--space-6);
}

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

.prose li + li {
	margin-top: var(--space-2);
}

/* 4. Components ----------------------------------------------------------- */

.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: var(--control-height);
	padding: var(--space-2) var(--space-5);
	border: 1.5px solid transparent;
	border-radius: var(--radius-md);
	font: inherit;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color var(--transition), border-color var(--transition), color var(--transition);
}

.button--primary,
.button--primary:hover,
.button--primary:active {
	color: var(--color-surface);
}

.button--primary { background: var(--color-teal); }
.button--primary:hover { background: var(--color-teal-hover); }
.button--primary:active { background: var(--color-teal-active); }

.button--secondary {
	border-color: var(--color-navy);
	background: transparent;
	color: var(--color-navy);
}

.button--secondary:hover {
	background: var(--color-navy);
	color: var(--color-surface);
}

.button--secondary:active {
	background: var(--color-navy-pressed);
	color: var(--color-surface);
}

.on-navy .button--primary,
.on-navy .button--primary:hover,
.on-navy .button--primary:active {
	background: var(--color-mint);
	color: var(--color-navy);
}

.on-navy .button--primary:hover {
	background: var(--color-surface);
}

.on-navy .button--secondary {
	border-color: var(--color-surface);
	color: var(--color-surface);
}

.on-navy .button--secondary:hover {
	background: var(--color-surface);
	color: var(--color-navy);
}

.button-row {
	display: flex;
	flex-direction: column;
	gap: var(--space-3);
}

@media (min-width: 48rem) {
	.button-row {
		flex-direction: row;
		flex-wrap: wrap;
	}
}

.tag-list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
	margin: 0;
	padding: 0;
	list-style: none;
}

.tag {
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-pill);
	background: var(--color-teal-tint);
	color: var(--color-navy);
	font-size: 0.75rem;
	font-weight: 600;
}

.card-grid {
	display: grid;
	gap: var(--space-5);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.card-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 80rem) {
	.card-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.card {
	position: relative;
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
	transition: box-shadow var(--transition);
}

.card:hover,
.card:focus-within {
	box-shadow: var(--shadow-raised);
}

/* Screenshots sit in a simple browser frame on a tint panel. The 16:10 box is
   reserved before the image loads, so nothing shifts (CLS). */
.shot {
	display: flex;
	align-items: flex-end;
	aspect-ratio: 16 / 10;
	margin: 0;
	padding: 20px 20px 0;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--color-teal-tint);
}

.card > .shot {
	border-radius: 0;
}

.shot__frame {
	width: 100%;
	height: 100%;
	overflow: hidden;
	border-top: 12px solid var(--color-navy);
	border-radius: 8px 8px 0 0;
	background: var(--color-surface);
	box-shadow: var(--shadow-raised);
}

.shot img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.card__body {
	display: flex;
	flex-direction: column;
	gap: var(--space-2);
	padding: var(--space-4);
}

@media (min-width: 48rem) {
	.card__body {
		padding: var(--space-5);
	}
}

.card__title {
	margin: 0;
	font-size: var(--text-h3);
	line-height: var(--leading-h3);
}

.card__link {
	color: inherit;
	text-decoration: none;
}

.card:hover .card__link {
	color: var(--color-teal);
}

/* The whole card is the link target, with one link for assistive technology. */
.card__link::after {
	content: "";
	position: absolute;
	inset: 0;
}

.card__meta {
	margin: 0;
	color: var(--color-muted);
	font-size: var(--text-small);
	line-height: 1.5;
}

.card--cta {
	justify-content: center;
	align-items: flex-start;
	gap: var(--space-3);
	padding: var(--space-5);
	border-color: var(--color-teal-tint);
	background: var(--color-teal-tint);
	box-shadow: none;
}

.card--cta p {
	margin: 0;
}

/* Closing call to action: an inset navy panel. Every page ends with a way
   to make contact. */
.closing-cta {
	padding: 0 var(--page-margin) var(--section-padding);
}

.closing-cta__panel {
	max-width: 71rem;
	margin-inline: auto;
	padding: 3.5rem var(--space-5);
	border-radius: 16px;
	background: var(--color-navy);
	color: var(--color-surface);
	text-align: center;
}

.closing-cta h2 {
	color: var(--color-surface);
	font-size: 2rem;
}

.closing-cta p {
	max-width: 65ch;
	margin-inline: auto;
	color: var(--color-on-navy-muted);
	font-size: var(--text-lead);
	line-height: 1.55;
}

.closing-cta .button-row {
	justify-content: center;
	margin-top: var(--space-6);
}

@media (min-width: 48rem) {
	.closing-cta__panel {
		padding: 5rem var(--space-7);
	}

	.closing-cta h2 {
		font-size: 3rem;
	}
}

/* Hero: navy, on every page except Contact. The rounded square behind the top
   right corner echoes the logo mark. */
.hero {
	position: relative;
	padding-block: var(--space-8);
	overflow: hidden;
	background: var(--color-navy);
	color: var(--color-surface);
}

.hero::before {
	content: "";
	position: absolute;
	top: -160px;
	right: -140px;
	width: 460px;
	height: 460px;
	border-radius: 100px;
	background: var(--color-navy-raised);
}

.hero > .container {
	position: relative;
}

.hero h1 {
	color: var(--color-surface);
}

.hero .lead,
.hero .breadcrumb {
	color: var(--color-on-navy-muted);
}

.hero .lead:last-child,
.hero h1:last-child {
	margin-bottom: 0;
}

@media (min-width: 48rem) {
	.hero {
		padding-bottom: 6.5rem;
	}

	.hero::before {
		top: -220px;
		right: -160px;
		width: 640px;
		height: 640px;
		border-radius: 140px;
	}
}

/* With JavaScript the header floats over the hero, so the hero makes room. */
.js .has-hero .hero {
	padding-top: calc(var(--header-height) + 3.5rem);
}

@media (min-width: 48rem) {
	.js .has-hero .hero {
		padding-top: calc(var(--header-height) + 6rem);
	}
}

/* A light card inside a navy area keeps the light-background rules. */
.on-light {
	color: var(--color-ink);
}

.on-navy .on-light .eyebrow {
	color: var(--color-teal);
}

.on-navy .on-light .button--primary {
	background: var(--color-teal);
	color: var(--color-surface);
}

.on-navy .on-light :focus-visible {
	outline-color: var(--color-teal);
}

/* 5. Header --------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--color-surface);
	border-bottom: 1px solid var(--color-border);
	transition: box-shadow var(--transition);
}

.site-header.is-scrolled {
	box-shadow: var(--shadow-raised);
}

.site-logo__image--reversed {
	display: none;
}

/* Over the navy hero the header is transparent: reversed logo, white links,
   mint button. It turns into the white header once the hero has scrolled
   past, and whenever the small-screen menu is open. Needs JavaScript to know
   where the hero ends; without it the header is simply white and in the flow. */
.js .has-hero .site-main {
	margin-top: calc(-1 * var(--header-height));
}

.js .has-hero .site-header.is-over-hero {
	border-bottom-color: var(--color-navy-line);
	background: transparent;
	box-shadow: none;
}

.js .is-over-hero .site-logo__image--default {
	display: none;
}

.js .is-over-hero .site-logo__image--reversed {
	display: block;
}

.js .is-over-hero .nav-toggle,
.js .is-over-hero .site-nav__link,
.js .is-over-hero .submenu-toggle {
	color: var(--color-surface);
}

.js .is-over-hero .site-nav__link:hover,
.js .is-over-hero .site-nav__link[aria-current] {
	color: var(--color-mint);
}

.js .is-over-hero .site-header__cta,
.js .is-over-hero .site-header__cta:hover {
	background: var(--color-mint);
	color: var(--color-navy);
}

.js .is-over-hero :focus-visible {
	outline-color: var(--color-mint);
}

.js .is-over-hero .submenu :focus-visible {
	outline-color: var(--color-teal);
}

.site-header__bar {
	display: flex;
	align-items: center;
	gap: var(--space-1);
	min-height: var(--header-height);
}

.site-logo {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	margin-right: auto;
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-weight: 700;
	text-decoration: none;
}

.site-logo__image {
	width: auto;
	height: 2rem;
}

/* 40 px tall to the eye, with a 44 px tap area. */
.site-header__cta {
	position: relative;
	min-height: 2.5rem;
	padding-inline: var(--space-4);
	font-size: 0.875rem;
	white-space: nowrap;
}

.site-header__cta::before {
	content: "";
	position: absolute;
	inset: -2px 0;
}

.nav-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	padding: 0;
	border: 0;
	border-radius: var(--radius-md);
	background: none;
	color: var(--color-navy);
	cursor: pointer;
}

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

.site-nav__list,
.submenu {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-nav__link,
.submenu__link {
	display: flex;
	align-items: center;
	min-height: var(--control-height);
	color: var(--color-navy);
	font-weight: 600;
	text-decoration: none;
}

.submenu__link {
	color: var(--color-ink);
	font-weight: 400;
}

.site-nav__link:hover,
.submenu__link:hover,
.site-nav [aria-current] {
	color: var(--color-teal);
}

.submenu-toggle {
	display: none;
}

/* Small screens: a full-height panel under the bar, the five services listed in full. */
@media (max-width: 63.98rem) {
	.site-nav {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		height: calc(100vh - var(--header-height));
		height: calc(100dvh - var(--header-height));
		overflow-y: auto;
		padding: var(--space-2) var(--page-margin) var(--space-6);
		background: var(--color-surface);
		border-top: 1px solid var(--color-border);
	}

	.js .site-nav {
		display: none;
	}

	.js .is-nav-open .site-nav {
		display: block;
	}

	.site-nav__item + .site-nav__item {
		border-top: 1px solid var(--color-border);
	}

	.submenu {
		padding: 0 0 var(--space-2) var(--space-4);
	}

	/* Without JavaScript the menu cannot be toggled, so it is part of the page
	   and the header stops being sticky to keep it from covering the content. */
	.no-js .site-header {
		position: static;
	}

	.no-js .site-header__bar {
		flex-wrap: wrap;
	}

	.no-js .site-nav {
		position: static;
		order: 3;
		flex-basis: 100%;
		height: auto;
		padding-inline: 0;
	}

	.no-js .nav-toggle {
		display: none;
	}
}

/* Wide screens: a bar, with Services opening a list. */
@media (min-width: 64rem) {
	.site-logo__image {
		height: 2.25rem;
	}

	.nav-toggle {
		display: none;
	}

	.site-nav {
		margin-right: var(--space-5);
	}

	.site-nav__list {
		display: flex;
		align-items: center;
		gap: var(--space-6);
	}

	.site-nav__item {
		position: relative;
		display: flex;
		align-items: center;
	}

	.site-nav__link {
		font-size: 0.9375rem;
		font-weight: 500;
	}

	.js .submenu-toggle {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		width: 1.75rem;
		height: 2.75rem;
		padding: 0;
		border: 0;
		border-radius: var(--radius-sm);
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.submenu-toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}

	.submenu {
		position: absolute;
		top: 100%;
		left: calc(var(--space-4) * -1);
		display: none;
		min-width: 18rem;
		padding: var(--space-2) var(--space-4);
		background: var(--color-surface);
		border: 1px solid var(--color-border);
		border-radius: var(--radius-lg);
		box-shadow: var(--shadow-raised);
	}

	/* Opens on hover, on keyboard focus, and when its button is pressed. The
	   first two also work without JavaScript. */
	.has-submenu:hover > .submenu,
	.has-submenu:focus-within > .submenu,
	.has-submenu.is-open > .submenu {
		display: block;
	}
}

/* 6. Footer --------------------------------------------------------------- */

.site-footer {
	padding-block: var(--space-8) var(--space-5);
	background: var(--color-navy);
	color: var(--color-on-navy-muted);
	font-size: var(--text-small);
	line-height: 1.5;
}

.site-footer a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	color: var(--color-surface);
	text-decoration: none;
}

.site-footer a:hover {
	color: var(--color-mint);
	text-decoration: underline;
}

.site-footer ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__grid {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 48rem) {
	.site-footer__grid {
		grid-template-columns: 1.6fr 1.2fr 0.8fr 1.4fr;
	}
}

.site-footer__logo {
	display: block;
	width: auto;
	height: 2.75rem;
	margin-bottom: var(--space-4);
}

.site-footer__heading {
	margin-bottom: var(--space-1);
	color: var(--color-surface);
	font-family: var(--font-body);
	font-size: var(--text-small);
	font-weight: 600;
	letter-spacing: 0;
}

.site-footer__contact li:not(:has(a)) {
	padding-block: var(--space-3);
}

.site-footer__social {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-4);
}

.site-footer__base {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-2) var(--space-5);
	margin-top: var(--space-6);
	padding-top: var(--space-5);
	border-top: 1px solid var(--color-navy-line);
}

.site-footer__base p {
	margin: 0;
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0 var(--space-5);
}

/* 7. Case studies --------------------------------------------------------- */

.case-hero {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 64rem) {
	.case-hero {
		grid-template-columns: 7fr 5fr;
		gap: var(--space-7);
		align-items: start;
	}
}

/* The main screenshot sits on the navy hero in a darker frame. */
.hero .shot {
	margin-top: var(--space-6);
	padding: 0;
	border-radius: var(--radius-md);
	background: none;
	box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.hero .shot__frame {
	border-top-color: var(--color-navy-line);
	border-radius: var(--radius-md);
	box-shadow: none;
}

.facts {
	margin: 0;
	padding: var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
	font-size: var(--text-small);
}

@media (min-width: 48rem) {
	.facts {
		padding: var(--space-5);
	}
}

.facts__row {
	display: grid;
	grid-template-columns: 6.5rem 1fr;
	gap: var(--space-3);
	padding-block: var(--space-2);
}

.facts__row + .facts__row {
	border-top: 1px solid var(--color-border);
}

.facts dt {
	color: var(--color-muted);
}

.facts dd {
	margin: 0;
	font-weight: 500;
}

.checklist {
	padding: 0;
	list-style: none;
}

.checklist li {
	position: relative;
	margin-top: var(--space-3);
	padding-left: 2rem;
}

.checklist li::before {
	content: "";
	position: absolute;
	top: 0.2em;
	left: 0;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--color-teal-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5.5 10.5l3 3 6-7' fill='none' stroke='%230F766E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.screenshot-grid {
	display: grid;
	gap: var(--space-5);
}

@media (min-width: 48rem) {
	.screenshot-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

.screenshot {
	margin: 0;
}

.screenshot__caption {
	margin-top: var(--space-2);
	color: var(--color-muted);
	font-size: var(--text-small);
}

.result-grid {
	display: grid;
	gap: var(--space-4);
	margin: 0 0 var(--space-6);
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.result-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.result-grid li {
	padding: var(--space-4);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-surface);
	font-weight: 500;
}

.testimonial {
	margin: var(--space-7) 0 0;
	text-align: center;
}

.testimonial blockquote {
	max-width: 22em;
	margin: 0 auto;
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 600;
	line-height: 1.3;
	letter-spacing: -0.02em;
}

.testimonial blockquote p:last-child {
	margin-bottom: 0;
}

.testimonial figcaption {
	margin-top: var(--space-4);
	color: var(--color-muted);
	font-size: var(--text-small);
}

@media (min-width: 48rem) {
	.testimonial blockquote {
		font-size: 2.125rem;
	}
}

.next-project {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding: var(--space-5);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	background: var(--color-surface);
	box-shadow: var(--shadow-card);
	transition: box-shadow var(--transition);
}

.next-project:hover,
.next-project:focus-within {
	box-shadow: var(--shadow-raised);
}

.next-project__title {
	margin: 0 0 var(--space-1);
	font-size: var(--text-h3);
}

.next-project__title a {
	color: inherit;
	text-decoration: none;
}

.next-project__title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.next-project:hover .next-project__title a {
	color: var(--color-teal);
}

.next-project p {
	margin: 0;
}

.next-project svg {
	flex: none;
	color: var(--color-teal);
}

/* The page behind the open small-screen menu does not scroll. */
.has-open-menu,
.has-open-menu body {
	overflow: hidden;
}

.section--flush-top {
	padding-top: 0;
}

/* 8. Page sections -------------------------------------------------------- */

.h3 { font-family: var(--font-heading); font-size: var(--text-h3); font-weight: 700; line-height: var(--leading-h3); letter-spacing: -0.02em; }
.h4 { font-family: var(--font-body); font-size: var(--text-h4); font-weight: 600; line-height: var(--leading-h4); letter-spacing: 0; }

.small {
	font-size: var(--text-small);
	line-height: 1.5;
	color: var(--color-muted);
}

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

/* A section heading may finish in grey (large text only: 4.1 : 1). */
.heading-soft {
	color: var(--color-field-border);
}

.section > .container > h2 {
	margin-bottom: var(--space-6);
}

.section-note {
	margin: var(--space-5) 0 0;
}

.icon {
	display: block;
	margin-bottom: var(--space-4);
	color: var(--color-teal);
}

.text-link {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
	font-weight: 600;
	text-decoration: underline;
}

.on-navy .text-link {
	color: var(--color-mint);
}

.price {
	color: var(--color-navy);
	font-weight: 600;
	font-variant-numeric: tabular-nums;
}

.grid {
	display: grid;
	gap: var(--space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 48rem) {
	.grid {
		gap: var(--space-5);
	}

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

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

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

.split {
	display: grid;
	gap: var(--space-6);
}

@media (min-width: 64rem) {
	.split {
		grid-template-columns: 7fr 5fr;
		gap: var(--space-7);
		align-items: center;
	}

	.split--top {
		align-items: start;
	}
}

/* Services and "why us": no card, a navy rule above. */
.hairline {
	padding-top: var(--space-5);
	border-top: 1px solid var(--color-navy);
}

.hairline > :last-child {
	margin-bottom: 0;
}

/* Five services: Web and System Development lead at one and a half width. */
@media (min-width: 48rem) {
	.service-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 64rem) {
	.service-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr));
	}

	.service-grid > * {
		grid-column: span 2;
	}

	.service-grid > :nth-child(-n+2) {
		grid-column: span 3;
	}
}

.card--plain:hover {
	box-shadow: var(--shadow-card);
}

.card--plain .card__body > :last-child {
	margin-bottom: 0;
}

/* Home hero */
.hero__buttons {
	margin-top: var(--space-6);
}

.hero__scene {
	position: relative;
	margin-top: var(--space-7);
}

/* The lighter circle behind the devices (Design System 13). */
.hero__scene::before {
	content: "";
	position: absolute;
	top: -6%;
	right: 6%;
	left: 12%;
	aspect-ratio: 1;
	border-radius: 50%;
	background: var(--color-navy-raised);
}

.hero__scene img {
	position: relative;
	display: block;
	width: 100%;
}

@media (min-width: 64rem) {
	.hero--service h1 {
		font-size: 4.5rem;
	}

	.hero--home .split {
		grid-template-columns: 1fr 1fr;
		gap: 3.5rem;
	}

	.hero__scene {
		margin-top: 0;
	}
}

/* Price panel: a light card on the navy hero. */
.price-panel .card__body {
	gap: var(--space-4);
}

.price-panel p {
	margin: 0;
}

.price-list {
	display: grid;
	gap: var(--space-3);
	margin: 0;
}

.price-list > div {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--space-1) var(--space-4);
}

.price-list dd {
	margin: 0;
}

.price-panel__alt {
	text-align: center;
}

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

.button--small {
	min-height: 2.75rem;
	padding-inline: var(--space-4);
	font-size: 0.875rem;
	white-space: nowrap;
}

/* Featured work on Home: navy, large screenshots, no card chrome. */
.showcase {
	background: var(--color-navy);
	color: var(--color-on-navy-muted);
}

.showcase h2,
.showcase .card__title {
	color: var(--color-surface);
}

.showcase__grid {
	margin-block: var(--space-6) var(--space-5);
}

@media (min-width: 64rem) {
	.showcase__grid {
		gap: var(--space-7) 2.5rem;
	}
}

.showcase .card,
.showcase .card:hover,
.showcase .card:focus-within {
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	overflow: visible;
}

.showcase .card > .shot {
	border-radius: var(--radius-lg);
	background: var(--color-navy-raised);
}

.showcase .shot__frame {
	border-top-color: var(--color-navy-line);
}

.showcase .card__body {
	padding: 1.125rem 0 var(--space-2);
}

.showcase .card__meta {
	color: var(--color-on-navy-muted);
}

.showcase .card:hover .card__link {
	color: var(--color-mint);
}

.showcase .tag {
	border: 1px solid var(--color-navy-line);
	background: none;
	color: var(--color-mint);
}

/* Client names, one colour, equal height. */
.eyebrow--centred {
	margin-bottom: var(--space-4);
	font-family: var(--font-body);
	text-align: center;
}

.client-strip {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: var(--space-4);
	margin: 0;
	padding: 0;
	list-style: none;
}

.client-strip li {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 3.5rem;
	color: var(--color-muted);
	font-family: var(--font-heading);
	font-size: 1.0625rem;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-align: center;
}

@media (min-width: 48rem) {
	.client-strip {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* Process steps: teal numerals above a hairline. */
.steps {
	counter-reset: step;
}

.steps li {
	counter-increment: step;
	padding-top: var(--space-5);
	border-top: 1px solid var(--color-border);
}

.steps li::before {
	content: counter(step, decimal-leading-zero);
	display: block;
	margin-bottom: 0.625rem;
	color: var(--color-teal);
	font-family: var(--font-heading);
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.03em;
}

.steps h3 {
	margin-bottom: var(--space-2);
}

.steps p {
	margin: 0;
}

/* Questions: a hairline list, native <details>. */
.faq details {
	border-top: 1px solid var(--color-border);
}

.faq details:last-child {
	border-bottom: 1px solid var(--color-border);
}

.faq summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	padding-block: var(--space-5);
	color: var(--color-navy);
	font-family: var(--font-heading);
	font-size: 1.125rem;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -0.01em;
	list-style: none;
	cursor: pointer;
}

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

.faq summary::after {
	content: "+";
	flex: none;
	color: var(--color-teal);
	font-size: 1.5rem;
	font-weight: 400;
	line-height: 1;
}

.faq details[open] summary::after {
	content: "\2212";
}

.faq details p {
	margin: 0 0 var(--space-5);
}

@media (min-width: 48rem) {
	.faq summary {
		font-size: 1.25rem;
	}
}

.testimonial--flush {
	margin-top: 0;
}

.about-photo {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: cover;
	border-radius: var(--radius-lg);
}

/* 9. Contact and the enquiry form ----------------------------------------- */

.contact h1 {
	margin-top: var(--space-2);
}

.contact__layout {
	margin-top: var(--space-6);
}

.chat-card {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-3);
	height: auto;
	margin-bottom: var(--space-6);
	padding: var(--space-4);
}

.chat-card:hover {
	box-shadow: var(--shadow-card);
}

.chat-card h2,
.chat-card p {
	margin: 0;
}

.contact__panel {
	height: auto;
}

.contact__panel:hover {
	box-shadow: var(--shadow-card);
}

@media (min-width: 64rem) {
	.contact__panel {
		position: sticky;
		top: calc(var(--header-height) + var(--space-5));
	}
}

.facts--bare {
	padding: 0;
	border: 0;
	box-shadow: none;
}

.facts--bare .facts__row {
	grid-template-columns: 5.25rem 1fr;
}

.facts dd {
	min-width: 0;
	overflow-wrap: anywhere;
}

.form__grid {
	display: grid;
	gap: var(--space-5);
}

@media (min-width: 48rem) {
	.form__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.field--wide {
		grid-column: 1 / -1;
	}
}

.field label {
	display: block;
	margin-bottom: var(--space-2);
	font-size: var(--text-small);
	font-weight: 600;
}

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

.field input:not([type="checkbox"]),
.field select,
.field textarea {
	display: block;
	width: 100%;
	min-height: var(--control-height);
	padding: 0 var(--space-4);
	border: 1.5px solid var(--color-field-border);
	border-radius: var(--radius-md);
	background: var(--color-surface);
	color: var(--color-ink);
	font: inherit;
	/* Never under 16 px, or iOS zooms the page when the field is tapped. */
	font-size: 1rem;
}

.field textarea {
	min-height: 10rem;
	padding-block: var(--space-3);
	resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
	border-color: var(--color-teal);
}

.field ::placeholder {
	color: var(--color-muted);
	opacity: 1;
}

.field__help,
.field__count,
.field__error {
	margin: var(--space-2) 0 0;
	font-size: var(--text-small);
	line-height: 1.5;
}

.field__help,
.field__count {
	color: var(--color-muted);
}

.field__count {
	text-align: right;
}

.field__count.is-over,
.field__error {
	color: var(--color-error);
}

/* Status is never shown by colour alone: the message has a mark and text. */
.field__error::before {
	content: "! ";
	font-weight: 700;
}

.field--error input:not([type="checkbox"]),
.field--error select,
.field--error textarea {
	border: 2px solid var(--color-error);
}

.field--consent {
	margin-top: var(--space-5);
}

.field--consent label {
	display: flex;
	align-items: flex-start;
	gap: var(--space-3);
	margin: 0;
	font-weight: 400;
	cursor: pointer;
}

.field--consent input {
	flex: none;
	width: 1.5rem;
	height: 1.5rem;
	margin: 0;
	accent-color: var(--color-teal);
}

.form__submit {
	width: 100%;
	max-width: 20rem;
	margin-top: var(--space-5);
}

/* Off-screen, not display:none, so simple scripts still fill it in. */
.form__trap {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.notice {
	margin-bottom: var(--space-5);
	padding: var(--space-4) var(--space-5);
	border-left: 4px solid;
	border-radius: var(--radius-md);
}

.notice > :last-child {
	margin-bottom: 0;
}

.notice--success { background: var(--color-success-bg); border-color: var(--color-success); }
.notice--success h2 { color: var(--color-success); }
.notice--warning { background: var(--color-warning-bg); border-color: var(--color-warning); color: var(--color-warning); }
.notice--error { background: var(--color-error-bg); border-color: var(--color-error); color: var(--color-error); }

/* 10. Floating WhatsApp button -------------------------------------------- */

.whatsapp-button {
	position: fixed;
	right: var(--space-4);
	bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	z-index: 40;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: var(--radius-pill);
	background: var(--color-whatsapp);
	color: var(--color-surface);
	box-shadow: var(--shadow-raised);
}

.whatsapp-button:hover {
	color: var(--color-surface);
}

.whatsapp-button__label {
	position: absolute;
	right: calc(100% + var(--space-2));
	padding: var(--space-1) var(--space-3);
	border-radius: var(--radius-sm);
	background: var(--color-navy);
	color: var(--color-surface);
	font-size: var(--text-small);
	font-weight: 600;
	white-space: nowrap;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--transition);
}

@media (min-width: 64rem) {
	.whatsapp-button:hover .whatsapp-button__label,
	.whatsapp-button:focus-visible .whatsapp-button__label {
		opacity: 1;
	}
}

@media (min-width: 48rem) {
	.whatsapp-button {
		right: var(--space-5);
		bottom: var(--space-5);
	}
}

/* Hidden while the small-screen menu is open, and on Contact under 768 px,
   where the "Prefer to chat?" card replaces it. */
.has-open-menu .whatsapp-button {
	display: none;
}

@media (max-width: 47.98rem) {
	.contact-page .whatsapp-button {
		display: none;
	}

	/* The last footer links stay clear of the button. */
	.site-footer {
		padding-bottom: 6.5rem;
	}
}

@media (min-width: 48rem) {
	.contact-page .site-main {
		padding-bottom: 5.5rem;
	}
}

/* Desktop header: the navigation sits centred between the logo and the button. */
@media (min-width: 64rem) {
	.site-logo {
		margin-right: 0;
	}

	.site-nav {
		margin-inline: auto;
	}
}

/* A panel beside text is as tall as its own content, not the row. */
.price-panel,
.split > .facts {
	height: auto;
}

/* The legal line reads as one run from the left and stays clear of the
   floating WhatsApp button at the bottom right. */
.site-footer__base {
	justify-content: flex-start;
}

@media (min-width: 48rem) {
	.site-footer__base {
		padding-right: 5rem;
	}
}

/* In cards, the icon sits on a 48 px teal-tint square (Design System 8.2). */
.card--plain .icon {
	width: 3rem;
	height: 3rem;
	padding: 0.75rem;
	border-radius: 10px;
	background: var(--color-teal-tint);
}

/* 11. Case study details and the cookie notice ----------------------------- */

.button__icon {
	margin-left: var(--space-2);
}

.anonymised-note {
	margin: var(--space-5) 0 0;
}

/* A phone screenshot is shown whole and centred on the tint, never cropped. */
.screenshot--portrait .shot {
	justify-content: center;
	padding-bottom: 20px;
}

.screenshot--portrait .shot__frame {
	width: auto;
	border: 0;
	border-radius: 8px;
}

.screenshot--portrait .shot img {
	width: auto;
	object-fit: contain;
}

.link-button {
	min-height: 2.75rem;
	padding: 0;
	border: 0;
	background: none;
	color: var(--color-surface);
	font: inherit;
	cursor: pointer;
}

.link-button:hover {
	color: var(--color-mint);
	text-decoration: underline;
}

.cookie-notice {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 60;
	padding: var(--space-4);
	padding-bottom: calc(var(--space-4) + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--color-border);
	background: var(--color-surface);
	box-shadow: var(--shadow-raised);
	font-size: var(--text-small);
	line-height: 1.5;
}

.cookie-notice p {
	margin: 0 0 var(--space-3);
}

/* Two buttons of equal size and weight: declining is as easy as accepting. */
.cookie-notice__buttons {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-3);
}

.cookie-notice[hidden] {
	display: none;
}

/* The WhatsApp button moves up so both stay fully visible and tappable. */
.whatsapp-button {
	margin-bottom: calc(var(--cookie-notice-height, 0px) + 0px);
}

@media (min-width: 64rem) {
	.cookie-notice {
		right: auto;
		bottom: var(--space-5);
		left: var(--space-5);
		width: 30rem;
		padding: var(--space-5);
		border: 1px solid var(--color-border);
		border-radius: var(--radius-lg);
	}

	/* On wide screens the notice is a card at the bottom left, clear of the button. */
	.whatsapp-button {
		margin-bottom: 0;
	}
}

.shot__placeholder {
	display: block;
	width: 100%;
	height: 100%;
}

/* 12. Motion (Design System section 14) ------------------------------------
 *
 * One orchestrated moment when Home loads, feedback wherever the visitor acts,
 * and one reveal on scroll. Only transform and opacity move; colour, border
 * and shadow change for states. Load animations are written as a `from`
 * keyframe alone, so an element that does not animate is simply in its final
 * state. The hero headline, lead and artwork are never transparent.
 */

/* 12.1 The Home hero */

@keyframes hero-settle { from { transform: translateY(var(--motion-rise-lg)) scale(0.94); } }
@keyframes hero-circle { from { transform: scale(0.5); opacity: 0; } }
@keyframes hero-dot    { from { transform: scale(0); } }
@keyframes hero-accent { from { color: #ffffff; } }
@keyframes hero-rise   { from { transform: translateY(var(--motion-rise)); opacity: 0; } }

.hero--home .hero__scene img {
	animation: hero-settle var(--motion-hero) var(--ease-hero) 100ms both;
}

.hero--home .hero__scene::before {
	animation: hero-circle var(--motion-hero) var(--ease-hero) 200ms both;
}

.hero--home .eyebrow::before {
	animation: hero-dot var(--motion-panel) var(--ease-out) 300ms both;
}

.hero--home h1 em {
	animation: hero-accent var(--motion-enter) var(--ease-in-out) 500ms both;
}

.hero--home .hero__buttons .button {
	animation: hero-rise var(--motion-enter) var(--ease-out) 620ms both;
}

.hero--home .hero__buttons .button + .button {
	animation-delay: 700ms;
}

/* Inner pages: only the accent phrase lights up. */
.hero:not(.hero--home) h1 em {
	animation: hero-accent var(--motion-enter) var(--ease-in-out) 120ms both;
}

/* 12.2 Buttons, links, cards, fields */

.button {
	transition: background-color var(--motion-base) var(--ease-out), border-color var(--motion-base) var(--ease-out), color var(--motion-base) var(--ease-out), transform var(--motion-fast) var(--ease-out);
}

.button:active {
	transform: scale(0.98);
}

.text-link,
.prose a,
.breadcrumb a {
	text-decoration-thickness: 1px;
	transition: color var(--motion-base) var(--ease-out), text-decoration-thickness var(--motion-base) var(--ease-out);
}

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

/* Only cards that are links react. */
.card,
.card:hover,
.card:focus-within {
	box-shadow: var(--shadow-card);
}

.card {
	transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}

.card:has(.card__link):hover,
.card:has(.card__link):focus-within {
	box-shadow: var(--shadow-raised);
	transform: translateY(-2px);
}

.card--cta,
.card--cta:hover,
.showcase .card,
.showcase .card:hover,
.showcase .card:focus-within {
	box-shadow: none;
}

.card__link {
	transition: color var(--motion-base) var(--ease-out);
}

.card:focus-within .card__link {
	color: var(--color-teal);
}

.showcase .card:focus-within .card__link {
	color: var(--color-mint);
}

/* The screenshot grows a little inside its frame, which clips it. */
.card .shot img,
.card .shot__placeholder {
	transition: transform var(--motion-enter) var(--ease-out);
}

.card:has(.card__link):hover .shot img,
.card:has(.card__link):focus-within .shot img,
.card:has(.card__link):hover .shot__placeholder,
.card:has(.card__link):focus-within .shot__placeholder {
	transform: scale(1.03);
}

.next-project {
	transition: transform var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}

.next-project:hover,
.next-project:focus-within {
	transform: translateY(-2px);
}

.field input,
.field select,
.field textarea {
	transition: border-color var(--motion-fast) var(--ease-out);
}

/* The focus outline itself always appears at once. */
:focus-visible {
	transition: none;
}

@keyframes message-in { from { transform: translateY(-4px); opacity: 0; } }
@keyframes panel-in   { from { transform: translateY(var(--motion-rise-sm)); opacity: 0; } }
@keyframes spin       { to { transform: rotate(360deg); } }

.field__error {
	animation: message-in var(--motion-base) var(--ease-out) both;
}

.notice--success {
	animation: panel-in var(--motion-panel) var(--ease-out) both;
}

.form__submit.is-sending {
	cursor: progress;
	opacity: 0.85;
}

.form__submit.is-sending::before {
	content: "";
	width: 1rem;
	height: 1rem;
	margin-right: var(--space-2);
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin 700ms linear infinite;
}

/* 12.3 Header: transparent to white, and the two logos cross-fade */

.site-header {
	transition: background-color var(--motion-base) var(--ease-out), border-color var(--motion-base) var(--ease-out), box-shadow var(--motion-base) var(--ease-out);
}

.site-logo {
	display: inline-grid;
}

.site-logo__image {
	grid-area: 1 / 1;
	align-self: center;
	transition: opacity var(--motion-base) var(--ease-out);
}

.site-logo__image--reversed,
.js .is-over-hero .site-logo__image--default {
	display: block;
	opacity: 0;
}

.js .is-over-hero .site-logo__image--reversed {
	opacity: 1;
}

.site-nav__link,
.submenu__link,
.nav-toggle,
.site-header__cta {
	transition: color var(--motion-base) var(--ease-out), background-color var(--motion-base) var(--ease-out);
}

/* 12.4 Menu button: three lines turn into a cross */

.nav-toggle__line {
	transform-origin: 12px 12px;
	transition: transform var(--motion-base) var(--ease-in-out), opacity var(--motion-base) var(--ease-in-out);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(1) { transform: rotate(45deg) translateY(6px); }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__line:nth-child(3) { transform: rotate(-45deg) translateY(-6px); }

/* 12.5 Small-screen menu: the panel drops in, then its links rise one by one.
   Closed, it is invisible and cannot be reached by keyboard or pointer. */

@keyframes menu-item { from { transform: translateY(var(--motion-rise-sm)); opacity: 0; } }

@media (max-width: 63.98rem) {
	.js .site-nav {
		display: block;
		visibility: hidden;
		opacity: 0;
		transform: translateY(calc(-1 * var(--motion-rise-sm)));
		pointer-events: none;
		transition: opacity var(--motion-base) var(--ease-in), transform var(--motion-base) var(--ease-in), visibility 0s linear var(--motion-base);
	}

	.js .is-nav-open .site-nav {
		visibility: visible;
		opacity: 1;
		transform: none;
		pointer-events: auto;
		transition: opacity var(--motion-panel) var(--ease-out), transform var(--motion-panel) var(--ease-out);
	}

	.js .is-nav-open .site-nav__item {
		animation: menu-item var(--motion-panel) var(--ease-out) both;
	}

	.js .is-nav-open .site-nav__item:nth-child(2) { animation-delay: 40ms; }
	.js .is-nav-open .site-nav__item:nth-child(3) { animation-delay: 80ms; }
	.js .is-nav-open .site-nav__item:nth-child(4) { animation-delay: 120ms; }
}

/* 12.6 Services list on wide screens. Hover waits 80 ms, so passing over the
   menu on the way elsewhere does not open it. */

@media (min-width: 64rem) {
	.submenu {
		display: block;
		visibility: hidden;
		opacity: 0;
		transform: translateY(-4px);
		transition: opacity var(--motion-fast) var(--ease-in), transform var(--motion-fast) var(--ease-in), visibility 0s linear var(--motion-fast);
	}

	/* With JavaScript the list opens on hover or from its button, and Escape
	   closes it. Without JavaScript, keyboard focus opens it instead. */
	.has-submenu:hover > .submenu,
	.no-js .has-submenu:focus-within > .submenu,
	.has-submenu.is-open > .submenu {
		visibility: visible;
		opacity: 1;
		transform: none;
		transition: opacity var(--motion-base) var(--ease-out), transform var(--motion-base) var(--ease-out);
	}

	.has-submenu:hover:not(.is-open) > .submenu {
		transition-delay: 80ms;
	}

	.submenu-toggle svg {
		transition: transform var(--motion-base) var(--ease-out);
	}

	.has-submenu:hover .submenu-toggle svg,
	.submenu-toggle[aria-expanded="true"] svg {
		transform: rotate(180deg);
	}
}

/* 12.7 Questions: the plus turns into a cross; the answer's height opens
   smoothly where the browser can do it, and at once elsewhere. */

.faq summary::after,
.faq details[open] summary::after {
	content: "+";
	transition: transform var(--motion-panel) var(--ease-in-out);
}

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

@supports (interpolate-size: allow-keywords) {
	.faq {
		interpolate-size: allow-keywords;
	}

	.faq details::details-content {
		height: 0;
		overflow: hidden;
		transition: height var(--motion-panel) var(--ease-in-out), content-visibility var(--motion-panel) allow-discrete;
	}

	.faq details[open]::details-content {
		height: auto;
	}
}

/* 12.8 Cookie notice and WhatsApp button */

.cookie-notice {
	opacity: 0;
	transform: translateY(var(--motion-rise));
	transition: opacity var(--motion-base) var(--ease-in), transform var(--motion-base) var(--ease-in);
}

.cookie-notice.is-in {
	opacity: 1;
	transform: none;
	transition: opacity var(--motion-panel) var(--ease-out), transform var(--motion-panel) var(--ease-out);
}

@keyframes whatsapp-in { from { transform: scale(0.8); opacity: 0; } }

/* The button moves clear of the cookie notice with transform, not margin. */
.whatsapp-button {
	margin-bottom: 0;
	transform: translateY(calc(-1 * var(--cookie-notice-height, 0px)));
	transition: transform var(--motion-panel) var(--ease-out);
	animation: whatsapp-in var(--motion-panel) var(--ease-out) 1s both;
}

@media (min-width: 64rem) {
	.whatsapp-button {
		transform: none;
	}

	.whatsapp-button__label {
		transform: translateX(var(--motion-rise-sm));
		transition: opacity var(--motion-panel) var(--ease-out), transform var(--motion-panel) var(--ease-out);
	}

	.whatsapp-button:hover .whatsapp-button__label,
	.whatsapp-button:focus-visible .whatsapp-button__label {
		transform: none;
	}
}

/* 12.9 Reveal on scroll: Recent work on Home only. Hidden only once the
   script that will reveal it is running. */

.reveal {
	transition: opacity var(--motion-enter) var(--ease-out), transform var(--motion-enter) var(--ease-out);
	transition-delay: calc(var(--reveal-order, 0) * var(--motion-stagger));
}

.reveal-ready .reveal:not(.is-in) {
	opacity: 0;
	transform: translateY(var(--motion-rise));
}

/* 12.10 Reduced motion: nothing moves and nothing is missing. Colours still
   change on hover and focus, at once. */

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation: none !important;
		transition: none !important;
		scroll-behavior: auto !important;
	}

	.reveal-ready .reveal:not(.is-in) {
		opacity: 1;
		transform: none;
	}
}

/* Long-form pages (Privacy Policy, Terms of Use): sub-headings and tables. */
.prose h3 {
	margin-top: var(--space-6);
	font-family: var(--font-body);
	font-size: var(--text-h4);
	font-weight: 600;
	letter-spacing: 0;
}

.prose table {
	width: 100%;
	margin-bottom: var(--space-5);
	border-collapse: collapse;
	font-size: var(--text-small);
}

.prose th,
.prose td {
	padding: var(--space-3) var(--space-4) var(--space-3) 0;
	border-bottom: 1px solid var(--color-border);
	text-align: left;
	vertical-align: top;
}

.prose th {
	color: var(--color-navy);
	font-weight: 600;
}

/* Stand-alone links in the contact panel get a full-height tap target. */
.facts--bare dd a {
	display: inline-flex;
	align-items: center;
	min-height: 2.75rem;
}

.facts--bare .facts__row {
	align-items: center;
}
