/* Layout — header, nav, footer. */

/* Header */
.site-header { background: var(--hl-bg-header); }
.site-header__inner {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 130px;
	padding: 1rem 0;
	/* Keeps each pill's off-screen half from widening the page while it
	 * slides in. Clip rather than hidden so no scroll container is created,
	 * and only here rather than on .site-header, which would cut off the
	 * Portfolio dropdown. */
	overflow-x: clip;
}
.site-header__brand { text-align: center; }
.brand-text { display: block; color: #fff; }
.brand-text__main { display: block; font-size: 2.6rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 300; }
.brand-text__sub  { display: block; font-size: 1rem; letter-spacing: 0.55em; text-transform: uppercase; color: var(--hl-green-text); margin-top: 0.2rem; }
.site-header__brand .custom-logo,
.custom-logo-link .custom-logo {
	margin: 0 auto;
	height: auto;
	max-height: 80px;
	width: auto;
	max-width: 300px;
}

.pill {
	position: absolute; top: 50%; transform: translateY(-50%);
	background: var(--hl-green); border-color: var(--hl-green);
	white-space: nowrap;
	display: inline-flex; align-items: center; justify-content: center; gap: 0.6em;
	min-width: 260px;              /* both pills share one width + height so they balance exactly */
	min-height: 48px;
	padding: 0 1.6em;
	line-height: 1;
}
.pill--call { left: 0; border-radius: 0 6px 6px 0; }
.pill--brochure { right: 0; border-radius: 6px 0 0 6px; }

/* Both pills glide in from their own edge as the page settles, arriving
 * together so the pair reads as one gesture around the logo. Their resting
 * state is translateY(-50%) for vertical centring, so the keyframes carry
 * that through — animating a bare translateX would drop the centring and
 * make them jump on landing. */
@keyframes hl-pill-in-left {
	from { opacity: 0; transform: translate(-100%, -50%); }
	to   { opacity: 1; transform: translate(0, -50%); }
}
@keyframes hl-pill-in-right {
	from { opacity: 0; transform: translate(100%, -50%); }
	to   { opacity: 1; transform: translate(0, -50%); }
}
/* A longer, softer curve than the UI easing used elsewhere: quick off the
 * edge, then a long graceful settle, so it reads as a glide rather than a
 * slide. This is a one-off entrance flourish, not an interaction. */
.pill--call     { animation: hl-pill-in-left  0.95s cubic-bezier(.16, 1, .3, 1) 0.2s both; }
.pill--brochure { animation: hl-pill-in-right 0.95s cubic-bezier(.16, 1, .3, 1) 0.2s both; }
@media (prefers-reduced-motion: reduce) {
	.pill--call, .pill--brochure { animation: none; }
}
.pill__label { display: inline-block; }
.pill__icon { width: 1.05em; height: 1.05em; flex: 0 0 auto; display: block; }

/* ── Nav ──────────────────────────────────────────────────────────
 * Desktop: one centred row; parent items open a dropdown on hover or
 * keyboard focus, and carry a small chevron button for touch.
 * Small screens (≤900px): the row becomes a hamburger. The panel below
 * it (menu + phone/brochure) slides open using the grid-rows trick, so
 * the animation is smooth at any content height with no magic numbers.
 * Parent items become accordions inside the panel. */
.site-nav {
	position: relative;
	background: var(--hl-bg-header);
	border-top: 1px solid rgba(255,255,255,0.05);
}
.site-nav__panel { display: block; }
.nav-menu {
	display: flex; justify-content: center; flex-wrap: wrap;
	list-style: none; gap: 0.5rem 2rem; padding: 0.75rem 0;
}
.nav-menu li { position: relative; }
.nav-menu a {
	display: inline-block;
	color: var(--hl-green-text); text-transform: uppercase;
	letter-spacing: 0.12em; font-size: 0.9rem; line-height: 1.4;
	padding: 0.35rem 0;
}
.nav-menu a:hover,
.nav-menu a:focus-visible,
.nav-menu .current-menu-item > a,
.nav-menu .current-menu-ancestor > a,
.nav-menu .menu-item.is-open > a { color: #fff; }
.nav-menu a:focus-visible { outline: 2px solid var(--hl-green-text); outline-offset: 4px; border-radius: 2px; }

/* Chevron button next to a parent link */
.sub-toggle {
	background: none; border: 0; padding: 0.35rem 0.4rem; margin-left: 0.15rem;
	cursor: pointer; color: var(--hl-green-text); vertical-align: middle;
	display: inline-flex; align-items: center;
}
.sub-toggle:hover, .sub-toggle:focus-visible { color: #fff; }
.sub-toggle:focus-visible { outline: 2px solid var(--hl-green-text); outline-offset: 2px; border-radius: 2px; }
.sub-toggle__chevron {
	display: block; width: 0.5em; height: 0.5em;
	border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
	transform: translateY(-25%) rotate(45deg);
	transition: transform 0.25s ease;
}
.menu-item.is-open > .sub-toggle .sub-toggle__chevron { transform: translateY(15%) rotate(225deg); }

/* Desktop dropdown */
.nav-menu .sub-menu {
	list-style: none;
	position: absolute; top: 100%; left: 50%; transform: translate(-50%, 6px);
	min-width: 220px; padding: 0.6rem 0; z-index: 50;
	background: var(--hl-bg-header);
	border: 1px solid var(--hl-rule); border-top: 2px solid var(--hl-green);
	box-shadow: 0 14px 30px rgba(0,0,0,0.45);
	opacity: 0; visibility: hidden; pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}
.nav-menu .sub-menu li { display: block; }
.nav-menu .sub-menu a {
	display: block; padding: 0.6rem 1.4rem; white-space: nowrap;
	font-size: 0.8rem; letter-spacing: 0.1em;
}
.nav-menu .sub-menu a:hover, .nav-menu .sub-menu a:focus-visible { background: rgba(255,255,255,0.05); }
.nav-menu .menu-item-has-children:hover > .sub-menu,
.nav-menu .menu-item-has-children:focus-within > .sub-menu,
.nav-menu .menu-item-has-children.is-open > .sub-menu {
	opacity: 1; visibility: visible; pointer-events: auto;
	transform: translate(-50%, 0);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}
/* Keep the hover bridge: no dead gap between link and dropdown. */
.nav-menu .menu-item-has-children::after {
	content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 8px;
}

/* Hamburger + mobile-only actions: hidden on desktop */
.nav-toggle { display: none; }
.nav-actions { display: none; }

@media (max-width: 900px) {
	/* Bars only — the icon carries it; the word lives in screen-reader text. */
	.nav-toggle {
		display: flex; align-items: center; justify-content: center;
		width: 100%; background: none; border: 0; cursor: pointer;
		padding: 1rem; color: var(--hl-green-text);
		-webkit-tap-highlight-color: transparent;
	}
	.nav-toggle:focus-visible { outline: 2px solid var(--hl-green-text); outline-offset: -4px; }
	.nav-toggle__bars {
		position: relative; display: block; width: 24px; height: 18px; flex: 0 0 auto;
	}
	.nav-toggle__bars::before, .nav-toggle__bars::after {
		content: ''; position: absolute; left: 0; width: 100%; height: 2px;
		background: #fff; border-radius: 2px;
		transition: transform 0.3s cubic-bezier(.2,.7,.2,1), top 0.3s cubic-bezier(.2,.7,.2,1), opacity 0.2s ease;
	}
	.nav-toggle__bars::before { top: 0; box-shadow: 0 8px 0 #fff; }
	.nav-toggle__bars::after  { top: 16px; }
	.nav-toggle__bars::before { transition: transform 0.3s cubic-bezier(.2,.7,.2,1), top 0.3s cubic-bezier(.2,.7,.2,1), box-shadow 0.15s ease; }
	.site-nav.is-open .nav-toggle__bars::before { top: 8px; transform: rotate(45deg); box-shadow: 0 0 0 transparent; }
	.site-nav.is-open .nav-toggle__bars::after  { top: 8px; transform: rotate(-45deg); }

	/* Sliding panel */
	.site-nav__panel {
		display: grid; grid-template-rows: 0fr;
		transition: grid-template-rows 0.35s cubic-bezier(.2,.7,.2,1);
	}
	/* Scrolls inside itself on short phones so the brochure button at the
	 * bottom is always reachable while the page behind is locked. */
	.site-nav__panel-inner { overflow: hidden auto; min-height: 0; max-height: calc(100dvh - 150px); overscroll-behavior: contain; }
	.site-nav.is-open .site-nav__panel { grid-template-rows: 1fr; }
	.site-nav__panel-inner {
		visibility: hidden;
		transition: visibility 0s linear 0.35s;
	}
	.site-nav.is-open .site-nav__panel-inner { visibility: visible; transition: visibility 0s; }

	.nav-menu {
		flex-direction: column; flex-wrap: nowrap; align-items: stretch;
		gap: 0; padding: 0.25rem 0 0.5rem;
		border-top: 1px solid rgba(255,255,255,0.06);
	}
	.nav-menu > li { border-bottom: 1px solid rgba(255,255,255,0.06); }
	.nav-menu > li:last-child { border-bottom: 0; }
	.nav-menu li { display: flex; flex-wrap: wrap; align-items: center; }
	.nav-menu a {
		flex: 1 1 auto; display: block; text-align: center;
		padding: 0.95rem 1rem; font-size: 0.95rem;
	}
	.nav-menu a:focus-visible { outline-offset: -4px; }
	.nav-menu .menu-item-has-children > a { padding-left: 3rem; } /* balance the chevron */
	.nav-menu .menu-item-has-children::after { display: none; }
	.sub-toggle {
		flex: 0 0 auto; width: 3rem; height: 3rem; margin: 0;
		justify-content: center; -webkit-tap-highlight-color: transparent;
	}
	.sub-toggle__chevron { width: 0.6em; height: 0.6em; }

	/* Accordion sub-menu. Height is measured by nav.js (scrollHeight) so
	 * the slide is exact; CSS just owns the easing. */
	.nav-menu .sub-menu {
		position: static; transform: none; min-width: 0; width: 100%;
		background: rgba(0,0,0,0.18); border: 0; box-shadow: none; padding: 0;
		opacity: 1; visibility: visible; pointer-events: auto;
		display: block; overflow: hidden; max-height: 0;
		transition: max-height 0.3s cubic-bezier(.2,.7,.2,1);
	}
	.nav-menu .menu-item-has-children:hover > .sub-menu,
	.nav-menu .menu-item-has-children:focus-within > .sub-menu,
	.nav-menu .menu-item-has-children.is-open > .sub-menu { transform: none; }
	.nav-menu .sub-menu li { display: block; }
	.nav-menu .sub-menu a { text-align: center; font-size: 0.85rem; padding: 0.8rem 1rem; white-space: normal; }
	.nav-menu .sub-menu a:hover { background: none; }

	/* Phone + brochure at the foot of the panel */
	.nav-actions {
		display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem;
		padding: 0.75rem 1rem 1rem; border-top: 1px solid rgba(255,255,255,0.06);
	}
	.nav-actions__item {
		display: flex; align-items: center; justify-content: center; gap: 0.5em;
		min-height: 46px; padding: 0.6rem 0.75rem; border-radius: 6px;
		border: 1px solid var(--hl-green); color: var(--hl-green-text);
		text-transform: uppercase; letter-spacing: 0.1em; font-size: 0.78rem; text-align: center;
	}
	.nav-actions__item--brochure { background: var(--hl-green); color: #fff; }
	.nav-actions__item:hover, .nav-actions__item:focus-visible { color: #fff; border-color: var(--hl-green-text); }
	.nav-actions__item .pill__icon { width: 1em; height: 1em; }

	/* Lock the page behind an open menu */
	html.nav-open, html.nav-open body { overflow: hidden; }
}
@media (max-width: 400px) {
	.nav-actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	.site-nav__panel, .nav-menu .sub-menu, .sub-toggle__chevron,
	.nav-toggle__bars::before, .nav-toggle__bars::after { transition: none; }
}

/* Footer */

/* Social icons live in a footer text widget. The global `img { display:block }`
 * was putting each one on its own line — these want to sit in a row. */
.footer-col .socialButton {
	display: inline-flex;
	margin-right: 0.75rem;
	transition: opacity 0.2s ease;
}
.footer-col .socialButton:last-child { margin-right: 0; }
.footer-col .socialButton:hover { opacity: 0.75; }
.footer-col .socialButton img { width: 35px; height: auto; margin: 0 !important; }

.site-footer { background: var(--hl-bg-footer); color: var(--hl-muted); }
.footer-widgets { padding: 3rem 0; border-top: 1px solid var(--hl-rule); }
.footer-widgets__cols {
	width: 90%; max-width: var(--hl-container); margin: 0 auto;
	display: flex; flex-wrap: wrap; gap: 2.5rem;
}
.footer-col { flex: 1; min-width: 240px; }
.footer-col .widget-title { color: #fff; font-size: 1.1rem; margin-bottom: 1rem; }
.footer-col a { color: var(--hl-muted); }
.footer-col a:hover { color: #fff; }

.footer-contact { padding: 0 0 3.5rem; color: #fff; }
.footer-contact__body { width: 90%; max-width: var(--hl-container); margin: 0 auto; }

.footer-copyright { background: var(--hl-bg-deep); padding: 1.25rem 0; border-top: 1px solid #333; }
.footer-copyright__inner {
	width: 90%; max-width: var(--hl-container); margin: 0 auto;
	display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
	color: #999; font-size: 0.85rem;
}
.footer-copyright__inner a { color: #bbb; }
.footer-copyright__inner a:hover { color: #fff; }

@media (max-width: 900px) {
	.pill { display: none; }
	.site-header__inner { min-height: 90px; }
}
@media (max-width: 900px) {
	.footer-widgets__cols { flex-direction: column; text-align: center; }
	.footer-copyright__inner { flex-direction: column; text-align: center; }
}
