/*
 * Site footer — Figma "SAP Footer / Global" (CRH file CPO8VrN83OFQrdnEQ6hRGX,
 * 6338:74694: Desktop 6276:52962, Tablet 6338:74695, Mobile 6338:74822) and
 * its bottom line "Footer / Secure" (28356:53414).
 *
 * Served directly, like block CSS; bin/add-fallbacks.mjs generates the var()
 * fallbacks. Type metrics come from the composite classes in the markup
 * (.text-label-sm, .text-paragraph-sm, .text-paragraph-xs); this file is
 * color and layout only. Side padding is --section-hr-padding, which the
 * token layer already steps down per breakpoint (64 / 32 / 20px).
 */

.site-footer {
	background: var(--background, #ffffff);
	color: var(--muted-foreground, #666666);
}

.site-footer__inner {
	max-width: var(--container-max-width, 1440px);
	margin-inline: auto;
	padding: var(--spacing-10, 40px) var(--section-hr-padding, 64px) var(--spacing-7, 28px);
}

/* Logo wall ------------------------------------------------------------------ */

.site-footer__logos {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: var(--spacing-6, 24px) var(--spacing-8, 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Every logo fits the comp's largest box, whatever its proportions. */
.site-footer__logo img {
	display: block;
	width: auto;
	height: auto;
	max-width: 112px;
	max-height: 60px;
	object-fit: contain;
}

.site-footer__logo a,
.site-footer__logo a:hover {
	display: block;
	border-bottom-color: transparent;
}

/* Dividers ------------------------------------------------------------------- */

/* Figma: a 1px muted-foreground stroke at 20% opacity, 28px above and below. */
.site-footer__divider {
	height: 0;
	margin: var(--spacing-7, 28px) 0;
	border: 0;
	border-top: var(--border-width-1, 1px) solid var(--muted-foreground, #666666);
	opacity: 0.2;
}

/* Link columns --------------------------------------------------------------- */

.site-footer__columns {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--spacing-6, 24px);
}

.site-footer__column {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-2, 8px);
	min-width: 128px;
}

.site-footer__heading {
	margin: 0;
	padding-bottom: var(--spacing-2, 8px);
	color: var(--foreground, #666666);
}

.site-footer__lines {
	display: flex;
	flex-direction: column;
	gap: var(--spacing-2, 8px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Links read as the surrounding copy; the global link rule adds the hover
   underline in the same color. */
.site-footer__link {
	color: var(--muted-foreground, #666666);
}

/* Disclaimer ----------------------------------------------------------------- */

.site-footer__disclaimer {
	max-width: 600px;
	margin-inline: auto;
	text-align: center;
}

.site-footer__disclaimer p {
	margin: 0;
}

/* The comp separates the two paragraphs with one empty line of the same size. */
.site-footer__disclaimer p + p {
	margin-top: 1.2em;
}

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

.site-footer__bottom {
	max-width: var(--container-max-width, 1440px);
	margin-inline: auto;
	padding: var(--spacing-4, 16px) var(--section-hr-padding, 64px);
}

.site-footer__legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--spacing-4, 16px);
}

.site-footer__legal p {
	margin: 0;
}

/* Mobile --------------------------------------------------------------------- */

@media (max-width: 767px) {
	.site-footer__logos {
		gap: var(--spacing-6, 24px);
	}

	.site-footer__logo img {
		max-width: 88px;
		max-height: 45px;
	}

	.site-footer__columns {
		flex-direction: column;
	}

	.site-footer__disclaimer {
		max-width: none;
	}
}

/* Milestone ---------------------------------------------------------------------
   Live Divi footer (milestonetn.com, 1440px): a #f2f2f2 band with three
   logos centred in thirds — Milestone (250px) over "TN HOME IMPROVEMENT
   LICENSE # 10448" and "Copyright", Open Sans 14px #666; ShingleMaster and
   CertainTeed (200px, multiplied into the grey). Then a 50px #262626 bar
   with the Kore credit on the left. */

.site-footer--ms { background: var(--ms-footer, #f2f2f2); border-top: 0; color: var(--ms-text, #666666); }
.site-footer--ms .site-footer__main { padding: 40px 0 36px; }

.site-footer--ms .site-footer__inner {
	width: 80%;
	max-width: 1080px;
	margin-inline: auto;
	padding: 0;
}

.site-footer__grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 32px 5.5%;
	align-items: center;
	text-align: center;
}

.site-footer--ms .site-footer__logos { display: block; margin: 0; padding: 0; list-style: none; }

.site-footer--ms .site-footer__main .site-footer__logo img {
	display: block;
	width: 100%;
	max-width: 200px;
	height: auto;
	max-height: none;
	margin-inline: auto;
	mix-blend-mode: multiply;
	filter: contrast(0.88);
}

.site-footer--ms .site-footer__col:first-child .site-footer__logo img { max-width: 250px; mix-blend-mode: normal; filter: none; }

.site-footer--ms .site-footer__disclaimer { margin-top: 28px; font-size: 14px; line-height: 1.7; text-transform: uppercase; color: var(--ms-text, #666666); }
.site-footer__copyright { margin: 14px 0 0; font-size: 14px; line-height: 1.7; }

.site-footer__credit { background: var(--ms-credit, #262626); }
.site-footer__credit-row { display: flex; align-items: center; min-height: 50px; padding: 8px 5%; }
.site-footer--ms .site-footer__credit .site-footer__logo img { display: block; width: auto; height: 20px; max-width: none; max-height: none; }

@media (max-width: 767px) {
	.site-footer__grid { grid-template-columns: 1fr; gap: 36px; }
	.site-footer--ms .site-footer__main .site-footer__logo img { max-width: 170px; }
	.site-footer--ms .site-footer__col:first-child .site-footer__logo img { max-width: 220px; }
}
