/* units: rem on a 10px root (html { font-size: 62.5% }); 1rem = 10px */
/**
 * Site footer.
 *
 * A black band. Mobile first: one column of links, growing to three and then
 * six. Logical properties throughout, so the logo is on the inline-start edge
 * in RTL and LTR alike.
 */

.acini-ftr {
	color: var(--acini-text-inverse);
	background: var(--acini-bg-inverse);
}

.acini-ftr__inner {
	padding-block: calc(var(--acini-space-xl) + var(--acini-space-sm)); /* 52px */
	padding-inline: var(--acini-gutter-footer);
}

.acini-ftr a {
	color: inherit;
	text-decoration: none;
}

/* ---- Top: logo + search ------------------------------------------------- */

/* Design: flex flex-wrap items-start justify-between gap-6 border-b border-white/30 pb-8 */
.acini-ftr__top {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: var(--acini-space-lg);
	padding-block-end: var(--acini-space-2lg);
	border-block-end: 1px solid var(--acini-border-inverse-strong);
}

/* Logo box from the design: 132 x 32. */
.acini-ftr__logo .acini-logo__img {
	inline-size: 13.2rem;
	block-size: 3.2rem;
	max-block-size: none;
	object-fit: contain;
	object-position: center;
}

/* row-reverse puts the icon at the inline-START edge next to the text (design: icon on the right
   in RTL) while the DOM order stays input -> button for keyboard and screen readers. */
.acini-ftr__search {
	position: relative; /* the autocomplete list (.acini-search-panel) hangs from it */
	display: flex;
	flex-direction: row-reverse;
	align-items: center;
	gap: var(--acini-space-xs);
	min-inline-size: 28rem; /* 280px */
	padding: 0.9rem 1.4rem;
	font-size: var(--acini-text-13);
	line-height: 1.5; /* 19.5px: 9 + 19.5 + 9 = 37.5px, as in the design */
	color: var(--acini-text);
	background: var(--acini-bg);
	border-radius: var(--acini-radius-md);
}

.acini-ftr__search:focus-within {
	outline: 2px solid var(--acini-focus);
	outline-offset: 2px;
}

.acini-ftr__search-input {
	flex: 1;
	min-inline-size: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	font-size: var(--acini-text-13);
	line-height: inherit;
	background: none;
	border: 0;
}

.acini-ftr__search-input::placeholder {
	color: var(--acini-text-muted);
	opacity: 1;
}

.acini-ftr__search-input:focus-visible {
	outline: none;
}

.acini-ftr__search-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	/* The theme keeps a 24px minimum target on buttons (WCAG 2.5.8). The design row is 19.5px
	   tall, so the button overhangs it by 2.25px each side instead of making the row taller. */
	block-size: 2.4rem;
	margin-block: -0.225rem;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

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

/* Design: flex flex-col gap-y-[30px] py-10, then from lg (1024px)
   flex-row flex-wrap justify-between gap-x-10. Columns are content-sized, NOT a grid:
   they wrap 4+2 at 1024, 5+1 at 1280 and sit six across from ~1440. */
.acini-ftr__cols {
	display: flex;
	flex-direction: column;
	gap: 3rem 0;
	padding-block: var(--acini-space-xl);
	border-block-end: 1px solid var(--acini-border-inverse);
}

.acini-ftr__col {
	inline-size: 100%;
	text-align: start;
}

.acini-ftr__heading {
	margin-block: 0 1.4rem;
	font-size: var(--acini-text-sm);
	font-weight: var(--acini-weight-semibold);
}

.acini-ftr__links {
	display: grid;
	grid-template-columns: minmax(0, 1fr); /* lets a long nowrap link truncate instead of widening the page */
	margin: 0;
	padding: 0;
	list-style: none;
}

.acini-ftr__links a {
	display: block;
	overflow: hidden;
	color: var(--acini-text-inverse-muted);
	font-size: var(--acini-text-13);
	line-height: 2;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---- Legal warning + bottom row ---------------------------------------------- */

/* Design: border-t border-white/30 py-[30px] text-right 13px leading-[20px] #c7c7c7 */
.acini-ftr__warning {
	margin: 0;
	padding-block: 3rem;
	color: var(--acini-text-inverse-muted);
	font-size: var(--acini-text-13);
	line-height: 2rem;
	text-align: start;
	border-block-end: 1px solid var(--acini-border-inverse);
}

/* Design: flex flex-col items-start gap-4 border-t pt-[30px]; from lg: flex-row flex-wrap
   items-center justify-between. */
.acini-ftr__bottom {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--acini-space-md);
	padding-block-start: 3rem;
	font-size: var(--acini-text-13);
	line-height: 1.5;
}

/* The design lays these English credits out left to right (dir="ltr"): a right-aligned stack
   below lg, then a row — © first, Dev by last — from lg, with a 5px dot before each credit. */
.acini-ftr__legal {
	direction: ltr;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--acini-space-xs);
	inline-size: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
}

.acini-ftr__legal li {
	display: flex;
	align-items: center;
	gap: 1.4rem;
}

.acini-ftr__legal li:not(:first-child)::before {
	content: "";
	display: none;
	flex: none;
	inline-size: 0.5rem;
	block-size: 0.5rem;
	background: currentColor;
	border-radius: 50%;
}

.acini-ftr__social {
	display: flex;
	align-items: center;
	gap: 1.4rem;
}

.acini-ftr__social-list {
	display: flex;
	gap: 1.4rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.acini-ftr__social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-inline-size: var(--acini-space-lg); /* 24px minimum target */
}

.acini-ftr__follow {
	margin: 0;
}

/* ---- Hover (pointer devices only) ---------------------------------------------- */

@media (hover: hover) {
	.acini-ftr a:hover {
		text-decoration: underline;
		text-underline-offset: 0.25em;
	}
}

/* ---- Wider screens ---------------------------------------------------------- */

@media (min-width: 64em) {
	.acini-ftr__cols {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 3rem var(--acini-space-xl); /* gap-x-10 = 40px */
	}

	.acini-ftr__col {
		inline-size: auto;
		min-inline-size: 16rem; /* 160px */
		max-inline-size: 24rem; /* 240px */
	}

	.acini-ftr__bottom {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: space-between;
	}

	.acini-ftr__legal {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		justify-content: flex-start;
		gap: 1.4rem;
		inline-size: auto;
	}

	.acini-ftr__legal li:not(:first-child)::before {
		display: block;
	}
}
