/* ==========================================================================
   Layout
   Containers, section rhythm, and the header and footer shells.
   ========================================================================== */

/* --- Container ------------------------------------------------------------ */

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

/* --- Sections ------------------------------------------------------------- */

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

.section--tint {
	background: var(--surface-2);
}

.site-main {
	display: block;
}

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

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgb(255 255 255 / 0.9);
	-webkit-backdrop-filter: saturate(1.5) blur(16px);
	backdrop-filter: saturate(1.5) blur(16px);
	border-bottom: 1px solid transparent;
	transition: border-color var(--dur-2) ease, box-shadow var(--dur-2) ease, background-color var(--dur-2) ease;
}

.site-header.is-scrolled,
.site-header.has-panel-open {
	background: rgb(255 255 255 / 0.97);
	border-bottom-color: var(--line);
	box-shadow: 0 12px 32px -24px rgb(15 26 18 / 0.28);
}

.admin-bar .site-header {
	top: 32px;
}

@media (max-width: 782px) {
	.admin-bar .site-header {
		top: 46px;
	}
}

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

.site-header__brand {
	flex: 0 0 auto;
}

.site-header__brand .brand__img,
.site-header__brand .custom-logo {
	width: auto;
	height: 40px;
}

/* The logo file is transparent (made from the client's PNG, whose #FEFEFE
   ground showed as a pale box over the header's blurred backdrop; the
   original is kept in client-assets/logo/). No blending needed. */

.site-header__actions {
	display: flex;
	align-items: center;
	gap: var(--space-2);
	margin-left: auto;
}

@media (min-width: 1200px) {
	.site-header__bar {
		gap: var(--space-6);
	}

	.site-header__brand .brand__img,
	.site-header__brand .custom-logo {
		height: 44px;
	}

	.site-header__actions {
		margin-left: 0;
	}
}

/* --- Footer shell ---------------------------------------------------------- */

.site-footer {
	position: relative;
	background: var(--brand-deep-quiet);
	color: rgb(255 255 255 / 0.8);
	font-size: var(--fs-sm);
	isolation: isolate;
}

.site-footer::before {
	content: "";
	position: absolute;
	inset: 0 0 auto;
	height: 1px;
	background: linear-gradient(90deg, rgb(106 185 55 / 0), rgb(106 185 55 / 0.7), rgb(106 185 55 / 0));
}

.site-footer__main {
	display: grid;
	gap: var(--space-7) var(--space-6);
	padding-block: clamp(4rem, 3rem + 3vw, 5.5rem) var(--space-8);
}

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

	.site-footer__brand {
		grid-column: 1 / -1;
	}
}

/* Tablet: "Visit us" takes a full row, address beside the map. */
@media (min-width: 720px) and (max-width: 1099px) {
	.site-footer__visit {
		display: grid;
		grid-column: 1 / -1;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
		column-gap: var(--space-6);
	}

	.site-footer__visit .site-footer__heading {
		grid-column: 1 / -1;
	}

	.site-footer__visit .site-footer__map {
		margin-top: 0;
	}
}

@media (min-width: 1100px) {
	.site-footer__main {
		grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr) minmax(0, 0.7fr) minmax(0, 1.3fr);
		gap: var(--space-6);
	}

	.site-footer__brand {
		grid-column: auto;
		padding-right: var(--space-6);
	}
}

/* Phones: the two short link lists sit side by side. */
@media (min-width: 360px) and (max-width: 719px) {
	.site-footer__main {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		column-gap: var(--space-5);
	}

	.site-footer__brand,
	.site-footer__visit {
		grid-column: 1 / -1;
	}
}
