.site-header {
	position: fixed;
	inset: 0 0 auto;
	z-index: 100;
	border-bottom: 1px solid transparent;
	transition: background-color 0.35s var(--ease), border-color 0.35s var(--ease);
}

.site-header.is-scrolled {
	border-bottom-color: var(--ink-line);
	background: rgba(16, 19, 24, 0.92);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	min-height: var(--header-height);
	padding-inline: var(--gutter);
}

.site-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-family: var(--font-heading);
	font-size: 1.5rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	line-height: 1.1;
	text-decoration: none;
	text-transform: uppercase;
}

.site-brand__logo {
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
}

@media (max-width: 480px) {
	.site-brand {
		gap: 0.5rem;
		font-size: 1.125rem;
	}

	.site-brand__logo {
		width: 2.75rem;
		height: 2.75rem;
	}
}

/* The name, the links and the button never wrap; below 1280px the menu button takes over instead. */
.site-brand {
	flex-shrink: 0;
	white-space: nowrap;
}

.site-nav {
	display: flex;
	align-items: center;
	gap: clamp(1.25rem, 2vw, 2.5rem);
}

.site-nav__list {
	display: flex;
	gap: clamp(1.25rem, 1.8vw, 2.25rem);
}

.site-nav__list a,
.site-nav .button {
	white-space: nowrap;
}

.site-nav__list a {
	position: relative;
	padding-block: 0.5rem;
	font-family: var(--font-heading);
	font-size: clamp(1rem, 1.15vw, 1.125rem);
	font-weight: 600;
	letter-spacing: 0.1em;
	text-decoration: none;
	text-transform: uppercase;
}

.site-nav__list a::after {
	content: "";
	position: absolute;
	inset: auto 0 0;
	height: 2px;
	background: var(--sky);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.35s var(--ease);
}

.site-nav__list a:hover::after,
.site-nav__list a:focus-visible::after {
	transform: scaleX(1);
}

.site-social {
	display: flex;
	gap: 0.25rem;
	margin-right: -0.75rem;
}

.site-social a {
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	transition: color 0.25s var(--ease), background-color 0.25s var(--ease);
}

.site-social a:hover,
.site-social a:focus-visible {
	background: rgba(60, 191, 240, 0.15);
	color: var(--sky);
}

.site-social .icon {
	width: 1.125rem;
	height: 1.125rem;
}

/* Laptop widths have no room for the icons beside the menu: they stay in the footer and the phone menu. */
@media (min-width: 1280px) and (max-width: 1599px) {
	.site-social {
		display: none;
	}
}

.site-nav-toggle {
	display: none;
}

/* Up to 1279px the links open from the menu button, so a menu of seven or more links still fits. */
@media (max-width: 1279px) {
	.js .site-nav-toggle {
		position: relative;
		z-index: 2;
		display: block;
		width: 2.75rem;
		height: 2.75rem;
		padding: 0;
		border: 0;
		background: none;
		color: inherit;
		cursor: pointer;
	}

	.site-nav-toggle__bars,
	.site-nav-toggle__bars::before {
		position: absolute;
		left: 0.5rem;
		width: 1.75rem;
		height: 2px;
		background: currentColor;
		transition: transform 0.3s var(--ease);
	}

	.site-nav-toggle__bars {
		top: 1.125rem;
	}

	.site-nav-toggle__bars::before {
		content: "";
		top: 0.5rem;
		left: 0;
	}

	.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bars {
		top: 1.375rem;
		transform: rotate(45deg);
	}

	.site-nav-toggle[aria-expanded="true"] .site-nav-toggle__bars::before {
		top: 0;
		transform: rotate(-90deg);
	}

	.site-header__inner {
		flex-wrap: wrap;
	}

	.js .site-header__inner {
		flex-wrap: nowrap;
	}

	.site-nav {
		flex-wrap: wrap;
		gap: 1rem 1.5rem;
		padding-bottom: 1rem;
	}

	.site-nav__list {
		flex-wrap: wrap;
		gap: 0.25rem 1.5rem;
	}

	.js .site-nav {
		position: fixed;
		inset: 0;
		z-index: 1;
		flex-direction: column;
		align-items: flex-start;
		/* "safe": on short screens the links start at the top and scroll, instead of being cut off above. */
		justify-content: safe center;
		gap: clamp(1.75rem, 5vw, 2.5rem);
		overflow-y: auto;
		padding: calc(var(--header-height) + 1rem) var(--gutter) var(--gutter);
		background: var(--ink);
		visibility: hidden;
		opacity: 0;
		transition: opacity 0.3s var(--ease), visibility 0.3s;
	}

	.js .site-nav.is-open {
		visibility: visible;
		opacity: 1;
	}

	.js .site-nav .site-nav__list {
		flex-direction: column;
		gap: clamp(0.5rem, 2vw, 1rem);
	}

	/* About 24px on phones, growing to 40px on tablets. */
	.js .site-nav .site-nav__list a {
		font-size: clamp(1.5rem, 4.5vw + 0.5rem, 2.5rem);
		font-weight: 700;
		line-height: 1.1;
	}

	/* Phone menu: a row of round icons under the links. */
	.js .site-nav .site-social {
		gap: 0.75rem;
		margin-right: 0;
	}

	.js .site-nav .site-social a {
		width: 3rem;
		height: 3rem;
		border: 1px solid var(--ink-line);
	}

	.js .site-nav .site-social .icon {
		width: 1.375rem;
		height: 1.375rem;
	}
}
