:root {
	font-size: 1px;

	--content-width-max: 1280rem;

	--margin: 80rem;
	--gap: calc(0.5 * var(--margin));
	--gap-quarter: calc(0.25 * var(--gap));
	--gap-half: calc(0.5 * var(--gap));
	--gap-3-4ths: calc(0.75 * var(--gap));

	--gap-2: calc(0.75 * var(--margin));

	--font-size-p: 16rem;
}

body {
	overflow-x: hidden;
	width: 100%;
	font-family: 'Inter', sans-serif;
	font-size: var(--font-size-p);
	font-optical-sizing: auto;
	font-style: normal;
	line-height: normal;
}

body {
	margin: 0;
	padding: 0;
}

body *:not(h1):not(h2):not(h3):not(h4):not(h5) {
	margin: 0;
	padding: 0;
	outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

div.page-section,
section.page-section {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: var(--margin) 0;

	&:not(.full-width-bg):not(.hero) + div.page-section:not(.full-width-bg),
	&:not(.full-width-bg):not(.hero) + section.page-section:not(.full-width-bg),
	&.full-width-bg:not(.hero) + div.page-section.full-width-bg,
	&.full-width-bg:not(.hero) + section.page-section.full-width-bg {
		margin-top: calc(-1 * var(--margin));
	}
}

div.page-section,
section.page-section {
	div.content {
		width: var(--content-width-max);

		&:has(> div:first-child):has(>img:nth-child(2)):not(:has(>:nth-child(3))) {
			/* 2-column: div+img */
			/* div.content with only 1 div and an img */
			display: flex;
			flex-direction: row;
			gap: var(--gap);

			> img {
				max-width: 640rem;
				height: auto;
				align-self: start;
			}
		}

		&:has(> img:first-child):has(> div:nth-child(2)):not(:has(>:nth-child(3))) {
			/* img+div */
			/* div.content with only 1 img and a div */
			display: flex;
			flex-direction: row;
			gap: var(--gap);

			> img {
				max-width: 640rem;
				height: auto;
				align-self: start;
			}
		}
	}
}

h1, h2, h3, h4, h5 {
	margin-top: 0;
	margin-bottom: var(--gap-3-4ths);
	line-height: 1.25;
	font-weight: 900;
	text-wrap: balance;
}

h1, h2 {
	font-family: Obviously;
	font-style: italic;
	text-transform: uppercase;
}

section.page-section.bg-color-pink {
	div.content {
		h1, h2 {
			color: var(--orange);
		}
	}
}

h1 {
	font-size: 48rem;
	/* fine-tune to offset font's top white-space  */
	margin-top: -17rem;
}

h2 {
	font-size: 32rem;
	/* fine-tune to offset font's top white-space  */
	margin-top: -5rem;
}

h3 {
	font-size: 24rem;
}

h4 {
	font-size: 20rem;
}

nav.breadcrumbs {
	margin-bottom: var(--gap-half);

	ol {
		display: flex;
		flex-direction: row;
		list-style: none;
		font-size: 14rem;

		li:not(:last-child) {
			&:after {
				content: "/";
				margin-left: 5rem;
				margin-right: 5rem;
			}
		}
	}
}

del {
	text-decoration: none;
}

ol, ul {
	list-style-position: inside;

	&:not(:last-child) {
		margin-bottom: var(--gap);
	}
}

ul.ticks {
	list-style: none;

	li {
		position: relative;
		padding-left: calc(25rem + 0.25 * var(--gap));
	}

	li::before {
		content: "";
		position: absolute;
		left: 0;
		top: 50%;
		transform: translateY(-50%);

		width: 25rem;
		height: 22rem;
		background-image: url("img/icon-tick-orange.svg");
		background-size: contain;
	}
}

p {
	&:not(:last-child) {
		margin-bottom: var(--gap);
	}

	span {
		color: inherit;
	}
}

a {
	color: inherit;
}

/* mobile */
/* 0px to 767 uses 414px design */
@media screen and (max-width: 767px) {
	:root {
		font-size: calc(100vw / 414);
		--margin: 40rem;
		--content-width-max: calc(100% - 2 * var(--gap));
		--gap-2: var(--gap);
		--font-size-p: 14rem;
	}

	header#main-header + div.page-section:not(.full-width-bg),
	header#main-header + section.page-section:not(.full-width-bg) {
		padding-top: var(--gap);
		border-top: 1px solid var(--orange);
	}

	div.page-section,
	section.page-section {
		div.content {
			&:has(> div:first-child):has(>img:nth-child(2)):not(:has(>:nth-child(3))) {
				/* 2-column: div+img */
				flex-direction: column;

				> img {
					max-width: 100%;
					order: -1;
				}
			}

			&:has(> img:first-child):has(> div:nth-child(2)):not(:has(>:nth-child(3))) {
				/* 2-column: img+div */
				flex-direction: column;

				> img {
					max-width: 100%;
					order: -1;
				}
			}
		}

		h2 {
			font-size: 22rem;
		}

		h3 {
			font-size: 18rem;
		}

		h4 {
			font-size: 16rem;
		}
	}

	nav.breadcrumbs {
		margin-bottom: var(--gap);

		ol {
			font-size: 10rem;
		}
	}
}

/* tablet */
/* min 768px uses 1440px design at 1px:1rem. */
/* below media query of 768px to 1440px applies vw-rem scaling to rem units. */ 
@media screen and (min-width: 768px) and (max-width: 1440px) {
	:root {
		font-size: calc(100vw / 1440);
	}

	div.page-section,
	section.page-section {
		div.content {
			width: 1280rem;
			max-width: var(--content-width-max);
		}
	}
}
