/* ==========================================================================
   VE Header Footer — header-footer.css
   Elementor Pro Theme Builder header (.ve-header) and footer (.ve-footer).
   Uses the design tokens from VE Landing Page's global.css (loaded by this
   plugin on every page where the header/footer can appear). Every colour has
   a fallback so nothing breaks if the tokens are missing.
   ========================================================================== */

:root {
	--ve-header-h: 76px;
	--ve-header-h-scrolled: 64px;
}

/* Anchor links land below the sticky header; smooth scrolling unless reduced motion. */
html { scroll-padding-top: calc(var(--ve-header-h-scrolled) + 16px); }
@media (prefers-reduced-motion: no-preference) {
	html:has(.ve-header) { scroll-behavior: smooth; }
}

/* ---------- Sticky host (Elementor's header location wrapper) ---------- */
.ve-header-host,
.elementor-location-header:has(.ve-header) {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 900;
	transition: transform 0.4s var(--ve-ease, cubic-bezier(0.22, 1, 0.36, 1));
}
/* Background layer on a pseudo-element: a blur on the wrapper itself would
   break the fixed-position mobile menu. */
.ve-header-host::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: var(--ve-bg, #faf8f4);
	transition: background-color 0.3s ease, box-shadow 0.3s ease;
	pointer-events: none;
}
.ve-header-host.is-scrolled::before {
	background: rgba(255, 255, 255, 0.86);
	-webkit-backdrop-filter: saturate(1.4) blur(14px);
	backdrop-filter: saturate(1.4) blur(14px);
	box-shadow: 0 1px 0 var(--ve-line, #e7e3dc), 0 10px 30px -18px rgba(28, 27, 31, 0.3);
}
.ve-header-host.is-hidden { transform: translateY(-110%); }

/* Header placed as a normal section at the top of a page (no Theme Builder).
   The container itself sticks; extra specificity beats Elementor's container rules. */
.e-con.ve-header.ve-header--inpage {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 900;
	isolation: isolate;
}
.e-con.ve-header.ve-header--inpage::before {
	content: "";
	display: block;
	position: absolute;
	top: 0;
	left: 0;
	inset-inline-start: 0;
	width: 100%;
	height: 100%;
	opacity: 1;
	mix-blend-mode: normal;
	border: 0;
	border-radius: 0;
}

/* ---------- Header bar ---------- */
.e-con.ve-header {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ve-space-5, 1.5rem);
	width: 100%;
	max-width: none;
	min-height: var(--ve-header-h);
	margin: 0;
	padding: 0 max(var(--ve-gutter, 1.5rem), calc((100% - var(--ve-max, 1320px)) / 2));
	background: transparent;
	font-family: var(--ve-font-body, system-ui, sans-serif);
	transition: min-height 0.3s ease;
}
.ve-header-host.is-scrolled .e-con.ve-header { min-height: var(--ve-header-h-scrolled); }
.ve-header > .elementor-element { width: auto; max-width: none; margin: 0; flex: none; }

/* Logo: a Heading widget (text) or an Image widget with class ve-header__logo */
.e-con.ve-header .ve-header__logo .elementor-heading-title,
.e-con.ve-header .ve-header__logo .elementor-heading-title a {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-family: var(--ve-font-display, Georgia, serif);
	font-size: 1.6rem;
	font-weight: 400;
	line-height: 1;
	letter-spacing: -0.02em;
	color: var(--ve-ink, #1c1b1f);
	text-decoration: none;
}
.ve-header__logo .elementor-heading-title::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ve-accent, #ff5a1f);
	box-shadow: 0 0 0 4px rgba(255, 90, 31, 0.18);
	flex: none;
}
.ve-header__logo img { display: block; max-height: 40px; width: auto; }

/* Nav: a Text Editor containing a bulleted list of links */
.ve-header .ve-header__nav { flex: 1 1 auto; display: flex; justify-content: center; }
.ve-header__nav ul {
	display: flex;
	align-items: center;
	gap: clamp(0.25rem, 0.1rem + 0.6vw, 0.75rem);
	margin: 0;
	padding: 0;
	list-style: none;
}
.ve-header__nav li { margin: 0; padding: 0; }
.ve-header__nav a {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 0.7rem;
	border-radius: var(--ve-radius-pill, 999px);
	color: var(--ve-ink-soft, #5a5760);
	font-size: 0.9375rem;
	font-weight: 600;
	text-decoration: none;
	transition: color 0.2s ease, background-color 0.2s ease;
}
.ve-header__nav a:hover { color: var(--ve-ink, #1c1b1f); background: rgba(28, 27, 31, 0.05); }
.ve-header__nav a.is-active { color: var(--ve-ink, #1c1b1f); }
.ve-header__nav a.is-active::after {
	content: "";
	position: absolute;
	left: 50%;
	bottom: 6px;
	width: 5px;
	height: 5px;
	margin-left: -2.5px;
	border-radius: 50%;
	background: var(--ve-accent, #ff5a1f);
}
.ve-header__nav a:focus-visible,
.ve-footer a:focus-visible {
	outline: 3px solid var(--ve-focus, #3a5bd9);
	outline-offset: 2px;
}

/* CTA uses the shared .ve-btn styles; slightly smaller in the bar */
.ve-header .ve-btn .elementor-button { min-height: 44px; padding: 0.75em 1.25em; font-size: 0.9375rem; }

/* Menu toggle (created by header-footer.js, shown on tablet/mobile) */
.ve-header .ve-header__toggle {
	display: none;
	position: relative;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ve-line, #e7e3dc);
	border-radius: 50%;
	background: var(--ve-surface, #fff);
	color: var(--ve-ink, #1c1b1f);
	cursor: pointer;
	flex: none;
}
.ve-header .ve-header__toggle:hover,
.ve-header .ve-header__toggle:focus { background: var(--ve-surface, #fff); color: var(--ve-ink, #1c1b1f); border-color: var(--ve-ink, #1c1b1f); }
.ve-header__toggle span {
	position: absolute;
	left: 50%;
	top: 50%;
	width: 18px;
	height: 1.75px;
	margin-left: -9px;
	border-radius: 2px;
	background: currentColor;
	transition: transform 0.3s var(--ve-ease, ease), opacity 0.2s ease;
}
.ve-header__toggle span:nth-child(1) { transform: translateY(-5px); }
.ve-header__toggle span:nth-child(3) { transform: translateY(5px); }
.ve-header.is-menu-open .ve-header__toggle span:nth-child(1) { transform: rotate(45deg); }
.ve-header.is-menu-open .ve-header__toggle span:nth-child(2) { opacity: 0; }
.ve-header.is-menu-open .ve-header__toggle span:nth-child(3) { transform: rotate(-45deg); }

@media (max-width: 1024px) {
	.ve-header .ve-header__toggle { display: block; order: 3; }
	.ve-header > .ve-header__cta { order: 2; margin-left: auto; }
	.ve-header .ve-header__nav {
		position: fixed;
		left: 0;
		right: 0;
		top: calc(var(--ve-header-h-scrolled) + var(--wp-admin--admin-bar--height, 0px));
		bottom: 0;
		z-index: 899;
		display: block;
		padding: var(--ve-space-6, 2rem) var(--ve-gutter, 1.5rem);
		background: var(--ve-bg, #faf8f4);
		overflow-y: auto;
		opacity: 0;
		visibility: hidden;
		transform: translateY(-10px);
		transition: opacity 0.3s ease, transform 0.35s var(--ve-ease, ease), visibility 0s linear 0.35s;
	}
	.ve-header.is-menu-open .ve-header__nav {
		opacity: 1;
		visibility: visible;
		transform: none;
		transition-delay: 0s;
	}
	.ve-header__nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.ve-header__nav li { border-bottom: 1px solid var(--ve-line, #e7e3dc); }
	.ve-header__nav a {
		width: 100%;
		min-height: 64px;
		padding: 0;
		border-radius: 0;
		font-family: var(--ve-font-display, Georgia, serif);
		font-size: clamp(1.75rem, 1.4rem + 2vw, 2.5rem);
		font-weight: 400;
		color: var(--ve-ink, #1c1b1f);
	}
	.ve-header__nav a:hover { background: transparent; color: var(--ve-accent-text, #c8410e); }
	.ve-header__nav a.is-active::after { left: auto; right: 0; bottom: 50%; margin: 0 0 -2.5px; width: 8px; height: 8px; }
	/* No-JS: keep links visible as a simple row */
	.ve-header:not(.is-js) .ve-header__nav {
		position: static; opacity: 1; visibility: visible; transform: none; padding: 0; background: transparent; overflow: visible;
	}
	.ve-header:not(.is-js) .ve-header__nav ul { flex-direction: row; flex-wrap: wrap; }
	.ve-header:not(.is-js) .ve-header__nav a { font-family: inherit; font-size: 0.9375rem; min-height: 44px; }
}
/* CTA copy inside the mobile menu (hidden on desktop) */
.ve-header .ve-header__nav .ve-header__menu-cta { display: none; }
@media (max-width: 1024px) {
	.ve-header.is-js .ve-header__nav .ve-header__menu-cta {
		display: flex;
		align-items: center;
		justify-content: center;
		min-height: 54px;
		margin-top: var(--ve-space-6, 2rem);
		border-radius: var(--ve-radius-pill, 999px);
		background: var(--ve-accent, #ff5a1f);
		color: var(--ve-on-accent, #1c1b1f);
		font-family: var(--ve-font-body, system-ui, sans-serif);
		font-size: 1rem;
		font-weight: 800;
		text-decoration: none;
	}
	.ve-header.is-js .ve-header__nav .ve-header__menu-cta {
		width: 100%;
		padding: 0 1.5rem;
		border-bottom: 0;
		line-height: 1;
	}
	.ve-header.is-js .ve-header__nav .ve-header__menu-cta:hover {
		background: var(--ve-accent-hover, #ec4a10);
		color: var(--ve-on-accent, #1c1b1f);
	}
	.ve-header.is-js .ve-header__nav .ve-header__menu-cta:focus-visible { outline: 3px solid var(--ve-focus, #3a5bd9); outline-offset: 3px; }
}
@media (max-width: 480px) {
	.ve-header .ve-btn .elementor-button { padding: 0.7em 1em; font-size: 0.875rem; }
	.ve-header__logo .elementor-heading-title { font-size: 1.35rem; }
}
@media (max-width: 400px) {
	.ve-header.is-js > .ve-header__cta { display: none; }
	.ve-header .ve-header__toggle { margin-left: auto; }
}
body.ve-menu-open { overflow: hidden; }

/* ---------- Footer ---------- */
.e-con.ve-footer {
	--ve-footer-text: rgba(255, 255, 255, 0.72);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: clamp(2.5rem, 1.5rem + 3vw, 4rem);
	width: 100%;
	max-width: none;
	margin: 0;
	padding: clamp(3.5rem, 2.5rem + 4vw, 6rem) max(var(--ve-gutter, 1.5rem), calc((100% - var(--ve-max, 1320px)) / 2)) var(--ve-space-6, 2rem);
	background: var(--ve-ink, #1c1b1f);
	color: var(--ve-footer-text);
	font-family: var(--ve-font-body, system-ui, sans-serif);
	overflow: hidden;
}
.ve-footer > .elementor-element { width: 100%; max-width: none; margin: 0; }

.e-con.ve-footer__top {
	display: grid;
	grid-template-columns: repeat(12, minmax(0, 1fr));
	column-gap: clamp(1rem, 0.5rem + 1.5vw, 2rem);
	row-gap: var(--ve-space-7, 3rem);
	padding: 0;
	margin: 0;
}
.ve-footer__top > .elementor-element { width: auto; max-width: none; min-width: 0; margin: 0; }
.e-con.ve-footer__brand {
	grid-column: 1 / span 5;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: var(--ve-space-5, 1.5rem);
	padding: 0;
	margin: 0;
}
.ve-footer__brand > .elementor-element { width: 100%; max-width: none; margin: 0; }
.ve-footer__brand > .elementor-widget-button { width: auto; }
/* Extra specificity: beats the landing page's dark heading colour from global.css */
.e-con.ve-footer .ve-footer__logo .elementor-heading-title {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0;
	font-family: var(--ve-font-display, Georgia, serif);
	font-size: 2rem;
	font-weight: 400;
	line-height: 1;
	color: #fff;
}
.ve-footer__logo .elementor-heading-title::before {
	content: "";
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: var(--ve-accent, #ff5a1f);
}
.ve-footer__tagline p {
	margin: 0;
	max-width: 36ch;
	font-size: var(--ve-fs-body, 1rem);
	line-height: 1.6;
	color: var(--ve-footer-text);
}
.ve-footer__col:nth-of-type(2) { grid-column: 7 / span 2; }
.ve-footer__col:nth-of-type(3) { grid-column: 9 / span 2; }
.ve-footer__col:nth-of-type(4) { grid-column: 11 / span 2; }
.ve-footer__col p {
	margin: 0 0 1rem;
	font-size: var(--ve-fs-micro, 0.75rem);
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.5);
}
.ve-footer__col ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 0.25rem; }
.ve-footer__col li { margin: 0; color: var(--ve-footer-text); font-size: 0.9375rem; line-height: 1.5; }
.ve-footer a {
	color: #fff;
	text-decoration: none;
	transition: color 0.2s ease;
}
.ve-footer__col a { display: inline-flex; align-items: center; min-height: 36px; }
.ve-footer a:hover { color: #ffb08f; }

/* Big brand wordmark */
.e-con.ve-footer .ve-footer__wordmark .elementor-heading-title {
	margin: 0;
	font-family: var(--ve-font-display, Georgia, serif);
	font-size: clamp(4rem, 1rem + 15vw, 16rem);
	font-weight: 400;
	line-height: 0.82;
	letter-spacing: -0.04em;
	white-space: nowrap;
	color: rgba(255, 255, 255, 0.92);
	background: linear-gradient(180deg, #fff 30%, rgba(255, 255, 255, 0.15));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	user-select: none;
}

.e-con.ve-footer__bottom {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--ve-space-4, 1rem);
	padding: var(--ve-space-5, 1.5rem) 0 0;
	margin: 0;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.ve-footer__bottom > .elementor-element { width: auto; max-width: none; margin: 0; }
.ve-footer__legal p,
.ve-footer__links p { margin: 0; font-size: var(--ve-fs-small, 0.875rem); color: rgba(255, 255, 255, 0.6); }
.ve-footer__links a { color: rgba(255, 255, 255, 0.8); }
.ve-footer .ve-footer__top-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	min-height: 40px;
	margin: 0;
	padding: 0 1rem;
	border: 1px solid rgba(255, 255, 255, 0.25);
	border-radius: var(--ve-radius-pill, 999px);
	background: transparent;
	color: #fff;
	font: inherit;
	font-size: var(--ve-fs-small, 0.875rem);
	font-weight: 700;
	cursor: pointer;
}
.ve-footer .ve-footer__top-btn:hover,
.ve-footer .ve-footer__top-btn:focus { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: #fff; }
.ve-footer .ve-footer__top-btn:focus-visible { outline: 3px solid #9fb2ff; outline-offset: 2px; }
.ve-footer__top-btn svg { width: 14px; height: 14px; fill: currentColor; }

@media (max-width: 1024px) {
	.e-con.ve-footer__brand { grid-column: 1 / -1; }
	.ve-footer__col:nth-of-type(2) { grid-column: 1 / span 4; }
	.ve-footer__col:nth-of-type(3) { grid-column: 5 / span 4; }
	.ve-footer__col:nth-of-type(4) { grid-column: 9 / span 4; }
}
@media (max-width: 600px) {
	.ve-footer__col:nth-of-type(2) { grid-column: 1 / span 6; }
	.ve-footer__col:nth-of-type(3) { grid-column: 7 / span 6; }
	.ve-footer__col:nth-of-type(4) { grid-column: 1 / -1; }
	.e-con.ve-footer__bottom { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
	.ve-header-host,
	.ve-header-host::before,
	.e-con.ve-header,
	.ve-header__toggle span,
	.ve-header .ve-header__nav { transition: none !important; }
	.ve-header-host.is-hidden { transform: none; }
}

/* ---------- Buttons in header/footer (work on every page, not only the landing page) ---------- */
.ve-header .ve-btn .elementor-button,
.ve-footer .ve-btn .elementor-button {
	display: inline-flex;
	align-items: center;
	gap: 0.5em;
	border: 1.5px solid transparent;
	border-radius: var(--ve-radius-pill, 999px);
	font-family: var(--ve-font-body, system-ui, sans-serif);
	font-weight: 700;
	line-height: 1;
	text-decoration: none;
	transition: background-color 0.2s ease, transform 0.45s var(--ve-ease, ease), border-color 0.2s ease;
}
.ve-header .ve-btn--primary .elementor-button,
.ve-footer .ve-btn--primary .elementor-button {
	background-color: var(--ve-accent, #ff5a1f);
	color: var(--ve-on-accent, #1c1b1f);
}
.ve-header .ve-btn--primary .elementor-button:hover,
.ve-footer .ve-btn--primary .elementor-button:hover {
	background-color: var(--ve-accent-hover, #ec4a10);
	color: var(--ve-on-accent, #1c1b1f);
	transform: translateY(-1px);
}
.ve-footer .ve-btn .elementor-button { min-height: 50px; padding: 0.9em 1.5em; font-size: 1rem; }
.ve-header .ve-btn .elementor-button:focus-visible,
.ve-footer .ve-btn .elementor-button:focus-visible { outline: 3px solid var(--ve-focus, #3a5bd9); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) {
	.ve-header .ve-btn .elementor-button:hover,
	.ve-footer .ve-btn .elementor-button:hover { transform: none; }
}
