/* Site header: the one shared header for every page that renders {header} (markup in header.php,
   behaviour in common/site-header.js). Mobile/tablet first; desktop from 1024px. */

/* The old header was position:fixed and style.min.css padded <body> to make room for it. */
body { padding-top: 0; }

.sv-hdr {
	--hdr-ink: #241F1C;
	--hdr-ink2: #564E48;
	--hdr-line: #E8E2DA;
	--hdr-hover: #F3EEE6;
	--hdr-focus: #0061EF;
	position: sticky;
	top: 0;
	z-index: 50;
	padding: 14px 10px 0;
	font: 500 14px/1.2 "Inter", sans-serif;
	color: var(--hdr-ink);
	-webkit-font-smoothing: antialiased;
}

.sv-hdr *, .sv-hdr *::before, .sv-hdr *::after { box-sizing: border-box; }
.sv-hdr ul { margin: 0; padding: 0; list-style: none; }
.sv-hdr li { float: none; margin: 0; padding: 0; }
.sv-hdr a { color: var(--hdr-ink); text-decoration: none; }
.sv-hdr button { margin: 0; border: 0; background: none; font: inherit; color: inherit; cursor: pointer; }
.sv-hdr svg { display: block; flex: none; }
.sv-hdr a:focus-visible, .sv-hdr button:focus-visible { outline: 2px solid var(--hdr-focus); outline-offset: 2px; }

.sv-hdr-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	border: 1px solid var(--hdr-line);
	border-radius: 32px;
	box-shadow: 0 2px 8px rgba(33, 23, 46, .04);
	padding: 12px 12px 12px 20px;
}

.sv-hdr-logo { display: block; }
.sv-hdr-logo svg { display: block; width: auto; max-width: none; height: 26px; }

.sv-hdr-nav { display: none; }

.sv-hdr-actions { display: flex; align-items: center; gap: 4px; }

.sv-hdr-btn {
	width: 40px;
	height: 40px;
	display: grid;
	place-items: center;
	padding: 0;
	border-radius: 50%;
	color: var(--hdr-ink);
	transition: background-color 150ms ease;
}
.sv-hdr-btn:hover, .sv-hdr-btn[aria-expanded="true"] { background: var(--hdr-hover); }

.sv-hdr-bur { width: 18px; height: 2px; background: var(--hdr-ink); box-shadow: 0 6px 0 var(--hdr-ink), 0 -6px 0 var(--hdr-ink); }

/* Dropdown chevron, shared by desktop menus and mobile accordions */
.sv-hdr-chev { color: var(--hdr-ink2); transition: transform 160ms ease; }
[aria-expanded="true"] > .sv-hdr-chev { transform: rotate(180deg); }

/* Menu items (desktop panels and mobile sub-lists) */
.sv-hdr-items { display: grid; gap: 2px; }
.sv-hdr-item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 48px;
	padding: 6px 12px 6px 6px;
	border-radius: 16px;
	font-size: 14px;
	transition: background-color 150ms ease;
}
.sv-hdr-item:hover, .sv-hdr-item[aria-current="page"] { background: rgba(255, 255, 255, .6); }
.sv-hdr-ico { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: var(--hdr-ink); }

.sv-hdr-tint-ig { background: #FFE6F1; }
.sv-hdr-tint-tt { background: #E5F1E3; }
.sv-hdr-tint-tools { background: #E4EEFC; }
.sv-hdr-tint-res { background: #EFECF4; }

/* Mobile/tablet menu */
.sv-hdr-m {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	max-height: calc(100vh - 110px);
	max-height: calc(100dvh - 110px);
	overflow-y: auto;
	padding: 8px;
	background: #fff;
	border: 1px solid var(--hdr-line);
	border-radius: 24px;
	animation: sv-hdr-in 160ms ease-out;
}
.sv-hdr-m[hidden] { display: none; }
.sv-hdr-m > ul { display: grid; gap: 2px; }
.sv-hdr-m-link {
	width: 100%;
	min-height: 48px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 16px;
	border-radius: 16px;
	font-size: 15px;
	font-weight: 500;
	text-align: left;
	transition: background-color 150ms ease;
}
.sv-hdr-m-link:hover, .sv-hdr-m-link[aria-current="page"] { background: var(--hdr-hover); }
.sv-hdr-m-sub { margin: 2px 0 6px; padding: 6px; border-radius: 20px; }
.sv-hdr-m-sub[hidden] { display: none; }

@keyframes sv-hdr-in { from { opacity: 0; transform: translateY(-4px); } }

@media (min-width: 1024px) {
	.sv-hdr { padding: 20px 40px 0; }

	.sv-hdr-bar {
		display: grid;
		grid-template-columns: auto 1fr auto;
		gap: 24px;
		max-width: 1200px;
		margin: 0 auto;
		padding: 12px 12px 12px 28px;
	}

	.sv-hdr-nav { display: block; justify-self: center; }
	.sv-hdr-nav > ul { display: flex; align-items: center; gap: 2px; }

	.sv-hdr-link {
		height: 40px;
		display: inline-flex;
		align-items: center;
		gap: 6px;
		padding: 0 12px;
		border-radius: 999px;
		font: 500 14px/1 "Inter", sans-serif;
		color: #241F1C;
		white-space: nowrap;
		transition: background-color 150ms ease;
	}
	.sv-hdr-link:hover, .sv-hdr-link[aria-expanded="true"], .sv-hdr-link[aria-current="page"] { background: var(--hdr-hover); color: #241F1C; }

	/* Panel spans the whole bar, 8px below it (the bar is the positioning box, not the <li>). */
	.sv-hdr-panel {
		position: absolute;
		top: calc(100% + 8px);
		left: 0;
		right: 0;
		padding: 12px;
		border-radius: 24px;
		animation: sv-hdr-in 160ms ease-out;
	}
	.sv-hdr-panel[hidden] { display: none; }
	.sv-hdr-panel .sv-hdr-items { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }

	.sv-hdr-menu-btn, .sv-hdr-m { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
	.sv-hdr *, .sv-hdr *::before, .sv-hdr *::after { transition: none !important; animation: none !important; }
}

/* Site footer (markup in header.php): the homepage's warm cream instead of the old .color1 tint. */
.footer.sv-ftr { background: #FAF8F5; border-top-color: #E8E2DA; }
