/*
 * Footer: brand + three link columns (accordion on mobile), newsletter card,
 * social block (pills: straight, tilt on hover), legal bar.
 */

.site-footer {
	margin-top: var(--rbnl-section-gap);
	padding: 28px 16px 24px;
	border-radius: 28px 28px 0 0;
	background: var(--rbnl-sand);
}

.site-footer__inner {
	display: flex;
	flex-direction: column;
	gap: 28px;
	max-width: var(--rbnl-content-max);
	margin: 0 auto;
}

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

/* No gap here: on mobile the accordion rows follow each other directly. */
.footer-top {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
}

.footer-brand {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
	margin-bottom: 24px;
	text-align: center;
}

.footer-brand__logo {
	display: flex;
	align-items: center;
}

.footer-brand__logo img {
	width: auto;
	max-width: 100%;
	height: 68px;
}

.footer-brand__tagline {
	margin: 0;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-size: 19px;
	font-weight: 600;
}

.footer-brand__about {
	max-width: 330px;
	margin: 0;
	font-size: 15px;
	line-height: 1.55;
}

/* Link columns: accordion on mobile */
.fcol {
	border-bottom: 1px solid var(--rbnl-line-strong);
}

.footer-brand + .fcol {
	border-top: 1px solid var(--rbnl-line-strong);
}

.fcol__title {
	margin: 0;
}

.fcol__btn {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	min-height: 54px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-size: 16px;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
	transition: color 0.3s var(--rbnl-ease);
}

.fcol__btn:hover,
.fcol__btn:focus-visible {
	color: var(--rbnl-orange);
}

.flist {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0 0 14px;
	list-style: none;
}

.flink {
	display: block;
	padding: 11px 0;
	color: var(--rbnl-text);
	font-size: 15px;
	line-height: 1.5;
	text-decoration: none;
	transition: color 0.25s var(--rbnl-ease);
}

.flink:hover {
	color: var(--rbnl-orange);
}

.ext-ic {
	display: inline-flex;
	margin-left: 6px;
	vertical-align: -2px;
	transition: transform 0.3s var(--rbnl-ease);
}

.flink:hover .ext-ic {
	transform: translate(2px, -2px);
}

/* ------------------------------------------------ Newsletter + social */

.footer-newsletter,
.footer-social {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 22px;
	padding: 32px 20px;
	border-radius: var(--rbnl-radius-card-lg);
	background: var(--rbnl-white);
	text-align: center;
}

.footer-newsletter p,
.footer-social p {
	margin: 0;
}

.footer-newsletter__text,
.footer-social__text {
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: 420px;
}

.footer-newsletter__title,
.footer-social__title {
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-weight: 700;
	line-height: 1.05;
}

.footer-social__title {
	font-size: 28px;
}

.footer-newsletter__title {
	font-size: 26px;
}

.newsletter {
	position: relative;
	width: 100%;
	max-width: 520px;
}

.newsletter__row {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.newsletter__msg {
	min-height: 1.5em;
	margin: 8px 0 0;
}

.newsletter__msg.is-error {
	color: #b42318;
}

/* Social pills */
.social-list {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 10px 6px;
	list-style: none;
}

.social {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-sizing: border-box;
	width: 220px;
	min-height: 52px;
	padding: 0 20px 0 16px;
	border-radius: var(--rbnl-radius-pill);
	color: var(--rbnl-ink);
	font-family: var(--rbnl-font-heading);
	font-size: 19px;
	font-weight: 600;
	text-decoration: none;
	transform: rotate(0deg);
	transition:
		transform 0.5s var(--rbnl-ease-spring),
		box-shadow 0.4s var(--rbnl-ease);
}

.social-list li:nth-child(3n + 1) .social {
	--rot: -3deg;
}

.social-list li:nth-child(3n + 2) .social {
	--rot: 2deg;
}

.social-list li:nth-child(3n) .social {
	--rot: -1.5deg;
}

.social--peach {
	background: var(--rbnl-peach-2);
}

.social--lilac {
	background: var(--rbnl-lilac-2);
}

.social--ink {
	background: var(--rbnl-ink);
	color: var(--rbnl-white);
}

.social:hover,
.social:focus-visible {
	transform: rotate(var(--rot, -3deg)) scale(1.04);
	box-shadow: 0 16px 30px rgba(33, 30, 100, 0.18);
	color: inherit;
}

.social--ink:hover {
	color: var(--rbnl-white);
}

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

.footer-bottom {
	display: flex;
	flex-direction: column-reverse;
	align-items: center;
	gap: 12px;
	padding-top: 4px;
	color: var(--rbnl-mute);
	font-size: 14px;
	text-align: center;
}

.footer-bottom .flist {
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0 20px;
	padding: 0;
}

.footer-bottom .flink {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--rbnl-mute);
	font-size: 14px;
}

.footer-bottom .flink:hover {
	color: var(--rbnl-orange);
}

/* --------------------------------------------------- Desktop (>= 1024px) */

@media (min-width: 1024px) {
	.site-footer {
		padding: 48px 48px 28px;
		border-radius: 40px 40px 0 0;
	}

	.site-footer__inner {
		gap: 40px;
	}

	.footer-top {
		grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
		gap: 32px;
	}

	.footer-brand {
		align-items: flex-start;
		margin-bottom: 0;
		text-align: left;
	}

	.footer-brand__logo img {
		height: 56px;
	}

	/* Columns are always open on desktop; the title is just a title. */
	.fcol,
	.footer-brand + .fcol {
		border: 0;
	}

	.fcol__btn {
		min-height: 0;
		margin-bottom: 10px;
		cursor: default;
		pointer-events: none;
	}

	.fcol__btn:hover {
		color: var(--rbnl-ink);
	}

	.fcol .acc__chev {
		display: none;
	}

	.fcol .acc__panel {
		grid-template-rows: 1fr;
		visibility: visible;
		opacity: 1;
	}

	.flist {
		padding: 0;
	}

	.flink {
		padding: 3px 0;
	}

	.footer-newsletter,
	.footer-social {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 28px;
		padding: 36px 40px;
		text-align: left;
	}

	.footer-newsletter__text,
	.footer-social__text {
		align-items: flex-start;
		max-width: none;
		gap: 4px;
	}

	.footer-social__title {
		font-size: 34px;
	}

	.newsletter {
		flex: 1 1 360px;
		width: auto;
		max-width: 520px;
	}

	.newsletter__row {
		flex-direction: row;
	}

	.newsletter__row .fin {
		flex: 1 1 auto;
		min-width: 0;
	}

	.social-list {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: flex-end;
		gap: 24px 22px;
	}

	.social {
		width: auto;
		min-height: 60px;
		padding: 0 26px 0 20px;
		transform: rotate(0deg);
	}

	.social-list li:nth-child(3n + 1) .social {
		--rot: -6deg;
	}

	.social-list li:nth-child(3n + 2) .social {
		--rot: 4deg;
	}

	.social-list li:nth-child(3n) .social {
		--rot: -3deg;
	}

	.social:hover,
	.social:focus-visible {
		transform: rotate(var(--rot, -6deg)) scale(1.08);
	}

	.footer-bottom {
		flex-direction: row;
		flex-wrap: wrap;
		justify-content: space-between;
	}

	.footer-bottom .flink {
		padding: 3px 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.social,
	.social:hover,
	.social:focus-visible {
		transition: none;
	}
}
