/*
 * Site footer — Figma: 1.0-home / footer (4299:82). All px values are the
 * frame's exact geometry (1400px frame, 48px side gutters).
 */

/* -- newsletter band -- */

.newsletter {
	background: var(--rds-light-grey);
}

.newsletter__inner {
	display: flex;
	align-items: flex-start;
	gap: 24px;
	max-width: var(--rds-wrap);
	margin: 0 auto;
	/* text column starts at x=50 in Figma, form ends at x=1352 */
	padding: 72px 48px 72px 50px;
}

/* columns keep the Figma proportions (638 | 640 at 1400) on wider screens */
.newsletter__text {
	flex: 638 1 0;
	min-width: 0;
}

.newsletter__heading {
	margin: 0;
	font-family: var(--font-display);
	font-size: 48px;
	font-weight: 500;
	line-height: 50px;
}

.newsletter__description {
	margin: 30px 0 0;
	font-size: 14px;
	line-height: 20px;
}

.newsletter__form {
	flex: 640 1 0;
	min-width: 0;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	align-items: center;
}

.newsletter__input {
	width: 100%;
	height: 50px;
	padding: 0 18px;
	border: 0;
	border-radius: 8px;
	background: var(--rds-white);
	font-family: var(--font-body);
	font-size: 14px;
	line-height: 20px;
	color: var(--rds-black);
}

.newsletter__input::placeholder {
	color: var(--rds-black);
	opacity: 1;
}

.newsletter__input:focus-visible {
	outline: 1px solid var(--rds-black);
	outline-offset: 0;
}

.newsletter__input.is-invalid {
	outline: 1px solid #c0392b;
}

.newsletter__hp {
	position: absolute;
	left: -10000px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.newsletter__privacy {
	display: inline-flex;
	align-items: center;
	gap: 12px;
	font-size: 14px;
	line-height: 20px;
	cursor: pointer;
}

/* Lufga sits high in its line box: centring the box left the capitals
   ~1.5px above the circle's middle, so nudge the text down */
.newsletter__privacy span {
	padding-top: 3px;
}

.newsletter__privacy a {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* round checkbox from the design: 20px circle, 1px black outline */
.newsletter__checkbox {
	appearance: none;
	flex: 0 0 20px;
	width: 20px;
	height: 20px;
	margin: 0;
	border: 1px solid var(--rds-black);
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
}

.newsletter__checkbox:checked {
	background: radial-gradient(circle, var(--rds-black) 0 5px, transparent 5.5px);
}

.newsletter__checkbox:focus-visible {
	outline: 2px solid var(--rds-beige);
	outline-offset: 2px;
}

.newsletter__checkbox.is-invalid {
	border-color: #c0392b;
}

.newsletter__submit {
	height: 50px;
	border: 0;
	border-radius: 8px;
	background: var(--rds-black);
	color: var(--rds-white);
	font-family: var(--font-body);
	font-size: 14px;
	font-weight: 900;
	line-height: 18.27px;
	text-transform: uppercase;
	cursor: pointer;
	transition: background-color 0.2s;
}

.newsletter__submit:hover {
	background: var(--rds-dark-grey);
}

.newsletter__submit:disabled {
	opacity: 0.6;
	cursor: wait;
}

.newsletter__message {
	grid-column: 1 / -1;
	margin: 0;
	font-size: 14px;
	line-height: 20px;
}

.newsletter__message:empty {
	display: none;
}

.newsletter__message.is-error {
	color: #c0392b;
}

/* -- logo + link columns -- */

.site-footer__main {
	max-width: var(--rds-wrap);
	margin: 0 auto;
	padding: 36px 48px 24px;
	background: var(--rds-white);
}

.site-footer__columns {
	display: grid;
	/* logo | Categories (x=380) | Links (x=933 → 1352) */
	grid-template-columns: minmax(0, 308fr) minmax(0, 529fr) minmax(0, 419fr);
	column-gap: 24px;
	align-items: start;
	padding-bottom: 48px;
	border-bottom: 1px solid var(--rds-beige);
}

.site-footer__logo {
	display: block;
	width: 144px;
}

.site-footer__menu-title {
	margin: 0 0 24px;
	font-family: var(--font-display);
	font-size: 20px;
	font-weight: 500;
	line-height: 25.6px;
}

.site-footer__menu-columns {
	display: flex;
	gap: 24px;
}

.site-footer__menu-column {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 24px;
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 14px;
	line-height: 20px;
}

.site-footer__menu-column a:hover {
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* -- social / copyright / payment row -- */

.site-footer__bottom {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	padding-top: 24px;
}

.site-footer__social {
	display: flex;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer__social a {
	display: block;
	transition: opacity 0.2s;
}

.site-footer__social a:hover {
	opacity: 0.7;
}

.site-footer__copyright {
	margin: 0;
	font-size: 14px;
	line-height: 20px;
	text-align: center;
}

/* developer credit after the copyright */
.site-footer__credit a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.site-footer__credit a:hover,
.site-footer__credit a:focus-visible {
	color: #777777;
}

/* -- responsive -- */

@media (max-width: 1399px) {
	.newsletter__inner {
		padding-left: 48px;
	}

	.newsletter__text,
	.newsletter__form {
		flex: 1 1 0;
		min-width: 0;
	}

	.newsletter__form {
		grid-template-columns: 1fr 1fr;
	}

	.site-footer__columns {
		grid-template-columns: 1fr 2fr 2fr;
	}

	.site-footer__menu-column {
		width: auto;
		flex: 1 1 0;
	}
}

@media (max-width: 900px) {
	.newsletter__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 32px;
		padding: 48px 24px;
	}

	.newsletter__text,
	.newsletter__form {
		flex: none;
	}

	.newsletter__heading {
		font-size: 36px;
		line-height: 40px;
	}

	.newsletter__description {
		margin-top: 16px;
	}

	.site-footer__main {
		padding: 36px 24px 24px;
	}

	.site-footer__columns {
		grid-template-columns: 1fr 1fr;
		row-gap: 36px;
	}

	.site-footer__logo {
		grid-column: 1 / -1;
	}

	.site-footer__bottom {
		flex-direction: column;
		gap: 16px;
	}

	.site-footer__copyright {
		order: 3;
	}
}

@media (max-width: 560px) {
	.newsletter__form {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.site-footer__columns {
		grid-template-columns: 1fr;
	}
}

/* -- phone, Figma footer_M (Newsletter_M + bottom_M, 420 wide): 36/24
      padding, logo 69×48 with the social icons beside it, the two menus
      side by side without their titles, copyright + payments centred. -- */

@media (max-width: 600px) {
	.newsletter__inner {
		gap: 24px;
		padding: 36px 24px;
	}

	.newsletter__heading {
		font-size: 42px;
		line-height: 48px;
	}

	.newsletter__description {
		margin-top: 18px;
	}

	.newsletter__form {
		gap: 18px;
	}

	.newsletter__privacy {
		margin-top: 6px;
	}

	.site-footer__main {
		position: relative;
		padding: 36px 24px;
	}

	.site-footer__columns {
		grid-template-columns: 1fr 1fr;
		column-gap: 36px;
		row-gap: 36px;
		padding-bottom: 36px;
	}

	.site-footer__logo {
		width: 69px;
	}

	/* the img keeps its height="100" attribute unless told otherwise, which
	   left a 69×100 box with the logo centred in it — lower than the icons */
	.site-footer__logo img {
		width: 100%;
		height: auto;
	}

	.site-footer__menu-title {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.site-footer__menu-columns {
		flex-direction: column;
	}

	/* social sits on the logo row: 36px padding + (48px logo − 30px icons) / 2 */
	.site-footer__social {
		position: absolute;
		top: calc(36px + (48px - 30px) / 2);
		right: 24px;
	}

	.site-footer__bottom {
		gap: 12px;
	}

	.site-footer__copyright {
		order: 0; /* Figma: copyright above the payment logos */
	}
}
