/* ============================================================
   JW&Co — site chrome (header nav + footer), ported from Nav.jsx / Footer.jsx.
   Values match the prototype inline styles exactly.
   ============================================================ */

/* ---------------- Header ---------------- */
.jw-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: rgba(5, 18, 35, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.jw-header-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 0 var(--container-pad);
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}
.jw-wordmark {
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.25rem;
	letter-spacing: -.01em;
	line-height: 1;
	color: #fff;
	text-decoration: none;
	white-space: nowrap;
}
.jw-wordmark span { color: var(--jw-gold-light); }

/* Logo (full wordmark desktop, square icon mobile) */
.jw-logo { display: inline-flex; align-items: center; line-height: 0; text-decoration: none; }
.jw-logo-full { display: block; height: 38px; width: auto; }
.jw-logo-mobile { display: none; height: 40px; width: 40px; }

.jw-nav {
	display: flex;
	align-items: center;
	gap: 22px;
}
.jw-nav-item { position: relative; }

.jw-nav-link {
	position: relative;
	font-family: var(--font-sans);
	font-size: .86rem;
	font-weight: 500;
	white-space: nowrap;
	color: rgba(255, 255, 255, .72);
	text-decoration: none;
	padding: 6px 0;
	display: inline-block;
	transition: color var(--ease);
}
.jw-nav-link:hover { color: #fff; }
/* Kill the legacy style.css `a:hover{text-decoration:underline}` on chrome links. */
.jw-nav-link:hover,
.jw-nav-cta:hover,
.jw-dropdown a:hover,
.jw-wordmark:hover,
.jw-footer a:hover,
.jw-footer-wordmark:hover { text-decoration: none; }
.jw-nav-link.is-active { color: #fff; font-weight: 600; }
.jw-nav-link.is-active::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--jw-gold);
}

/* Dropdowns */
.jw-has-dropdown { padding-bottom: 14px; margin-bottom: -14px; } /* hover bridge */
.jw-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	margin-top: 8px;
	min-width: 220px;
	background: rgba(5, 18, 35, .92);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 8px;
	box-shadow: var(--shadow-float);
	overflow: hidden;
	z-index: 60;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
}
.jw-has-dropdown:hover .jw-dropdown,
.jw-has-dropdown:focus-within .jw-dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}
.jw-dropdown a {
	display: block;
	width: 100%;
	padding: 11px 16px;
	font-family: var(--font-sans);
	font-size: .86rem;
	font-weight: 500;
	color: #fff;
	text-decoration: none;
	transition: background var(--ease);
}
.jw-dropdown a:hover { background: rgba(255, 255, 255, .06); }
.jw-dropdown--team a { padding: 12px 16px; }
.jw-dropdown-name { display: block; color: #fff; font-size: .88rem; font-weight: 600; }
.jw-dropdown-title { display: block; color: rgba(255, 255, 255, .55); font-size: .76rem; margin-top: 2px; }

/* CTA button (gold, sm) */
.jw-nav-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: .6rem 1.4rem;
	background: var(--action);
	color: var(--jw-white);
	border: 1.5px solid var(--action);
	border-radius: var(--radius-btn);
	font-family: var(--font-sans);
	font-weight: var(--fw-semibold);
	font-size: .82rem;
	letter-spacing: var(--ls-button);
	line-height: 1;
	text-decoration: none;
	white-space: nowrap;
	transition: transform var(--ease), box-shadow var(--ease), background-color var(--ease), border-color var(--ease);
}
.jw-nav-cta:hover {
	background: var(--action-hover);
	border-color: var(--action-hover);
	color: var(--jw-white);
	transform: translateY(-2px);
	box-shadow: var(--shadow-gold);
}

/* Hamburger (hidden on desktop) */
.jw-nav-toggle {
	display: none;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 40px;
	height: 40px;
	padding: 8px;
	background: none;
	border: none;
	cursor: pointer;
}
.jw-nav-toggle span {
	display: block;
	height: 2px;
	width: 100%;
	background: #fff;
	border-radius: 2px;
	transition: transform var(--ease), opacity var(--ease);
}
.jw-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.jw-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.jw-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------------- Mobile drawer ----------------
   Body-level off-canvas drawer (navy/gold), cloned from .jw-nav by chrome.js.
   Slides in from the right with a dark backdrop, close (×) button and +/−
   submenu expanders. Mounted on <body> so it escapes the sticky header's
   stacking context. */
.jw-nav-backdrop,
.jw-mobile-drawer { display: none; }

@media (max-width: 980px) {
	.jw-nav { display: none; } /* in-header nav hidden; drawer takes over */
	/* Bar: icon (left) → CTA + hamburger (right). Icon is small so both fit. */
	.jw-header-inner { gap: 8px; padding-left: 16px; padding-right: 12px; }
	/* Layout: logo (left) ......... CTA + hamburger (right group).
	   DOM order is logo, toggle, nav, cta — reordered with flex `order`.
	   CTA gets margin-left:auto to push the CTA+hamburger pair to the right. */
	.jw-logo { order: 0; }
	.jw-nav-cta {
		display: inline-flex;
		order: 1;
		margin-left: auto;
		padding: .5rem .8rem;
		font-size: .72rem;
		letter-spacing: 0;
	}
	.jw-nav-toggle { display: flex; order: 2; flex: 0 0 auto; }
	/* Swap full wordmark → square icon on mobile. */
	.jw-logo-full { display: none; }
	.jw-logo-mobile { display: block; }

	html.jw-nav-open,
	body.jw-nav-open { overflow: hidden; }

	.jw-nav-backdrop {
		display: block;
		position: fixed;
		inset: 0;
		background: rgba(3, 12, 24, .6);
		opacity: 0;
		visibility: hidden;
		transition: opacity var(--ease), visibility var(--ease);
		z-index: 998;
	}
	.jw-nav-backdrop.is-open { opacity: 1; visibility: visible; }

	.jw-mobile-drawer {
		display: block;
		position: fixed;
		top: 0;
		right: 0;
		bottom: 0;
		height: 100dvh;
		width: 82vw;
		max-width: 340px;
		padding: 84px 26px 40px;
		background: var(--jw-navy);
		-webkit-backdrop-filter: blur(12px);
		backdrop-filter: blur(12px);
		border-left: 1px solid rgba(255, 255, 255, .08);
		box-shadow: -8px 0 40px rgba(3, 12, 24, .5);
		overflow-y: auto;
		transform: translateX(100%);
		visibility: hidden;
		transition: transform var(--ease), visibility var(--ease);
		z-index: 999;
	}
	.jw-mobile-drawer.is-open { transform: translateX(0); visibility: visible; }

	.jw-nav-close {
		display: flex;
		position: absolute;
		top: 20px;
		right: 20px;
		width: 40px;
		height: 40px;
		align-items: center;
		justify-content: center;
		background: none;
		border: 1px solid rgba(255, 255, 255, .18);
		border-radius: 10px;
		color: #fff;
		font-size: 26px;
		line-height: 1;
		cursor: pointer;
		transition: color var(--ease), border-color var(--ease);
	}
	.jw-nav-close:hover { color: var(--jw-gold-light); border-color: var(--jw-gold); }

	.jw-drawer-cta {
		display: flex;
		align-items: center;
		justify-content: center;
		margin: 0 0 8px;
		padding: .85rem 1.2rem;
		background: var(--action);
		color: var(--jw-white);
		border: 1.5px solid var(--action);
		border-radius: var(--radius-btn);
		font-family: var(--font-sans);
		font-weight: var(--fw-semibold);
		font-size: .9rem;
		letter-spacing: var(--ls-button);
		line-height: 1;
		text-decoration: none;
	}
	.jw-drawer-cta:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--jw-white); }

	.jw-mobile-nav { display: flex; flex-direction: column; }
	.jw-mobile-nav .jw-nav-link {
		display: block;
		padding: 15px 0;
		font-size: 1rem;
		font-weight: 500;
		color: rgba(255, 255, 255, .82);
		border-bottom: 1px solid rgba(255, 255, 255, .08);
	}
	.jw-mobile-nav .jw-nav-link:hover,
	.jw-mobile-nav .jw-nav-link.is-active { color: #fff; }
	.jw-mobile-nav .jw-nav-link.is-active::after { display: none; }
	.jw-mobile-nav .jw-nav-item,
	.jw-mobile-nav .jw-has-dropdown { position: relative; padding: 0; margin: 0; }

	.jw-mean-expand {
		display: flex;
		position: absolute;
		top: 7px;
		right: 0;
		width: 40px;
		height: 40px;
		align-items: center;
		justify-content: center;
		background: none;
		border: 1px solid rgba(255, 255, 255, .18);
		border-radius: 8px;
		color: var(--jw-gold-light);
		font-size: 22px;
		line-height: 1;
		cursor: pointer;
		padding: 0;
		transition: border-color var(--ease);
	}
	.jw-mean-expand:hover { border-color: var(--jw-gold); }

	.jw-mobile-nav .jw-dropdown {
		position: static;
		opacity: 1;
		visibility: visible;
		transform: none;
		margin: 0;
		min-width: 0;
		background: rgba(255, 255, 255, .03);
		border: none;
		box-shadow: none;
		border-radius: 0;
		-webkit-backdrop-filter: none;
		backdrop-filter: none;
		max-height: 0;
		overflow: hidden;
		transition: max-height var(--ease);
	}
	.jw-mobile-nav .jw-nav-item.is-open .jw-dropdown,
	.jw-mobile-nav .jw-has-dropdown.is-open .jw-dropdown { max-height: 720px; }
	.jw-mobile-nav .jw-dropdown a {
		padding: 12px 0 12px 14px;
		font-size: .95rem;
		border-bottom: 1px solid rgba(255, 255, 255, .05);
	}
	.jw-mobile-nav .jw-dropdown--team a { padding: 12px 0 12px 14px; }
}

/* ---------------- Footer ---------------- */
.jw-footer { background: var(--jw-navy); color: rgba(255, 255, 255, .7); }
.jw-footer-inner {
	max-width: var(--container-max);
	margin: 0 auto;
	padding: 64px var(--container-pad) 0;
}
.jw-footer-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr 1fr 1fr;
	gap: 40px;
}
.jw-footer-wordmark {
	display: inline-block;
	font-family: var(--font-display);
	font-weight: 900;
	font-size: 1.25rem;
	color: #fff;
	text-decoration: none;
	margin-bottom: 14px;
}
.jw-footer-wordmark span { color: var(--jw-gold-light); }
.jw-footer-blurb {
	font-size: .9rem;
	line-height: 1.6;
	max-width: 26ch;
	color: rgba(255, 255, 255, .6);
	margin: 0;
}
.jw-footer-contact { display: grid; gap: 10px; margin-top: 20px; }
.jw-footer-contact span {
	display: flex;
	align-items: center;
	gap: 9px;
	font-size: .88rem;
}
.jw-footer-contact a { color: inherit; text-decoration: none; }
.jw-footer-contact a:hover { color: #fff; }
.jw-footer-contact .jw-icon { color: var(--jw-gold-light); flex: 0 0 auto; }
.jw-footer-contact .jw-brand svg { display: block; width: 15px; height: 15px; }

.jw-footer-col h4 {
	font-family: var(--font-sans);
	font-size: .78rem;
	font-weight: 600;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--jw-gold-light);
	margin: 0 0 16px;
}
.jw-footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.jw-footer-col a { color: rgba(255, 255, 255, .7); font-size: .9rem; text-decoration: none; }
.jw-footer-col a:hover { color: #fff; }

.jw-footer-bottom {
	margin-top: 48px;
	padding: 28px 0;
	border-top: 1px solid rgba(255, 255, 255, .1);
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
}
.jw-footer-bottom > span { font-size: .82rem; color: rgba(255, 255, 255, .5); }
.jw-footer-legal-links { font-size: .82rem; }
.jw-footer-legal-links ul { display: flex; flex-wrap: wrap; gap: 22px; list-style: none; margin: 0; padding: 0; }
.jw-footer-legal-links li { margin: 0; }
.jw-footer-legal-links a { color: rgba(255, 255, 255, .6); text-decoration: none; }
.jw-footer-legal-links a:hover { color: #fff; }
.jw-footer-legal {
	font-size: .72rem;
	color: rgba(255, 255, 255, .38);
	line-height: 1.6;
	padding-bottom: 40px;
	max-width: 80ch;
	margin: 0;
}
.jw-footer-legal b { color: rgba(255, 255, 255, .55); }

@media (max-width: 860px) {
	.jw-footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 560px) {
	.jw-footer-grid { grid-template-columns: 1fr; }
}
