:root {
	--header-font-size: 72px;
	--footer-color: #222;
	--contact-shadow-spread: 25px;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: 'Lato', sans-serif;
}

h2 {
	margin: 0;
	padding: 40px 0;
}

.underline-link {
	color: inherit;
	text-decoration: none;
	background: 
	linear-gradient(to right, rgba(0,0,0,0), rgba(0, 0, 0, 0)),
	linear-gradient(to right, var(--footer-color), var(--footer-color));
	background-size: 100% 0.3em, 0 0.3em;
	background-position: 100% 120%, 0 120%;
	background-repeat: no-repeat;
	transition: background-size 400ms;
}

.underline-link:hover, .underline-link:focus {
	background-size: 0 0.3em, 100% 0.3em;
}

header {
	display: flex;
	flex-direction: column;
	align-content: stretch;

	width: 100%;
	min-height: 100vh;
	background-image: url('../imgs/pierogi.webp');
	background-repeat:no-repeat;
	-webkit-background-size:cover;
	-moz-background-size:cover;
	-o-background-size:cover;
	background-size:cover;
	background-position:center;
}

nav {
	display: flex;
	flex-direction: row;
	justify-content: space-between;
	align-items: center;
	background-color: #ffffffe6;
	box-shadow: 0px 10px 50px #555;
	height: 90px;
}

.nav-brand {
	font-family: 'Pacifico', cursive;
	text-decoration: none;
	color: #222;
	font-size: 40px;
	margin: 10px 30px;
}

#nav-links {
	display: flex;
	list-style: none;
	font-size: 0; /* For some reason removes margin between elements. */
	height: 100%;
}

#nav-links li {
	display: inline-block;
	height: 100%;
}

#nav-links li a {
	display: flex;
	justify-content: center;
	align-items: center;
	color: #707070;
	font-weight: 400;
	font-size: 16px;
	letter-spacing: 2px;
	text-decoration: none;
	text-transform: uppercase;
	padding: 0px 20px;
	background-color: rgba(0.4, 0.4, 0.4, 0);
	transition: background-color 0.2s;
	height: 100%;
}

#nav-links li a:hover {
	background-color: rgba(0.4, 0.4, 0.4, 0.1);
}

.nav-links-on-shown {
	display: flex !important;
}

.nav-links-on-hidden {
	display: flex !important;
}

#hamburger-menu-btn {
	display: none;
	flex-direction: column;
	justify-content: space-evenly;
	min-width: 30px;
	aspect-ratio: 1/1;
	margin: 5px 20px;
}

#hamburger-menu-btn:hover {
	cursor: pointer;
}

#hamburger-menu-btn div {
	background-color: black;
	width: 100%;
	height: 2px;
	transition-duration: 200ms;
}

.hamburger-menu-btn-toggled > div:nth-child(1) {
	transform: translate(0, 7.5px) rotate(45deg);
}

.hamburger-menu-btn-toggled > div:nth-child(2) {
	opacity: 0;
}

.hamburger-menu-btn-toggled > div:nth-child(3) {
	transform: translate(0, -7.5px) rotate(-45deg);
}

.invitation-box {
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	height: inherit;
	text-align: center;
	min-height: 90vh;
}

.invitation-box h2 {
	font-size: 54px;
	color: white;
	text-shadow: 0 0 20px #000;
	-moz-text-shadow: 0 0 20px #000;
	-webkit-text-shadow: 0 0 20px #000;
	text-transform: uppercase;
}

.invitation-box hr {
	width: 130px;
	color: white;
	border: 1px solid white;
}

.order-btn {
	position: relative;
	text-decoration: none;
	color: #eee;
	font-size: 22px;
	margin-top: 50px;
	padding: 20px 60px;
	border: 2px solid #eee;
	text-transform: uppercase;
	background-color: #55555580;
	transition: background-color 0.2s ease-out;
}

.order-btn:hover {
	background-color: white;
	color: black;
}

.order-btn span {
	display: block;
	position: relative;
	transition: transform 0.2s ease-out;
}

.order-btn:hover span {
	animation-name: bump;
	animation-duration: 0.4s;
}

.container {
	padding: 50px 100px;
}

#about {
	text-align: justify;
	overflow: hidden;
	position: relative;
}

#about-back {
	z-index: -1;
	position: absolute;
	width: 100%;
	height: 100%;
}

#about-back img {
	position: absolute;
	display: block;
	bottom: -150px;
	animation: dumpling 30s linear infinite, fade 30s linear infinite;
}

#about-back img:nth-child(1) {
	left: 86%;
	width: 100px;
	height: 100px;
	animation-delay: 0.2s;
}

#about-back img:nth-child(2) {
	left: 12%;
	width: 80px;
	height: 80px;
	animation-delay: 1.5s;
	animation-duration: 10s;
}

#about-back img:nth-child(3) {
	left: 70%;
	width: 150px;
	height: 150px;
	animation-delay: 8.5s;
}

#about-back img:nth-child(4) {
	left: 44%;
	width: 90px;
	height: 90px;
	animation-delay: 0s;
	animation-duration: 20s;
}

#about-back img:nth-child(5) {
	left: 30%;
	width: 130px;
	height: 130px;
	animation-delay: 2s;
}

#about-back img:nth-child(6) {
	left: 62%;
	width: 110px;
	height: 110px;
	animation-delay: 15s;
}

#about-front {
	z-index: 1;
}

#about-front h2 {
	font-family: 'Pacifico', cursive;
	font-size: var(--header-font-size);
	line-height: 10px;
}

#about-front h3 {
	font-family: 'Pacifico', cursive;
	font-size: 36px;
	color: #222;
}

#about-front p {
	color: #333;
	width: 60%;
	font-size: 20px;
}

#offer {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	background-image: url('../imgs/pierogi4.webp');
	background-repeat:no-repeat;
	-webkit-background-size:cover;
	-moz-background-size:cover;
	-o-background-size:cover;
	background-size:cover;
	background-position:center;
	color: white;
	min-height: 100vh;
}

#offer h2 {
	font-family: 'Pacifico', cursive;
	font-size: var(--header-font-size);
	line-height: 10px;
	grid-column: 2;
	text-align: center;
}

.offer-btns {
	position: relative;
	margin: 100px 0px;
	grid-column: 2;
	grid-row: 2;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
	grid-column-gap: 20px;
	grid-row-gap: 20px;
	width: 85%;
}

.offer-btn {
	display: block;
	border-radius: 10px;
	overflow: hidden;
	box-shadow: 0px 0px 15px black;
	text-decoration: none;
	color: white;
	--order-btn-anim-time: 0.5s;
	transition: var(--order-btn-anim-time) transform;
	transform-style: preserve-3d;
}

.offer-btn-front {
	display: grid;
	grid-template-rows: repeat(2, 1fr);
	aspect-ratio: 16/9;
	background-repeat:no-repeat;
	background-size:cover;
	background-position:center;
	transform: rotateX(0deg);
	transition: opacity 0.4s;
	border-radius: 10px;
	overflow: hidden;
}

.offer-btn-back {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	flex-direction: column;
	transform: rotateX(180deg);
	background-color: #222;
	color: #eee;
	transition: opacity 0.4s;
	border-radius: 10px;
	overflow: hidden;
}

.flip-container {
	perspective: 800px;
}

.flip-container:hover > .offer-btn {
	transform: rotateX(10deg);
}

.flip-container:focus > .offer-btn {
	transform: rotateX(0deg);
}

.offer-btn-clicked {
	transform: rotateX(180deg) !important;
}

.offer-btn-clicked > .offer-btn-front {
	opacity: 0;
}

.offer-btn-clicked > .offer-btn-back {
	opacity: 1;
}

.flip-container:hover > .offer-btn > .offer-description {
	padding-bottom: 30px;
}

.flip-container:hover > .offer-btn > .offer-description > span,
.flip-container:hover > .offer-btn > .offer-description > p {
	padding-top: 10px;
}

.flip-container:hover > .offer-btn > .offer-description > h5 {
	display: flex;
	justify-content: center;
	align-items: center;
	transform: scale(1.5);
}

.offer-backside {
	position: absolute;
	top: 0px;
	left: 0px;
	background-color: yellow;
	width: 100%;
	height: 100%;
}

.offer-description {
	grid-row: 2;
	background-color: #44444460;
	padding: 10px;
	transition: var(--order-btn-anim-time) padding-bottom;
}

.offer-description h5 {
	font-size: 18px;
	text-align: center;
	margin: 0;
	font-weight: 600;
	transition-duration: var(--order-btn-anim-time);
}

.offer-description p {
	transition-duration: var(--order-btn-anim-time);
}

.offer-description span {
	display: flex;
	justify-content: flex-end;
	align-items: flex-end;
	transition-duration: var(--order-btn-anim-time);
}

#contact {
	background-color: #444;
	color: white;
	background-image: url('../imgs/pierogi2.webp');
	background-repeat:no-repeat;
	-webkit-background-size:cover;
	-moz-background-size:cover;
	-o-background-size:cover;
	background-size:cover;
	background-position:center;
	position: relative;
}

.color-dimm {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	background-color: #00000030;
	mix-blend-mode: color;
	z-index: 1;
}

#contact h2 {
	font-family: 'Pacifico', cursive;
	font-size: var(--header-font-size);
	text-align: center;
	position: relative;
	z-index: 2;
}

.contact-content {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	z-index: 2;
	position: relative;
}

.conact-information h3 {
	font-size: 22px;
	text-shadow: 0px 0px var(--contact-shadow-spread) black;
	text-transform: uppercase;
}

.conact-information p,
.conact-information a {
	font-size: 18px;
	text-shadow: 0px 0px var(--contact-shadow-spread) black;
}

#contact iframe {
	width: 100%;
	height: 100%;
}

footer {
	padding: 20px 0px;
	text-align: center;
	background-color: var(--footer-color);
	color: #eee;
}

footer p {
	font-size: 18px;
}

@media only screen and (max-width: 930px) {
	:root {
		--header-font-size: 54px;
	}

	.nav-brand {
		font-size: 24px;
	}

	#nav-links {
		position: fixed;
		display: block;
		top: 0px;
		right: 0px;
		padding: 0;
		width: 100vw;
		height: 100vh;
		background-color: #eee;
		z-index: 2;
		transition: opacity 0.4s;
		overflow-y: scroll;
		scrollbar-width: none;
	}

	#nav-links li {
		display: flex;
		justify-content: flex-start;
		align-items: center;
		margin: 0;
		height: auto;
		width: 100%;
	}

	#nav-links li a {
		justify-content: flex-start;
		padding: 20px;
		padding-left: 40px !important;
		width: 100%;
		text-align: left;
		transition: padding-left 0.4s;
	}

	#nav-links li a:hover {
		padding-left: 60px !important;
	}

	.invitation-box h2 {
		font-size: 30px;
		padding: 15px 0px;
	}

	.invitation-box hr {
		width: 50px;
	}

	.nav-links-on-shown {
		display: block !important;
	}

	.nav-links-on-hidden {
		display: none !important;
	}

	#hamburger-menu-btn {
		display: flex;
	}

	.order-btn {
		font-size: 18px;
		margin-top: 25px;
		padding: 10px 30px;
	}

	.container {
		padding: 10px 20px;
	}

	#about {
		min-height: 100vh;
	}

	#about-back img:nth-child(1) {
		width: 80px;
		height: 80px;
	}

	#about-back img:nth-child(2) {
		width: 50px;
		height: 50px;
	}

	#about-back img:nth-child(3) {
		width: 100px;
		height: 100px;
	}

	#about-back img:nth-child(4) {
		width: 70px;
		height: 70px;
	}

	#about-back img:nth-child(5) {
		width: 90px;
		height: 90px;
	}

	#about-back img:nth-child(6) {
		width: 80px;
		height: 80px;
	}

	#about-front h3 {
		font-size: 30px;
	}

	#about-front p {
		width: auto;
		font-size: 18px;
	}

	#offer {
		padding-left: 0;
		padding-right: 0;
	}

	.offer-btns {
		margin: 50px 0px;
	}

	.contact-content {
		grid-template-columns: 1fr;
		grid-template-rows: repeat(2, 1fr);
	}

	footer p {
		font-size: 14px;
	}
}

@keyframes bump {
	0% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-7px);
	}
	100% {
		transform: translateY(0px);
	}
}

@keyframes dumpling {
	from {
		transform: translateY(0) rotate(0deg);
	}
	to {
		transform: translateY(-850px) rotate(360deg);
	}
}

@keyframes fade {
	0% {
		opacity: 1;
	}
	80% {
		opacity: 1;
	}
	85% {
		opacity: 0;
	}
	100% {
		opacity: 0;
	}
}