/*
 * Site header — Figma "Global Header" (CRH file CPO8VrN83OFQrdnEQ6hRGX,
 * 8103:36711: desktop 8103:36712, mobile 8107:1167) and "Global / Message
 * Bar" (28408:5436).
 *
 * Served directly, like block CSS; bin/add-fallbacks.mjs generates the var()
 * fallbacks. Type metrics come from the composite classes in the markup
 * (.text-label-sm, .text-label-lg); this file is color and layout only.
 */

.site-header {
	background: var(--background, #ffffff);
}

/* Announcement bar ---------------------------------------------------------- */

.site-announcement {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	min-height: 48px;
	padding: var(--spacing-2, 8px) var(--section-hr-padding, 64px);
	background: var(--primary, #0c71c3);
	color: var(--primary-foreground, #ffffff);
}

.site-announcement[hidden] {
	display: none;
}

.site-announcement__text {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	text-align: center;
}

/* Desktop: pinned 16px from the right edge at 20px, so the copy stays centred
   on the full bar. Mobile moves it into the flow at 16px (below). */
.site-announcement__close {
	--icon-size: 20px;
	position: absolute;
	top: 50%;
	right: var(--spacing-4, 16px);
	display: inline-flex;
	padding: 0;
	border: 0;
	background: transparent;
	color: inherit;
	cursor: pointer;
	transform: translateY(-50%);
}

.site-announcement__close:focus-visible {
	outline: 2px solid var(--primary-foreground, #ffffff);
	outline-offset: 2px;
	border-radius: var(--radius-sm, 2px);
}

/* Main row ------------------------------------------------------------------ */

.site-header__inner {
	display: flex;
	align-items: center;
	gap: var(--spacing-8, 32px);
	max-width: var(--container-max-width, 1440px);
	margin-inline: auto;
	padding: var(--spacing-6, 24px) var(--section-hr-padding, 64px);
}

/* The global a:not(.btn) hover underline doesn't belong on the logo. */
.site-header__logo,
.site-header__logo:hover {
	display: flex;
	flex: none;
	align-items: center;
	border-bottom-color: transparent;
}

.site-header__logo img {
	display: block;
	width: auto;
	max-width: 200px;
	height: 60px;
	object-fit: contain;
}

.site-header__site-name {
	color: var(--foreground, #666666);
}

.site-header__nav {
	flex: 1 1 0;
	min-width: 0;
}

.site-header__menu {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	/* 24px between links, per Figma. A menu longer than the comp's three links
	   can wrap at tablet widths; the 8px row gap keeps it compact when it does. */
	gap: var(--spacing-2, 8px) var(--spacing-6, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Menu links are Figma Button Type=Link in foreground: the hover underline
   comes from the global link rule, in the link's own color. */
.site-header__link {
	color: var(--foreground, #666666);
}

.site-header__actions {
	display: flex;
	flex: none;
	align-items: center;
	gap: var(--spacing-2, 8px);
	margin-left: auto;
}

/* The header's pills are full-round in Figma whatever the brand's
   --radius-button is (the Button component uses border-radius/full here). */
.site-header__pill {
	border-radius: var(--radius-full, 9999px);
}

.site-header__toggle {
	display: none;
}

/* Mobile -------------------------------------------------------------------- */

@media (max-width: 767px) {
	.site-announcement__close {
		--icon-size: 16px;
		position: static;
		flex: none;
		transform: none;
	}

	.site-header__inner {
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 0 var(--spacing-2, 8px);
		padding-block: var(--spacing-4, 16px);
	}

	.site-header__logo img {
		height: 40px;
	}

	/* The menu becomes a panel under the row, opened by the toggle. Without JS
	   (no .has-js) it stays visible and the toggle stays hidden, so the menu is
	   always reachable. The open panel isn't in the Figma comp — this is the
	   simplest treatment on existing tokens; replace it when design adds one. */
	.site-header__nav {
		flex-basis: 100%;
		order: 3;
	}

	.site-header.has-js .site-header__nav {
		display: none;
	}

	.site-header.has-js.is-open .site-header__nav {
		display: block;
	}

	.site-header.has-js .site-header__toggle {
		display: inline-flex;
	}

	.site-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin-top: var(--spacing-4, 16px);
		border-top: var(--border-width-1, 1px) solid var(--border, #d6d3d1);
	}

	.site-header__menu > li {
		border-bottom: var(--border-width-1, 1px) solid var(--border, #d6d3d1);
	}

	.site-header__link {
		display: block;
		padding-block: var(--spacing-3, 12px);
	}
}

/* SFL Productions -------------------------------------------------------------------
   Live Divi header (sflproductions.net, 1440px): a 98px bar of white at 88%
   that sticks to the top and floats over the hero photo; the logo (130px)
   then 50px to the links — Poppins 500 16px uppercase, rgba(0,0,0,.91),
   ~10px apart — and the blue gradient "Quote" button at the right of the
   1080px row. --sf-header-h lets the hero slide up under it. */

:root { --sf-header-h: 98px; }

.site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, 0.88);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
}

.site-header__bar { background: transparent; }

.admin-bar .site-header { top: 32px; }

@media (max-width: 782px) {
	.admin-bar .site-header { top: 46px; }
}

.site-header__inner {
	width: 80%;
	max-width: 1080px;
	min-height: var(--sf-header-h, 98px);
	padding: 12px 0;
	gap: 0 50px;
}

.site-header__logo img { width: 130px; max-width: none; height: auto; }

.site-header__link {
	font-family: var(--font-heading, "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Helvetica, Arial, sans-serif);
	font-weight: 500;
	font-size: 16px;
	line-height: 1;
	text-transform: uppercase;
	color: rgba(0, 0, 0, 0.91);
	border-bottom: 0;
}

.site-header__link:hover { color: var(--sf-purple, #6a14d1); border-bottom: 0; }
.site-header__menu .current-menu-item > .site-header__link { color: rgba(0, 0, 0, 0.91); border-bottom: 0; }

/* The Quote button: a menu item with the menu-cta class. */
.site-header__menu .menu-cta > .site-header__link {
	display: inline-block;
	padding: 8px 19px;
	border-radius: 3px;
	background: linear-gradient(180deg, var(--brand-500, #0c71c3) 0%, var(--sf-sky, #0da6dd) 100%);
	color: #ffffff;
	font-size: 19px;
	line-height: 1.4;
	text-transform: none;
	transition: filter 0.2s ease;
}
.site-header__menu .menu-cta > .site-header__link:hover,
.site-header__menu .menu-cta > .site-header__link:focus-visible { color: #ffffff; filter: brightness(1.12); }

@media (min-width: 981px) {
	.site-header__menu { flex-wrap: nowrap; gap: 0 22px; }
	.site-header__menu .menu-cta { margin-left: auto; }
	.site-header__actions { display: none; }
}

/* Below 981px: logo left, menu behind the toggle. */
@media (max-width: 980px) {
	:root { --sf-header-h: 76px; }

	.site-header__inner {
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 0 8px;
		width: 90%;
		padding: 10px 0;
	}

	.site-header__logo img { width: 110px; }

	.site-header__nav {
		flex-basis: 100%;
		order: 3;
		max-height: calc(100vh - 100px);
		overflow-y: auto;
	}

	.site-header.has-js .site-header__nav { display: none; }
	.site-header.has-js.is-open .site-header__nav { display: block; }
	.site-header.has-js .site-header__toggle { display: inline-flex; color: #2b2b2b; border-color: rgba(0, 0, 0, 0.35); background: transparent; }
	.site-header.is-open { background: #ffffff; }

	.site-header__menu {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		margin: 12px 0 0;
		border-top: 1px solid rgba(0, 0, 0, 0.1);
	}

	.site-header__menu > li { border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
	.site-header__link { display: block; padding: 14px 0; }
	.site-header__menu .menu-cta { padding: 16px 0 8px; border-bottom: 0; }
	.site-header__menu .menu-cta > .site-header__link { padding: 10px 28px; }
}
