/* Transparent header positioned over the hero image. */
.lucy-header {
	position: fixed;
	z-index: var(--z-header);
	top: 0;
	right: 0;
	left: 0;
	border: 0;
	background: transparent;
	color: var(--color-ink);
	transition:
		background-color var(--transition-base),
		box-shadow var(--transition-base),
	backdrop-filter var(--transition-base);
}

.lucy-header.is-scrolled {
	background: rgb(243 245 244 / 68%);
	box-shadow: 0 1px 12px rgb(16 36 30 / 4%);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
}

.lucy-header__inner {
	display: grid;
	width: min(100% - (var(--page-gutter) * 2), var(--content-width));
	min-height: 84px;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	margin-inline: auto;
	transition: min-height var(--transition-base);
}

.lucy-header.is-scrolled .lucy-header__inner {
	min-height: 68px;
}

.lucy-header__brand {
	justify-self: start;
	color: var(--color-ink);
	text-decoration: none;
}

.lucy-header__wordmark {
	display: inline-block;
	font-family: var(--font-display);
	font-size: 1.625rem;
	font-weight: 500;
	letter-spacing: 0.045em;
	line-height: 1;
}

.lucy-header__nav {
	display: flex;
	align-items: center;
	gap: clamp(22px, 2.6vw, 40px);
}

.lucy-header__link,
.lucy-header__mobile-link {
	color: var(--color-ink);
	font-size: 1rem;
	font-weight: 600;
	text-decoration: none;
	transition: color var(--transition-fast);
}

.lucy-header__link:hover,
.lucy-header__mobile-link:hover {
	color: var(--color-brand);
}

.lucy-header__actions {
	display: flex;
	align-items: center;
	justify-self: end;
	gap: var(--space-5);
}

.lucy-header__icon-link {
	display: inline-grid;
	width: 32px;
	height: 36px;
	place-items: center;
	color: var(--color-ink);
}

.lucy-header__icon-link svg {
	width: 22px;
	height: 22px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.6;
}

.lucy-header__cart {
	display: inline-flex;
	position: relative;
	width: 40px;
	height: 42px;
	align-items: center;
	justify-content: center;
	color: var(--color-ink);
	text-decoration: none;
	transition: color var(--transition-fast), transform var(--transition-fast);
}

.lucy-header__cart:hover {
	color: var(--color-brand);
	transform: translateY(-1px);
}

.lucy-header__cart-icon {
	width: 24px;
	height: 24px;
	fill: none;
	stroke: currentColor;
	stroke-linecap: round;
	stroke-linejoin: round;
	stroke-width: 1.7;
}

.lucy-header__cart-count {
	position: absolute;
	top: 0;
	right: -1px;
	display: grid;
	min-width: 19px;
	height: 19px;
	place-items: center;
	padding-inline: 4px;
	border: 2px solid #f5f7f6;
	border-radius: var(--radius-pill);
	background: var(--color-brand);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 700;
	line-height: 1;
}

.lucy-header__cart-count[data-count="0"] {
	display: none;
}

.lucy-header__menu-toggle {
	display: none;
	width: 40px;
	height: 40px;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	gap: 5px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--color-ink);
	cursor: pointer;
}

.lucy-header__menu-toggle span {
	display: block;
	width: 20px;
	height: 1.5px;
	background: currentColor;
	transition: transform var(--transition-fast), opacity var(--transition-fast);
}

.lucy-header__menu-toggle[aria-expanded="true"] span:first-child {
	transform: translateY(6.5px) rotate(45deg);
}

.lucy-header__menu-toggle[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.lucy-header__menu-toggle[aria-expanded="true"] span:last-child {
	transform: translateY(-6.5px) rotate(-45deg);
}

.lucy-header__mobile-nav {
	position: absolute;
	top: calc(100% - 1px);
	right: 0;
	left: 0;
	z-index: var(--z-menu);
	padding: 12px var(--page-gutter) 24px;
	border-top: 1px solid rgb(25 54 42 / 10%);
	background: rgb(243 245 244 / 98%);
	box-shadow: var(--shadow-popover);
}

.lucy-header__mobile-nav[hidden] {
	display: none;
}

.lucy-header__mobile-link {
	display: block;
	padding-block: 14px;
	border-bottom: 1px solid var(--color-border);
	font-size: var(--font-size-sm);
}

@media (max-width: 900px) {
	.lucy-header__inner {
		min-height: 72px;
		grid-template-columns: 1fr auto;
	}

	.lucy-header.is-scrolled .lucy-header__inner {
		min-height: 62px;
	}

	.lucy-header__nav,
	.lucy-header__actions > .lucy-header__account {
		display: none;
	}

	.lucy-header__menu-toggle {
		display: inline-flex;
	}
}

@media (max-width: 480px) {
	.lucy-header__wordmark {
		font-size: 1.25rem;
	}
}
