@font-face {
	font-family: 'League Spartan';
	src: url('./font/LeagueSpartan-VariableFont_wght.woff2') format('woff2');
	font-weight: 100 900;
	font-display: swap;
}

/* 1 jednostka projektu (u) = 1px przy oknie o wysokości 1200px; wszystko skaluje się z wysokością okna */
:root {
	/* KOLORY */
	--bg: #020046; /* tło strony */
	--purple: #1d006e; /* duże środkowe koło */
	--magenta: #76006a; /* koło za nim (prawy dół) */
	--olive: #787300; /* koło za nim (lewa góra) */
	--halo: var(--magenta); /* obwódka za kołem każdego projektu */
	--text: #fff; /* cały tekst */

	/* ROZMIARY */
	--u: calc(100vh/1200);
	--h: min(var(--u), calc(100vw/1100));
	--header-h: min(calc(170 * var(--h)), 130px);

	--animation-time: 5s;
	--animation-delay: -2.5s;
}
@supports (height: 100dvh) {
	:root {
		--u: calc(100dvh/1200);
	}
}
* {
	box-sizing: border-box;
}
html,
body {
	height: 100%;
	margin: 0;
	overflow: hidden;
	background: var(--bg);
	color: var(--text);
}
body::before {
	content: '';
	position: fixed;
	left: 0;
	right: 0;
	height: var(--header-h);
	background: var(--bg);
	z-index: 4;
	pointer-events: none;
}
body {
	font-family: 'League Spartan', sans-serif;
	font-weight: 300;
	font-size: calc(28 * var(--u));
	line-height: calc(36 * var(--u));
}
a {
	color: inherit;
	text-decoration: none;
	transition: opacity 0.2s;
	-webkit-tap-highlight-color: transparent;
}
a:hover {
	opacity: 0.6;
}

header {
	position: fixed;
	z-index: 5;
	left: calc(90 * var(--h));
	right: calc(119 * var(--h));
	height: var(--header-h);
	display: flex;
	justify-content: space-between;
	align-items: center;
}
header > a {
	transform: translateX(calc(-46 * var(--u)));
}
header img {
	height: var(--header-h);
	width: auto;
	max-width: 65%;
	max-height: var(--header-h);
	object-fit: contain;
	object-position: left center;
	display: block;
}
nav {
	display: flex;
	gap: calc(106 * var(--h));
	padding-top: calc(12 * var(--h));
}
.nav-toggle {
	display: none;
}
nav a {
	font-size: max(15px, calc(29 * var(--h)));
}
footer {
	position: fixed;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: 0;
	height: calc(136 * var(--h));
	padding: 0 calc(119 * var(--h)) 0 calc(204 * var(--h));
	display: flex;
	align-items: center;
	gap: calc(47 * var(--h));
	font-size: max(12px, calc(18 * var(--h)));
	line-height: 1.2;
}
footer b {
	font-weight: 500;
	font-size: 1.11em;
}
footer a {
	margin-left: auto;
}
.mobile-break {
	display: none;
}

.scroller {
	position: fixed;
	inset: 0;
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	cursor: grab;
	user-select: none;
	touch-action: pan-x;
	outline: none;
}
.scroller::-webkit-scrollbar {
	display: none;
}
.scroller.drag {
	cursor: grabbing;
}
.track {
	position: relative;
	display: flex;
	align-items: flex-start;
	height: 100%;
	width: max-content;

	padding-right: calc(119 * var(--u));
}

.intro {
	position: relative;
	flex: 0 0 calc(817 * var(--u));
	height: 100%;
}
.c {
	position: absolute;
	aspect-ratio: 1;
	border-radius: 50%;
	animation: breathe var(--d) ease-in-out infinite;
	animation-delay: var(--dl, 0s);
}
.olive {
	left: calc(-100 * var(--u));
	top: calc(168 * var(--u));
	width: calc(780 * var(--u));
	background: var(--olive);
	--d: 7s;
	--s: 1.05;
}
.magenta {
	left: calc(44 * var(--u));
	top: calc(286 * var(--u));
	width: calc(762 * var(--u));
	background: var(--magenta);
	--d: 8s;
	--dl: -3s;
	--s: 1.045;
}
.purple {
	left: calc(-32 * var(--u));
	top: calc(218 * var(--u));
	width: calc(758 * var(--u));
	background: var(--purple);
	--d: 6s;
	--dl: -1.5s;
	--s: 1.02;
}
@keyframes breathe {
	50% {
		transform: scale(var(--s));
	}
}
.copy {
	position: absolute;
	left: calc(170 * var(--u));
	top: calc(404 * var(--u));
	white-space: nowrap;
	letter-spacing: -0.01em;
}
.copy h1 {
	margin: 0;
	font: inherit;
	font-weight: 500;
}
.copy p {
	margin: 0 0 calc(20 * var(--u));
}

.project {
	position: relative;
	flex: 0 0 calc(398 * var(--u));
	height: calc(368 * var(--u));
	animation: float var(--animation-time) ease-in-out infinite alternate;
}
.project:nth-of-type(odd) {
	margin-top: calc(226 * var(--u));
}
.project:nth-of-type(even) {
	margin-top: calc(392 * var(--u));
	animation-duration: var(--animation-time);
	animation-delay: var(--animation-delay);
}
@keyframes float {
	to {
		transform: translate(calc(8 * var(--u)), calc(-18 * var(--u)));
	}
}
.art {
	display: block;
	position: relative;
	top: calc(35 * var(--u));
	width: calc(368 * var(--u));
	aspect-ratio: 1;
}
.art img,
.halo {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
}
.halo {
	border-radius: 50%;
	background: var(--halo);
	transform: translate(calc(-10 * var(--u)), calc(-13 * var(--u)));
	animation: halo 5s ease-in-out infinite;
}
@keyframes halo {
	50% {
		transform: translate(calc(-17 * var(--u)), calc(-21 * var(--u)))
			scale(1.04);
	}
}
.project h2 {
	position: absolute;
	left: calc(94 * var(--u));
	top: calc(365 * var(--u));
	margin: 0;
	font-size: calc(35 * var(--u));
	font-weight: 500;
	line-height: 1;
	color: var(--text);
	text-shadow: 0 0 3px var(--bg), 0 0 8px var(--bg), 0 0 14px var(--bg);
}
.project p {
	position: absolute;
	left: calc(94 * var(--u));
	top: calc(420 * var(--u));
	margin: 0;
	font-size: calc(24 * var(--u));
	line-height: calc(30 * var(--u));
	white-space: nowrap;
}
html {
	-webkit-text-size-adjust: 100%;
}
@media (max-width: 700px) and (orientation: portrait) {
	:root {
		--header-h: clamp(40px, 9vh, 60px);
	}
	header > a {
		transform: none;
	}
	header {
		top: 8px;
		left: 18px;
		right: 18px;
		gap: 10px;
	}
	header > a {
		display: flex;
		align-items: center;
		flex: 0 1 auto;
		min-width: 0;
		height: 85%;
	}
	header img {
		height: 100%;
		width: auto;
		max-width: 100%;
		object-fit: contain;
		object-position: left center;
	}
	nav {
		display: none;
		position: absolute;
		top: calc(100% - 4px);
		right: 0;
		width: min(72vw, 250px);
		padding: 8px;
		background: var(--bg);
		border: 1px solid rgba(255, 255, 255, 0.35);
		flex-direction: column;
		gap: 2px;
	}
	nav.is-open {
		display: flex;
	}
	.nav-toggle {
		display: flex;
		flex: 0 0 44px;
		width: 44px;
		height: 44px;
		padding: 10px 8px;
		border: 1px solid rgba(255, 255, 255, 0.55);
		background: transparent;
		cursor: pointer;
		flex-direction: column;
		justify-content: space-between;
	}
	.nav-toggle span {
		display: block;
		height: 2px;
		width: 100%;
		background: var(--text);
	}
	nav a {
		display: flex;
		align-items: center;
		min-height: 48px;
		padding: 0 12px;
		font-size: clamp(17px, 4.8vw, 21px);
		white-space: nowrap;
	}

	footer {
		height: auto;
		padding: 8px 18px calc(14px + env(safe-area-inset-bottom));
		display: grid;
		grid-template-columns: minmax(0, 1fr) auto;
		gap: 4px clamp(12px, 3.5vw, 20px);
		font-size: clamp(14px, 3.6vw, 18px);
		line-height: 1.25;
	}
	footer b,
	footer > span {
		grid-column: 1;
	}
	footer b {
		grid-row: 1;
	}
	footer > span {
		grid-row: 2;
	}
	footer a {
		display: flex;
		align-items: flex-end;
		min-height: 44px;
		justify-content: flex-end;
		grid-column: 2;
		grid-row: 2;
		margin-left: 0;
	}
	.mobile-break {
		display: inline;
	}
}
@media (max-width: 700px) and (orientation: portrait) {
	.track {
		padding-right: 0;
	}
	.intro,
	.project {
		flex: 0 0 100vw;
		height: 100%;
	}

	.intro {
		--dia: min(80vw, 56vh);
	}
	.c {
		translate: -50% -50%;
	}
	.purple {
		left: 50%;
		top: 50%;
		width: var(--dia);
	}
	.olive {
		left: calc(50% - var(--dia) * 0.075);
		top: calc(50% - var(--dia) * 0.051);
		width: calc(var(--dia) * 1.03);
	}
	.magenta {
		left: calc(50% + var(--dia) * 0.103);
		top: calc(50% + var(--dia) * 0.092);
		width: calc(var(--dia) * 1.005);
	}
	.copy {
		left: 50%;
		top: 50%;
		translate: -50% -50%;
		width: max-content;
		font-size: clamp(12px, 3.9vw, 17px);
		line-height: 1.32;
	}
	.copy p {
		margin-bottom: 0.7em;
	}
	.copy p:last-child {
		margin-bottom: 0;
	}

	.project:nth-of-type(odd),
	.project:nth-of-type(even) {
		margin-top: 0;
	}
	.project {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		padding: 0 8vw;
		text-align: center;
	}
	.art {
		flex: none;
		width: min(74vw, 42vh);
	}
	.project h2 {
		position: static;
		margin: clamp(18px, 6vw, 28px) 0 6px;
		font-size: clamp(20px, 6vw, 26px);
		color: var(--text);
		text-shadow: none;
	}
	.project p {
		position: static;
		font-size: clamp(14px, 4.1vw, 17px);
		line-height: 1.35;
		white-space: normal;
	}
}
@media (max-width: 700px) and (orientation: portrait) and (pointer: coarse) {
	.scroller {
		scroll-snap-type: x mandatory;
	}
	.intro,
	.project {
		scroll-snap-align: start;
	}
}
@media (prefers-reduced-motion: reduce) {
	* {
		animation: none !important;
	}
}
