/*
 * Footer — certificate strip and site footer.
 * Design: CertStrip / Footer in src-v2/footer.jsx, MFooter in src-v2/mobile.jsx.
 *
 * Tokens and the .wrap, .eyebrow, .btn, .iconbtn atoms come from global.css;
 * only footer-specific layout lives here. The phone breakpoint (680px) must
 * stay in step with the one in footer.js.
 */

/* ---------------------------------------------------- Cert strip ---- */

.fmt-certs {
	background: var(--paper);
	border-top: 1px solid var(--line);
	padding: 40px 0 32px;
}

.fmt-certs__inner {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.fmt-certs__title {
	margin: 0;
	text-align: center;
}

.fmt-certs__logos {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 48px;
	justify-content: center;
}

/* --h is the design height, set per logo in template-parts/footer/certs.php. */
.fmt-certs__logo {
	height: var(--h);
	opacity: .92;
	width: auto;
}

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

.fmt-footer {
	background: var(--ink-2);
	color: rgba(255, 255, 255, .78);
	padding: 80px 0 28px;
}

/* Swapped pairs: the phone design words a few things differently. */
.fmt-footer__mobile {
	display: none;
}

.fmt-footer a:not(.btn):not(.iconbtn) {
	transition: color .15s ease;
}

.fmt-footer a[href]:not(.btn):not(.iconbtn):hover {
	color: #fff;
}

/* Small uppercase labels — card headings and column headings. */
.fmt-footer__label,
.fmt-footer__col-title {
	color: rgba(255, 255, 255, .5);
	font-size: 11px;
	letter-spacing: .15em;
	text-transform: uppercase;
}

/* ---------------------------------------------------------- Top ---- */

.fmt-footer__top {
	border-bottom: 1px solid rgba(255, 255, 255, .12);
	display: grid;
	gap: 48px;
	grid-template-columns: 560px 1fr;
	margin-bottom: 48px;
	padding-bottom: 48px;
}

.fmt-footer__brand {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 4px 0;
}

.fmt-footer__logo {
	align-self: flex-start;
}

.fmt-footer__logo img {
	height: 100px;
	max-width: none;
	width: auto;
}

.fmt-footer__claim {
	color: rgba(255, 255, 255, .72);
	font-size: 15px;
	line-height: 1.55;
	margin: 24px 0;
	max-width: 100%;
	width: 500px;
}

.fmt-footer__social {
	display: flex;
	gap: 8px;
}

.fmt-footer__card {
	align-content: center;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(255, 255, 255, .10);
	border-radius: 16px;
	display: grid;
	gap: 32px;
	grid-template-columns: 1fr 1fr;
	padding: 28px 32px;
}

.fmt-footer__label {
	margin-bottom: 14px;
}

.fmt-footer__phone {
	align-items: center;
	color: #fff;
	display: flex;
	font-size: 24px;
	font-weight: 500;
	gap: 10px;
	margin-bottom: 8px;
}

.fmt-footer__hours {
	color: rgba(255, 255, 255, .55);
	column-gap: 10px;
	display: grid;
	font-size: 12px;
	grid-template-columns: auto auto;
	justify-content: start;
	margin: 0 0 18px;
	row-gap: 2px;
}

.fmt-footer__hours dd {
	margin: 0;
}

.fmt-footer__mail {
	align-items: center;
	color: rgba(255, 255, 255, .85);
	display: flex;
	font-size: 14px;
	gap: 8px;
}

.fmt-footer__address {
	color: #fff;
	font-size: 15px;
	font-style: normal;
	line-height: 1.5;
	margin-bottom: 8px;
}

.fmt-footer__note {
	color: rgba(255, 255, 255, .55);
	font-size: 12px;
	margin: 0 0 4px;
}

.fmt-footer__note--last {
	margin-bottom: 14px;
}

.fmt-footer__cta {
	font-size: 13px;
	padding: 8px 14px;
}

/* ------------------------------------------------------ Columns ---- */

.fmt-footer__cols {
	display: grid;
	gap: 48px;
	grid-template-columns: repeat(4, 1fr);
	padding-bottom: 40px;
}

.fmt-footer__col-title {
	font-weight: 400;
	margin: 0 0 18px;
}

/* Plain text until footer.js enables it on phones. */
.fmt-footer__col-toggle {
	background: none;
	border: 0;
	color: inherit;
	cursor: default;
	font: inherit;
	letter-spacing: inherit;
	padding: 0;
	text-align: left;
	text-transform: inherit;
}

.fmt-footer__col-toggle .icon {
	display: none;
}

.fmt-footer__list {
	display: flex;
	flex-direction: column;
	font-size: 14px;
	gap: 10px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.fmt-footer__list a,
.fmt-footer__list span {
	color: rgba(255, 255, 255, .85);
}

/* ------------------------------------------------------- Bottom ---- */

.fmt-footer__bottom {
	border-top: 1px solid rgba(255, 255, 255, .12);
	color: rgba(255, 255, 255, .5);
	display: flex;
	font-size: 12px;
	gap: 24px;
	justify-content: space-between;
	padding-top: 24px;
}

.fmt-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}

/* style.css colours every link red; the row takes its own muted grey. */
.fmt-footer__legal a {
	color: inherit;
}

/* ------------------------------------------------------- Tablet ---- */

/*
 * The design is drawn at desktop and phone width only. In between, the fixed
 * 560px brand column gives way to a flexible one, and below 900px the brand
 * and the card stack.
 */
@media (max-width: 1100px) {
	.fmt-certs__logos {
		gap: 32px;
	}

	.fmt-footer__top {
		gap: 32px;
		grid-template-columns: minmax(0, 1fr) minmax(0, 1.5fr);
	}

	.fmt-footer__logo img {
		height: 80px;
	}

	.fmt-footer__claim {
		width: auto;
	}

	.fmt-footer__cols {
		gap: 32px;
	}
}

@media (max-width: 900px) {
	.fmt-certs__logo {
		height: calc(var(--h) * .85);
	}

	/* Six logos no longer fit one row; the phone design's four do. */
	.fmt-certs__logo--desktop {
		display: none;
	}

	.fmt-footer__top {
		grid-template-columns: 1fr;
	}

	.fmt-footer__cols {
		grid-template-columns: repeat(2, 1fr);
	}

	.fmt-footer__bottom {
		flex-direction: column;
		gap: 12px;
	}
}

/* -------------------------------------------------------- Phone ---- */

@media (max-width: 680px) {
	.fmt-footer__desktop {
		display: none;
	}

	.fmt-footer__mobile {
		display: inline;
	}

	/* Cert strip — the four logos in one row, scaled down together. */
	.fmt-certs {
		padding: 32px 0;
	}

	.fmt-certs__inner {
		gap: 20px;
	}

	.fmt-certs__logos {
		flex-wrap: nowrap;
		gap: 12px;
		justify-content: space-between;
	}

	.fmt-certs__logo {
		height: calc(var(--h) * .69);
		min-width: 0;
		object-fit: contain;
	}

	.fmt-footer {
		padding: 48px 0 24px;
	}

	/*
	 * Top — MFooter's "stacked" layout: logo and claim beside a vertical
	 * social column, then the card at full width. Its two halves stack: side
	 * by side they only fit the design's 390px frame with no room to spare.
	 */
	.fmt-footer__top {
		border-bottom: 0;
		gap: 18px;
		grid-template-columns: 1fr;
		margin-bottom: 32px;
		padding-bottom: 0;
	}

	.fmt-footer__brand {
		align-items: flex-end;
		flex-direction: row;
		gap: 20px;
		justify-content: flex-start;
		padding: 0;
	}

	.fmt-footer__intro {
		flex: 1 1 0;
		min-width: 0;
	}

	.fmt-footer__logo {
		display: block;
		margin-bottom: 16px;
	}

	.fmt-footer__logo img {
		height: 72px;
		max-width: 100%;
	}

	.fmt-footer__claim {
		font-size: 13px;
		margin: 0;
		width: auto;
	}

	.fmt-footer__social {
		flex-direction: column;
		margin-bottom: 18px;
	}

	.fmt-footer__card {
		border-radius: 14px;
		display: block;
		padding: 18px 16px;
	}

	.fmt-footer__card-col + .fmt-footer__card-col {
		margin-top: 14px;
	}

	.fmt-footer__label {
		font-size: 10px;
		letter-spacing: .14em;
		margin-bottom: 10px;
	}

	.fmt-footer__phone {
		font-size: 17px;
		gap: 8px;
	}

	.fmt-footer__phone .icon {
		height: 15px;
		width: 15px;
	}

	.fmt-footer__hours {
		column-gap: .35em;
		font-size: 11.5px;
		line-height: 1.6;
		margin-bottom: 0;
		row-gap: 0;
	}

	.fmt-footer__address {
		font-size: 13px;
		margin-bottom: 14px;
	}

	.fmt-footer__cta {
		font-size: 12.5px;
		justify-content: center;
		padding: 9px 14px;
		width: 100%;
	}

	/* Columns — a single-open accordion (footer.js). */
	.fmt-footer__cols {
		border-bottom: 1px solid rgba(255, 255, 255, .12);
		border-top: 1px solid rgba(255, 255, 255, .12);
		display: block;
		margin-bottom: 32px;
		padding-bottom: 0;
	}

	.fmt-footer__col + .fmt-footer__col {
		border-top: 1px solid rgba(255, 255, 255, .10);
	}

	.fmt-footer__col-title {
		color: rgba(255, 255, 255, .85);
		margin: 0;
	}

	.fmt-footer__col-toggle {
		align-items: center;
		display: flex;
		justify-content: space-between;
		padding: 16px 0;
		width: 100%;
	}

	.fmt-footer__col-toggle:not([disabled]) {
		cursor: pointer;
	}

	.fmt-footer__col-toggle .icon {
		color: rgba(255, 255, 255, .5);
		display: inline-block;
		transition: transform .2s ease;
	}

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

	.fmt-footer__list {
		gap: 12px;
		padding-bottom: 16px;
	}

	/*
	 * Collapsed only once footer.js has taken over; visibility keeps the links
	 * of a closed column out of the tab order.
	 */
	.fmt-js .fmt-footer__col-body {
		max-height: 0;
		opacity: 0;
		overflow: hidden;
		transition: max-height .3s ease, opacity .25s ease, visibility 0s linear .3s;
		visibility: hidden;
	}

	.fmt-js .fmt-footer__col.is-open .fmt-footer__col-body {
		max-height: 360px;
		opacity: 1;
		transition: max-height .3s ease, opacity .25s ease;
		visibility: visible;
	}

	.fmt-footer__bottom {
		border-top: 0;
		display: block;
		padding-top: 20px;
	}

	.fmt-footer__copy {
		margin-bottom: 12px;
	}

	.fmt-footer__legal {
		gap: 18px;
	}
}
