:root {
	--font-sans-serif: "Helvetica Neue", Helvetica, Arial, sans-serif;
	--font-monospace: "Monaco", monospace;
	--ivory: #FFFFF0;
	--graphite: #333;
	--red-primary: #B33D34;
	--red-secondary: #771608;
	--border: #e2e2e2;
	--gap: 24px;
}
@media (max-width: 960px) {
	:root {
		--gap: 20px;
	}
}
@media (max-width: 640px) {
	:root {
		--gap: 16px;
	}
}

body.body,
html.html {
	margin: 0;
	padding: 0;
	scroll-behavior: smooth;
}

body.body {
	font-family: var(--font-sans-serif);
	font-size: 14px;
	font-weight: 400;
	background-color: var(--ivory);
	color: var(--graphite);
}

header.header,
main.main,
footer.footer {
	padding: 16px 16px 0 16px;
}
@media (max-width: 960px) {
	header.header,
	main.main,
	footer.footer {
		padding-left: 64px;
		padding-right: 64px;
	}
}

@media (max-width: 640px) {
	header.header,
	main.main,
	footer.footer {
		padding-left: 32px;
		padding-right: 32px;
	}
}

main.main {
	padding-bottom: 64px;
}

div.main__container,
nav.nav {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

nav.nav {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: 16px;
}
@media (max-width: 1200px) {
	nav.nav {
		flex-direction: column;
	}
}

nav.nav--header {
	align-items: center;
}

img.nav__img {
	margin: 0;
	transition: filter 100ms;
}

img.nav__img--header:hover {
	filter: saturate(1.25);
	opacity: 1;
}

img.nav__img--footer {
	height: 40px;
	opacity: .25;
}

img.nav__img--footer:hover {
	opacity: .9
}

ul.nav__ul {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	gap: var(--gap);
	list-style: none;
	padding: 0;
	margin: 0;
}
@media (max-width: 960px) {
	ul.nav__ul {
		flex-direction: column;
		gap: calc(var(--gap) * 2);
	}
}

ul.nav__ul--header {
	align-items: center;
}
@media (max-width: 960px) {
	ul.nav__ul--header {
		display: none;
	}
}

ul.nav__ul--column {
	flex-direction: column;
}

li.nav__li {
	display: inline-flex;
	flex-direction: column;
	gap: 16px;
}

a.a {
	color: var(--red-primary);
} 

a.nav__a {
	color: var(--graphite);
	font-weight: 600;
}

a.a,
a.nav__a {
	text-decoration: none;
	transition: filter 100ms;
}

a.a:hover,
a.nav__a:hover {
	color: var(--red-primary);
	filter: saturate(1.5);
}

a.a:visited {
	color: var(--red-secondary);
}

a.a--dead {
	text-decoration: line-through;
}

input.nav__input {
	font-family: var(--font-sans-serif);
	padding: 16px;
	background-color: rgba(0, 0, 0, 0.05);
	border-radius: 6px;
	border: 2px solid transparent;
	min-width: 256px;
}
@media (max-width: 1200px) {
	form.nav__form,
	input.nav__input {
		display: block;
		width: 100%;
		min-width: 0px;
	}
}
@media (max-width: 1200px) {
	form.nav__form--header {
		display: none;
	}
}

input.nav__input:focus {
	outline: none;
	border: 2px solid var(--red-primary);
	background-color: #FFF;
}

div.main__container {
	border-radius: 6px;
}

footer.footer {
	border-top: 1px solid var(--border);
	padding-bottom: 64px;
}

hr.hr {
	height: 1px;
	border: none;
	background-color: var(--border);
	margin-top: var(--gap);
	margin-bottom: var(--gap);
	box-sizing: border-box;
}

h1.h1 {
	font-size: 32px;
	padding: var(--gap) var(--gap) 0 var(--gap);
	font-weight: 300;
	margin: 0;
}
@media (max-width: 960px) {
	h1.h1 {
		font-size: 24px;
	}
}

h2.h2 {
	font-size: 24px;
	margin: var(--gap);
	letter-spacing: -0.025em;
	line-height: 1.35em;
}
@media (max-width: 960px) {
	h2.h2 {
		font-size: 20px;
	}
}

h2.h2:first-child {
	margin-top: var(--gap);
}

h2.h2:last-child {
	margin-bottom: var(--gap);
}

span.h2__span {
	font-weight: 300;
	letter-spacing: 0.025em;
}

h3.h3 {
	font-size: 18px;
	font-weight: 400;
	margin: var(--gap) 0 0 0;
}

h3.h3:first-of-type {
	margin-top: 0;
}

h4.h4 {
	margin-top: var(--gap);
}

p.p {
	line-height: 1.35em;
}

ul.ul {
	display: flex;
	flex-direction: column;
	row-gap: 12px;
	padding: 0;
	margin: 12px 0 0 0;
	list-style: none;
}

ul.ul--grid {
	padding-top: 16px;
	border-top: 1px solid var(--border);
}

li.ul__li {
	display: flex;
	column-gap: 16px;
}
@media (max-width: 960px) {
	li.ul__li {
		display: block;
	}
}

li.ul__li--grid {
	display: grid;
	grid-template-columns: 1fr 2fr;
}
@media (max-width: 960px) {
	li.ul__li--grid {
		grid-template-columns: 1fr;
	}
}

div.row {
	display: grid;
	grid-auto-flow: row;
	gap: var(--gap);
	margin-top: calc(var(--gap) / 2);
	margin-bottom: calc(var(--gap) / 2);
	margin-left: var(--gap);
	margin-right: var(--gap);
}

div.row:first-child {
	margin-top: var(--gap);
}

div.row:last-child {
	margin-bottom: var(--gap);
}

div.row--grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

div.row--grid:last-child {
	padding-bottom: var(--gap);
}

