/* Layout: a yellow banner header, overlapped by a blue frame holding the
   navigation tabs, a white content panel and the footer.
   Breakpoints: 48rem (two-column content), 64rem (horizontal navigation). */

@font-face {
	font-family: "Merriweather";
	font-style: italic;
	font-weight: 300;
	font-display: swap;
	src: url("/fonts/merriweather-latin-300-italic.woff2") format("woff2");
}

:root {
	--colour-page: #f7f1e2;
	--colour-text: #4c4c33;
	--colour-frame: #bce2eb;
	--colour-panel: #fff;
	--colour-link: #069;
	--colour-divider: #5e7176;
	--font-body: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-feature: "Merriweather", Georgia, serif;
	--gutter: clamp(0.75rem, 4vw, 3rem);
	--radius: 5px;
}

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

body {
	margin: 0;
	background: var(--colour-page);
	color: var(--colour-text);
	font-family: var(--font-body);
	line-height: 1.5;
	overflow-wrap: break-word;
}

a {
	color: var(--colour-link);
}

a:focus-visible,
button:focus-visible {
	outline: 2px solid var(--colour-link);
	outline-offset: 2px;
}

img {
	display: block;
	max-width: 100%;
	height: auto;
}

.skip-link {
	position: absolute;
	left: 1rem;
	top: -10rem;
	z-index: 1;
	padding: 0.5rem 1rem;
	background: var(--colour-panel);
}

.skip-link:focus {
	top: 1rem;
}

.wrapper {
	width: min(100% - 2 * var(--gutter), 72rem);
	margin-inline: auto;
}

/* Header */

.site-header {
	min-height: 12.5rem;
	padding-block: 1.5rem 6rem;
	background: #e8d36b url("/images/banner/banner-512.jpg") repeat;
}

@media (min-width: 32rem) {
	.site-header {
		background-image: url("/images/banner/banner-1024.jpg");
	}
}

.site-title {
	display: inline-block;
	color: inherit;
	text-decoration: none;
	font-weight: bold;
	line-height: 1.2;
}

.site-name {
	display: block;
	font-size: clamp(1.5rem, 5vw, 2rem);
}

.site-qualifications {
	font-size: 0.5em;
}

.site-role {
	display: block;
	font-size: clamp(1.15rem, 3.75vw, 1.5rem);
}

/* Frame, overlapping the bottom of the banner */

.frame {
	margin-top: -5rem;
	margin-bottom: 1.25rem;
	padding: 0.5rem var(--gutter) 1.5rem;
	background: var(--colour-frame);
	border-radius: var(--radius);
}

/* Navigation: a "Menu" button on small screens, tabs on larger ones */

.nav-toggle {
	display: none;
	width: 100%;
	align-items: center;
	justify-content: space-between;
	padding: 0.5rem 0.25rem;
	background: none;
	border: 0;
	color: var(--colour-text);
	font: inherit;
	cursor: pointer;
}

.nav-toggle-icon,
.nav-toggle-icon::before,
.nav-toggle-icon::after {
	display: block;
	width: 1.5rem;
	height: 2px;
	background: currentColor;
}

.nav-toggle-icon {
	position: relative;
}

.nav-toggle-icon::before,
.nav-toggle-icon::after {
	content: "";
	position: absolute;
	left: 0;
}

.nav-toggle-icon::before {
	top: -7px;
}

.nav-toggle-icon::after {
	top: 7px;
}

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

.nav-list a {
	display: block;
	padding: 0.45rem 1rem;
	text-decoration: none;
}

.nav-list a:hover {
	text-decoration: underline;
}

.nav-list a[aria-current="page"] {
	background: var(--colour-panel);
}

@media (max-width: 63.99rem) {
	.js .nav-toggle {
		display: flex;
	}

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

	.js .site-nav.is-open .nav-list {
		display: block;
		margin-bottom: 0.75rem;
	}

	.nav-list li + li {
		border-top: 1px solid var(--colour-divider);
	}

	.nav-list a[aria-current="page"] {
		border-radius: var(--radius);
	}
}

@media (min-width: 64rem) {
	/* Tabs always stay on one row; spare width goes between them */
	.nav-list {
		display: flex;
		justify-content: space-evenly;
	}

	.nav-list a {
		padding-inline: 0.875rem;
		white-space: nowrap;
		border-radius: 10px 10px 0 0;
	}
}

/* Content panel */

.panel {
	padding: clamp(1rem, 3vw, 2rem);
	background: var(--colour-panel);
	border-radius: var(--radius);
}

.content {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 2rem;
}

.prose {
	max-width: 42rem;
}

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

.page-heading {
	margin: 0 0 1em;
	font-size: 1.17rem;
	font-weight: normal;
}

.page-heading--feature {
	font-family: var(--font-feature);
	font-style: italic;
	font-weight: 300;
	font-size: 1.5rem;
}

.quote {
	margin: 1.25rem 0 0;
	font-family: var(--font-feature);
	font-style: italic;
	font-weight: 300;
	font-size: 1.3rem;
}

.quote blockquote {
	margin: 0;
}

.quote figcaption {
	margin-top: 0.75rem;
	text-align: right;
	font-family: var(--font-body);
	font-style: normal;
	font-size: 1.05rem;
}

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

.contact-list a {
	overflow-wrap: anywhere;
	text-decoration: none;
}

.section-heading {
	margin: 2em 0 0.75em;
	font-size: 1.1rem;
	font-weight: bold;
}

/* Contact form */

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

.contact-form {
	display: grid;
	gap: 1rem;
	max-width: 30rem;
}

.form-field {
	display: grid;
	gap: 0.3rem;
	margin: 0;
	padding: 0;
	border: 0;
}

.form-field legend {
	margin-bottom: 0.3rem;
	padding: 0;
}

.form-hint {
	font-size: 0.875rem;
}

.contact-form input:not([type="radio"]),
.contact-form textarea {
	width: 100%;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--colour-divider);
	border-radius: var(--radius);
	background: var(--colour-panel);
	color: inherit;
	font: inherit;
}

.contact-form textarea {
	resize: vertical;
}

.contact-form input:focus-visible,
.contact-form textarea:focus-visible {
	outline: 2px solid var(--colour-link);
	outline-offset: 1px;
}

.form-choice {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.form-choice input {
	width: 1.1rem;
	height: 1.1rem;
	margin: 0;
	accent-color: var(--colour-link);
}

.button {
	justify-self: start;
	padding: 0.6rem 1.25rem;
	border: 0;
	border-radius: var(--radius);
	background: var(--colour-link);
	color: #fff;
	font: inherit;
	cursor: pointer;
}

.button:hover {
	background: #005580;
}

.button:disabled {
	opacity: 0.6;
	cursor: wait;
}

.form-error {
	margin: 0;
	padding: 0.6rem 0.75rem;
	border-radius: var(--radius);
	background: #fbebeb;
	color: #8a1c1c;
}

.form-note {
	font-size: 0.875rem;
}

.aside img {
	border-radius: var(--radius);
}

.aside--map iframe {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	border: 0;
	border-radius: var(--radius);
}

@media (max-width: 47.99rem) {
	.aside--hide-small {
		display: none;
	}
}

/* Side images shrink with the column but never grow beyond their natural size */
@media (min-width: 48rem) {
	.content--with-aside {
		grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
		align-items: start;
	}

	.content--with-aside .aside {
		justify-self: end;
	}

	.content--with-aside:has(.aside--map) {
		grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	}

	.content--with-aside .aside--map {
		justify-self: stretch;
	}
}

/* Footer */

.site-footer {
	margin-top: 1.25rem;
}

.footer-logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 1.5rem 2.5rem;
}

.footer-logos img {
	width: auto;
	height: 100px;
}

.footer-meta p {
	margin: 1rem 0 0;
}

.footer-tagline {
	font-size: 1.17rem;
}

@media (max-width: 47.99rem) {
	.footer-logos {
		justify-content: flex-start;
	}

	.footer-logos img {
		height: 72px;
	}
}
