/* Setting theme colors here for now */
:root {
	--black: #302E2F;
	--teal: #4F917F;
	--blue: #5D7B95;
	--red: #CE4A35;
	--cream: #E0D7B6;
}

/* Fix default designs to allow for fullscreen */
html,
body {
	margin: 0;
	height: 100%;
	background-color: var(--black);
}

/*
	- Header should only take up as much space as it needs
	- Main content should expand to fill the screen.
	- Footer should only take up as much space as it needs
*/
.page {
	width: 75rem;
	max-width: 100%;
	margin: 0 auto;

	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-rows: min-content 1fr min-content;
	min-height: 100%;
	justify-items: center;
	text-align: center;

	font-family: sans-serif;

	background: center no-repeat url(./paper_textures-nobkgcolor.png);
	background-color: var(--cream);
	color: color(from var(--cream) srgb calc(r - 0.55) calc(g - 0.55) calc(b - 0.55));
}

:is(h1, h2, h3, h4, h5, h6, i) {
	color: var(--red);
	font-family: Cambria, Cochin, Georgia, Times, 'Times New Roman', serif;
}

/* Limit width on larger screens */
.page > * {
	width: 240rem;
    max-width: 100%;
}

.terms-and-conditions {
	box-sizing: border-box;
    padding: 3rem;
	display: grid;
	justify-items: center;
}

header, footer {
	box-sizing: border-box;
	padding: 1rem;
	background-color: color(from var(--cream) srgb calc(r - 0.10) calc(g - 0.10) calc(b - 0.10) / .75);
}

header {
	margin-block-end: 30px;
}

header::after {
	background: center / contain no-repeat url(./horizontal-lotus.png);
	content: '';
	display: block;
	margin-block-end: -62px;
	height: 79px;
}

*:has(+ footer) > .section-group {
	padding-block-end: 62px;
}

footer {
	padding-block: 30px;
}

footer::before {
	background: center / contain no-repeat url(./horizontal-lotus.png);
	content: '';
	display: block;
	margin-block-start: -60px;
	margin-block-end: 10px;
	height: 79px;
	
	/* 626 × 158 px */
}

img {
	max-width: 100%;
}

.logo {
	max-height: 15rem;
}

/* Pairs media with a section, alternating which side it appears on in desktop views */
.section-group {
	display: flex;
	flex-wrap: wrap-reverse;
	align-items: stretch;
	justify-content: center;
	gap: 1.5rem;
	padding-block: 2rem;
	padding-inline: 2rem;
}
.section-group > * {
	width: 100%;
	max-width: 100%;
}

@media(min-width: 900px) {
	.section-group > * {
		width: 25rem;
	}
}
.section-group:nth-of-type(even) {
	flex-wrap: wrap;
	flex-direction: row-reverse;
	background-color: color(from var(--cream) srgb calc(r + 0.05) calc(g + 0.05) calc(b + 0.05) / .75)
}

.section-group-media {
	display: grid;
	align-items: center;
	background: no-repeat center / contain url(./circle4-BL.png);
}

.iframe-wrapper {
	aspect-ratio: 560 / 315;
}

/* Allow the iframe to shrink while keeping its aspect ratio */
iframe {
    width: 100%;
    height: 100%;
}

/*
	- Reset text alignment (since everything is centered, otherwise)
	- paragraphs will take up as much space as they are allotted, unless we set a max-width
*/
section {
	text-align: left;
	max-width: 60rem;
}

/* Nested sections get spacing between them */
section section + section {
	margin-block-start: 1rem;
}

/* Override the initial styles for these tags */
:is(h1, h2, h3, h4, h5, h6) {
	margin-block-start: 0;
}
h2 {
	font-size: 1em;
}
p {
	margin: 0;
}
p + p {
	margin-block-start: 1em;
}

/* Space buttons out, let them flow  to the next line if too many */
.button-list {
	display: flex;
	flex-wrap: wrap;
	gap: 1em;
}

/* Default link colors (adjusted brand blue to be a more saturated blue) */
a, a:visited {
	color: color(from var(--blue) srgb r g calc(b + 0.25));
}

/* Make links look like buttons */
a.button {
	display: inline-block;
	padding: 0.25em 0.5em;
	background-color: color(from var(--cream) srgb calc(r + 0.55) calc(g + 0.55) calc(b + 0.55));
	color: color(from var(--cream) srgb calc(r - 0.10) calc(g - 0.10) calc(b - 0.10));
	border-radius: 0.25em;
	text-decoration: none;
	box-shadow: 0.2em 0.2em 0.2em rgba(0,0,0,0.5),
		inset 0.1em 0.1em 0.1em rgba(0,0,0,0.5),
		inset -0.1em -0.1em 0.1em rgba(255,255,255,0.5);
	font-weight: 600;
	font-size: 0.9em;
}
a.button:active {
	position: relative;
	top: 0.1em;
	left: 0.1em;
	box-shadow: 0.1em 0.1em 0.1em rgba(0,0,0,0.5),
		inset 0.2em 0.2em 0.2em rgba(0,0,0,0.5),
		inset -0.1em -0.1em 0.1em rgba(255,255,255,0.25);
}
