/**
 * Site header.
 *
 * Figma desktop 10210:4017 — 1440 × 80, bg white, padding 24px 40px,
 *   logo 235 × 48, menu Roboto SemiBold 18/18 capitalize gap 32,
 *   actions gap 20, sign-up pill: border #C7C7C7, radius 60, padding 12px 16px.
 * Figma mobile 10343:5175 — 375 × 48, bg white, padding 10px 12px,
 *   logo mark 60 × 28, text 16/16, actions gap 6, icons 32.
 *
 * Nav switches from the full menu to the drawer at 1024px.
 */

.ae-header {
	position: relative;
	width: 100%;
	background-color: var(--ae-color-white, #fff);
}

.ae-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	width: 100%;
	/*
	 * 16px flat. It is the only value that satisfies both drawn bars: the
	 * mobile mark is 28 tall in a 60 bar and the desktop wordmark 48 in an 80.
	 */
	padding-block: 16px;
	/* 12px at 375 → 40px at 1440 */
	padding-inline: clamp(12px, calc(12px + 28 * var(--ae-fluid)), 40px);
}

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

.ae-header__logo {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	text-decoration: none;
}

.ae-header__logo-img {
	width: auto;
	object-fit: contain;
}

.ae-header__logo-img--full {
	display: none;
	/* Figma: 48px tall at 1440 */
	max-height: 48px;
}

.ae-header__logo-img--compact {
	display: block;
	/* Figma: 28px tall at 375 */
	max-height: 28px;
}

/* Primary menu ---------------------------------------------------------- */

.ae-header__nav {
	display: none;
	min-width: 0;
}

.ae-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: clamp(16px, calc(16px + 16 * var(--ae-fluid)), 32px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.ae-header__menu > li > a {
	display: block;
	font-size: 18px;
	line-height: 18px;
	font-weight: 600;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--ae-color-black, #000);
	white-space: nowrap;
}

.ae-header__menu > li > a:hover {
	color: var(--ae-color-orange, #ea6042);
}

/* Actions --------------------------------------------------------------- */

.ae-header__actions {
	display: flex;
	align-items: center;
	flex-shrink: 0;
	/* 6px at 375 → 20px at 1440 */
	gap: clamp(6px, calc(6px + 14 * var(--ae-fluid)), 20px);
}

/**
 * Figma orders these differently per frame:
 *   mobile  10343:5175 — CTA, Login pill, search, menu
 *   desktop 10210:4017 — search, Login, Sign Up
 * One DOM, reordered with flex.
 */
.ae-header__cta {
	order: 1;
}

/*
 * Below the 375 frame the bar runs out of room once the mark is in it. The text
 * call to action is the one item that drops: the drawer carries the same link,
 * so nothing becomes unreachable.
 */
@media (max-width: 359px) {

	.ae-header__cta {
		display: none;
	}
}

.ae-header__login {
	order: 2;
}

.ae-header__search-toggle {
	order: 3;
}

.ae-header__menu-toggle {
	order: 4;
}

.ae-header__cta {
	font-size: 16px;
	line-height: 16px;
	font-weight: 600;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--ae-color-black, #000);
	white-space: nowrap;
}

.ae-header__search-toggle,
.ae-header__menu-toggle {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
	padding: 0;
	background: none;
	border: 0;
	cursor: pointer;
}

.ae-header__search-toggle img,
.ae-header__menu-toggle img {
	width: 32px;
	height: 32px;
}

.ae-header__menu-toggle {
	display: flex;
}

.ae-header__login {
	font-size: 18px;
	line-height: 18px;
	font-weight: 600;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--ae-color-black, #000);
	white-space: nowrap;
}

.ae-header__signup {
	display: inline-flex;
	align-items: center;
	padding: 12px 16px;
	border: 1px solid var(--ae-color-grey-400, #c7c7c7);
	border-radius: 60px;
	font-size: 18px;
	line-height: 18px;
	font-weight: 600;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--ae-color-black, #000);
	white-space: nowrap;
}

.ae-header__signup:hover,
.ae-header__signup:focus-visible {
	border-color: var(--ae-color-black, #000);
}

/* Below 1025px the design shows the Login pill, not the Sign Up pill. */
.ae-header__login {
	display: inline-flex;
	align-items: center;
	padding: 12px 16px;
	border: 1px solid var(--ae-color-grey-400, #c7c7c7);
	border-radius: 60px;
	font-size: 16px;
	line-height: 16px;
}

.ae-header__signup {
	display: none;
}

/* Search — Figma desktop 10344:4991, mobile 10344:5417 -------------------- */

.ae-header__search[hidden] {
	display: none;
}

.ae-header__search {
	/* Band fill #E9E9E9 (Grey 200). */
	background-color: var(--ae-color-grey-200, #e9e9e9);
}

.ae-header__search-inner {
	display: flex;
	justify-content: center;
	/* Mobile: 20px all sides. */
	padding: 20px;
}

.ae-header-search {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	margin: 0;
	/* Mobile pill: #F8F8F8, 0.6px #C7C7C7, radius 40, 20 / 12 / 12. */
	padding: 12px 12px 12px 20px;
	border: 0.6px solid var(--ae-color-grey-400, #c7c7c7);
	border-radius: 40px;
	background-color: var(--ae-color-grey-100, #f8f8f8);
	overflow: hidden;
}

.ae-header-search:focus-within {
	border-color: var(--ae-color-blue-600, #0c8ce9);
}

.ae-header-search__icon {
	/* Mobile frame has no leading glyph. */
	display: none;
	flex-shrink: 0;
	width: 32px;
	height: 32px;
}

.ae-header-search__input {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 18px;
	line-height: 28px;
	font-weight: 400;
	color: var(--ae-color-grey-600, #676767);
	text-overflow: ellipsis;
	-webkit-appearance: none;
	appearance: none;
}

.ae-header-search__input::placeholder {
	color: var(--ae-color-grey-600, #676767);
	opacity: 1;
}

.ae-header-search__input::-webkit-search-decoration,
.ae-header-search__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.ae-header-search__input:focus {
	outline: none;
}

.ae-header-search__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	/* Mobile: 42px blue disc with magnifier. */
	width: 42px;
	height: 42px;
	padding: 0;
	border: 0;
	border-radius: 200px;
	background-color: transparent;
	background-image: url("../images/icon-search-submit.svg");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 42px 42px;
	color: var(--ae-color-white, #fff);
	cursor: pointer;
}

.ae-header-search__submit:hover,
.ae-header-search__submit:focus-visible {
	opacity: 0.9;
}

.ae-header-search__submit-label {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

.ae-header__search-toggle[aria-expanded="true"] img {
	opacity: 0.7;
}

@media (min-width: 768px) {

	.ae-header__search-inner {
		padding-inline: 60px;
		padding-block: 20px;
	}

	.ae-header-search {
		/* Mid widths: desktop pill treatment, fluid width. */
		padding: 12px 12px 12px 24px;
		background-color: var(--ae-color-white, #fff);
	}

	.ae-header-search__icon {
		display: block;
	}

	.ae-header-search__submit {
		width: auto;
		height: auto;
		padding: 12px 24px;
		background-color: var(--ae-color-blue-600, #0c8ce9);
		background-image: none;
		opacity: 1;
	}

	.ae-header-search__submit:hover,
	.ae-header-search__submit:focus-visible {
		background-color: var(--ae-color-blue-700, #0067b3);
		opacity: 1;
	}

	.ae-header-search__submit-label {
		position: static;
		width: auto;
		height: auto;
		margin: 0;
		overflow: visible;
		clip-path: none;
		font-size: 18px;
		line-height: 18px;
		font-weight: 600;
		text-transform: capitalize;
		color: var(--ae-color-white, #fff);
	}
}

/* Drawer ---------------------------------------------------------------- */

.ae-header__drawer[hidden] {
	display: none;
}

.ae-header__drawer {
	position: absolute;
	inset-inline: 0;
	top: 100%;
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 24px;
	max-height: calc(100vh - 100%);
	overflow-y: auto;
	padding: 24px clamp(12px, calc(12px + 28 * var(--ae-fluid)), 40px) 32px;
	background-color: var(--ae-color-white, #fff);
	box-shadow: var(--ae-shadow-basic);
}

.ae-header__drawer-menu,
.ae-header__drawer-menu ul {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.ae-header__drawer-menu ul {
	gap: 12px;
	margin-top: 12px;
	padding-inline-start: 16px;
}

.ae-header__drawer-menu a {
	display: block;
	font-size: 18px;
	line-height: 28px;
	font-weight: 600;
	text-transform: capitalize;
	text-decoration: none;
	color: var(--ae-color-black, #000);
}

.ae-header__drawer-menu ul a {
	font-weight: 400;
	color: var(--ae-color-grey-600, #676767);
}

.ae-header__signup--drawer {
	display: inline-flex;
	align-self: flex-start;
}

/* Desktop --------------------------------------------------------------- */

@media (min-width: 1025px) {

	.ae-header__logo-img--full {
		display: block;
	}

	.ae-header__logo-img--compact,
	.ae-header__cta,
	.ae-header__menu-toggle,
	.ae-header__drawer {
		display: none;
	}

	.ae-header__nav {
		display: block;
	}

	.ae-header__login {
		order: 2;
		padding: 0;
		border: 0;
		border-radius: 0;
		font-size: 18px;
		line-height: 18px;
	}

	.ae-header__search-toggle {
		order: 1;
	}

	.ae-header__signup {
		order: 3;
	}

	.ae-header__login:hover {
		color: var(--ae-color-orange, #ea6042);
	}

	.ae-header__signup {
		display: inline-flex;
	}

	/* Desktop 10344:4991 — 120px side padding (120/1440), 800px of 1200 content. */
	.ae-header__search-inner {
		padding-block: 20px;
		padding-inline: 8.3333%;
	}

	.ae-header-search {
		/* 800 / 1200 content box. */
		max-width: 66.6667%;
	}
}
