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

html {
	height: 100%;
}

body {
	margin: 0;
	min-height: 100%;
	min-height: 100dvh;
	display: grid;
	grid-template-rows: auto 1fr auto;
	background-color: #000;
	background-repeat: no-repeat;
	background-position: center;
	background-size: cover;
	background-attachment: scroll;
	font-family: "Russo One", sans-serif;
	-webkit-font-smoothing: antialiased;
}

@media (min-width: 768px) and (hover: hover) {
	body {
		background-attachment: fixed;
	}
}

a {
	-webkit-tap-highlight-color: transparent;
}

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

/* ── Top bar ── */

.top-bar {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.5rem;
	padding:
		max(0.75rem, env(safe-area-inset-top, 0px))
		max(0.75rem, env(safe-area-inset-right, 0px))
		0
		max(0.75rem, env(safe-area-inset-left, 0px));
}

.top-bar__icon {
	display: block;
	height: clamp(2.5rem, 10vw, 4rem);
	width: auto;
}

.socials {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 0.25rem;
}

.top-bar a {
	display: block;
	line-height: 0;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.top-bar a:hover {
	transform: scale(1.04);
	filter: brightness(1.08);
}

.top-bar a:active {
	transform: scale(0.98);
}

/* ── Central portals ── */

.portals {
	display: grid;
	grid-template-columns: 1fr 1fr 1fr;
	align-items: center;
	align-self: center;
	width: 100%;
	padding: 0 0.25%;
}

.portal--mail {
	display: grid;
	grid-template-columns: 1fr 1fr;
	min-width: 0;
}

.portal__link {
	display: block;
	line-height: 0;
	transition: transform 0.15s ease, filter 0.15s ease;
}

.portal__link:hover {
	transform: scale(1.04);
	filter: brightness(1.08);
}

.portal__link:active {
	transform: scale(0.98);
}

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

/* ── Footer ── */

.site-footer {
	text-align: center;
	color: #fafafa;
	padding:
		1rem
		max(0.75rem, env(safe-area-inset-right, 0px))
		max(1rem, env(safe-area-inset-bottom, 0px))
		max(0.75rem, env(safe-area-inset-left, 0px));
}

.site-footer a {
	color: inherit;
	text-decoration: none;
}

.site-footer a:hover {
	text-decoration: underline;
}

.text-shadow {
	text-shadow:
		#000 2px 0 2px,
		#000 0 2px 2px,
		#000 0 -2px 2px,
		#000 -2px 0 2px;
}

.site-footer__title {
	font-size: clamp(1rem, 4.5vw, 1.875rem);
	line-height: 1.3;
}

.site-footer__note {
	display: block;
	margin-top: 0.25rem;
	font-size: clamp(0.7rem, 2.5vw, 0.875rem);
	line-height: 1.4;
}

/* ── Portrait phones: stack portals vertically ── */

@media (max-width: 480px) and (orientation: portrait) {
	.top-bar__icon {
		height: clamp(2rem, 8vw, 2.75rem);
	}

	.top-bar {
		padding-bottom: 0;
	}

	.site-footer {
		padding-top: 0.5rem;
		padding-bottom: max(0.5rem, env(safe-area-inset-bottom, 0px));
	}

	.site-footer__title {
		font-size: clamp(0.8rem, 3.5vw, 1.1rem);
	}

	.site-footer__note {
		font-size: clamp(0.65rem, 2.2vw, 0.8rem);
		margin-top: 0.15rem;
	}

	.portals {
		grid-template-columns: 1fr;
		width: auto;
		margin: 0 auto;
		gap: clamp(0.4rem, 1.5dvh, 0.75rem);
		justify-items: center;
	}

	.portals > .portal {
		width: 100%;
		max-width: min(80vw, calc((100dvh - 11rem) / 3));
	}
}
