.footer {
	/* Puts footer at bottom of page all the time. See reset.css for flexbox implementation. Make sure .footer is a direct child of body. */
	margin-top: auto;
	padding: 40px 20px;
	background-color: var(--white);

	@media screen and (min-width: 768px) {
		padding: 60px;
		display: grid;
		grid-template: auto auto auto / 4fr 1fr;
	}
}

.footer--black {
	background: var(--black);
	color: var(--white);

	a {
		color: var(--white);
	}
}

.footer__menus {
	grid-column: 2 / 2;
	font-weight: 700;
	line-height: 1;
	margin-bottom: 20px;
}

.footer__menu {
	padding: 0;
	margin: 0;

	li {
		list-style: none;
	}

	a {
		font-size: var(--h1);
		font-weight: 700;
		line-height: 1;
		padding-block: var(--spacing-5);
		transition: color 0.3s ease;
		display: inline-block;
		color: var(--black);
		text-decoration: none;

		&:is(:hover, :focus-within) {
			color: var(--teal);
		}

		.footer--black & {
			color: var(--white);
		}

		&:hover,
		&:focus {
			color: var(--teal);
		}
	}
}

.footer__menu--secondary {
	margin-top: 2px;

	a {
		background-color: transparent;
		color: var(--black);
		font-weight: 400;
		font-size: var(--h2);

		.footer--black & {
			color: var(--white);
		}
	}
}

.footer__text {
	grid-column: 1 / 1;
	grid-row: 1 / 1;
}

.footer__title {
	font-size: 24px;
	line-height: 1.2;
	margin: 0 0 20px;
	text-transform: none;

	@media (width > 768px) {
		margin-bottom: 0;
		line-height: 2;
		font-size: 40px;
	}
}

.footer__button {
	font-weight: 700;
	font-size: 18px;
	align-items: center;
	justify-content: center;
	color: var(--black);
	background: var(--white);
	text-decoration: none;
	border: 2px solid var(--black);
	padding: 20px 40px;
	display: inline-block;
	transition: 0.3s ease-in-out all;
	margin-bottom: 20px;

	/* biome-ignore lint: not a specificity issue. */
	.footer--black & {
		color: var(--white);
		background: var(--black);
		border-color: var(--white);
	}

	:is(&:hover, &:focus) {
		border-color: var(--teal);
		color: var(--teal);
	}
}

.footer__social {
	grid-column: 1;
}

.footer__fine-print {
	font-size: 12px;
	font-weight: normal;
	clear: both;
	grid-column: 2;

	p {
		margin-bottom: 0;
	}
}
