/* ===========================================================================
   FOOTER — closing call to action + site footer
   =========================================================================== */

/* --- Pre-footer call to action ------------------------------------------- */
.vub-cta {
	padding-block: var(--vub-section-y);
	background-color: var(--vub-red);
	text-align: center;
}

.vub-cta__title {
	margin: 0 0 var(--vub-space-sm);
	font-size: var(--vub-text-3xl);
	text-transform: uppercase;
	color: var(--vub-white);
}

.vub-cta__text {
	max-width: 40rem;
	margin: 0 auto var(--vub-space-xl);
	color: rgba(255, 255, 255, 0.88);
	font-size: var(--vub-text-lg);
}

.vub-cta .vub-btn-group { justify-content: center; }

/* On the red band, invert the button treatments. */
.vub-cta .vub-btn--primary {
	background-color: var(--vub-white);
	border-color: var(--vub-white);
	color: var(--vub-black);
}

.vub-cta .vub-btn--primary:hover { background-color: var(--vub-black); border-color: var(--vub-black); color: var(--vub-white); }

.vub-cta .vub-btn--secondary { border-color: rgba(255, 255, 255, 0.5); color: var(--vub-white); }

.vub-cta .vub-btn--secondary:hover { background-color: var(--vub-white); color: var(--vub-red); }

/* --- Site footer ---------------------------------------------------------- */
/* Its content is drawn 20% larger than the scale's sizes (--vub-footer-scale):
   the type and the social icons, not the spacing between them. */
.vub-footer {
	--vub-footer-scale: 1.2;

	background-color: var(--vub-black);
	border-top: var(--vub-rule);
	padding-block: var(--vub-space-3xl) var(--vub-space-lg);
	color: var(--vub-text-muted);
	font-size: calc(var(--vub-text-sm) * var(--vub-footer-scale));
}

.vub-footer__top {
	display: grid;
	gap: var(--vub-grid-gap);
	grid-template-columns: 1fr;
	padding-bottom: var(--vub-space-2xl);
}

.vub-footer__brand-name {
	margin: 0 0 var(--vub-space-2xs);
	font-family: var(--vub-font-display);
	/* The site name is one long word; on the narrowest phones (under ~370px)
	   the cap keeps it from pushing the page sideways. */
	font-size: min(calc(var(--vub-text-xl) * var(--vub-footer-scale)), 6.6vw);
	font-weight: var(--vub-weight-black);
	letter-spacing: var(--vub-tracking-tight);
	text-transform: uppercase;
	color: var(--vub-white);
}

.vub-footer__tagline { max-width: calc(30rem * var(--vub-footer-scale)); margin: 0; }

.vub-footer__heading {
	margin: 0 0 var(--vub-space-md);
	font-size: calc(var(--vub-text-xs) * var(--vub-footer-scale));
	font-weight: var(--vub-weight-bold);
	letter-spacing: var(--vub-tracking-wider);
	text-transform: uppercase;
	color: var(--vub-white);
}

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

.vub-footer__list li { margin-bottom: var(--vub-space-2xs); }

.vub-footer__list a { color: var(--vub-text-muted); text-decoration: none; }

.vub-footer__list a:hover { color: var(--vub-white); }

/* WordPress menus rendered into the footer columns. */
.vub-footer__menu ul { margin: 0; padding: 0; list-style: none; }
.vub-footer__menu li { margin-bottom: var(--vub-space-2xs); }
.vub-footer__menu a { color: var(--vub-text-muted); text-decoration: none; }
.vub-footer__menu a:hover { color: var(--vub-white); }

.vub-footer__social {
	display: flex;
	gap: var(--vub-space-2xs);
	margin: var(--vub-space-md) 0 0;
	padding: 0;
	list-style: none;
}

.vub-footer__social a {
	display: grid;
	place-items: center;
	width: calc(40px * var(--vub-footer-scale));
	height: calc(40px * var(--vub-footer-scale));
	border: var(--vub-rule);
	border-radius: var(--vub-radius-button);
	color: var(--vub-text-muted);
	text-decoration: none;
	transition: var(--vub-transition-color);
}

.vub-footer__social a:hover {
	border-color: var(--vub-red);
	color: var(--vub-white);
	background-color: var(--vub-red);
}

.vub-footer__social svg {
	width: calc(18px * var(--vub-footer-scale));
	height: calc(18px * var(--vub-footer-scale));
	fill: currentColor;
}

.vub-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vub-space-sm) var(--vub-space-lg);
	align-items: center;
	justify-content: space-between;
	padding-top: var(--vub-space-lg);
	border-top: var(--vub-rule);
	color: var(--vub-text-faint);
	font-size: calc(var(--vub-text-xs) * var(--vub-footer-scale));
}

.vub-footer__bottom p { margin: 0; }

.vub-footer__legal ul {
	display: flex;
	flex-wrap: wrap;
	gap: var(--vub-space-md);
	margin: 0;
	padding: 0;
	list-style: none;
}

.vub-footer__legal a { color: var(--vub-text-faint); text-decoration: none; }
.vub-footer__legal a:hover { color: var(--vub-white); }

/* "Website by Skifta", after the copyright: the row's small muted type, the
   name a shade lighter, underlined under the pointer. Kept on one line, so on
   a phone it wraps whole onto a line of its own. Keyboard focus keeps the
   site's ring (base.css). */
.vub-footer__credit { white-space: nowrap; }

.vub-footer__credit a {
	color: var(--vub-text-muted);
	text-decoration: none;
	text-underline-offset: 0.25em;
	transition: var(--vub-transition-color);
}

.vub-footer__credit a:hover {
	color: var(--vub-white);
	text-decoration: underline;
}

/* On its red wall (vub_peek(), templates/sections/footer.php). Everything is
   white, on the red wall and on the black one in the mouse's circle alike.
   --vub-footer-ink is that colour, as r, g, b, and --vub-footer-ink-on the one
   drawn on it. The greys made for the black footer, and its red hovers, would
   vanish into the red, so links underline and the social icons fill with the
   ink. The red stands in for the wall until the picture has loaded. */
.vub-footer.vub-has-peek {
	--vub-footer-ink: 255, 255, 255;
	--vub-footer-ink-on: var(--vub-black);

	background-color: var(--vub-red);
	border-top: 0;
	color: rgb(var(--vub-footer-ink));
}

.vub-has-peek .vub-footer__brand-name,
.vub-has-peek .vub-footer__heading,
.vub-has-peek .vub-footer__list a,
.vub-has-peek .vub-footer__menu a,
.vub-has-peek .vub-footer__legal a { color: rgb(var(--vub-footer-ink)); }

.vub-has-peek .vub-footer__list a:hover,
.vub-has-peek .vub-footer__menu a:hover,
.vub-has-peek .vub-footer__legal a:hover {
	color: rgb(var(--vub-footer-ink));
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

.vub-has-peek .vub-footer__social a {
	border-color: rgba(var(--vub-footer-ink), 0.5);
	color: rgb(var(--vub-footer-ink));
}

.vub-has-peek .vub-footer__social a:hover {
	border-color: rgb(var(--vub-footer-ink));
	background-color: rgb(var(--vub-footer-ink));
	color: var(--vub-footer-ink-on);
}

.vub-has-peek .vub-footer__bottom {
	border-top-color: rgba(var(--vub-footer-ink), 0.35);
	color: rgb(var(--vub-footer-ink));
}

/* The credit a step quieter than the copyright, the name in full ink. */
.vub-has-peek .vub-footer__credit { color: rgba(var(--vub-footer-ink), 0.85); }

.vub-has-peek .vub-footer__credit a,
.vub-has-peek .vub-footer__credit a:hover { color: rgb(var(--vub-footer-ink)); }

/* Hide Astra's default footer bar when our own footer is in use. */
.vub-theme .site-footer .ast-small-footer,
.vub-theme .site-footer .site-below-footer-wrap {
	display: none;
}
