/*
 * Footer — Blocksy footer builder skinned to the design (style.css 1135-1236).
 * Structure: scripts/config/blocksy-footer.php. Columns 1.4fr + 3 × 1fr → 2 (< 1000) → 1 (< 690);
 * link columns are accordions on phones: a button in the heading (inc/integrations/blocksy-menus.php).
 */

/* Surface + the oval cut above it (design .oval--footer). html [data-footer] beats Blocksy's own footer background. */
html [data-footer] .ct-footer {
	position: relative;
	background: var(--ll-emphasis);
	color: var(--ll-on-emphasis-muted);
	--theme-text-color: var(--ll-on-emphasis-muted);
	--theme-headings-color: var(--ll-on-emphasis);
	--theme-link-initial-color: var(--ll-on-emphasis-muted);
	--theme-link-hover-color: var(--ll-on-emphasis);
	padding-block: var(--ll-footer-pad-top) var(--ll-space-40);
}
html [data-footer] .ct-footer::before {
	content: "";
	position: absolute;
	inset: calc(-1 * var(--ll-oval-h) + 1px) 0 auto;
	block-size: var(--ll-oval-h);
	background: var(--ll-emphasis);
	-webkit-mask: var(--ll-oval-up) center / 100% 100% no-repeat;
	mask: var(--ll-oval-up) center / 100% 100% no-repeat;
}
html [data-footer] .ct-footer :is([data-row*="middle"], [data-row*="bottom"]) {
	background-color: transparent;
	--theme-border-top: none;
	--theme-border-bottom: none;
}
.ct-footer [data-row] > .ct-container {
	--theme-normal-container-max-width: var(--ll-content);
}
html [data-footer] .ct-footer [data-row] > div {
	--container-spacing: 0; /* row padding comes from the design tokens below */
}

/* Middle row grid */
html [data-footer] .ct-footer [data-row*="middle"] > .ct-container {
	--grid-template-columns: var(--ll-footer-cols);
	--columns-gap: var(--ll-footer-gap);
	gap: var(--ll-footer-gap);
	padding-block: 0 var(--ll-footer-pad-top);
	border-bottom: 1px solid var(--ll-border-dark);
}
@media (max-width: 999.98px) {
	html [data-footer] .ct-footer [data-row*="middle"] > .ct-container {
		--grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}
@media (max-width: 689.98px) {
	html [data-footer] .ct-footer [data-row*="middle"] > .ct-container {
		--grid-template-columns: minmax(0, 1fr);
		row-gap: 0;
		padding-block-end: 0;
	}
	.ct-footer [data-column="logo"] {
		margin-block-end: var(--ll-space-32);
	}
}
.ct-footer [data-column] {
	align-items: flex-start;
}
.ct-footer [data-column^="text:llcol"] > [data-id],
.ct-footer [data-column^="text:llcol"] .entry-content {
	inline-size: 100%;
}

/* Brand column */
.ct-footer [data-id="logo"] .site-logo-container {
	color: var(--ll-on-emphasis);
}
.ct-footer [data-id="logo"] .site-logo-container svg {
	block-size: var(--logo-max-height);
	inline-size: auto;
}
.ct-footer .ll-footer-brand__text {
	margin-block: var(--ll-space-24);
	max-inline-size: var(--ll-measure-brand);
	font-size: var(--ll-small);
	line-height: var(--ll-lh-relaxed);
}
.ct-footer .ll-footer-brand__social {
	display: flex;
	flex-direction: column;
	gap: var(--ll-space-4);
	margin: 0;
}
.ct-footer .ll-footer-brand__label {
	font-size: var(--ll-tiny);
	line-height: var(--ll-lh-relaxed);
}
.ct-footer .ll-footer-brand__hashtag {
	font-size: var(--ll-h4);
	line-height: var(--ll-lh-tight);
	font-weight: var(--ll-weight-medium);
	letter-spacing: var(--ll-tracking-hashtag);
	color: var(--ll-accent);
}

/* Socials: round outline buttons with the design's line icons ([ll_socials]; <span> until a URL exists) */
.ct-footer .ll-socials {
	display: flex;
	gap: var(--ll-space-8);
	margin-block-start: var(--ll-space-24);
}
.ct-footer .ll-socials__item {
	inline-size: var(--ll-tap);
	block-size: var(--ll-tap);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--ll-border-dark);
	border-radius: var(--ll-r-full);
	color: var(--ll-on-emphasis);
	transition: background-color var(--ll-t-fast) var(--ll-ease), transform var(--ll-t-fast) var(--ll-ease-pop);
}
.ct-footer a.ll-socials__item:hover {
	background-color: var(--ll-hover-tint-on-dark-soft);
	transform: translateY(var(--ll-lift));
}
.ct-footer .ll-socials__item svg {
	inline-size: var(--ll-icon-m);
	block-size: var(--ll-icon-m);
	fill: none;
	stroke: currentColor;
	stroke-width: var(--ll-social-stroke);
}

/* Link columns: a heading (the menu's name) and the list. */
.ct-footer .ll-footer-menu__title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--ll-space-12);
	margin: 0;
	padding-block-end: var(--ll-space-16);
	font-family: inherit;
	font-size: var(--ll-tiny);
	line-height: var(--ll-lh-relaxed);
	font-weight: var(--ll-weight-bold);
	letter-spacing: var(--ll-tracking-caps);
	text-transform: uppercase;
	color: var(--ll-on-dark-mute);
}
/* The accordion button exists for phones only (below); elsewhere the heading is plain text. */
.ct-footer .ll-footer-menu__toggle {
	display: none;
}
.ct-footer .ll-footer-menu__list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.ct-footer .ll-footer-menu {
	inline-size: 100%;
}
.ct-footer .ll-footer-menu__list li {
	margin: 0 0 var(--ll-space-12);
	font-size: var(--ll-body); /* line box like the design's li (body size), link itself is small */
	line-height: var(--ll-lh-relaxed);
}
/* Not the social buttons ([ll_socials] sits in a text item): they keep their colour and transition. */
.ct-footer :is(.ll-footer-menu__list, .ct-header-text) a:where(:not(.wp-element-button, .ll-socials__item)) {
	font-size: var(--ll-small);
	line-height: var(--ll-lh-relaxed);
	color: var(--ll-on-emphasis-muted);
	text-decoration: none;
	transition: color var(--ll-t-fast) var(--ll-ease);
}
.ct-footer :is(.ll-footer-menu__list, .ct-header-text) a:hover {
	color: var(--ll-on-emphasis);
}
@media (max-width: 689.98px) {
	.ct-footer [data-column^="text:llcol"] {
		border-bottom: 1px solid var(--ll-hover-tint-on-dark-soft);
	}
	.ct-footer [data-column^="text:llcol"]:last-child {
		border-bottom: none;
	}
	/* Phones with JavaScript: the heading is the accordion button (assets/js/footer-menu.js), the list shows when it is
	   open. Without JavaScript the label and the list stay, as on wide screens. */
	.ll-js .ct-footer .ll-footer-menu__title {
		padding-block-end: 0;
	}
	.ll-js .ct-footer .ll-footer-menu__label {
		display: none;
	}
	.ll-js .ct-footer .ll-footer-menu__toggle {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: var(--ll-space-12);
		inline-size: 100%;
		min-block-size: var(--ll-tap);
		margin: 0;
		padding: var(--ll-space-16) 0;
		border: 0;
		border-radius: 0;
		background: none;
		box-shadow: none;
		color: inherit;
		font: inherit;
		letter-spacing: inherit;
		text-transform: inherit;
		text-align: start;
		cursor: pointer;
	}
	.ll-js .ct-footer .ll-footer-menu__toggle::after {
		content: "";
		flex: none;
		inline-size: var(--ll-chevron);
		block-size: var(--ll-chevron);
		background: currentColor;
		-webkit-mask: var(--ll-chevron-down) center / contain no-repeat;
		mask: var(--ll-chevron-down) center / contain no-repeat;
		transition: transform var(--ll-t-base) var(--ll-ease);
	}
	.ll-js .ct-footer .ll-footer-menu__toggle[aria-expanded="true"]::after {
		transform: rotate(180deg);
	}
	.ll-js .ct-footer .ll-footer-menu__title:has(.ll-footer-menu__toggle[aria-expanded="false"]) + .ll-footer-menu__list {
		display: none;
	}
	.ct-footer .ll-footer-menu__list {
		padding-block-end: var(--ll-space-16);
	}
}

/* Bottom row: copyright · legal · payments */
html [data-footer] .ct-footer [data-row*="bottom"] > .ct-container {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ll-space-24);
	padding-block-start: var(--ll-space-32);
	font-size: var(--ll-tiny);
	line-height: var(--ll-lh-relaxed);
	color: var(--ll-on-dark-mute);
}
@media (max-width: 999.98px) {
	html [data-footer] .ct-footer [data-row*="bottom"] > .ct-container {
		flex-direction: column;
		text-align: center;
	}
}
html [data-footer] .ct-footer .ct-footer-copyright {
	--theme-font-size: var(--ll-tiny);
	--theme-line-height: var(--ll-lh-relaxed);
	color: inherit;
}
.ct-footer .ll-footer-kingnature {
	color: var(--ll-sand);
	font-weight: var(--ll-weight-bold);
	text-decoration: none;
}
html [data-footer] .ct-footer [data-id="menu"] > ul {
	flex-wrap: wrap;
	gap: var(--ll-space-8) var(--ll-space-24);
	justify-content: center;
}
html [data-footer] .ct-footer [data-id="menu"] > ul > li > a {
	--theme-font-size: var(--ll-tiny);
	--theme-font-weight: var(--ll-weight-book);
	--theme-text-transform: none;
	--theme-line-height: var(--ll-lh-relaxed);
	--theme-link-initial-color: var(--ll-on-dark-mute);
	--theme-link-hover-color: var(--ll-on-emphasis);
	--menu-item-padding: 0;
	white-space: nowrap;
}
.ct-footer .ll-payment-icons {
	display: flex;
	align-items: center;
	gap: var(--ll-space-8);
}
.ct-footer .ll-payment-icons img {
	block-size: var(--ll-payment-h);
	inline-size: auto;
	opacity: var(--ll-payment-opacity);
	border-radius: var(--ll-r-sm);
}

/* Keyboard focus: a rounded ring on the square menu links and the column buttons on phones. */
:root #footer .ct-menu-link:focus-visible,
.ll-js .ct-footer .ll-footer-menu__toggle:focus-visible {
	border-radius: var(--ll-r-focus);
}
