/* Header: transparent over the photo heroes, cream once scrolled (or on pages without a photo). */

.site-header {
	position: fixed;
	inset: 0 0 auto 0;
	z-index: 100;
	color: var(--c-ink);
	background: rgba(245, 241, 234, .97);
	border-bottom: 1px solid var(--c-line);
	transition: background-color 300ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { position: absolute; } .admin-bar .site-header.is-scrolled { position: fixed; top: 0; } }

.has-photo-hero .site-header:not(.is-scrolled):not(.is-open) {
	background: transparent;
	border-bottom-color: transparent;
	color: #fff;
}
.has-photo-hero .site-header:not(.is-scrolled):not(.is-open)::before {
	content: "";
	position: absolute;
	inset: 0 0 -40px 0;
	z-index: -1;
	background: linear-gradient(180deg, rgba(18, 22, 14, .42), rgba(18, 22, 14, 0));
	pointer-events: none;
}
.site-header.is-scrolled { box-shadow: 0 1px 24px rgba(36, 41, 31, .06); }

.site-header__inner {
	display: flex;
	align-items: center;
	gap: clamp(20px, 3vw, 44px);
	max-width: calc(1440px + 2 * var(--gutter));
	height: var(--header-h);
	margin-inline: auto;
	padding-inline: var(--gutter);
	transition: height 300ms var(--ease);
}
.site-header.is-scrolled .site-header__inner { height: 76px; }

/* Brand */
.brand {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	margin-right: auto;
	color: inherit;
	text-decoration: none;
}
.brand:hover { color: inherit; }
/* The client's logo: sun-and-hills ornament + their "CASA DI CORAGGIO" lettering (mask, takes the text colour). */
.brand__mark { position: relative; display: block; width: 66px; height: 36px; flex: none; }
.brand__mark img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; transition: opacity 300ms var(--ease); }
.brand__mark-white { opacity: 0; }
.has-photo-hero .site-header:not(.is-scrolled):not(.is-open) .brand__mark-color { opacity: 0; }
.has-photo-hero .site-header:not(.is-scrolled):not(.is-open) .brand__mark-white { opacity: 1; }
.brand__wordmark {
	display: block;
	width: clamp(190px, 17vw, 250px);
	aspect-ratio: 760 / 69;
	background: currentColor;
	-webkit-mask: url("../images/logo-wordmark-mask.webp") center / contain no-repeat;
	mask: url("../images/logo-wordmark-mask.webp") center / contain no-repeat;
}

/* Main navigation */
.main-nav__list { display: flex; align-items: center; gap: clamp(18px, 2.4vw, 40px); }
.main-nav__list a {
	position: relative;
	display: block;
	padding: 10px 0;
	color: inherit;
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .2em;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}
.main-nav__list a::after {
	content: "";
	position: absolute;
	left: 0; right: 0; bottom: 2px;
	height: 2px;
	background: var(--c-gold-fill);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 260ms var(--ease);
}
.main-nav__list a:hover::after,
.main-nav__list .current-menu-item > a::after,
.main-nav__list .current_page_item > a::after { transform: scaleX(1); }
.main-nav__list a:hover { color: inherit; }

/* Language switch: NL | EN | DE */
.lang-switch {
	display: flex;
	align-items: center;
	gap: 0;
	padding-left: clamp(16px, 2vw, 28px);
	border-left: 1px solid currentColor;
	border-left-color: color-mix(in srgb, currentColor 35%, transparent);
}
.lang-switch li + li::before { content: "|"; padding: 0 .45em; opacity: .45; font-size: .75rem; }
.lang-switch a {
	color: inherit;
	font-size: .75rem;
	font-weight: 500;
	letter-spacing: .14em;
	text-decoration: none;
	opacity: .7;
}
.lang-switch a:hover, .lang-switch a.is-current { opacity: 1; }
.lang-switch a.is-current { text-decoration: underline; text-decoration-color: var(--c-gold); text-underline-offset: .45em; }

/* Menu toggle (mobile) */
.menu-toggle {
	display: none;
	align-items: center;
	gap: 10px;
	padding: 10px 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: .72rem;
	font-weight: 500;
	letter-spacing: .2em;
	text-transform: uppercase;
	cursor: pointer;
}
.menu-toggle__bars { position: relative; display: block; width: 24px; height: 10px; }
.menu-toggle__bars span {
	position: absolute; left: 0; right: 0;
	height: 1.5px;
	background: currentColor;
	transition: transform 260ms var(--ease), top 260ms var(--ease);
}
.menu-toggle__bars span:first-child { top: 0; }
.menu-toggle__bars span:last-child { top: 8.5px; }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:first-child { top: 4.25px; transform: rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-toggle__bars span:last-child { top: 4.25px; transform: rotate(-45deg); }

/* Mobile menu panel */
.mobile-menu {
	position: fixed;
	inset: 0;
	z-index: 90;
	overflow-y: auto;
	padding: calc(var(--header-h) + 24px) var(--gutter) 40px;
	background: var(--c-cream);
	color: var(--c-ink);
}
.admin-bar .mobile-menu { top: 46px; }
.mobile-menu[hidden] { display: none; }
.mobile-menu__inner { display: flex; flex-direction: column; min-height: 100%; max-width: 560px; margin-inline: auto; }
.mobile-menu__list li { border-bottom: 1px solid var(--c-line); }
.mobile-menu__list a {
	display: block;
	padding: 18px 0;
	color: var(--c-ink);
	font-family: var(--f-serif);
	font-size: 2rem;
	line-height: 1.1;
	text-decoration: none;
}
.mobile-menu__list a { transition: color 220ms var(--ease), padding 300ms var(--ease); }
.mobile-menu__list a:hover, .mobile-menu__list .current-menu-item > a { color: var(--c-gold-text); padding-left: 10px; }
.mobile-menu__langs { display: flex; flex-wrap: wrap; gap: 10px 24px; margin-top: 32px; }
.mobile-menu__langs a { font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; text-decoration: none; opacity: .7; }
.mobile-menu__langs a.is-current { opacity: 1; text-decoration: underline; text-decoration-color: var(--c-gold); text-underline-offset: .4em; }
.mobile-menu__foot { display: flex; align-items: center; gap: 14px; margin-top: auto; padding-top: 48px; color: var(--c-muted); font-size: .8rem; letter-spacing: .16em; text-transform: uppercase; }
.mobile-menu__emblem { width: 72px; height: auto; }
body.menu-open { overflow: hidden; }

@media (max-width: 1080px) {
	.main-nav { display: none; }
	.menu-toggle { display: inline-flex; }
	.lang-switch { border-left: 0; padding-left: 0; }
}
@media (max-width: 560px) {
	:root { --header-h: 74px; }
	.brand { gap: 10px; }
	.brand__mark { width: 52px; height: 28px; }
	.brand__wordmark { width: 170px; }
	.lang-switch { display: none; }
	.menu-toggle__label { display: none; }
	.site-header.is-scrolled .site-header__inner { height: 66px; }
}
