@font-face {
	font-family: "Industry Inc Base";
	src: url("../fonts/IndustryInc-Base.woff2") format("woff2"),
		url("../fonts/IndustryInc-Base.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}
@font-face {
	font-family: "Eurostile";
	src: url("../fonts/EurostileRegular.woff2") format("woff2"),
		url("../fonts/EurostileRegular.woff") format("woff");
	font-weight: normal;
	font-style: normal;
	font-display: swap;
}

:root {
	--padding: 3rem;
	--gold: rgb(248 179 3);
	--font-size: 24px;
	--min-width: 240px;

	@media screen and (max-width: 768px) {
		--padding: 2rem;
		--font-size: 18px;
	}
}

* {
	box-sizing: border-box;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

*::-webkit-scrollbar {
	width: 10px;
}
*::-webkit-scrollbar-track {
	background: transparent;
}
*::-webkit-scrollbar-thumb {
	background-color: #000;
	border-radius: 5px;
	border: 2px solid #fff;
}

body {
	font-size: var(--font-size);
	font-family: "Eurostile", sans-serif;
}

h1,
h2,
h3 {
	font-weight: normal;
	font-family: "Industry Inc Base", sans-serif;
	margin: 0;
	padding: 0;
	text-wrap: balance;
}

h1 {
	font-size: clamp(50px, 10vw, 110px);
	line-height: clamp(60px, 10vw, 110px);
	margin-bottom: var(--padding);
}
h2 {
	font-size: clamp(36px, 6vw, 90px);
	line-height: clamp(36px, 6vw, 90px);
}
h3 {
	font-size: clamp(34px, 4vw, 60px);
	line-height: clamp(34px, 4vw, 60px);
}

p {
	text-wrap: balance;
	min-width: var(--min-width);

	&:last-child {
		margin-bottom: 0;
	}

	&.strong {
		font-weight: bold;
		font-size: clamp(14px, 4vw, 26px);
		line-height: clamp(24px, 4vw, 36px);
		text-transform: uppercase;
		font-family: "Industry Inc Base", sans-serif;

		&.mini {
			font-size: 16px;
			font-weight: bold;
			letter-spacing: 3px;
		}
	}
}

.mobile {
	display: none;

	@media screen and (max-width: 768px) {
		display: block;
	}
}
.desktop {
	@media screen and (max-width: 768px) {
		display: none;
	}
}

.container {
	max-width: 1200px;
	margin: 0 auto;
}

.flex {
	display: flex;
	flex-wrap: wrap;
	gap: var(--padding);

	&.no-gap {
		gap: 0;
	}

	> div {
		flex: 1;

		&.flex-2_3 {
			flex: 2;
		}
	}

	@media screen and (max-width: 768px) {
		flex-direction: column;

		div {
			/* width: 100%; */
		}
	}
}

.v-center {
	align-items: center;
}
.h-center {
	justify-content: center;
	text-align: center;
}
.h-right {
	justify-content: flex-end;
}

header {
	padding: calc(var(--padding) * 0.5) var(--padding);
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	overflow-x: hidden;

	a {
		img {
			display: block;
		}
	}

	nav {
		display: flex;
		flex-wrap: wrap;
		gap: var(--padding);
		align-items: center;
		a {
			color: #000;
			text-decoration: none;
			margin-left: 1rem;
			font-family: "Industry Inc Base", sans-serif;
			font-size: 20px;

			img {
				height: 1.5rem;
			}

			&:hover,
			&:active,
			&:focus {
				color: var(--gold);
			}
		}

		&.social {
			gap: 1rem;
		}
	}

	&.open {
		position: fixed;
		flex-direction: column;
		width: 100%;
		height: 100%;
		justify-content: space-between;
		z-index: 2000;
		/* animation: fadeIn 0.2s ease-in-out; */

		&::before {
			content: "";
			position: fixed;
			left: 0;
			top: 0;
			width: 100vw;
			height: 100vh;
			background-color: #fff;
			z-index: 1000;
		}

		a {
			position: relative;
			z-index: 1001;
		}

		nav {
			&.menu {
				z-index: 1001;
				display: flex;
				flex-direction: column;
			}
			&.social {
				margin-bottom: 3rem;
				z-index: 1001;
				display: flex;
				flex-direction: row;
				justify-content: center;
			}
		}
	}

	@media screen and (max-width: 768px) {
		position: absolute;

		.menu-toggle {
			display: flex;
			flex-direction: column;
			justify-content: center;
			align-items: center;
			position: fixed !important;
			z-index: 1001;
			right: 0;
			top: 0;
			padding: 2rem;
			hr {
				margin: 0.1rem;
				width: 1.5rem;
				border: 1px solid #000;
			}
		}

		nav {
			display: none;
		}
	}
}

section {
	overflow-x: hidden;

	&#kampaania {
		background-image: url("../images/bg-green.webp");
		background-size: cover;
		background-position: center;
		padding: calc(var(--padding) * 2) var(--padding);

		@media screen and (max-width: 768px) {
			background-position: center left;
			padding: var(--padding) var(--padding);
			padding-top: calc(var(--padding) * 3);
		}
	}

	&#reeglid {
		padding: calc(var(--padding) * 2) var(--padding);

		a {
			color: inherit;
		}

		@media screen and (max-width: 768px) {
			padding: var(--padding) var(--padding);
			img {
				width: 100%;
			}
		}
	}

	&#tooted {
		background-image: url("../images/bg-green-empty.webp");
		background-size: cover;
		background-position: center;

		.bright {
			position: relative;
			z-index: 1;
			padding: var(--padding);

			img {
				transition: transform 0.3s ease-in-out;
			}

			&:hover {
				img {
					transform: scale(1.1);
				}
			}

			.gradient {
				position: absolute;
				right: 0;
				top: 0;
				width: 100%;
				height: 100%;
				z-index: -1;
				/* aspect-ratio: 1 / 1; */

				background: radial-gradient(
					circle,
					rgba(255, 255, 255, 0) 0%,
					rgba(255, 255, 255, 1) 100%,
					/* rgba(121, 214, 76, 1) 70%, */ /* rgba(121, 214, 76, 1) 100% */
				);
			}

			h3 {
				color: #fff;
			}
			p {
				max-width: 25%;
			}
		}

		@media screen and (max-width: 768px) {
			p {
				max-width: 100%;
			}
			img {
				width: 100%;
			}
		}
	}

	&#tooted-2 {
		.citrus,
		.breeze {
			position: relative;
			z-index: 1;
			background-color: rgb(253 98 110);
			padding: calc(var(--padding) * 2) var(--padding);

			img {
				transition: transform 0.3s ease-in-out;
			}

			&:hover {
				img {
					transform: scale(1.1);
				}
			}

			.gradient {
				position: absolute;
				right: 0;
				top: 0;
				height: 100%;
				z-index: -1;
				aspect-ratio: 1 / 1;

				background: radial-gradient(
					circle,
					rgba(255, 255, 255, 0.7) 0%,
					rgba(253, 98, 110, 1) 70%,
					rgba(251, 94, 108, 1) 100%
				);
			}

			h3 {
				color: #fff;
			}

			@media screen and (max-width: 768px) {
				background-position: center;

				.gradient {
					width: 100%;
					background-size: 200%;
					background-position: center;
				}

				img {
					width: 100%;
				}
			}
		}
		.breeze {
			background-color: rgb(233 165 0);

			.gradient {
				position: absolute;
				right: 0;
				top: 0;
				width: 100%;
				height: 100%;
				z-index: -1;
				/* aspect-ratio: 1 / 1; */

				background: radial-gradient(
					circle,
					rgba(255, 255, 255, 0.7) 0%,
					rgba(248, 226, 89, 1) 50%,
					rgba(233, 165, 0, 1) 100%
				);
			}
		}
	}

	.products {
		padding: var(--padding);
		.container {
			display: grid;
			grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
			gap: calc(0.5 * var(--padding));
			article {
				display: flex;
				flex-direction: column;
				justify-content: space-between;
				padding: calc(0.5 * var(--padding));
				background-color: #f0f0f0;
				h2 {
					color: var(--gold);
					font-size: 2rem;
					line-height: 2rem;
					strong {
						display: block;
						color: #000;
						font-weight: normal;
					}
				}
				p {
					font-size: 1rem;
					margin-bottom: 0;
				}
				div {
					text-align: center;
					padding: var(--padding) 0 0 0;
					img {
						max-width: 50%;
					}
				}
			}
		}
	}

	&#meedia {
		background-color: #000;
		padding: var(--padding);

		p {
			color: #fff;
			max-width: 75%;

			strong {
				color: var(--gold);
			}
		}

		@media screen and (max-width: 768px) {
			p {
				text-align: center;
				max-width: 100%;
			}
		}
	}
}

footer {
	padding: var(--padding);

	.strong {
		line-height: 1.5em;
	}

	nav {
		display: flex;
		flex-wrap: wrap;
		gap: var(--padding);
		align-items: center;
		a {
			color: #000;
			text-decoration: none;
			margin-left: 1rem;
			font-family: "Industry Inc Base", sans-serif;
			font-size: 20px;

			img {
				height: 1.5rem;
			}

			&:hover,
			&:active,
			&:focus {
				color: var(--gold);
			}
		}

		&.social {
			gap: 1rem;
		}
	}

	@media screen and (max-width: 768px) {
		text-align: center;
		p {
			width: 100%;
		}

		nav {
			&.menu {
				display: flex;
				flex-direction: column;
			}
			&.social {
				margin-top: calc(2 * var(--padding));
			}
		}
	}
}

.modal {
	position: fixed;
	top: 2rem;
	left: 2rem;
	right: 2rem;
	bottom: 2rem;
	background-color: #fff;
	display: flex;
	display: none;
	z-index: 2000;
	box-shadow: 0 0 300px rgba(0, 0, 0, 0.5);

	&.open {
		display: flex;
	}

	> div {
		padding: 2rem;
		padding-right: 4rem;
		overflow: auto;
	}
	.modal-close {
		position: fixed;
		top: 3rem;
		right: 4rem;
		font-size: 2rem;
		cursor: pointer;
		text-decoration: none;
		color: inherit;
	}

	table {
		margin-left: 2.5rem;
		border-collapse: collapse;
		thead {
			th {
				text-align: left;
				padding: 0.5rem 1rem 0.5rem 0;
				border-bottom: 1px solid #000;
			}
		}
		td {
			padding: 0.5rem 1rem 0.5rem 0;
			border-bottom: 1px solid #000;
		}
	}

	@media screen and (max-width: 768px) {
		padding: 1rem !important;

		.close {
			position: absolute;
			top: 0.2rem;
			right: 1rem;
			font-size: 2rem;
			cursor: pointer;
			text-decoration: none;
			color: inherit;
		}
		table {
			display: block;
			overflow-x: auto;
			white-space: nowrap;
			margin-left: 0;
		}
	}
}

/* Animations */

.can-animation {
	position: relative;
	/* height: 100%; */
	min-width: 320px;
	min-height: 320px;
	aspect-ratio: 1 / 1;

	img {
		transition: transform 0.3s ease-in-out;
	}
	&:hover {
		img {
			transform: scale(1.1);
		}
	}

	> div {
		position: absolute;

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

	.green-can {
		z-index: 30;
		left: -10%;
		animation: sway 8s linear infinite;
		img {
			width: 100%;
		}
	}
	.yellow-can {
		z-index: 20;
		left: 35%;
		animation: sway 6s linear infinite;
		img {
			width: 100%;
		}
	}
	.uus-toode {
		z-index: 40;
		bottom: 0;
		right: 0;
		img {
			width: 100%;
		}
	}

	@media screen and (max-width: 768px) {
		margin-left: -2rem;
		width: 100dvw;
		height: 100dvw;

		.green-can {
			height: 90%;
			left: 1rem;
			img {
				width: auto;
			}
		}
		.yellow-can {
			height: 75%;
			left: 40%;
			top: -10dvw;
			img {
				width: auto;
			}
		}

		.uus-toode {
			z-index: 40;
			bottom: 2rem;
			right: 2rem;
			width: 25dvw;
		}
	}
}

/* Animations */
@keyframes sway {
	0% {
		transform-origin: bottom;
		transform: rotate(-1.5deg);
	}
	50% {
		transform-origin: bottom;
		transform: rotate(1.5deg);
	}
	100% {
		transform-origin: bottom;
		transform: rotate(-1.5deg);
	}
}
