/* ----------------------------------- Fonts ---------------------------------- */

@font-face {
	font-family: "Plus Jakarta Sans";
	src: url("fonts/PlusJakartaSans-latin-var.woff2") format("woff2");
	font-weight: 400 700;
	font-style: normal;
	font-display: swap;
}

@font-face {
	font-family: "Cal Sans";
	src: url("fonts/CalSans-latin.woff2") format("woff2");
	font-weight: 400;
	font-style: normal;
	font-display: swap;
}

/* ----------------------------------- Tokens --------------------------------- */

:root {
	--color-background: #fafaf6;
	--color-typography: #1c1c14;
	--color-secondary: #cacaca;

	--color-web-primary: #5391f6;
	--color-social-primary: #b46ff5;
	--color-branding-primary: #ed7c4e;

	--font-display: "Cal Sans", "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
	--font-body: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;

	--text-h3: 1.5rem;
	--text-body-large: 1.125rem;
	--text-body: 1rem;
	--text-body-small: 0.875rem;

	--gradient-adn: linear-gradient(
		90deg,
		var(--color-web-primary),
		var(--color-social-primary) 50%,
		var(--color-branding-primary)
	);

	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	--page-x: 24px;
	--page-y: 28px;
}

/* ----------------------------------- Reset ---------------------------------- */

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

html,
body {
	margin: 0;
}

body {
	background: var(--color-background);
	color: var(--color-typography);
	font-family: var(--font-body);
	font-size: var(--text-body);
	font-weight: 500;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	font-synthesis: none;
	overflow-x: hidden;
}

ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

a {
	color: inherit;
	text-decoration: none;
}

a:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 2px;
	border-radius: 4px;
}

svg {
	display: block;
}

::selection {
	background: var(--color-typography);
	color: var(--color-background);
}

/* ----------------------------------- Layout --------------------------------- */

.page {
	min-height: 100vh;
	min-height: 100svh;
	display: flex;
	flex-direction: column;
	padding: var(--page-y) var(--page-x);
}

.page > * {
	width: 100%;
	flex: none;
}

.stage {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-bottom: min(14svh, 10rem);
}

/* ---------------------------------- Masthead -------------------------------- */

.masthead {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 20px;
}

.brand {
	display: flex;
	margin: 0;
}

.brand__mark {
	height: 32px;
	width: auto;
}

.eyebrow {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: var(--text-body-small);
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.025em;
	text-align: right;
}

.eyebrow__lead {
	width: 24px;
	height: 1px;
	background: currentColor;
	flex: none;
}

/* ----------------------------------- Title ---------------------------------- */

.kicker {
	margin: 0 0 18px;
	font-family: var(--font-body);
	font-size: var(--text-body-small);
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: 0.01em;
}

.title {
	margin: 0 0 -0.04em;
	font-family: var(--font-display);
	font-weight: 400;
	font-size: clamp(2.5rem, min(13vw, 12svh), 4.5rem);
	line-height: 0.95;
	letter-spacing: -0.015em;
}

.title__line {
	display: block;
}

.title__dot {
	display: inline-block;
	width: 0.22em;
	height: 0.22em;
	border-radius: 50%;
	background-image: var(--gradient-adn);
	margin-left: 0.05em;
	vertical-align: baseline;
}

/* ---------------------------------- Horizon --------------------------------- */

.horizon {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 28px 0 0;
	font-size: var(--text-body-large);
	font-weight: 400;
	width: fit-content;
}

.horizon strong {
	font-weight: 700;
}

.horizon__burst {
	width: 0.8em;
	height: 1.3em;
	flex: none;
}

/* ---------------------------------- Colophon -------------------------------- */

.colophon {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.rule {
	position: relative;
	height: 1px;
	background: var(--color-secondary);
	flex: none;
}

.rule::before,
.rule::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 6px;
	height: 6px;
	background: var(--color-secondary);
	rotate: 45deg;
	translate: -50% -50%;
}

.rule::before {
	left: 0;
}

.rule::after {
	left: 100%;
}

.colophon__row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 36px;
}

.poles {
	display: flex;
	gap: 36px;
}

.pole {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.pole__mark {
	height: 3px;
	width: 100%;
	background: var(--pole);
}

.pole__name {
	font-family: var(--font-body);
	font-size: var(--text-h3);
	font-weight: 700;
	white-space: nowrap;
}

.pole--web {
	--pole: var(--color-web-primary);
}

.pole--social {
	--pole: var(--color-social-primary);
}

.pole--branding {
	--pole: var(--color-branding-primary);
}

.contacts {
	display: flex;
	gap: 24px;
	flex-wrap: wrap;
	justify-content: flex-end;
	font-size: var(--text-body-small);
}

.contacts a {
	text-decoration: underline;
	text-decoration-color: var(--color-secondary);
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

.contacts a:hover {
	text-decoration-color: var(--color-typography);
	text-decoration-thickness: 2px;
}

.contacts__mail {
	font-weight: 600;
}

/* --------------------------------- Responsive ------------------------------- */

@media (max-width: 639px) {
	.masthead {
		flex-direction: column;
		gap: 14px;
	}

	.eyebrow {
		text-align: left;
	}
}

@media (max-width: 767px) {
	.colophon__row {
		flex-direction: column;
		align-items: flex-start;
		gap: 28px;
	}

	.poles {
		flex-direction: column;
		gap: 16px;
	}

	.pole {
		flex-direction: row;
		align-items: center;
		gap: 12px;
	}

	.pole__mark {
		width: 20px;
		flex: none;
	}

	.contacts {
		justify-content: flex-start;
	}
}

@media (min-width: 640px) {
	:root {
		--page-x: 40px;
		--page-y: 40px;
	}
}

@media (min-width: 768px) {
	.kicker {
		margin-bottom: 22px;
		font-size: var(--text-body);
	}

	.title {
		font-size: clamp(3.5rem, min(9vw, 16svh), 9.5rem);
		line-height: 0.93;
	}

	.title__dot {
		width: 0.18em;
		height: 0.18em;
	}

	.horizon {
		margin-top: 36px;
		font-size: var(--text-h3);
	}

	.poles {
		gap: 48px;
	}
}

@media (min-width: 1024px) {
	:root {
		--page-x: 64px;
		--page-y: 56px;
	}
}

/* ----------------------------------- Motion --------------------------------- */

@media (prefers-reduced-motion: no-preference) {
	@keyframes draw {
		from {
			stroke-dashoffset: 100;
			opacity: 0;
		}
	}

	@keyframes rise {
		from {
			opacity: 0;
			translate: 0 12px;
		}
	}

	@keyframes lift {
		from {
			translate: 0 108%;
		}
	}

	@keyframes wipe {
		from {
			scale: 0 1;
		}
	}

	@keyframes bounce {
		from {
			opacity: 0;
			scale: 0.5;
		}
	}

	.rise {
		animation: rise var(--dur, 0.45s) var(--ease) var(--d, 0s) both;
	}

	.draw {
		stroke-dasharray: 100;
		animation: draw var(--dur, 0.32s) var(--ease) var(--d, 0s) both;
	}

	.title__line {
		overflow: hidden;
		padding-block: 0.14em;
		margin-block: -0.14em;
	}

	.title__line > span {
		display: inline-block;
		animation: lift 0.62s var(--ease) var(--d, 0s) both;
	}

	.title__dot {
		animation: bounce 0.34s cubic-bezier(0.34, 1.32, 0.64, 1) 0.96s both;
	}

	.rule {
		transform-origin: left;
		animation: wipe 0.64s var(--ease) 1.46s both;
	}

	.pole__mark {
		transform-origin: left;
		animation: wipe 0.38s var(--ease) var(--d, 0s) both;
	}
}
