/* ARM Motion — header + full-screen menu overlay.
 *
 * Every custom property carries a literal fallback: this stylesheet must render
 * correctly even if Breakdance's global-settings.css (which defines the --arm-*
 * tokens on :root) loads after it, or is regenerated without them.
 */

:root {
	--armh-h: 84px;
	--armm-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--armm-ease-in: cubic-bezier(0.55, 0, 0.55, 0.2);
}

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

.armh {
	position: fixed;
	top: var(--wp-admin--admin-bar--height, 0px);
	left: 0;
	right: 0;
	z-index: 300;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	height: var(--armh-h);
	padding-inline: clamp(1.25rem, 4vw, 2.5rem);
	background-color: transparent;
	border-bottom: 1px solid transparent;
	transition: background-color 500ms var(--armm-ease), border-color 500ms var(--armm-ease),
		height 500ms var(--armm-ease);
}

.armh.is-stuck {
	height: 68px;
	background-color: var(--arm-paper, #fff);
	border-bottom-color: var(--arm-line, #e4dbd6);
}

/* While the overlay is open the header sits on top of it, so its own chrome
   must drop away or it paints a white bar across the dark panel. */
.armh.is-open,
.armh.is-open.is-stuck {
	background-color: transparent;
	border-bottom-color: transparent;
	height: var(--armh-h);
}

.armh-logo {
	display: inline-flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	flex-shrink: 0;
}

.armh-mark {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	display: block;
	flex-shrink: 0;
}

.armh-word {
	font-family: var(--arm-font-display, "Instrument Serif"), Georgia, serif;
	font-weight: 400;
	font-size: 1.125rem;
	letter-spacing: -0.006em;
	line-height: 1;
	color: var(--arm-slate-ink, #1c2422);
	transition: color 400ms var(--armm-ease);
}

.armh.is-open .armh-word { color: var(--arm-paper, #fff); }

/* Over a dark hero the chrome inverts. Applied by the observer in menu.js while
   a [data-arm-dark] section overlaps the header, and only while the header is
   still transparent — once .is-stuck paints it white, dark ink is correct again. */
.armh--light:not(.is-stuck) .armh-word,
.armh--light:not(.is-stuck) .armh-burger { color: var(--arm-paper, #fff); }

.armh--light:not(.is-stuck) .armh-cta {
	background-color: transparent;
	border-color: rgba(255, 255, 255, 0.55);
	color: var(--arm-paper, #fff);
}

.armh--light:not(.is-stuck) .armh-cta:hover {
	background-color: var(--arm-paper, #fff);
	border-color: var(--arm-paper, #fff);
	color: var(--arm-slate-ink, #1c2422);
}

/* --------------------------------------------------------- header right --- */

.armh-right {
	display: flex;
	align-items: center;
	gap: 0.875rem;
}

.armh-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1;
	letter-spacing: -0.005em;
	padding: 0.8125rem 1.375rem;
	border-radius: 999px;
	background-color: var(--arm-slate, #495a58);
	color: var(--arm-paper, #fff);
	border: 1.5px solid var(--arm-slate, #495a58);
	text-decoration: none;
	transition: background-color 400ms var(--armm-ease), border-color 400ms var(--armm-ease),
		transform 400ms var(--armm-ease), opacity 300ms var(--armm-ease);
}

.armh-cta:hover {
	background-color: var(--arm-slate-deep, #2f3b39);
	border-color: var(--arm-slate-deep, #2f3b39);
	color: var(--arm-paper, #fff);
	transform: translateY(-2px);
}

.armh-cta:focus-visible {
	outline: 3px solid var(--arm-clay, #c48d73);
	outline-offset: 3px;
	color: var(--arm-paper, #fff);
}

/* The overlay carries its own, larger CTA — two competing buttons is noise. */
.armh.is-open .armh-cta {
	opacity: 0;
	pointer-events: none;
}

/* ------------------------------------------------------------- the burger -- */

.armh-burger {
	display: inline-flex;
	align-items: center;
	gap: 0.625rem;
	padding: 0.625rem 0.375rem 0.625rem 0.75rem;
	background: none;
	border: 0;
	cursor: pointer;
	font: inherit;
	color: var(--arm-slate-ink, #1c2422);
	transition: color 400ms var(--armm-ease);
}

.armh.is-open .armh-burger { color: var(--arm-paper, #fff); }

.armh-burger:focus-visible {
	outline: 3px solid var(--arm-clay, #c48d73);
	outline-offset: 4px;
	border-radius: 4px;
}

.armh-bars {
	position: relative;
	display: block;
	width: 26px;
	height: 12px;
	flex-shrink: 0;
}

/* scaleX rather than width: the short lower bar and its hover extension are
   compositor-only, so the burger never triggers layout. */
.armh-bars span {
	position: absolute;
	left: 0;
	width: 100%;
	height: 2px;
	border-radius: 2px;
	background-color: currentColor;
	transform-origin: left center;
	transition: transform 460ms var(--armm-ease);
}

.armh-bars span:first-child { top: 0; }
.armh-bars span:last-child  { bottom: 0; transform: scaleX(0.7); }

.armh-burger:hover .armh-bars span:last-child { transform: scaleX(1); }

/* Two bars crossing into an X reads cleaner than collapsing three. The origin
   flips to centre here so the rotation pivots mid-bar, not at the left edge. */
.armh.is-open .armh-bars span { transform-origin: center; }
.armh.is-open .armh-bars span:first-child { transform: translateY(5px) rotate(45deg); }
.armh.is-open .armh-bars span:last-child  { transform: translateY(-5px) rotate(-45deg) scaleX(1); }

/* Menu / Close swap in a fixed-height mask so the header never reflows. */
.armh-labels {
	position: relative;
	display: block;
	width: 3.25rem;
	height: 1.25rem;
	overflow: hidden;
	text-align: left;
}

.armh-lbl {
	position: absolute;
	left: 0;
	top: 0;
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-weight: 600;
	font-size: 0.9375rem;
	line-height: 1.25rem;
	white-space: nowrap;
	transition: transform 460ms var(--armm-ease), opacity 300ms var(--armm-ease);
}

.armh-lbl-close { transform: translateY(100%); opacity: 0; }
.armh.is-open .armh-lbl-menu  { transform: translateY(-100%); opacity: 0; }
.armh.is-open .armh-lbl-close { transform: translateY(0);     opacity: 1; }

@media (max-width: 767px) {
	.armh-labels { display: none; }
	.armh-word { font-size: 1rem; }
	.armh-cta { display: none; }
}

/* --------------------------------------------------------------- overlay --- */

.armm {
	position: fixed;
	inset: 0;
	z-index: 250;
	background-color: var(--arm-slate-ink, #1c2422);
	background-image:
		radial-gradient(120% 80% at 88% 8%, rgba(196, 141, 115, 0.30) 0%, rgba(196, 141, 115, 0) 60%),
		radial-gradient(90% 70% at 4% 96%, rgba(73, 90, 88, 0.55) 0%, rgba(73, 90, 88, 0) 62%);
	opacity: 0;
	visibility: hidden;
	clip-path: inset(0 0 100% 0);
	transition: opacity 320ms var(--armm-ease-in), visibility 0s linear 640ms,
		clip-path 640ms var(--armm-ease);
	overflow-y: auto;
	overscroll-behavior: contain;
}

.armm.is-open {
	opacity: 1;
	visibility: visible;
	clip-path: inset(0 0 0 0);
	transition: opacity 240ms var(--armm-ease), visibility 0s linear 0s,
		clip-path 760ms var(--armm-ease);
}

.armm-inner {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: center;
	min-height: 100%;
	max-width: 1280px;
	margin-inline: auto;
	padding: calc(var(--armh-h) + clamp(2rem, 6vh, 4.5rem)) clamp(1.25rem, 4vw, 2.5rem)
		clamp(2.5rem, 6vh, 4rem);
}

/* ------------------------------------------------------------ nav links --- */

.armm-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: clamp(0.25rem, 1.2vh, 0.75rem);
}

.armm-item {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 520ms var(--armm-ease), transform 620ms var(--armm-ease);
}

/* --armm-i staggers the reveal per item; set inline in the markup. */
.armm.is-open .armm-item {
	opacity: 1;
	transform: none;
	transition-delay: calc(180ms + var(--armm-i, 0) * 55ms);
}

.armm-link {
	display: block;
	padding-block: clamp(0.2rem, 0.6vh, 0.5rem);
	text-decoration: none;
	color: var(--arm-sand, #f5e9e3);
	transition: color 380ms var(--armm-ease);
}

.armm-label {
	display: block;
	font-family: var(--arm-font-display, "Instrument Serif"), Georgia, serif;
	font-weight: 400;
	font-size: clamp(1.85rem, 4.4vw, 3.5rem);
	line-height: 1.06;
	letter-spacing: -0.012em;
	color: inherit;
	text-wrap: balance;
}

.armm-link:hover { color: var(--arm-clay, #c48d73); }

.armm-link:focus-visible {
	outline: 3px solid var(--arm-clay, #c48d73);
	outline-offset: 6px;
	border-radius: 4px;
}

/* The note is the payoff for hovering — a plain-language outcome, not a tagline.
 *
 * 0fr → 1fr rather than max-height: no magic number to clip a note that wraps to
 * two lines, and the spacing lives inside the clipped child so nothing animates
 * margin. */
.armm-note {
	display: grid;
	grid-template-rows: 0fr;
	transition: grid-template-rows 420ms var(--armm-ease);
}

/* padding-top is constant, not animated: it sits inside the clipped row so the
   0fr → 1fr measurement already includes it, and no layout property changes on
   hover. Only opacity and the row track transition. */
.armm-note-in {
	overflow: hidden;
	padding-top: 0.4rem;
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-size: 0.9375rem;
	line-height: 1.4;
	color: rgba(245, 233, 227, 0.62);
	opacity: 0;
	transition: opacity 320ms var(--armm-ease);
}

.armm-link:hover .armm-note,
.armm-link:focus-visible .armm-note {
	grid-template-rows: 1fr;
}

.armm-link:hover .armm-note-in,
.armm-link:focus-visible .armm-note-in {
	opacity: 1;
}

/* ---------------------------------------------------------- side column --- */

.armm-side {
	display: flex;
	flex-direction: column;
	gap: clamp(1.5rem, 3vh, 2.25rem);
	align-items: flex-start;
	opacity: 0;
	transform: translateY(20px);
	transition: opacity 520ms var(--armm-ease) 260ms, transform 620ms var(--armm-ease) 260ms;
}

.armm.is-open .armm-side { opacity: 1; transform: none; }

.armm-stage {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	border-radius: 16px;
	overflow: hidden;
	background-color: rgba(255, 255, 255, 0.05);
}

.armm-shot {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transform: scale(1.04);
	transition: opacity 560ms var(--armm-ease), transform 900ms var(--armm-ease);
}

.armm-shot.is-active { opacity: 1; transform: scale(1); }

.armm-sec-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.5rem;
}

.armm-sec-link {
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	color: rgba(245, 233, 227, 0.82);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color 320ms var(--armm-ease), border-color 320ms var(--armm-ease);
}

.armm-sec-link:hover {
	color: var(--arm-clay, #c48d73);
	border-bottom-color: var(--arm-clay, #c48d73);
}

.armm-sec-link:focus-visible {
	outline: 3px solid var(--arm-clay, #c48d73);
	outline-offset: 4px;
	border-radius: 2px;
}

.armm-meta {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	align-items: flex-start;
	width: 100%;
	padding-top: clamp(1rem, 2vh, 1.5rem);
	border-top: 1px solid rgba(255, 255, 255, 0.16);
}

.armm-trust {
	margin: 0;
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-size: 0.875rem;
	line-height: 1.5;
	color: rgba(245, 233, 227, 0.72);
}

.armm-big-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: var(--arm-font-body, Inter), system-ui, sans-serif;
	font-weight: 600;
	font-size: 1rem;
	line-height: 1;
	padding: 1.125rem 1.875rem;
	border-radius: 999px;
	background-color: var(--arm-paper, #fff);
	color: var(--arm-slate-ink, #1c2422);
	border: 1.5px solid var(--arm-paper, #fff);
	text-decoration: none;
	transition: background-color 400ms var(--armm-ease), transform 400ms var(--armm-ease);
}

.armm-big-cta:hover {
	background-color: var(--arm-clay, #c48d73);
	border-color: var(--arm-clay, #c48d73);
	color: var(--arm-slate-ink, #1c2422);
	transform: translateY(-2px);
}

.armm-big-cta:focus-visible {
	outline: 3px solid var(--arm-clay, #c48d73);
	outline-offset: 4px;
	color: var(--arm-slate-ink, #1c2422);
}

/* Lock the page behind the overlay without losing scroll position. */
.armm-locked { overflow: hidden; }

@media (max-width: 1023px) {
	.armm-inner {
		grid-template-columns: minmax(0, 1fr);
		align-items: start;
		gap: 2.5rem;
	}
	.armm-stage { display: none; }
}

@media (max-width: 479px) {
	.armm-sec-list { gap: 0.5rem 1.125rem; }
	.armm-big-cta { width: 100%; }
}

/* ------------------------------------------------------- reduced motion --- */

@media (prefers-reduced-motion: reduce) {
	.armh,
	.armh-word,
	.armh-burger,
	.armh-cta,
	.armh-bars span,
	.armh-lbl,
	.armm-sec-link,
	.armm-link,
	.armm-big-cta,
	.armm-shot {
		transition-duration: 1ms;
	}

	/* Crossfade instead of the clip-path wipe, and drop the stagger entirely. */
	.armm {
		clip-path: none;
		transition: opacity 120ms linear, visibility 0s linear 120ms;
	}
	.armm.is-open {
		clip-path: none;
		transition: opacity 120ms linear, visibility 0s linear 0s;
	}
	.armm-item,
	.armm-side {
		opacity: 1;
		transform: none;
		transition: none;
	}
	.armm.is-open .armm-item { transition-delay: 0s; }
	.armm-note { transition: none; }
}
