/*
 * Site header and footer (template-parts/site-header.php, site-footer.php),
 * on every page. Front end only. Mobile first: the header shows the full
 * menu from 1024px; below that the toggle opens it (assets/js/ls-header.js).
 */

/* ---- Header ------------------------------------------------------------- */
.ls-header {
	position: relative;
	z-index: 50;
	background: var(--ls-color-navy);
	font-family: var(--ls-font-body);
}
/* Pages with Astra's transparent-header setting: the header lies over the first section */
.ast-theme-transparent-header #page { position: relative; }
.ast-theme-transparent-header .ls-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	background: transparent;
}
.ls-header__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	height: var(--ls-header-height-mobile);
	padding-inline: var(--ls-band-x);
}
.ls-header__logo { display: flex; align-items: center; }
.ls-header__logo img { display: block; width: auto; height: 28px; }
.ls-header__logo:focus-visible,
.ls-header__nav a:focus-visible,
.ls-header__toggle:focus-visible { outline: 3px solid var(--ls-color-accent); outline-offset: 4px; }

.ls-header__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	padding: 0;
	border: 1.5px solid var(--ls-color-toggle-line);
	border-radius: 50%;
	background: var(--ls-color-toggle-bg);
	color: var(--ls-color-bg);
	cursor: pointer;
}
.ls-header__toggle:hover,
.ls-header__toggle:focus { background: var(--ls-color-toggle-bg); border-color: var(--ls-color-bg); color: var(--ls-color-bg); }
.ls-header__icon-close,
.ls-header.is-open .ls-header__icon-open { display: none; }
.ls-header.is-open .ls-header__icon-close { display: block; }

/* Menu: a panel under the bar on phones and tablets */
.ls-header__nav {
	display: none;
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	padding: 8px var(--ls-gutter) 28px;
	background: var(--ls-color-navy);
	border-top: 1px solid var(--ls-color-line-on-navy);
	box-shadow: var(--ls-shadow-device);
}
.ls-header.is-open .ls-header__nav { display: block; }
.ls-header__menu { margin: 0 0 24px; padding: 0; list-style: none; }
.ls-header__menu li { margin: 0; border-bottom: 1px solid var(--ls-color-line-on-navy); }
.ls-header__menu a {
	display: block;
	padding: 14px 0;
	font-size: 20px;
	font-weight: var(--ls-font-weight-body-bold);
	line-height: 1.3;
	color: var(--ls-color-bg);
	text-decoration: none;
}
.ls-header__menu a:is(:hover, :focus),
.ls-header__menu a[aria-current="page"] { color: var(--ls-color-accent); }
.ls-header__cta.ls-btn { display: flex; width: 100%; }

@media (min-width: 1024px) {
	.ls-header__bar { height: var(--ls-header-height); }
	/* 40px at 1024px, growing to the design's 50px at 1440px, so it keeps clear of the menu */
	.ls-header__logo img { height: clamp(40px, 15.38px + 2.404vw, 50px); }
	.ls-header__toggle { display: none; }
	.ls-header__nav,
	.ls-header.is-open .ls-header__nav {
		display: flex;
		position: static;
		align-items: center;
		gap: clamp(24px, 3.1vw, 44px);
		padding: 0;
		background: none;
		border: 0;
		box-shadow: none;
	}
	.ls-header__menu { display: flex; gap: clamp(24px, 3.1vw, 44px); margin: 0; }
	.ls-header__menu li { border: 0; }
	.ls-header__menu a { padding: 0; font-size: 18px; font-weight: var(--ls-font-weight-body); color: var(--ls-color-on-navy); }
	.ls-header__cta.ls-btn {
		display: inline-flex;
		width: auto;
		min-height: var(--ls-btn-height-sm);
		padding: var(--ls-btn-padding-sm);
		font-size: 16px;
	}
}

/* ---- Footer: link section and bottom line ---------------------------------- */
.ls-footer {
	padding: 44px var(--ls-band-x) 0;
	background: var(--ls-color-navy-darker);
	color: var(--ls-color-on-navy);
	font-family: var(--ls-font-body);
	font-size: var(--ls-fs-small);
	line-height: 1.5;
}
.ls-footer p { margin: 0; }
.ls-footer a { color: var(--ls-color-on-navy); text-decoration: none; }
.ls-footer a:is(:hover, :focus) { color: var(--ls-color-bg); text-decoration: underline; }
.ls-footer a:focus-visible { outline: 2px solid var(--ls-color-accent); outline-offset: 3px; }
.ls-footer__main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 26px 16px;
	align-items: start;
}
.ls-footer__brand,
.ls-footer__contact { grid-column: 1 / -1; }
.ls-footer__brand { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.ls-footer__logo { display: inline-flex; }
.ls-footer__logo img { display: block; width: auto; height: 30px; }
.ls-footer__about { max-width: 300px; color: var(--ls-color-on-footer-muted); }
.ls-footer__group { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ls-footer .ls-footer__title {
	font-family: var(--ls-font-heading);
	font-size: 12px;
	font-weight: var(--ls-font-weight-heading);
	line-height: 1.4;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--ls-color-bg);
}
.ls-footer__links { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ls-footer__links li { margin: 0; }
.ls-footer__contact-links { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.ls-footer .ls-footer__contact-links a { color: var(--ls-color-bg); font-weight: var(--ls-font-weight-body-bold); }
.ls-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	gap: 10px 24px;
	margin-top: 28px;
	padding: 16px 0 22px;
	border-top: 1px solid var(--ls-color-line-on-navy);
	font-size: var(--ls-font-size-small);
	color: var(--ls-color-on-footer-muted);
}
.ls-footer .ls-footer__bottom a { color: var(--ls-color-on-footer-muted); }
.ls-footer__address { display: none; }
.ls-footer__credit { flex-basis: 100%; }

@media (min-width: 922px) {
	.ls-footer { padding-top: 56px; }
	.ls-footer__main { display: flex; flex-wrap: wrap; gap: 32px 64px; }
	.ls-footer__brand { width: 280px; gap: 16px; }
	.ls-footer__group { gap: 12px; }
	.ls-footer__group--features .ls-footer__links {
		display: grid;
		grid-auto-flow: column;
		grid-template-rows: repeat(4, auto);
		gap: 8px 40px;
	}
	.ls-footer__contact { align-items: flex-end; margin-left: auto; text-align: right; }
	.ls-footer__contact-links { flex-direction: column; align-items: flex-end; gap: 8px; }
	.ls-footer__bottom { gap: 12px 28px; margin-top: 44px; padding: 20px 0 26px; }
	.ls-footer__address { display: inline; }
	.ls-footer__credit { flex-basis: auto; margin-left: auto; }
}
