/* ==========================================================================
   Footer
   The only dark band on the site: deep green with cream text. Three quiet
   tiers: a slim enquiry line with one button, four columns (brand, menu,
   office, contact) in small type, and a bottom bar. Gold appears only as the
   hairline under the enquiry line. The logo keeps its colours on the same
   cream tab as the header.
   ========================================================================== */

.ph-footer {
	--ph-sec-muted: rgb(var(--ph-cream-rgb) / 0.7);
	--ph-sec-line: rgb(var(--ph-cream-rgb) / 0.12);

	padding-top: var(--ph-block-space);
	padding-bottom: var(--ph-space-m);
	background: var(--ph-deep);
	color: var(--ph-sec-muted);
	font-size: var(--ph-fs-body);
	line-height: 1.6;
}

.ph-footer :focus-visible {
	outline-color: var(--ph-cream);
}

/* Enquiry line
   ========================================================================== */

.ph-footer__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ph-space-s) var(--ph-space-l);
	padding-bottom: var(--ph-block-space);
	border-bottom: 1px solid rgb(var(--ph-gold-rgb) / 0.4);
}

.ph-footer__cta-text {
	max-width: 32ch;
	font-family: var(--ph-font-heading);
	font-size: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
	font-weight: var(--ph-fw-display);
	letter-spacing: -0.02em;
	line-height: 1.25;
	color: var(--ph-cream);
	text-wrap: balance;
}

.ph-button--footer {
	--ph-btn-bg: var(--ph-cream);
	--ph-btn-border: var(--ph-cream);
	--ph-btn-fg: var(--ph-deep);
}

.ph-button--footer:hover,
.ph-button--footer:focus-visible {
	--ph-btn-bg: transparent;
	--ph-btn-border: rgb(var(--ph-cream-rgb) / 0.6);
	--ph-btn-fg: var(--ph-cream);
}

/* Columns
   Mobile order: brand, office and contact, menu.
   ========================================================================== */

.ph-footer__main {
	display: grid;
	align-content: start;
	gap: var(--ph-space-l) var(--ph-space-m);
	padding-block: var(--ph-block-space);
}

.ph-footer__address {
	display: grid;
	align-content: start;
	gap: var(--ph-space-l) var(--ph-space-m);
	font-style: normal;
	order: 1;
}

.ph-footer__nav {
	order: 2;
}

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

	.ph-footer__address {
		grid-column: 1 / -1;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-columns: subgrid;
		order: 0;
	}

	.ph-footer__nav {
		order: 0;
	}
}

@media (min-width: 64rem) {
	.ph-footer__main {
		grid-template-columns: minmax(0, 4fr) minmax(0, 2fr) minmax(0, 3fr) minmax(0, 3fr);
		column-gap: var(--ph-space-l);
	}

	.ph-footer__address {
		grid-column: 3 / 5;
		grid-template-columns: repeat(2, minmax(0, 1fr));
		grid-template-columns: subgrid;
	}
}

/* Brand: logo on the cream tab, one short line beneath */

.ph-footer__brand {
	display: grid;
	align-content: start;
	justify-items: start;
	gap: var(--ph-space-s);
}

.ph-footer__logo {
	display: inline-block;
	padding: var(--ph-space-2xs) var(--ph-space-xs);
	border-radius: var(--ph-space-xs);
	background: var(--ph-cream);
}

.ph-footer__logo img {
	display: block;
	width: calc(var(--ph-logo-w) * 0.8);
	height: auto;
}

/* Column titles and lists */

.ph-footer__group {
	display: grid;
	align-content: start;
	gap: var(--ph-space-xs);
}

.ph-footer__label {
	font-family: var(--ph-font-heading);
	font-size: var(--ph-fs-nav);
	font-weight: var(--ph-fw-heading);
	line-height: 1.3;
	color: var(--ph-cream);
}

.ph-footer__menu {
	display: grid;
	justify-items: start;
	gap: var(--ph-space-2xs);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Links: muted at rest, cream on hover with a line that grows from the left
   ========================================================================== */

.ph-footer__link,
.ph-footer__menu a {
	position: relative;
	display: inline-block;
	color: inherit;
	text-decoration: none;
	overflow-wrap: anywhere;
	transition: color var(--ph-dur-base) var(--ph-ease-out);
}

.ph-footer__link::after,
.ph-footer__menu a::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform: scaleX(0);
	transform-origin: left center;
	transition: transform var(--ph-dur-slow) var(--ph-ease-out);
	pointer-events: none;
}

.ph-footer__link:hover,
.ph-footer__link:focus-visible,
.ph-footer__menu a:hover,
.ph-footer__menu a:focus-visible {
	color: var(--ph-cream);
}

.ph-footer__link:hover::after,
.ph-footer__link:focus-visible::after,
.ph-footer__menu a:hover::after,
.ph-footer__menu a:focus-visible::after {
	transform: scaleX(1);
}

/* Bottom bar
   ========================================================================== */

.ph-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: var(--ph-space-2xs) var(--ph-space-m);
	padding-top: var(--ph-space-s);
	border-top: 1px solid var(--ph-sec-line);
	color: rgb(var(--ph-cream-rgb) / 0.55);
}

@media (prefers-reduced-motion: reduce) {
	.ph-footer__link::after,
	.ph-footer__menu a::after {
		transition: none;
	}
}
