/* =====================================================================
   css/nav.css — site menu drawer (markup generated by js/nav.js)
   Linked on every page alongside that page's own stylesheet.
   ===================================================================== */

/* Page scroll lock while the drawer is open */
html.menuOpen {
	overflow: hidden;
}

/* ---- Menu button (in the header) ---- */
#menuButton {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 30px;
	width: 80px;
	height: 60px;
	padding: 0;
	background: none;
	border: none;
	cursor: pointer;
}

#menuButton.scrolled {
	height: 100%;
}

/* ---- Dimmed page behind the drawer ---- */
#menuBackdrop {
	position: fixed;
	inset: 0;
	z-index: 1;
	background: rgba(0, 0, 0, 0.6);
	opacity: 0;
	visibility: hidden;
	/* explicit transitions override the global `* { transition: all }` */
	transition: opacity 350ms ease, visibility 0s linear 350ms;
}

html.menuOpen #menuBackdrop {
	opacity: 1;
	visibility: visible;
	transition: opacity 350ms ease;
}

/* ---- Drawer ---- */
#menuNav {
	position: fixed;
	top: 0;
	right: 0;
	margin: 0; /* neutralizes any leftover margins from the old dropdown rules */
	z-index: 2;
	width: min(440px, 100vw);
	height: 100vh;
	height: 100dvh; /* mobile: excludes the browser toolbar; falls back to 100vh above */
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	overscroll-behavior: contain;
	background: #62CBB8;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.45);
	transform: translateX(100%);
	visibility: hidden;
	/* visibility flips after the slide-out finishes so it animates both ways */
	transition: transform 350ms cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 350ms;
}

html.menuOpen #menuNav {
	transform: translateX(0);
	visibility: visible;
	transition: transform 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

.menuNavHeader {
	display: flex;
	justify-content: right;
	align-items: center;
	flex-shrink: 0;
	height: 80px;
	padding: 0 20px 0 32px;
}

#menuClose {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	background: none;
	border: none;
	border-radius: 9px;
	cursor: pointer;
	transition: background-color 150ms ease;
}

#cls {
	width: 28px;
	height: 28px;
	background-color: #101010;
	-webkit-mask-image: url('../images/icons/clear.svg');
	mask-image: url('../images/icons/clear.svg');
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	transition: background-color 150ms ease;
}

/* ---- Link lists ---- */
#menuNav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

#menuNav .navLink {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #101010;
	text-decoration: none;
	font-weight: 400;
	transition: background-color 150ms ease, color 150ms ease, padding-left 150ms ease;
}

/* Primary: big condensed type */
.navPrimary {
	padding-top: 8px !important;
}

.navPrimary .navLink {
	padding: 16px 32px;
	font-family: "Bebas Neue", sans-serif;
	font-size: 44px;
	line-height: 1;
	letter-spacing: 0.02em;
}

/* Secondary: quieter, pushed toward the bottom of the drawer */
.navSecondary {
	margin-top: auto !important;
	padding: 24px 0 8px !important;
}

.navSecondary .navLink {
	padding: 10px 32px;
	font-family: "Plus Jakarta Sans", sans-serif;
	font-size: 18px;
}

/* Social icons — same icon, size and colors as the footer's #social/#insta */
.navSocial {
	display: flex;
	padding: 0 22px 40px; /* 22px + 10px link padding lines the icon up with the 32px text inset */
	justify-content: center;
}

.navSocial a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	border-radius: 24px;
	transition: background-color 150ms ease;
}

.navInsta {
	width: 24px;
	height: 24px;
	background-color: #101010;
	-webkit-mask-image: url('../images/icons/insta.svg');
	mask-image: url('../images/icons/insta.svg');
	mask-size: contain;
	mask-repeat: no-repeat;
	mask-position: center;
	transition: background-color 150ms ease;
}

/* Current page: inset bar instead of the old bold/underline */
#menuNav .navLink.currentPage {
	box-shadow: inset 6px 0 0 #101010;
}

.navBadge {
	font-family: "Space Mono", monospace;
	font-size: 12px;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	padding: 3px 8px;
	border: 1px solid currentColor;
	border-radius: 20px;
}

#menuNav a:focus-visible,
#menuNav button:focus-visible {
	outline: 3px solid #101010;
	outline-offset: -3px;
}

.navSocial a:focus-visible {
	background-color: #101010;
	outline-offset: 2px;
}

.navSocial a:focus-visible .navInsta {
	background-color: #62CBB8;
}

@media (hover: hover) and (pointer: fine) {
	#menuNav .navLink:hover {
		background-color: #101010;
		color: #62CBB8;
		padding-left: 40px;
	}

	#menuClose:hover {
		background-color: #101010;
	}

	#menuClose:hover #cls {
		background-color: #62CBB8;
	}

	.navSocial a:hover {
		background-color: #101010;
	}

	.navSocial a:hover .navInsta {
		background-color: #62CBB8;
	}
}

@media (prefers-reduced-motion: reduce) {
	#menuNav,
	#menuBackdrop {
		transition: none !important;
	}
}

@media screen and (max-width: 535px) {
	#menuButton {
		margin-right: 20px;
	}

	#menuNav {
		width: 85vw;
	}

	.navPrimary .navLink {
		font-size: 38px;
		padding: 14px 24px;
	}

	.navSecondary .navLink {
		padding: 10px 24px;
	}

	.menuNavHeader {
		padding: 0 12px 0 24px;
	}

	.navSocial {
		padding: 0 14px 40px;
	}
}
