/*
 * Site header.
 *
 * Measured from the published page at 1440, 1200, 1000, 810 and 390, at the top of the page and
 * scrolled, with every panel open. Rebuilt for the October 2026 revision, which made the header
 * fixed, added the scrolled state and the dropdowns, and moved the phone layout up to 1199px.
 *
 *   Top of page, 1200 and up   112 tall, 24/32 padding, transparent, light or dark tone
 *   Scrolled past 20px         96 tall, 16/32 padding, white, dark contents — 300ms
 *   Below 1200                 81 tall, 24/20 padding, 168px logo, menu button
 */

.as-header {
	position: fixed;
	z-index: 20;
	top: 0;
	right: 0;
	left: 0;
	padding: 24px 32px;
	color: var(--as-white);
	background-color: rgb(255 255 255 / 0);
	transition:
		background-color 300ms var(--as-ease),
		padding 300ms var(--as-ease);
}

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

/* Dark text over a pale page — every inner page except Sale and Lease. */
.as-header--dark {
	color: var(--as-ink);
}

.as-header.is-scrolled {
	padding-top: 16px;
	padding-bottom: 16px;
	color: var(--as-ink);
	background-color: var(--as-white);
}

/*
 * The row is the full padded width, not the 1280 content column — 1376 at 1440, so the button's right
 * edge lines up with the page padding. The three items are distributed across it.
 */
.as-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	min-height: 64px;
}

.as-header__bar-row {
	display: contents;
}

/* Logo -------------------------------------------------------------------- */

.as-header__logo {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	/* The file lost its "MOVE FORWARD" line in 0.9.6 and is shorter; the box keeps the old height so the header does not change. */
	min-height: 64px;
	text-decoration: none;
}

.as-header__logo-img {
	display: block;
	width: 327px;
	height: auto;
	aspect-ratio: 2002 / 256;
}

/*
 * Two logo files, because the design supplies two: a light mark for dark backgrounds and a dark one
 * for pale and white ones. Swapping files keeps the dark mark's own colour, which is not simply the
 * light one inverted.
 */
.as-header__logo-img--dark,
.as-header--dark .as-header__logo-img--light,
.as-header.is-scrolled .as-header__logo-img--light,
.as-header.is-open .as-header__logo-img--light {
	display: none;
}

.as-header--dark .as-header__logo-img--dark,
.as-header.is-scrolled .as-header__logo-img--dark,
.as-header.is-open .as-header__logo-img--dark {
	display: block;
}

/* Panel ------------------------------------------------------------------- */

/* Only there so the nav and the button can be hidden as one thing below 1200. */
.as-header__panel {
	display: contents;
}

/* Nav --------------------------------------------------------------------- */

.as-header__nav {
	flex: 0 0 auto;
}

.as-nav {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: 28px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.as-nav--phone {
	display: none;
}

.as-nav__item {
	position: relative;
	margin: 0;
}

/*
 * The roll-up. The link is clipped to one line and holds two identical labels 6px apart; hovering
 * slides the stack up by one label plus that gap, so the second copy lands where the first was.
 */
.as-nav__link {
	display: block;
	overflow: hidden;
	height: 22px;
	padding: 1px;
	color: inherit;
	text-decoration: none;
}

.as-nav__roll {
	display: flex;
	flex-direction: column;
	gap: 6px;
	transition: transform var(--as-duration) var(--as-ease);
}

.as-nav__label {
	display: block;
	font-family: var(--as-font);
	font-size: 16px;
	font-weight: 500;
	line-height: var(--as-lh-snug);
	letter-spacing: -0.04em;
	white-space: nowrap;
}

.as-nav__link:hover .as-nav__roll,
.as-nav__link:focus-visible .as-nav__roll {
	transform: translateY(calc(-1 * (1.2em + 6px)));
}

/* The parent's label and its chevron, 4px apart. */
.as-nav__head {
	display: flex;
	align-items: center;
	gap: 4px;
}

.as-nav__toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 16px;
	height: 16px;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.as-nav__chevron {
	display: block;
}

/*
 * The panel: white, 8px corners, a faint shadow, 12px below the item and 16px to the left of it so
 * the links inside line up 4px in from the label above. It fades in while dropping the last 6px,
 * in about 150ms.
 */
.as-nav__sub {
	position: absolute;
	z-index: 1;
	top: calc(100% + 12px);
	left: -16px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 200px;
	margin: 0;
	padding: 8px;
	color: var(--as-ink);
	list-style: none;
	background: var(--as-white);
	border-radius: 8px;
	box-shadow: 0 10px 20px rgb(0 0 0 / 0.05);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-6px);
	transition:
		opacity 150ms var(--as-ease),
		transform 150ms var(--as-ease),
		visibility 0s linear 150ms;
}

/* The design sets Service's panel wider than its links need; the others stay at 200. */
.as-nav__sub--wide {
	width: 260px;
}

/* Bridges the 12px gap, so moving the pointer from the label down to the panel does not close it. */
.as-nav__sub::before {
	position: absolute;
	top: -12px;
	right: 0;
	left: 0;
	height: 12px;
	content: "";
}

.as-nav__item--parent:hover > .as-nav__sub,
.as-nav__item--parent:focus-within > .as-nav__sub,
.as-nav__item--parent.is-open > .as-nav__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition-delay: 0s;
}

.as-nav__sub-item {
	margin: 0;
	padding: 10px 12px;
}

@media (prefers-reduced-motion: reduce) {
	.as-header,
	.as-nav__roll,
	.as-nav__sub {
		transition: none;
	}
}

/* Button ------------------------------------------------------------------ */

/* The component itself is in button.css, which this sheet depends on. */

.as-header__cta {
	/* A fixed 228 with its contents centred; min-width lets a longer label through. */
	flex: 0 0 auto;
	min-width: 228px;
}

.as-arrow {
	display: block;
	flex: 0 0 auto;
	width: 13px;
	height: 12px;
}

/* Menu button ------------------------------------------------------------- */

.as-header__toggle {
	display: none;
	/* Must not shrink, or the default flex-shrink takes it from 32 to 24 beside the logo. */
	flex: 0 0 32px;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 32px;
	height: 32px;
	padding: 0;
	color: inherit;
	background: none;
	border: 0;
	cursor: pointer;
}

.as-header__bar {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	transition: transform var(--as-duration) var(--as-ease);
}

@media (prefers-reduced-motion: reduce) {
	.as-header__bar {
		transition: none;
	}
}

/* Below 1200: the phone header ------------------------------------------- */

/*
 * The design's phone header now starts at 1199px — the tablet band uses it too, which also removes
 * the overflow the earlier tablet header had between 810 and 1000.
 */
@media (max-width: 1199px) {
	.as-header,
	.as-header.is-scrolled {
		padding: 24px 20px;
	}

	.as-header__inner {
		flex-wrap: wrap;
		min-height: 33px;
	}

	.as-header__bar-row {
		display: flex;
		flex: 0 0 100%;
		flex-wrap: nowrap;
		align-items: center;
		justify-content: space-between;
	}

	.as-header__logo {
		min-height: 33px;
	}

	.as-header__logo-img {
		width: 168px;
		height: auto;
	}

	.as-header__toggle {
		display: flex;
	}

	.as-header__panel {
		display: none;
		flex-basis: 100%;
		flex-direction: column;
		align-items: flex-start;
		justify-content: flex-start;
		gap: 32px;
		padding-top: 32px;
	}

	.as-header.is-open .as-header__panel {
		display: flex;
	}

	/* Open, the bar becomes a white sheet with dark contents, and simply gets taller. */
	.as-header.is-open {
		color: var(--as-ink);
		background-color: var(--as-white);
	}

	.as-header.is-open .as-header__toggle {
		gap: 0;
	}

	/* Each bar moves half the 2px between them, so the two cross at one point. */
	.as-header.is-open .as-header__bar--top {
		transform: translateY(1px) rotate(-45deg);
	}

	.as-header.is-open .as-header__bar--bottom {
		transform: translateY(-1px) rotate(45deg);
	}

	.as-nav {
		display: none;
	}

	.as-nav--phone {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 20px;
	}

	/*
	 * A fold: the label and a 16px chevron 6px apart, a 19.2px line like the label itself. Open, its
	 * links sit 14px below, 14px apart, behind a 1px rule with 15px between it and the text and 2px
	 * of the rule showing above and below them. The chevron turns to point up.
	 */
	.as-fold__head {
		display: flex;
		align-items: center;
		gap: 6px;
		font-family: var(--as-font);
		font-size: 16px;
		font-weight: 500;
		line-height: var(--as-lh-snug);
		letter-spacing: -0.04em;
		white-space: nowrap;
		list-style: none;
		cursor: pointer;
	}

	.as-fold__head::-webkit-details-marker {
		display: none;
	}

	.as-fold__head .as-nav__chevron {
		transition: transform var(--as-duration) var(--as-ease);
	}

	.as-fold[open] .as-fold__head .as-nav__chevron {
		transform: rotate(180deg);
	}

	.as-fold__items {
		display: flex;
		flex-direction: column;
		gap: 14px;
		margin: 14px 0 0;
		padding: 2px 0 2px 15px;
		list-style: none;
		border-left: 1px solid rgb(221 223 225);
	}

	.as-fold__link {
		display: block;
		font-family: var(--as-font);
		font-size: 16px;
		font-weight: 500;
		line-height: var(--as-lh-snug);
		letter-spacing: -0.04em;
		white-space: nowrap;
		color: inherit;
		text-decoration: none;
	}

	.as-header__cta {
		height: 40px;
		color: var(--as-white);
	}
}

/*
 * Navy variant (allard_header_navy). A solid navy bar with white text and the light logo in every state:
 * at the top, scrolled, and with the phone panel open. Last in the file so it wins over the scrolled and
 * open states above without needing more specificity than they have.
 */
.as-header.as-header--navy,
.as-header.as-header--navy.is-scrolled,
.as-header.as-header--navy.is-open {
	color: var(--as-white);
	background-color: var(--as-navy);
}

.as-header.as-header--navy .as-header__logo-img--light {
	display: block;
}

.as-header.as-header--navy .as-header__logo-img--dark {
	display: none;
}

.as-header.as-header--navy .as-fold__items {
	border-left-color: var(--as-white-50);
}
