/* ==========================================================================
   FITOORNAMA NAVIGATION
   Homepage editorial header, sticky header, mobile navigation and search
   ========================================================================== */


/* --------------------------------------------------------------------------
   Shared variables
   -------------------------------------------------------------------------- */

:root {
	--nav-text: #1e1e1e;
	--nav-light: #f7f4ed;
	--nav-green: #2f4a42;
	--nav-gold: #b88a3d;
	--nav-border: rgba(30, 30, 30, 0.18);
	--nav-header-z: 100;
	--nav-sticky-z: 800;
	--nav-overlay-z: 1000;
}


/* --------------------------------------------------------------------------
   Homepage header
   -------------------------------------------------------------------------- */

.home-header {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	z-index: var(--nav-header-z);
	color: var(--nav-light);
	background: linear-gradient(
		to bottom,
		rgba(0, 0, 0, 0.42) 0%,
		rgba(0, 0, 0, 0.16) 58%,
		rgba(0, 0, 0, 0) 100%
	);
}

.home-header__inner {
	width: min(100% - 48px, 1440px);
	margin-inline: auto;
	padding-top: 28px;
}

.home-header__top {
	display: grid;
	grid-template-columns: 56px minmax(0, 1fr) 56px;
	align-items: center;
	min-height: 112px;
}

.home-header__logo {
	display: block;
	width: min(430px, 42vw);
	justify-self: center;
	line-height: 0;
	transition:
		opacity 250ms ease,
		transform 400ms ease;
}

.home-header__logo:hover {
	opacity: 0.88;
	transform: scale(1.012);
}

.home-header__logo img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.home-header__menu-toggle,
.home-header__search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	border-radius: 0;
	color: inherit;
	background: transparent;
	cursor: pointer;
	transition:
		color 200ms ease,
		opacity 200ms ease,
		transform 200ms ease;
}

.home-header__menu-toggle:hover,
.home-header__search-toggle:hover {
	color: var(--nav-gold);
	transform: scale(1.06);
}

.home-header__menu-toggle {
	visibility: hidden;
	justify-self: start;
	flex-direction: column;
	gap: 5px;
}

.menu-toggle__line {
	display: block;
	width: 23px;
	height: 1px;
	background: currentColor;
	transition:
		transform 250ms ease,
		opacity 250ms ease;
}

.home-header__search-toggle {
	justify-self: end;
}

.home-header__divider {
	width: 100%;
	height: 1px;
	background: rgba(247, 244, 237, 0.45);
}

.home-header__navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 64px;
}

.home-navigation,
.sticky-navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: clamp(24px, 3vw, 48px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.home-navigation li,
.sticky-navigation li {
	position: relative;
	margin: 0;
	padding: 0;
}

.home-navigation a {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 20px 0 18px;
	color: var(--nav-light);
	font-family: "Inter", sans-serif;
	font-size: 0.76rem;
	font-weight: 500;
	letter-spacing: 0.12em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	transition:
		color 220ms ease,
		transform 220ms ease;
}

.home-navigation a::after,
.sticky-navigation a::after {
	position: absolute;
	right: 0;
	bottom: 11px;
	left: 0;
	height: 1px;
	content: "";
	background: currentColor;
	transform: scaleX(0);
	transform-origin: center;
	transition: transform 250ms ease;
}

.home-navigation a:hover,
.home-navigation .current-menu-item > a,
.home-navigation .current_page_item > a {
	color: var(--nav-gold);
	transform: scale(1.025);
}

.home-navigation a:hover::after,
.home-navigation .current-menu-item > a::after,
.home-navigation .current_page_item > a::after {
	transform: scaleX(1);
}


/* --------------------------------------------------------------------------
   Sticky header
   -------------------------------------------------------------------------- */

.sticky-header {
	position: fixed;
	top: 0;
	right: 0;
	left: 0;
	z-index: var(--nav-sticky-z);
	color: var(--nav-text);
	background: rgba(247, 244, 237, 0.96);
	border-bottom: 1px solid rgba(30, 30, 30, 0.12);
	box-shadow: 0 8px 30px rgba(30, 30, 30, 0.05);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-100%);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	transition:
		transform 420ms cubic-bezier(0.22, 1, 0.36, 1),
		opacity 300ms ease,
		visibility 300ms ease;
}

.sticky-header.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.sticky-header__inner {
	display: grid;
	grid-template-columns: minmax(170px, 230px) minmax(0, 1fr) minmax(80px, 230px);
	align-items: center;
	width: min(100% - 48px, 1440px);
	min-height: 78px;
	margin-inline: auto;
}

.sticky-header__logo {
	display: block;
	width: min(200px, 100%);
	line-height: 0;
}

.sticky-header__logo img {
	display: block;
	width: 100%;
	height: auto;
	object-fit: contain;
}

.sticky-header__navigation {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
}

.sticky-navigation {
	gap: clamp(18px, 2.3vw, 36px);
}

.sticky-navigation a {
	position: relative;
	display: inline-flex;
	align-items: center;
	padding: 30px 0 27px;
	color: var(--nav-text);
	font-family: "Inter", sans-serif;
	font-size: 0.7rem;
	font-weight: 500;
	letter-spacing: 0.1em;
	line-height: 1;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
	transition:
		color 200ms ease,
		transform 200ms ease;
}

.sticky-navigation a::after {
	bottom: 19px;
}

.sticky-navigation a:hover,
.sticky-navigation .current-menu-item > a,
.sticky-navigation .current_page_item > a {
	color: var(--nav-green);
	transform: scale(1.025);
}

.sticky-navigation a:hover::after,
.sticky-navigation .current-menu-item > a::after,
.sticky-navigation .current_page_item > a::after {
	transform: scaleX(1);
}

.sticky-header__actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.sticky-header__search,
.sticky-header__menu-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	color: var(--nav-text);
	background: transparent;
	cursor: pointer;
	transition:
		color 200ms ease,
		transform 200ms ease;
}

.sticky-header__search:hover,
.sticky-header__menu-toggle:hover {
	color: var(--nav-green);
	transform: scale(1.05);
}

.sticky-header__menu-toggle {
	display: none;
	flex-direction: column;
	gap: 6px;
}

.sticky-header__menu-toggle span:not(.screen-reader-text) {
	display: block;
	width: 22px;
	height: 1px;
	background: currentColor;
}


/* --------------------------------------------------------------------------
   Search panel
   -------------------------------------------------------------------------- */

.site-search-panel {
	position: fixed;
	inset: 0;
	z-index: var(--nav-overlay-z);
	color: var(--nav-text);
	background: rgba(247, 244, 237, 0.985);
}

.site-search-panel[hidden] {
	display: none;
}

.site-search-panel__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 100%;
	padding: 80px 24px;
}

.site-search-panel__close {
	position: absolute;
	top: 30px;
	right: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 0;
	color: var(--nav-text);
	background: transparent;
	font-family: "Inter", sans-serif;
	font-size: 2.2rem;
	font-weight: 300;
	line-height: 1;
	cursor: pointer;
	transition:
		color 200ms ease,
		transform 200ms ease;
}

.site-search-panel__close:hover {
	color: var(--nav-green);
	transform: rotate(5deg);
}

.site-search-panel__content {
	width: min(100%, 760px);
	text-align: center;
}

.site-search-panel__label {
	margin: 0 0 34px;
	color: var(--nav-green);
	font-family: "Inter", sans-serif;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.site-search-panel .search-form {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: end;
	gap: 18px;
	width: 100%;
}

.site-search-panel .search-form label {
	display: block;
	width: 100%;
}

.site-search-panel .search-field {
	width: 100%;
	min-height: 64px;
	padding: 10px 2px;
	border: 0;
	border-bottom: 1px solid rgba(30, 30, 30, 0.45);
	border-radius: 0;
	color: var(--nav-text);
	background: transparent;
	font-family: "Cormorant Garamond", serif;
	font-size: clamp(1.75rem, 4vw, 3.2rem);
	line-height: 1.1;
	outline: none;
	transition: border-color 200ms ease;
}

.site-search-panel .search-field:focus {
	border-bottom-color: var(--nav-green);
}

.site-search-panel .search-field::placeholder {
	color: rgba(30, 30, 30, 0.38);
}

.site-search-panel .search-submit {
	min-height: 50px;
	padding: 0 24px;
	border: 1px solid var(--nav-text);
	border-radius: 0;
	color: var(--nav-light);
	background: var(--nav-text);
	font-family: "Inter", sans-serif;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	cursor: pointer;
	transition:
		color 200ms ease,
		background 200ms ease,
		border-color 200ms ease;
}

.site-search-panel .search-submit:hover {
	border-color: var(--nav-green);
	background: var(--nav-green);
}


/* --------------------------------------------------------------------------
   Mobile navigation state
   -------------------------------------------------------------------------- */

body.navigation-open,
body.search-open {
	overflow: hidden;
}


/* --------------------------------------------------------------------------
   Tablet
   -------------------------------------------------------------------------- */

@media (max-width: 1100px) {

	.home-header__inner,
	.sticky-header__inner {
		width: min(100% - 32px, 1440px);
	}

	.home-navigation {
		gap: clamp(16px, 2vw, 26px);
	}

	.home-navigation a {
		font-size: 0.68rem;
		letter-spacing: 0.09em;
	}

	.sticky-header__inner {
		grid-template-columns: 180px minmax(0, 1fr) 80px;
	}

	.sticky-navigation {
		gap: 18px;
	}

	.sticky-navigation a {
		font-size: 0.63rem;
		letter-spacing: 0.07em;
	}

}


/* --------------------------------------------------------------------------
   Mobile
   -------------------------------------------------------------------------- */

@media (max-width: 820px) {

	.home-header {
		background: linear-gradient(
			to bottom,
			rgba(0, 0, 0, 0.52) 0%,
			rgba(0, 0, 0, 0.18) 74%,
			rgba(0, 0, 0, 0) 100%
		);
	}

	.home-header__inner {
		width: calc(100% - 28px);
		padding-top: 14px;
	}

	.home-header__top {
		grid-template-columns: 48px minmax(0, 1fr) 48px;
		min-height: 82px;
	}

	.home-header__logo {
		width: min(250px, 62vw);
	}

	.home-header__menu-toggle {
		visibility: visible;
	}

	.home-header__divider {
		background: rgba(247, 244, 237, 0.32);
	}

	.home-header__navigation {
		position: fixed;
		inset: 0;
		z-index: 950;
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 100vh;
		padding: 110px 32px 60px;
		color: var(--nav-text);
		background: var(--nav-light);
		opacity: 0;
		visibility: hidden;
		transform: translateY(-18px);
		transition:
			opacity 300ms ease,
			visibility 300ms ease,
			transform 420ms cubic-bezier(0.22, 1, 0.36, 1);
	}

	body.navigation-open .home-header__navigation {
		opacity: 1;
		visibility: visible;
		transform: translateY(0);
	}

	.home-navigation {
		flex-direction: column;
		gap: 0;
		width: 100%;
		max-width: 520px;
	}

	.home-navigation li {
		width: 100%;
		text-align: center;
		border-bottom: 1px solid rgba(30, 30, 30, 0.12);
	}

	.home-navigation a {
		justify-content: center;
		width: 100%;
		padding: 18px 10px;
		color: var(--nav-text);
		font-family: "Cormorant Garamond", serif;
		font-size: clamp(1.65rem, 6vw, 2.4rem);
		font-weight: 500;
		letter-spacing: 0;
		text-transform: none;
	}

	.home-navigation a::after {
		bottom: 12px;
		width: 34px;
		margin-inline: auto;
	}

	body.navigation-open .home-header__menu-toggle {
		position: fixed;
		top: 28px;
		left: 18px;
		z-index: 980;
		color: var(--nav-text);
	}

	body.navigation-open .home-header__menu-toggle .menu-toggle__line:nth-child(2) {
		transform: translateY(6px) rotate(45deg);
	}

	body.navigation-open .home-header__menu-toggle .menu-toggle__line:nth-child(3) {
		opacity: 0;
	}

	body.navigation-open .home-header__menu-toggle .menu-toggle__line:nth-child(4) {
		transform: translateY(-6px) rotate(-45deg);
	}

	.sticky-header__inner {
		grid-template-columns: minmax(150px, 210px) 1fr;
		width: calc(100% - 28px);
		min-height: 68px;
	}

	.sticky-header__navigation {
		display: none;
	}

	.sticky-header__logo {
		width: min(190px, 52vw);
	}

	.sticky-header__actions {
		grid-column: 2;
	}

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

	.site-search-panel__close {
		top: 16px;
		right: 16px;
	}

	.site-search-panel .search-form {
		grid-template-columns: 1fr;
	}

	.site-search-panel .search-submit {
		justify-self: center;
		min-width: 150px;
	}

}


/* --------------------------------------------------------------------------
   Small mobile
   -------------------------------------------------------------------------- */

@media (max-width: 480px) {

	.home-header__inner {
		width: calc(100% - 20px);
	}

	.home-header__top {
		grid-template-columns: 42px minmax(0, 1fr) 42px;
	}

	.home-header__logo {
		width: min(220px, 64vw);
	}

	.home-header__menu-toggle,
	.home-header__search-toggle {
		width: 42px;
		height: 42px;
	}

	.sticky-header__inner {
		width: calc(100% - 20px);
	}

	.sticky-header__logo {
		width: min(165px, 50vw);
	}

	.site-search-panel__inner {
		padding-inline: 20px;
	}

	.site-search-panel .search-field {
		font-size: 2rem;
	}

}


/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.home-header__logo,
	.home-header__menu-toggle,
	.home-header__search-toggle,
	.home-navigation a,
	.sticky-header,
	.sticky-navigation a,
	.site-search-panel__close,
	.home-header__navigation {
		transition: none;
	}

}