/* ==========================================================================
   HeroMount layout: shared header, slide-in menu, shared footer (spec Section 6).
   ========================================================================== */

/* Brand (logo + wordmark) -------------------------------------------------- */

.brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	color: var(--navy);
	text-decoration: none;
}

.brand:hover {
	color: var(--navy);
}

.brand__logo {
	flex: none;
	width: 36px;
	height: 36px;
	overflow: hidden;
	border-radius: 50%;
	background: #000;
}

.brand__logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.brand__text {
	display: flex;
	flex-direction: column;
}

.brand__name {
	font-family: var(--font-head);
	font-size: 16px;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 1;
}

/* The name fades from the logo's gold into its blue and back out to navy,
   the same in the header and the footer. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
	.brand__name {
		padding-bottom: 0.08em;
		background: linear-gradient(90deg, #B38A22 0%, var(--blue) 46%, var(--blue) 58%, var(--navy) 100%);
		-webkit-background-clip: text;
		background-clip: text;
		color: transparent;
		-webkit-text-fill-color: transparent;
	}
}

.brand__sub {
	margin-top: 4px;
	color: var(--gold-dark);
	font-family: var(--font-head);
	font-size: 9px;
	font-weight: 700;
	letter-spacing: 0.25em;
	line-height: 1;
	text-transform: uppercase;
}

/* Header ------------------------------------------------------------------- */

.site-header {
	position: sticky;
	top: 0;
	z-index: 50;
	background: var(--white);
	box-shadow: 0 1px 8px rgba(2, 5, 25, 0.08);
	transition: transform 0.25s ease;
}

/* Hides on scroll down, returns on scroll up. */
.site-header.is-hidden {
	transform: translateY(-100%);
}

.admin-bar .site-header {
	top: var(--wp-admin--admin-bar--height, 0px);
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	height: var(--header-h);
}

.site-nav {
	display: none;
}

.site-header__actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.site-header__back {
	display: none;
}

/* Header button: a small pill on phones, with a full 48px tap area around it. */
.btn--header {
	min-height: 36px;
	padding: 6px 14px;
	overflow: visible;
	font-size: 13px;
	box-shadow: none;
}

.btn--header::after {
	content: "";
	position: absolute;
	inset: -8px -2px;
}

.btn--header .icon,
.btn__label-long {
	display: none;
}

.menu-toggle {
	margin-right: -10px;
}

@media (min-width: 1100px) {
	.brand__logo {
		width: 44px;
		height: 44px;
	}

	.brand__name {
		font-size: 20px;
	}

	.brand__sub {
		font-size: 11px;
	}

	.site-nav {
		display: flex;
		align-items: center;
		gap: 28px;
	}

	.site-nav__link {
		padding-block: 8px;
		color: #334155;
		font-size: 14px;
		font-weight: 500;
		text-decoration: none;
		transition: color 0.2s ease;
	}

	.site-nav__link:hover {
		color: var(--blue);
	}

	.site-header__actions {
		gap: 14px;
	}

	/* "Back to the main site" pill on the event page. */
	.site-header__back {
		display: inline-flex;
		align-items: center;
		gap: 6px;
		min-height: 40px;
		padding: 6px 16px 6px 12px;
		border: 1px solid var(--border);
		border-radius: var(--radius-pill);
		background: var(--white);
		color: var(--navy);
		font-size: 14px;
		font-weight: 700;
		text-decoration: none;
		transition: border-color 0.2s ease, background-color 0.2s ease, color 0.2s ease;
	}

	.site-header__back .icon {
		color: var(--blue);
		transition: transform 0.2s ease;
	}

	.site-header__back:hover {
		border-color: var(--blue);
		background: var(--blue-tint);
		color: var(--blue);
	}

	.site-header__back:hover .icon {
		transform: translateX(-3px);
	}

	.btn--header {
		min-height: 48px;
		padding: 10px 24px;
		overflow: hidden;
		font-size: 14px;
	}

	.btn--header.btn--primary {
		box-shadow: 0 4px 16px rgba(10, 77, 179, 0.2);
	}

	.btn--header::after {
		content: none;
	}

	.btn--header .icon,
	.btn__label-long {
		display: inline;
	}

	.btn__label-short,
	.menu-toggle {
		display: none;
	}
}

/* Slide-in menu (phones and tablets) ---------------------------------------- */

.site-menu {
	position: fixed;
	inset: 0 0 0 auto;
	width: min(86vw, 340px);
	max-width: none;
	height: 100%;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: var(--white);
	color: var(--text-body);
	box-shadow: var(--shadow-3);
}

.site-menu[open] {
	display: flex;
	flex-direction: column;
	animation: hm-menu-in 0.25s ease-out;
}

.site-menu.is-closing {
	animation: hm-menu-out 0.2s ease-in forwards;
}

.site-menu::backdrop {
	background: rgba(2, 5, 25, 0.6);
}

@keyframes hm-menu-in {
	from {
		transform: translateX(100%);
	}
}

@keyframes hm-menu-out {
	to {
		transform: translateX(100%);
	}
}

.site-menu__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	height: 56px;
	padding: 0 6px 0 16px;
	border-bottom: 1px solid var(--border);
}

.site-menu__nav {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 8px 0;
	overflow-y: auto;
}

.site-menu__link {
	display: flex;
	align-items: center;
	min-height: 52px;
	padding: 8px 20px;
	color: var(--navy);
	font-family: var(--font-head);
	font-size: 17px;
	font-weight: 700;
	text-decoration: none;
}

.site-menu__link:hover,
.site-menu__link:focus-visible {
	background: var(--blue-tint);
	color: var(--blue);
}

.site-menu__link--back {
	margin-top: 8px;
	border-top: 1px solid var(--border);
	color: var(--text-muted);
	font-family: var(--font-body);
	font-size: 15px;
	font-weight: 500;
}

.site-menu__foot {
	padding: 16px 16px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid var(--border);
}

/* Footer ------------------------------------------------------------------- */

.site-footer {
	padding-block: 48px 32px;
	border-top: 1px solid var(--border);
	background: var(--white);
	font-size: 14px;
}

.site-footer__top {
	display: grid;
	gap: 32px;
}

.site-footer__about {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 16px;
}

.brand--footer .brand__logo {
	width: 56px;
	height: 56px;
}

.brand--footer .brand__name {
	font-size: 24px;
}

.brand--footer .brand__sub {
	font-size: 12px;
}

.site-footer__tagline {
	max-width: 560px;
	font-size: 16px;
}

.site-footer__status {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	color: var(--text);
	font-size: 14px;
	font-weight: 500;
}

.site-footer__dot {
	flex: none;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--gold);
}

.site-footer__contact {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 20px;
}

.site-footer__contact li,
.site-footer__contact a {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	color: var(--text-body);
	text-decoration: none;
}

.site-footer__contact a:hover {
	color: var(--blue);
}

.site-footer__contact .icon {
	color: var(--blue);
}

/* Mission Dispatch sign-up */
.dispatch {
	align-self: start;
	padding: 24px;
	border-radius: var(--radius-card);
	background: var(--blue-tint);
}

.dispatch__title {
	font-size: 20px;
}

.dispatch__intro {
	margin-top: 6px;
}

.dispatch__form {
	position: relative;
	display: flex;
	gap: 8px;
	margin-top: 16px;
}

.dispatch__form .input {
	flex: 1 1 auto;
	min-width: 0;
}

.dispatch__form .btn {
	flex: none;
	padding-inline: 24px;
}

.dispatch__note {
	margin-top: 12px;
	color: var(--text-muted);
	font-size: 13px;
}

.dispatch__status:empty {
	display: none;
}

.dispatch__status {
	margin-top: 8px;
	color: var(--text);
	font-weight: 500;
}

.site-footer__bottom {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 32px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0 24px;
}

.site-footer__links a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--text-body);
	text-decoration: none;
}

.site-footer__links a:hover {
	color: var(--navy);
	text-decoration: underline;
}

.site-footer__links .site-footer__top-link {
	color: var(--blue);
	font-weight: 500;
}

.site-footer__copyright {
	color: var(--text-muted);
	font-size: 13px;
}

@media (min-width: 900px) {
	.site-footer {
		padding-block: 64px 40px;
	}

	.site-footer__top {
		grid-template-columns: 7fr 5fr;
		gap: 48px;
	}

	.site-footer__bottom {
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
	}
}
