/*
	My First Wrestling Tournament: stylesheet

	Recreates the original Carrd design. Every size is in rem, and the root
	font size steps down on smaller screens, so the whole page scales together:
	  wider than 1680px   1rem = 18pt
	  981px to 1680px     1rem = 13pt
	  980px and below     1rem = 11pt
*/

:root {
	--color-background: #272B36;
	--color-card: #2F3340;
	--color-raised: #3E4352;        /* round icon buttons, "Tournament Details" button, photo outlines */
	--color-accent: #87CDFF;        /* light blue: icons, photo borders, dotted connectors */
	--color-alert: #D92B14;         /* red "spots available" box */
	--color-register: #E83913;      /* orange "Register Now" buttons */
	--color-register-hover: #B02E2E;
	--color-eyebrow: #9992F0;       /* small purple caps above headings */

	--spacing: 1.75rem;             /* space between items in a card */
	--tight-spacing: 0.875rem;      /* space between small text items */
}

/* ---------- Basics ---------- */

*, *::before, *::after {
	box-sizing: border-box;
}

html {
	font-size: 18pt;
}

body {
	margin: 0;
	min-width: 320px;
	min-height: 100vh;
	min-height: 100svh;
	overflow-x: hidden;
	overflow-wrap: break-word;
	line-height: 1;
	background-color: var(--color-background);
	-webkit-text-size-adjust: none;
	text-size-adjust: none;
}

h1, h2, p, ul {
	margin: 0;
	padding: 0;
	font: inherit;
}

ul {
	list-style: none;
}

a {
	color: inherit;
	transition: color 0.25s ease;
}

/* Animated "grid tunnel" background, fixed behind the page. */
body::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	z-index: 0;
	display: block;
	width: 100vw;
	height: 100vh;
	height: 100lvh;
	pointer-events: none;
	background-image: url('../images/background.svg');
	background-size: 100% 150%;
	background-position: center;
	background-repeat: no-repeat;
	transform: scale(1);
}

/* Covers the background while the page loads, then fades out (see main.js). */
body::after {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	pointer-events: none;
	background-color: var(--color-background);
	opacity: 0;
	visibility: hidden;
	transform: scale(1);
	transition: opacity 1s ease-in-out 0.25s, visibility 1s 0.25s;
}

body.is-loading::after {
	opacity: 1;
	visibility: visible;
}

/* ---------- Page layout ---------- */

.site-wrapper {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
}

.site-main {
	position: relative;
	z-index: 1;
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	max-width: 100%;
	text-align: center;
	transition: opacity 0.5s ease, transform 0.5s ease;
}

body.is-loading .site-main {
	opacity: 0;
	transform: translateY(0.375rem);
}

.page {
	position: relative;
	width: 70rem;
	max-width: 100%;
	padding: 4rem;
}

.page > * {
	margin-top: var(--spacing);
	margin-bottom: var(--spacing);
}

.page > .card,
.page > .connector {
	margin-top: 0;
	margin-bottom: 0;
}

.page > :first-child {
	margin-top: 0;
}

.page > :last-child {
	margin-bottom: 0;
}

/* Items stacked inside a card or column. */
.stack > * {
	margin-top: var(--spacing);
	margin-bottom: var(--spacing);
}

.stack > .alert-title,
.stack > .alert-text,
.stack > .eyebrow,
.stack > .faq-label {
	margin-top: var(--tight-spacing);
	margin-bottom: var(--tight-spacing);
}

.stack > .photo {
	margin-top: 3rem;
	margin-bottom: 3rem;
}

.stack > :first-child {
	margin-top: 0;
}

.stack > :last-child {
	margin-bottom: 0;
}

/* ---------- Cards ---------- */

/* Narrow centered card. */
.card {
	position: relative;
	width: 30rem;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding: 4rem 3rem;
	border-radius: 1rem;
	background-color: var(--color-card);
}

/* Red "spots available" box. */
.card--alert {
	padding: 0.875rem 3.25rem;
	background-color: var(--color-alert);
}

/* Full-width card with two side-by-side columns. */
.card--wide {
	display: grid;
	grid-template-columns: 1fr 1fr;
	column-gap: 3rem;
	align-items: center;
	width: 100%;
	padding: 3rem;
}

.card--wide > * {
	min-width: 0;
}

/* Dotted vertical line between cards. */
.connector {
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	min-height: 1rem;
}

.connector::before {
	content: '';
	width: 7px;
	height: 8rem;
	border-left: dotted 7px var(--color-accent);
}

/* ---------- Text ---------- */

.alert-title {
	width: calc(100% + 0.25rem);
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 2em;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.25rem;
	text-align: center;
	text-transform: uppercase;
	-webkit-text-stroke: 0.02em #FFFFFF;
}

.alert-text {
	color: #FFFFFF;
	font-family: 'Inter', sans-serif;
	font-size: 0.875em;
	font-weight: 400;
	line-height: 1.5;
	text-align: center;
	-webkit-text-stroke: 0.02em #FFFFFF;
}

/* Small letter-spaced caps above a heading, e.g. "NEW DIVISION!". */
.eyebrow {
	width: calc(100% + 0.25rem);
	color: var(--color-eyebrow);
	font-family: 'Inter', sans-serif;
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.25rem;
	text-transform: uppercase;
}

.faq-label {
	width: calc(100% + 0.25rem);
	color: #D6D6D6;
	font-family: 'Inter', sans-serif;
	font-size: 1.125em;
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: 0.25rem;
	text-transform: uppercase;
}

/* Purple-to-silver gradient headings. */
.heading,
.heading .line {
	background-image: linear-gradient(45deg, #8A80F2 0%, #D5E3EB 85%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.heading {
	color: #D5E3EB;
	font-family: 'Poppins', sans-serif;
	font-size: 2em;
	font-weight: 600;
	line-height: 1.375;
}

/* Big blue gradient title, "My First Wrestling Tournament". */
.title {
	color: #87CDFF;
	background-image: linear-gradient(45deg, #695EE6 0%, #87CDFF 85%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	font-family: 'Poppins', sans-serif;
	font-size: 3.625em;
	font-weight: 700;
	line-height: 1.25;
}

.body-text {
	color: rgba(255, 255, 255, 0.588);
	font-family: 'Inter', sans-serif;
	font-size: 1em;
	font-weight: 400;
	line-height: 1.875;
	text-align: center;
}

.body-text--bright {
	color: rgba(255, 255, 255, 0.82);
}

.body-text a,
.eyebrow a,
.heading a {
	text-decoration: none;
}

.body-text a:hover,
.eyebrow a:hover,
.heading a:hover {
	text-decoration: underline;
}

/* A paragraph inside a text block. */
.line {
	display: block;
	position: relative;
}

.line + .line {
	margin-top: 1rem;
}

/* ---------- Buttons ---------- */

.buttons {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: center;
	cursor: default;
	letter-spacing: 0;
}

.buttons > li {
	max-width: 100%;
}

.btn {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	max-width: 100%;
	padding: 0 2rem 0 calc(0.25rem + 2rem);
	border-radius: 2rem;
	font-family: 'Inter', sans-serif;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.25rem;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	vertical-align: middle;
	transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.btn > .label {
	flex: 1 1 auto;
	width: 100%;
	overflow: hidden;
	text-align: left;
}

.btn > svg {
	display: block;
	flex: 0 0 auto;
	width: 1.875em;
	min-width: 18px;
	margin-left: 0.5em;
	margin-right: calc(-0.125em + 0.25rem);
	fill: var(--color-accent);
	pointer-events: none;
	transition: fill 0.25s ease;
}

.btn:hover {
	transform: scale(1.0775);
}

/* Orange "Register Now". */
.btn--primary {
	align-items: flex-start;
	padding-top: 1.25rem;
	padding-bottom: 1.25rem;
	line-height: 2rem;
	white-space: normal;
	color: #FFFFFF;
	background-color: var(--color-register);
}

.btn--primary > svg {
	height: 2rem;
}

.btn--primary:hover {
	background-color: var(--color-register-hover);
}

/* Grey "Tournament Details". */
.btn--secondary {
	height: 4rem;
	line-height: 4rem;
	color: rgba(115, 234, 250, 0.588);
	background-color: var(--color-raised);
}

.btn--secondary > svg {
	height: 100%;
}

/* ---------- Round icon buttons (down arrow, email) ---------- */

.icons {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	letter-spacing: 0;
}

.icons > li {
	position: relative;
	z-index: 1;
}

.icons a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	border-radius: 100%;
	background-color: var(--color-raised);
	transition: transform 0.25s ease, color 0.25s ease, background-color 0.25s ease, border-color 0.25s ease;
}

.icons a:hover {
	transform: scale(1.1125);
}

.icons svg {
	display: block;
	position: relative;
	width: 60%;
	height: 60%;
	fill: var(--color-accent);
	pointer-events: none;
	transition: fill 0.25s ease;
}

.icons--chevron {
	font-size: 1.875em;
	gap: 0.75rem;
}

.icons--contact {
	font-size: 1.5em;
	gap: 1.25rem;
}

/* ---------- Images and video ---------- */

/* Photo with a light-blue border and grey outline. */
.photo {
	position: relative;
	width: 100%;
	height: 25rem;
	overflow: hidden;
	border: 10px solid var(--color-accent);
	border-radius: 1rem;
	box-shadow: 0 0 0 0.75rem var(--color-raised);
	-webkit-backface-visibility: hidden;
	transform: translate3d(0, 0, 0);
}

.photo > img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	border-radius: calc(1rem - 10px);
}

/* Round picture at the top of the intro card. */
.avatar {
	width: 9rem;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	overflow: hidden;
	border: 10px solid #4EB4FC;
	border-radius: 100%;
	box-shadow: 0 0 0 0.75rem var(--color-raised);
	-webkit-backface-visibility: hidden;
}

.avatar > img {
	display: block;
	width: 100%;
	height: auto;
}

.video {
	position: relative;
	width: 20rem;
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background-color: #000000;
}

.video > iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

/* ---------- Scroll-in animations (classes added by main.js) ---------- */

.reveal {
	transition: opacity 1s ease, transform 1s ease;
}

.reveal--fade-right:not(.is-visible) {
	opacity: 0;
	transform: translateX(-0.375rem);
}

.reveal--fade-left:not(.is-visible) {
	opacity: 0;
	transform: translateX(0.375rem);
}

.reveal--fade-up:not(.is-visible) {
	opacity: 0;
	transform: translateY(0.375rem);
}

.reveal--fade-in:not(.is-visible) {
	opacity: 0;
}

.reveal--zoom-in:not(.is-visible) {
	opacity: 0;
	transform: scale(0.94375);
}

.reveal--zoom-out:not(.is-visible) {
	opacity: 0;
	transform: scale(1.05625);
}

/* Photos zoom inside their frame instead of moving. */
.reveal--zoom-image {
	transition: none;
}

.reveal--zoom-image > img {
	transition: transform 1s ease;
}

.reveal--zoom-image:not(.is-visible) > img {
	transform: scale(1.1125);
}

/* ---------- Smaller screens ---------- */

@media (max-width: 1680px) {
	html {
		font-size: 13pt;
	}
}

@media (max-width: 980px) {
	html {
		font-size: 11pt;
	}
}

@media (max-width: 736px) {
	.page {
		padding: 1.5rem;
	}

	:root {
		--tight-spacing: 0.65625rem;
	}

	.card,
	.card--alert,
	.card--wide {
		padding: 3rem 2rem;
	}

	/* Columns stack, with the photo or video on top. */
	.card--wide {
		grid-template-columns: 1fr;
		row-gap: 3rem;
	}

	.card--wide > .media {
		order: -1;
	}

	.connector::before {
		height: 5rem;
	}

	.alert-title,
	.eyebrow,
	.faq-label {
		width: calc(100% + 0.21875rem);
		letter-spacing: 0.21875rem;
	}

	.heading {
		font-size: 1.75em;
	}

	.title {
		font-size: 2.75em;
	}

	.photo {
		height: 18.75rem;
	}

	.avatar {
		width: 7.75rem;
	}
}

@media (max-width: 480px) {
	:root {
		--spacing: 1.53125rem;
	}

	/* Buttons go full width. */
	.buttons {
		flex-direction: column;
		flex-wrap: nowrap;
	}

	.btn {
		width: 100%;
		max-width: 32rem;
	}

	.photo {
		height: 15rem;
	}
}

@media (max-width: 360px) {
	:root {
		--spacing: 1.3125rem;
	}

	.page {
		padding: 1.125rem;
	}

	.card,
	.card--alert,
	.card--wide {
		padding: 2.25rem 1.5rem;
	}

	.alert-title {
		font-size: 1.5em;
	}

	.photo {
		height: 13.125rem;
	}

	.icons--chevron {
		gap: 0.5625rem;
	}

	.icons--contact {
		gap: 0.9375rem;
	}
}
