/* ========== Tokens ========== */
:root {
	/* Colors */
	--color-text: #424242;
	--color-bg: #fff;
	--color-accent: #eaeaea;
	--color-muted: #6b6b6b;

	/* Typography */
	--font-body: "Simplon Norm", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--font-heading: "Abigeta Display", var(--font-body);

	--fs-body: .875rem;
	--fs-h1: clamp(2.25rem, 1.5rem + 3vw, 4rem);
	--fs-h2: clamp(1.75rem, 1.25rem + 2vw, 2.75rem);
	--fs-h3: clamp(1.25rem, 1.1rem + 0.8vw, 1.75rem);
	--lh-body: 1.6;
	--lh-heading: 1.15;

	/* Spacing */
	--space-section: clamp(3rem, 2rem + 5vw, 7rem);
	--space-gap: clamp(1rem, 0.5rem + 2vw, 2rem);
	--page-gutter: clamp(1rem, 0.47rem + 2.25vw, 2.5rem);
	--split-gap: clamp(1.5rem, 1rem + 2.5vw, 3.5rem);

	/* Header (height of the bar that stays in the layout) */
	--header-bar-h: 4rem;

	/* Motion */
	--transition: 0.2s ease;
	--ease: cubic-bezier(0.22, 0.61, 0.36, 1);

	/* Offset for fixed/sticky elements; set below while the WP admin bar is visible */
	--admin-bar-h: 0px;

	/* Bootstrap bridge (harmless when Bootstrap is off) */
	--bs-body-font-family: var(--font-body);
	--bs-body-color: var(--color-text);
	--bs-body-bg: var(--color-bg);
	--bs-body-line-height: var(--lh-body);
}

@media (min-width: 992px) {
	:root {
		--header-bar-h: 4.5rem;
	}
}

/* ========== Fonts ========== */

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

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

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

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: var(--admin-bar-h);
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--color-text);
	background: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	padding-top: var(--header-bar-h);
}

img,
video {
	max-width: 100%;
	height: auto;
}

h1,
h2,
h3,
h4 {
	font-family: var(--font-heading);
	line-height: var(--lh-heading);
}

h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }

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

.noise {
	background-image: url('../img/noise.gif');
	background-size: 120px;
	opacity: calc(10 / 100);
	height: 100%;
	width: 100%;
	position: fixed;
	top: 0;
	left: 0;
	z-index: 9999;
	pointer-events: none;
}

/* ========== Admin bar ========== */
:root:has(body.admin-bar) {
	--admin-bar-h: 32px;
}

@media (max-width: 782px) {
	:root:has(body.admin-bar) {
		--admin-bar-h: 46px;
	}
}

@media (max-width: 600px) {
	:root:has(body.admin-bar) {
		--admin-bar-h: 0px;
	}
}

/* ========== Layout helpers ========== */
.section {
	padding-block: var(--space-section);
}

.container-fluid {
	--bs-gutter-x: calc(var(--page-gutter) * 2);
}

.footer {
	border-top: .5px solid var(--color-text);
	margin-top: var(--space-gap);
	padding-top: var(--space-gap);
	padding-bottom: var(--space-gap);
}

/* ========== Accessibility ========== */
:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

/* Skip link. Bootstrap ships the hiding part; kept here for projects without it. */
.visually-hidden-focusable:not(:focus):not(:focus-within) {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.visually-hidden-focusable:focus {
	position: fixed;
	top: 1rem;
	left: 1rem;
	z-index: 1000;
	padding: 0.5rem 1rem;
	background: var(--color-bg);
	color: var(--color-text);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-delay: 0s !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		transition-delay: 0s !important;
	}
}

/* ========== Components ========== */
.audio-player {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 0.5rem + 2vw, 2.5rem);
	padding: 1rem clamp(1rem, 0.5rem + 2.5vw, 1.5rem);
	background: url("../img/noise.png") var(--color-accent);
	background-size: cover;
}

.audio-player__toggle {
	display: grid;
	flex: none;
	place-items: center;
	width: 1.5rem;
	height: 1.5rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

/* play: trójkąt */
.audio-player__icon {
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.6rem 0 0.6rem 1rem;
	border-color: transparent transparent transparent currentColor;
	transition: transform 0.4s var(--ease);
}

/* pauza: dwie kreski */
.audio-player.is-playing .audio-player__icon {
	width: 1rem;
	height: 1.2rem;
	border-width: 0 0.3rem;
	border-color: currentColor;
}

/* gentle grow on hover / keyboard focus, the same as on the video button */
.audio-player__toggle:focus-visible .audio-player__icon {
	transform: scale(1.18);
}

@media (hover: hover) {
	.audio-player:hover .audio-player__icon {
		transform: scale(1.18);
	}
}

.audio-player__seek {
	--progress: 0%;
	flex: 1;
	min-width: 0;
	height: 1.5rem;
	margin: 0;
	background: transparent;
	color: inherit;
	appearance: none;
	cursor: pointer;
}

.audio-player__seek::-webkit-slider-runnable-track {
	height: 1px;
	background: linear-gradient(to right, currentColor var(--progress), rgb(66 66 66 / 0.3) var(--progress));
}

.audio-player__seek::-webkit-slider-thumb {
	width: 0.6rem;
	height: 0.6rem;
	margin-top: -0.3rem;
	border: 0;
	border-radius: 50%;
	background: currentColor;
	appearance: none;
}

.audio-player__seek::-moz-range-track {
	height: 1px;
	background: rgb(66 66 66 / 0.3);
}

.audio-player__seek::-moz-range-progress {
	height: 1px;
	background: currentColor;
}

.audio-player__seek::-moz-range-thumb {
	width: 0.6rem;
	height: 0.6rem;
	border: 0;
	border-radius: 50%;
	background: currentColor;
}

.audio-player__time {
	flex: none;
	min-width: 2.5ch;
	font-variant-numeric: tabular-nums;
}

/* --- video: poster + play button; the <video> has no native controls, the button is the control --- */
.video {
	position: relative;
	aspect-ratio: 16 / 9;
	background: var(--color-accent);
}

/* sits under the button (it is inserted before it), so clicks always reach the button */
.video__frame {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	object-fit: contain;
	background: #000;
}

.video__play {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: var(--video-icon, var(--color-text));
	cursor: pointer;
}

/* grain lives on the button: <img> can't have pseudo-elements */
.video__play::after {
	content: '';
	position: absolute;
	inset: 0;
	background-image: url("../img/noise.png");
	background-size: cover;
	opacity: 0.5;
	pointer-events: none;
	transition: opacity 0.4s ease;
}

.video__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	filter: grayscale(1) contrast(.75) brightness(1.25);
	transition: filter 0.5s var(--ease), opacity 0.4s ease;
}

/* the whole button triggers it, so hovering the play icon counts too */
.video__play:focus-visible .video__poster {
	filter: none;
}

@media (hover: hover) {
	.video__play:hover .video__poster {
		filter: none;
	}
}

/* once the video is on screen the poster and its grain fade out */
.video.is-started .video__poster,
.video.is-started .video__play::after {
	opacity: 0;
}

.video__icon {
	position: relative;
	z-index: 1;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 0.6rem 0 0.6rem 1rem;
	border-color: transparent transparent transparent var(--color-bg);
	transition: opacity 0.35s ease, transform 0.4s var(--ease);
}

/* readable on bright frames */
.video.is-started .video__icon {
	filter: drop-shadow(0 0 6px rgb(0 0 0 / 0.45));
}

/* playing: pause icon. box-sizing is border-box, so the width includes the borders:
   1rem = two 0.3rem bars + a 0.4rem gap */
.video.is-playing .video__icon {
	width: 1rem;
	height: 1.2rem;
	border-width: 0 0.3rem;
	border-color: var(--color-bg);
	opacity: 0;
}

.video.is-playing.is-active .video__icon,
.video.is-playing .video__play:focus-visible .video__icon {
	opacity: 1;
}

/* gentle grow on hover / keyboard focus, for both play and pause */
.video__play:focus-visible .video__icon {
	transform: scale(1.18);
}

@media (hover: hover) {
	.video__play:hover .video__icon {
		transform: scale(1.18);
	}

	.video.is-playing .video__play:hover .video__icon {
		opacity: 1;
	}
}

/* keyboard focus ring sits inside the card instead of framing the whole video */
.video__play:focus-visible {
	outline: 2px solid var(--color-bg);
	outline-offset: -0.5rem;
}

/* ========== Parts: Hero ========== */
.hero {
	padding-bottom: var(--space-gap);
}

.hero__media {
	position: relative;
	overflow: hidden;
	aspect-ratio: 4 / 5;
}

.hero__img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 40% center;
}

/* mobile: text sits below the image */
.hero__lead {
	max-width: 100%;
    text-align: center;
	margin: var(--space-gap) 0 0;
}

@media (min-width: 768px) {
	.hero__media { aspect-ratio: 1432 / 622; }
	.hero__img   { object-position: 70% 20%; }

	.hero__inner { position: relative; }

	/* desktop: text overlays the image */
	.hero__lead {
		position: absolute;
		left: 0;
		bottom: 0;
		margin: 0;
		max-width: 18rem;
		text-align: justify;
	}
}

/* ========== Parts: About ========== */
.about {
	padding-block: var(--space-gap);
}

.about__title {
	margin-bottom: var(--space-gap);
	margin-top: var(--space-gap);
}

.about__text {
	text-align: justify;
	/* hyphens: auto; */
}

.about__text p {
	margin: 0 0 1em;
	text-indent: 4em;

	&:last-of-type {
		margin: 0;
	}
}

.about__media {
	aspect-ratio: 3 / 2;
}

.about__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

@media (min-width: 768px) {
	.about__content {
		padding-block: var(--space-gap);
		padding-right: var(--split-gap);
	}

	.about__title {
		margin-top: 0;
	}

	.about__text p {
		width: 80%;

		&:last-of-type {
			margin: 0 0 0 auto;
		}
	}

	.about__text p + p {
		margin-left: auto;
	}
}

/* ========== Parts: Voice ========== */
.voice {
	padding-block: var(--space-gap);
}

.voice__media {
	aspect-ratio: 3 / 2;
	margin-top: var(--space-gap);
	overflow: hidden;
}

.voice__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* the picture next to the player jumps to the voice (JS moves this wrapper, the reveal animates the <img>) */
.voice__motion {
	height: 100%;
	transform-origin: 62% 45%;
}

/* spare room, so a jump never shows the edge of the frame; only while the effect can run.
   Keep 1.07 in sync with BASE in main.js */
.voice__motion.is-ready {
	transform: scale(1.07);
}

.voice__motion.is-reacting {
	will-change: transform;
}

.voice__title {
	margin-bottom: var(--space-gap);
}

.voice__text {
	text-indent: 4em;
}

.voice__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 0 0.5em;
	margin-block: var(--space-gap) .75rem;
}

.voice__tag {
	padding: 0;
	border: 0;
	font: inherit;
	color: inherit;
	text-transform: uppercase;
	cursor: pointer;
}

.voice__tag:hover,
.voice__tag[aria-pressed="true"] {
	border-bottom-color: var(--color-text);
}

.voice__note {
	margin: .75rem 0 0;
	font-size: .75rem;
	transition: opacity .22s ease, transform .22s ease;
}

.voice__note.is-swapping {
	opacity: 0;
	transform: translateY(4px);
}

@media (min-width: 768px) {
	.voice__content {
		padding-left: var(--split-gap);
	}

	.voice__content > * {
		max-width: 512px;
	}

	.voice__media {
		margin-top: 0;
	}
}

/* ========== Parts: Logos ========== */
.logos {
	padding-block: var(--space-gap);
}

.logos__viewport {
	overflow: hidden;
	/* -webkit-mask-image: linear-gradient(to right, transparent, #fff 5%, #fff 95%, transparent);
	mask-image: linear-gradient(to right, transparent, #fff 5%, #fff 95%, transparent); */
}

.logos__track {
	display: flex;
	width: max-content;
	animation: logos-scroll calc(var(--logos-count, 10) * 4s) linear infinite;
}

.logos__group {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: space-between;
	gap: clamp(2rem, 1rem + 4vw, 5rem);
	min-width: calc(100vw - var(--page-gutter) * 2);
	margin: 0;
	padding: 0 clamp(2rem, 1rem + 4vw, 5rem) 0 0;
	list-style: none;
}

.logos__item {
	flex: none;
	width: clamp(3.75rem, 3.18rem + 2.44vw, 5.375rem);
	aspect-ratio: 16 / 9;
}

.logos__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	opacity: 0.85;
}

@keyframes logos-scroll {
	to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
	.logos__track {
		width: auto;
		animation: none;
	}

	.logos__group {
		flex-wrap: wrap;
		justify-content: center;
		min-width: 0;
		padding-right: 0;
	}

	.logos__group[aria-hidden="true"] {
		display: none;
	}
}

/* ========== Parts: Contact ========== */
.contact {
	padding-block: var(--space-gap);
}

.contact__media {
	aspect-ratio: 3 / 2;
}

.contact__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.contact__content {
	padding-block: var(--space-gap);
}

.contact__title {
	margin-bottom: var(--space-gap);
}

.contact__text {
	text-indent: 4em;
}

.contact__details {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	gap: 0.5rem 2rem;
	margin-top: var(--space-gap);
}

@media (min-width: 768px) {
	.contact__content {
		padding-left: var(--split-gap);
	}

	.contact__content > * {
		max-width: 512px;
	}
}

/* ========== Parts: Achievements ========== */
.achievements {
	padding-block: var(--space-gap);
}

.achievements__header {
	margin-bottom: var(--space-gap);
	text-align: center;
}

.achievements__title {
	margin-bottom: var(--space-gap);
}

.achievements__text {
	max-width: 624px;
	margin: 0 auto;
}

.achievements__list {
	margin: 0;
}

.achievements__row {
	display: grid;
	gap: .25rem;
	padding-block: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	border-bottom: .5px solid var(--color-text);
}

.achievements__category {
	font-size: .75rem;
	font-weight: inherit;
	text-transform: uppercase;
}

.achievements__description {
	margin: 0;
	transition: transform 0.5s var(--ease);
}

@media (min-width: 768px) {
	.achievements__row {
		grid-template-columns: minmax(8rem, 17%) 1fr;
		gap: var(--space-gap);
		align-items: baseline;
	}
}

@media (hover: hover) {
	.achievements__row:hover .achievements__description {
		transform: translateX(0.5rem);
	}
}

/* ========== Parts: Portfolio ========== */
.portfolio {
	padding-block: var(--space-gap);
}

.portfolio__banner {
	aspect-ratio: 16 / 9;
}

.portfolio__banner-img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: 45% 30%;
}

.portfolio__header {
	margin-block: var(--space-gap);
	text-align: center;
}

.portfolio__title {
	margin-bottom: var(--space-gap);
}

.portfolio__text {
	max-width: 624px;
	margin: 0 auto;
	text-indent: 0;
}

.portfolio__grid {
	display: grid;
	gap: var(--space-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.portfolio__grid + .portfolio__grid {
	margin-top: var(--space-gap);
}

.portfolio__caption {
	margin: 0.5rem 0 0;
	font-size: .75rem;
}

@media (min-width: 576px) {
	.portfolio__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (min-width: 768px) {
	.portfolio__banner {
		aspect-ratio: 1432 / 260;
	}
}

@media (min-width: 992px) {
	.portfolio__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* ========== Parts: Header ========== */
html.is-menu-open {
	overflow: hidden;
}

.header {
	position: fixed;
	top: var(--admin-bar-h);
	right: 0;
	left: 0;
	z-index: 100;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.header.is-hidden {
	transform: translateY(calc(-100% - var(--admin-bar-h)));
}

.header__brand {
	position: relative;
	z-index: 2;
	height: var(--header-bar-h);
	background: var(--color-bg);
}

.header__brand .container-fluid {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 100%;
}

.header__logo {
	position: relative;
	display: block;
	width: fit-content;
}

.header__logo img {
	display: block;
	width: 9rem;
	height: auto;
}

.header__toggle {
	position: relative;
	width: 2.75rem;
	height: 2.75rem;
	margin-right: -0.75rem;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	cursor: pointer;
}

.header__toggle span {
	position: absolute;
	left: 0.75rem;
	right: 0.75rem;
	height: 1px;
	background: currentColor;
	transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1), top 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.header__toggle span:nth-child(1) { top: calc(50% - 4px); }
.header__toggle span:nth-child(2) { top: calc(50% + 3px); }

.header.is-open .header__toggle span:nth-child(1) {
	top: 50%;
	transform: rotate(45deg);
}

.header.is-open .header__toggle span:nth-child(2) {
	top: 50%;
	transform: rotate(-45deg);
}

.header__bar {
	position: fixed;
	inset: 0;
	z-index: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	height: 100dvh;
	padding-top: calc(var(--header-bar-h) + var(--admin-bar-h));
	background: var(--color-bg);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.35s ease, visibility 0s linear 0.35s;
}

.header.is-open .header__bar {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.35s ease;
}

.header__bar .container-fluid {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--space-section);
	text-align: center;
}

.header__menu {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.header__menu a {
	font-family: var(--font-heading);
	font-size: var(--fs-h2);
	line-height: var(--lh-heading);
}

.header__cta {
	font-size: 0.8125rem;
	text-transform: uppercase;
}

@media (min-width: 992px) {
	.header {
		display: flex;
		flex-direction: column-reverse;
	}

	.header__toggle {
		display: none;
	}

	.header__bar {
		position: static;
		display: block;
		height: var(--header-bar-h);
		padding: 0;
		font-size: 0.8125rem;
		text-transform: uppercase;
		opacity: 1;
		visibility: visible;
		transition: none;
	}

	.header__bar .container-fluid {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		height: 100%;
		gap: var(--space-gap);
		text-align: left;
	}

	.header__menu {
		flex-direction: row;
		flex-wrap: wrap;
		align-items: baseline;
		gap: 0.25rem clamp(1rem, 0.5rem + 2.3vw, 2.65rem);
	}

	.header__menu a {
		font-family: inherit;
		font-size: inherit;
		line-height: inherit;
	}

	.header__cta {
		margin-left: auto;
		font-size: inherit;
		text-transform: inherit;
	}

	.header__brand {
		height: auto;
		padding-bottom: var(--space-gap);
		background: none;
	}

	.header__brand::before {
		content: '';
		position: absolute;
		inset: 0;
		background: var(--color-bg);
		opacity: 1;
	}

	.header.is-top .header__brand::before {
		opacity: 0;
		transition: opacity 0.5s ease;
	}

	.header__brand .container-fluid {
		display: block;
		height: auto;
	}

	.header__logo img {
		width: clamp(9rem, 3rem + 15vw, 17.25rem);
	}
}

/* ========== Motion ========== */
.hero__img { animation: hero-zoom 1.8s var(--ease) both; }
.hero__lead { animation: fade-up 0.9s var(--ease) 0.55s both; }

@keyframes hero-zoom {
	from { transform: scale(1.08); }
	to   { transform: scale(1); }
}

@keyframes fade-up {
	from { opacity: 0; transform: translateY(0.75rem); }
	to   { opacity: 1; transform: none; }
}

.js [data-reveal] {
	opacity: 0;
	transform: translateY(1.25rem);
	transition: opacity 0.8s var(--ease) var(--reveal-delay, 0s), transform 0.8s var(--ease) var(--reveal-delay, 0s);
}

.js [data-reveal].is-visible {
	opacity: 1;
	transform: none;
}

/* achievement rows: a short slide-up as each row reaches the viewport (the stagger is set in JS) */
.js [data-reveal="line"] {
	transform: translateY(1rem);
	transition: opacity 0.7s var(--ease) var(--reveal-delay, 0s), transform 0.7s var(--ease) var(--reveal-delay, 0s);
}

.js [data-reveal="image"] {
	position: relative;
	overflow: hidden;
	opacity: 1;
	transform: none;
}

.js [data-reveal="image"]::after {
	content: '';
	position: absolute;
	inset: 0;
	background: var(--color-bg);
	transform-origin: bottom;
	transition: transform 1.1s var(--ease) var(--reveal-delay, 0s);
	pointer-events: none;
}

.js [data-reveal="image"] img {
	transform: scale(1.12);
	transition: transform 1.5s var(--ease) var(--reveal-delay, 0s);
}

.js [data-reveal="image"].is-visible::after {
	transform: scaleY(0);
}

.js [data-reveal="image"].is-visible img {
	transform: none;
}

/* portfolio cards: stagger follows the position in the row, not the index in the list */
.portfolio__item {
	--reveal-delay: 0s;
}

@media (min-width: 576px) and (max-width: 991.98px) {
	.portfolio__item:nth-child(2n) { --reveal-delay: 0.12s; }
}

@media (min-width: 992px) {
	.portfolio__item:nth-child(3n + 2) { --reveal-delay: 0.12s; }
	.portfolio__item:nth-child(3n)     { --reveal-delay: 0.24s; }
}

.header__menu a,
.header__cta,
.contact__details a,
.voice__tag,
.footer a {
	display: inline-block;
	background: linear-gradient(currentColor, currentColor) 100% 100% / 0 .5px no-repeat;
	transition: background-size 0.5s var(--ease);
}

.header__menu a:focus-visible,
.header__cta:focus-visible,
.contact__details a:focus-visible,
.voice__tag:focus-visible,
.footer a:focus-visible,
.voice__tag[aria-pressed="true"] {
	background-position: 0 100%;
	background-size: 100% .5px;
}

@media (hover: hover) {
	.header__menu a:hover,
	.header__cta:hover,
	.contact__details a:hover,
	.voice__tag:hover,
	.footer a:hover {
		background-position: 0 100%;
		background-size: 100% .5px;
	}
}

.header__menu li,
.header__cta {
	--d: calc(0.15s + var(--i, 0) * 0.07s);
	opacity: 0;
	transform: translateY(1rem);
}

.header__menu li {
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.header__cta {
	transition: opacity 0.3s ease, transform 0.3s ease, background-size 0.5s var(--ease);
}

.header.is-open .header__menu li {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s var(--ease) var(--d), transform 0.7s var(--ease) var(--d);
}

.header.is-open .header__cta {
	opacity: 1;
	transform: none;
	transition: opacity 0.7s var(--ease) var(--d), transform 0.7s var(--ease) var(--d), background-size 0.5s var(--ease);
}

@media (min-width: 992px) {
	.header__menu li,
	.header__cta {
		opacity: 1;
		transform: none;
	}

	.header__menu li {
		transition: none;
	}

	.header__cta {
		transition: background-size 0.5s var(--ease);
	}
}