/* Sloane Curtis — primary menu, including the WordPress dropdown markup.
   Loaded after style.css. */

.nav__list > li { position: relative; }

/* Parent of a dropdown gets a caret. */
.nav__list > .menu-item-has-children > a {
	display: inline-flex;
	align-items: center;
	gap: 7px;
}
.nav__list > .menu-item-has-children > a::after {
	content: "";
	width: 5px;
	height: 5px;
	border-right: 1.5px solid currentColor;
	border-bottom: 1.5px solid currentColor;
	transform: translateY(-2px) rotate(45deg);
	opacity: .55;
	transition: transform .3s var(--ease), opacity .3s;
}
.nav__list > .menu-item-has-children:hover > a::after,
.nav__list > .menu-item-has-children:focus-within > a::after {
	transform: translateY(0) rotate(225deg);
	opacity: 1;
}

/* The panel itself. Hidden until the parent is hovered or focused. */
.nav__list .sub-menu {
	position: absolute;
	top: 100%;
	left: 0;
	z-index: 5;
	min-width: 272px;
	margin: 0;
	padding: 8px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	background: rgba(14, 14, 17, .96);
	border: 1px solid var(--line-d2);
	border-radius: var(--r);
	box-shadow: 0 26px 60px -18px rgba(0, 0, 0, .8);
	backdrop-filter: blur(22px) saturate(150%);
	-webkit-backdrop-filter: blur(22px) saturate(150%);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: opacity .28s var(--ease), transform .28s var(--ease), visibility .28s;
}

/* A transparent bridge so the pointer can travel from the parent to the panel. */
.nav__list .sub-menu::before {
	content: "";
	position: absolute;
	inset: -14px 0 100% 0;
}

.nav__list > li:hover > .sub-menu,
.nav__list > li:focus-within > .sub-menu {
	opacity: 1;
	visibility: visible;
	transform: translateY(6px);
}

.nav__list .sub-menu li { width: 100%; }
.nav__list .sub-menu a {
	display: block;
	white-space: nowrap;
	padding: 10px 14px;
	border-radius: var(--r-sm);
	font-size: .86rem;
	font-weight: 500;
	color: var(--on-dark-mute);
	transition: background-color .22s, color .22s, padding-left .28s var(--ease);
}
.nav__list .sub-menu a:hover,
.nav__list .sub-menu a:focus-visible {
	background: rgba(255, 255, 255, .08);
	color: var(--accent);
	padding-left: 18px;
}

/* Panels that would run off the right edge flip to the other side. */
.nav__list > li:last-child .sub-menu,
.nav__list > li:nth-last-child(2) .sub-menu { left: auto; right: 0; }

/* Current page marker. */
.nav__list .current-menu-item > a,
.nav__list .current-menu-ancestor > a,
.nav__list .current_page_item > a { color: var(--on-dark); }
.nav__list .current-menu-item > a::before,
.nav__list .current_page_item > a::before {
	content: "";
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 2px;
	height: 1.5px;
	background: var(--accent);
}

/* Below the desktop breakpoint the whole bar is replaced by the burger sheet,
   so nothing here should paint. */
@media (max-width: 1180px) {
	.nav__list .sub-menu { display: none; }
}
