/* reset  */
/* 1. Use a more-intuitive box-sizing model */
*, *::before, *::after {
  box-sizing: border-box;
}

/* 2. Remove default margin */
* {
  margin: 0;
}

body {
  /* 3. Add accessible line-height */
  line-height: 1.5;
  /* 4. Improve text rendering */
  -webkit-font-smoothing: antialiased;
}

/* 5. Improve media defaults */
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

/* 6. Inherit fonts for form controls */
input, button, textarea, select {
  font: inherit;
}

/* 7. Avoid text overflows */
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

/* 8. Improve line wrapping */
p {
  text-wrap: pretty;
}
h1, h2, h3, h4, h5, h6 {
  text-wrap: balance;
}

/*
  9. Create a root stacking context
*/
#root, #__next {
  isolation: isolate;
}

@font-face {
    font-family: 'fontin';
    src: url('/library/fonts/fontin-bold-webfont.woff2') format('woff2'),
         url('/library/fonts/fontin-bold-webfont.woff') format('woff');
    font-weight: bold;
    font-style: normal;
}

@font-face {
    font-family: 'fontin';
    src: url('/library/fonts/fontin-italic-webfont.woff2') format('woff2'),
         url('/library/fonts/fontin-italic-webfont.woff') format('woff');
    font-weight: normal;
    font-style: italic;
}

@font-face {
    font-family: 'fontin';
    src: url('/library/fonts/fontin-regular-webfont.woff2') format('woff2'),
         url('/library/fonts/fontin-regular-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'fontin';
    src: url('/library/fonts/fontin-smallcaps-webfont.woff2') format('woff2'),
         url('/library/fonts/fontin-smallcaps-webfont.woff') format('woff');
    font-weight: normal;
    font-style: normal;
}

/* END RESET */

:root {
	--red: #b92727;
	--blue: #006da4;
	--lt-blue: #cfe8f4;
	--space: 1.618rem;
}

body {
	font-family: 'Open Sans', sans-serif;
	color: var(--blue);
	font-size: 18px;
	display: flex;
	flex-direction: column;
	height: 100vh;
}

img {
	max-width: 100%;
	height: auto;
}

:where(h1, h2, h3, h4) {
	line-height: 1.1;
	font-family: 'fontin', sans-serif;
}

h1 {
	font-size: clamp(40px, 6vw, 60px);
}

h2 {
	font-size: clamp(28px, 4vw, 44px);
}

header {
	display: flex;
	flex-direction: column;
	justify-content: center;
	margin-bottom: calc(var(--space) * 2);
	background: url('/library/images/bg-header.jpg') bottom/100% no-repeat, var(--lt-blue);
	padding-bottom: calc(var(--space) * 2);
	padding-top: calc(var(--space) * 2);

	.container {
		align-items: end;
		gap: calc(var(--space) * 2);
		justify-content: space-between;
	}
}

@media (min-width: 781px) {
	header {
		aspect-ratio: 1920 / 470;
	}
	.logo {
		margin-right: 10%;
		margin-bottom: 14px;
	}
}

.container {
	width: 1240px;
	margin-left: auto;
	margin-right: auto;
	max-width: 100%;
	padding-left: 20px;
	padding-right: 20px;
	display: block;
}

.flex-row {
	display: flex;
	flex-direction: row;
}

@media (max-width: 780px) {
	.flex-row {
		flex-direction: column;
	}
}

.flex-column {
	display: flex;
	flex-direction: column;
}

.course-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(375px, 1fr));
	gap: calc(var(--space) * 2);
	margin-bottom: calc(var(--space) * 4);
}

@media (max-width: 480px) {
	.course-grid {
		grid-template-columns: 1fr;
	}
}

.logo {
	max-width: 80%;
}

article {
	flex-direction: column;
	display: flex;
	gap: var(--space);
	align-items: flex-start;

	img {
		width: 100%;
	}
}

.button {
	--button-color: var(--red);
	color: var(--button-color);
	text-decoration: none;
	margin-bottom: var(--space);
	border: 2px solid var(--button-color);
	padding: calc(var(--space) *.5) var(--space);
	display: inline-block;
	flex-shrink: 1;
	border-radius: 4px;
	transition: .2s;
	font-weight: 600;

	&:hover {
		--button-color: var(--blue);
	}
}

.site-footer {
	background: var(--red);
	color: white;
	padding: 12px 0;
	font-size: 16px;
	margin-top: auto;
}