/* =========================================================================
   KEYIS header & footer
   Everything is scoped to #khf-header / #khf-footer so Elementor kit and
   theme styles (.elementor-kit-N a, button:hover, h2 ...) can't leak in.
   Sizes are taken from the 2560px XD artboards and scale down fluidly.
   ========================================================================= */

#khf-header,
#khf-footer {
	--khf-black: #000;
	--khf-white: #fff;
	--khf-pink: #e9425c;
	--khf-pink-hover: #d22f4a;
	--khf-rainbow: linear-gradient(90deg, #e9425c 0%, #f69550 25%, #fecc47 37.5%, #bcc44a 52%, #7ab94e 69%, #74bf87 81%, #75c6ca 100%);
	--khf-rule: 1px solid var(--khf-white);
	--khf-font: "Roboto", "Helvetica Neue", Arial, sans-serif;

	--khf-gutter: clamp(20px, 4vw, 80px);
	--khf-btn-h: clamp(42px, 0.5vw + 37px, 50px);

	--khf-fs-nav: clamp(16px, 0.35vw + 11px, 20px);
	--khf-fs-body: clamp(16px, 0.3vw + 12.5px, 20px);
	--khf-fs-h3: clamp(20px, 0.6vw + 14.6px, 30px);
	--khf-fs-menu-title: clamp(22px, 0.5vw + 19px, 32px);
	--khf-fs-h2: clamp(26px, 0.8vw + 19.5px, 40px);

	box-sizing: border-box;
	position: relative;
	background: var(--khf-black);
	color: var(--khf-white);
	font-family: var(--khf-font);
	font-size: var(--khf-fs-body);
	font-weight: 400;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* Never break words mid-way; lines only wrap at spaces. */
	overflow-wrap: normal;
	word-break: normal;
	hyphens: manual;
	text-align: left;
}

:is(#khf-header, #khf-footer) *,
:is(#khf-header, #khf-footer) *::before,
:is(#khf-header, #khf-footer) *::after {
	box-sizing: inherit;
}

/* ---- Resets (beat theme and Elementor kit element styles) ---- */
:is(#khf-header, #khf-footer) :is(h2, h3, p, ul, li, address, nav, figure) {
	margin: 0;
	padding: 0;
	font-style: normal;
	letter-spacing: normal;
	text-transform: none;
	color: inherit;
	list-style: none;
	background: none;
	border: 0;
}

:is(#khf-header, #khf-footer) :is(h2, h3) {
	font-family: inherit;
	line-height: 1.2;
	text-wrap: balance;
}

:is(#khf-header, #khf-footer) a {
	color: inherit;
	text-decoration: none;
	box-shadow: none;
	background: none;
	font-weight: inherit;
}

:is(#khf-header, #khf-footer) button {
	appearance: none;
	-webkit-appearance: none;
	margin: 0;
	padding: 0;
	min-height: 0;
	width: auto;
	background: none;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	color: inherit;
	font: inherit;
	line-height: inherit;
	letter-spacing: normal;
	text-transform: none;
	cursor: pointer;
}

:is(#khf-header, #khf-footer) img {
	display: block;
	max-width: 100%;
	height: auto;
	border: 0;
	border-radius: 0;
	box-shadow: none;
}

:is(#khf-header, #khf-footer) :is(a, button):focus-visible {
	outline: 2px solid var(--khf-white);
	outline-offset: 3px;
	border-radius: 2px;
}

:is(#khf-header, #khf-footer) .khf-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

:is(#khf-header, #khf-footer) .khf-wrap {
	width: min(1920px, 100% - 2 * var(--khf-gutter));
	margin-inline: auto;
}

:is(#khf-header, #khf-footer) .khf-icon {
	display: block;
	flex: none;
	width: 1.1em;
	height: 1.1em;
}

/* Rainbow line: header and footer only. */
#khf-header::after,
#khf-footer::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	height: 5px;
	background: var(--khf-rainbow);
}
#khf-header::after { bottom: 0; }
#khf-footer::before { top: 0; }

/* ---- Brand lockup ---- */
:is(#khf-header, #khf-footer) .khf-brand {
	--logo-h: 42px;
	display: inline-flex;
	align-items: center;
	gap: calc(var(--logo-h) * 0.78);
	flex: none;
}

:is(#khf-header, #khf-footer) .khf-brand__logo {
	width: auto;
	height: var(--logo-h);
}

:is(#khf-header, #khf-footer) .khf-brand__tagline {
	padding-bottom: 0.14em;
	font-size: calc(var(--logo-h) * 0.6);
	font-weight: 400;
	line-height: 1.1;
	white-space: nowrap;
	background: var(--khf-rainbow) left bottom / 100% 2px no-repeat;
}

/* ---- CTA button (the one brand colour) ---- */
:is(#khf-header, #khf-footer) .khf-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	height: var(--khf-btn-h);
	padding: 0 clamp(20px, 0.8vw + 12px, 34px);
	border-radius: 999px;
	background: var(--khf-pink);
	color: var(--khf-white);
	font-size: var(--khf-fs-nav);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
	transition: background-color 0.15s ease;
}

:is(#khf-header, #khf-footer) .khf-btn:hover {
	background: var(--khf-pink-hover);
	color: var(--khf-white);
}

/* =========================================================================
   Header
   ========================================================================= */

#khf-header {
	--khf-hh: clamp(64px, 3.1vw + 36px, 115px);
	z-index: 1000;
	padding-bottom: 5px;
}

#khf-header .khf-header__bar {
	display: flex;
	align-items: stretch;
	gap: clamp(16px, 1.6vw, 40px);
	min-height: var(--khf-hh);
}

#khf-header .khf-brand {
	--logo-h: clamp(28px, 1vw + 16px, 42px);
	align-self: center;
}

#khf-header .khf-header__panel {
	display: flex;
	flex: 1;
	align-items: stretch;
	gap: clamp(16px, 1.6vw, 40px);
}

/* Navigation */
#khf-header .khf-nav {
	display: flex;
	flex: 1;
	justify-content: center;
}

#khf-header .khf-nav__list {
	display: flex;
	align-items: stretch;
	gap: clamp(20px, 2.6vw, 68px);
}

#khf-header .khf-nav__item {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

#khf-header .khf-nav__row {
	display: flex;
	align-items: center;
	gap: 0.3em;
}

#khf-header .khf-nav__link {
	font-size: var(--khf-fs-nav);
	font-weight: 500;
	line-height: 1.2;
	white-space: nowrap;
	text-decoration: underline 2px transparent;
	text-underline-offset: 0.45em;
	transition: text-decoration-color 0.15s ease;
}

#khf-header .khf-nav__link:hover,
#khf-header .khf-nav__item.is-current > .khf-nav__row > .khf-nav__link {
	text-decoration-color: currentColor;
}

#khf-header .khf-nav__toggle {
	display: grid;
	place-items: center;
	width: 1.6em;
	height: 1.6em;
	font-size: var(--khf-fs-nav);
}

#khf-header .khf-icon--chevron {
	transition: transform 0.2s ease;
}

#khf-header .khf-nav__item.is-open .khf-icon--chevron,
#khf-header .khf-lang.is-open .khf-icon--chevron {
	transform: rotate(180deg);
}

/* Desktop dropdown: every page in the section at once, no nested clicks. */
#khf-header .khf-nav__sub {
	position: absolute;
	top: calc(100% + 5px);
	left: -24px;
	min-width: 280px;
	padding: 12px 0;
	background: var(--khf-black);
	border: 1px solid rgba(255, 255, 255, 0.28);
	border-top: 0;
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s linear 0.15s;
}

/* Hover bridge over the rainbow line so the menu doesn't close mid-move. */
#khf-header .khf-nav__sub::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 100%;
	height: 6px;
}

#khf-header .khf-nav__item.is-open > .khf-nav__sub {
	opacity: 1;
	visibility: visible;
	transform: none;
	transition: opacity 0.15s ease, transform 0.15s ease, visibility 0s;
}

#khf-header .khf-nav__sublink {
	display: block;
	padding: 10px 24px;
	font-size: var(--khf-fs-body);
	font-weight: 400;
	line-height: 1.3;
	white-space: nowrap;
	text-decoration: underline 1px transparent;
	text-underline-offset: 0.3em;
}

#khf-header .khf-nav__sublink:hover,
#khf-header .khf-nav__sublink[aria-current] {
	text-decoration-color: currentColor;
}

/* Actions: language + CTA */
#khf-header .khf-header__actions {
	display: flex;
	align-items: center;
	gap: clamp(16px, 1.4vw, 36px);
}

#khf-header .khf-lang {
	position: relative;
}

#khf-header .khf-lang__btn {
	display: flex;
	align-items: center;
	gap: 0.75em;
	min-width: clamp(190px, 2.8vw + 170px, 242px);
	height: var(--khf-btn-h);
	padding: 0 16px;
	border-radius: 8px;
	background: var(--khf-white);
	color: var(--khf-black);
	font-size: var(--khf-fs-nav);
	font-weight: 500;
	line-height: 1;
	white-space: nowrap;
}

#khf-header .khf-lang__btn:hover {
	background: var(--khf-white);
	color: var(--khf-black);
}

#khf-header .khf-lang__btn .khf-icon--globe { width: 1.15em; height: 1.15em; }
#khf-header .khf-lang__btn .khf-icon--chevron { margin-left: auto; }
#khf-header .khf-lang__name { margin-left: 0.25em; }
#khf-header .khf-lang__short { display: none; }

#khf-header .khf-lang__list {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 100%;
	padding: 6px 0;
	border-radius: 8px;
	background: var(--khf-white);
	color: var(--khf-black);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0s linear 0.15s;
}

#khf-header .khf-lang.is-open .khf-lang__list {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.15s ease, visibility 0s;
}

#khf-header .khf-lang__link {
	display: block;
	padding: 10px 16px;
	font-size: var(--khf-fs-body);
	white-space: nowrap;
}

#khf-header .khf-lang__link:hover,
#khf-header .khf-lang__link[aria-current] {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

#khf-header .khf-lang__link:focus-visible {
	outline-color: var(--khf-black);
	outline-offset: -3px;
}

/* Burger (mobile/tablet only) */
#khf-header .khf-burger {
	display: none;
	align-self: center;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-left: auto;
	margin-right: -10px;
}

#khf-header .khf-burger__bars,
#khf-header .khf-burger__bars::before,
#khf-header .khf-burger__bars::after,
#khf-header .khf-burger__bars span {
	display: block;
	width: 24px;
	height: 2px;
	background: currentColor;
	border-radius: 1px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

#khf-header .khf-burger__bars {
	position: relative;
	background: none;
}

#khf-header .khf-burger__bars::before,
#khf-header .khf-burger__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

#khf-header .khf-burger__bars::before { top: -7px; }
#khf-header .khf-burger__bars::after { top: 7px; }
#khf-header .khf-burger[aria-expanded="true"] .khf-burger__bars span { opacity: 0; }
#khf-header .khf-burger[aria-expanded="true"] .khf-burger__bars::before { transform: translateY(7px) rotate(45deg); }
#khf-header .khf-burger[aria-expanded="true"] .khf-burger__bars::after { transform: translateY(-7px) rotate(-45deg); }

/* Skip link (sits just before the header) */
.khf-skip {
	position: absolute;
	top: -100px;
	left: 16px;
	z-index: 100001;
	padding: 12px 18px;
	background: #fff;
	color: #000;
	font: 500 16px/1 "Roboto", Arial, sans-serif;
	text-decoration: none;
}
.khf-skip:focus { top: 16px; }

/* ---- Header breakpoints ---- */

/* Laptop: drop the tagline so the nav keeps its spacing. */
@media (max-width: 1599px) {
	#khf-header .khf-brand__tagline { display: none; }
}

/* Small laptop: compact language button. */
@media (max-width: 1439px) {
	#khf-header .khf-lang__btn { min-width: 0; gap: 0.5em; }
	#khf-header .khf-lang__name { display: none; }
	#khf-header .khf-lang__short { display: inline; }
}

/* Tablet and mobile: burger menu. */
@media (max-width: 1199px) {
	#khf-header .khf-burger { display: grid; }

	#khf-header .khf-header__panel {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		display: none;
		flex-direction: column;
		gap: 0;
		max-height: calc(100vh - var(--khf-panel-top, 80px));
		max-height: calc(100dvh - var(--khf-panel-top, 80px));
		overflow-y: auto;
		overscroll-behavior: contain;
		padding: 8px var(--khf-gutter) 32px;
		background: var(--khf-black);
		border-bottom: 1px solid rgba(255, 255, 255, 0.28);
	}

	#khf-header.is-menu-open .khf-header__panel { display: flex; }

	#khf-header .khf-nav { display: block; flex: none; }
	#khf-header .khf-nav__list { flex-direction: column; gap: 0; }

	#khf-header .khf-nav__item {
		display: block;
		border-bottom: 1px solid rgba(255, 255, 255, 0.28);
	}

	#khf-header .khf-nav__row { justify-content: space-between; }

	#khf-header .khf-nav__link {
		flex: 1;
		padding: 16px 0;
		font-size: 18px;
	}

	#khf-header .khf-nav__toggle {
		width: 48px;
		height: 48px;
		margin-right: -12px;
		font-size: 20px;
	}

	#khf-header .khf-nav__sub {
		position: static;
		display: none;
		min-width: 0;
		padding: 0 0 12px 16px;
		border: 0;
		opacity: 1;
		visibility: visible;
		transform: none;
		transition: none;
	}

	#khf-header .khf-nav__sub::before { display: none; }
	#khf-header .khf-nav__item.is-open > .khf-nav__sub { display: block; }

	#khf-header .khf-nav__sublink {
		padding: 10px 0;
		font-size: 17px;
		white-space: normal;
	}

	#khf-header .khf-header__actions {
		flex-wrap: wrap;
		gap: 16px;
		padding-top: 24px;
	}

	#khf-header .khf-lang__name { display: inline; }
	#khf-header .khf-lang__short { display: none; }
	#khf-header .khf-lang__btn { min-width: 200px; }
	#khf-header .khf-lang__list { left: 0; right: auto; }
}

html.khf-locked,
html.khf-locked body {
	overflow: hidden;
}

/* =========================================================================
   Footer
   ========================================================================= */

#khf-footer {
	padding-top: 5px;
}

#khf-footer .khf-footer__cols {
	display: grid;
	grid-template-columns: minmax(0, 47fr) minmax(0, 45fr);
	column-gap: 0;
}

/* Top row: logo | connect + CTAs */
#khf-footer .khf-footer__top {
	align-items: center;
	row-gap: 32px;
	padding: clamp(36px, 3vw + 10px, 86px) 0 clamp(28px, 1.5vw + 8px, 48px);
	border-bottom: var(--khf-rule);
}

#khf-footer .khf-brand {
	--logo-h: clamp(40px, 1.6vw + 24px, 65px);
	justify-self: start;
}

#khf-footer .khf-footer__connect {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 20px 24px;
}

#khf-footer .khf-footer__social {
	display: flex;
	align-items: center;
	gap: clamp(12px, 0.6vw + 6px, 26px);
	font-size: var(--khf-fs-h3);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

#khf-footer .khf-footer__linkedin img {
	width: auto;
	height: 1.27em;
}

#khf-footer .khf-footer__ctas {
	display: flex;
	flex-wrap: wrap;
	gap: 16px 24px;
}

/* Main row: offices | Site Menu */
#khf-footer .khf-footer__main {
	row-gap: 48px;
	padding: clamp(36px, 1.8vw + 12px, 57px) 0 clamp(36px, 1.2vw + 14px, 46px);
	border-bottom: var(--khf-rule);
}

#khf-footer .khf-footer__heading {
	margin-bottom: clamp(24px, 1.6vw + 6px, 48px);
	font-size: var(--khf-fs-h3);
	font-weight: 700;
}

#khf-footer .khf-offices {
	display: flex;
	flex-wrap: wrap;
	row-gap: 28px;
}

#khf-footer .khf-office {
	padding: 14px clamp(16px, 1vw, 24px) 18px 0;
	line-height: 1.5;
}

#khf-footer .khf-office + .khf-office {
	padding-left: clamp(20px, 1vw + 8px, 32px);
	border-left: var(--khf-rule);
}

#khf-footer .khf-office__label {
	font-size: inherit;
	font-weight: 700;
	line-height: 1.5;
}

#khf-footer .khf-office__phone a {
	white-space: nowrap;
}

#khf-footer .khf-office a:hover,
#khf-footer .khf-fmenu__link:hover,
#khf-footer .khf-fmenu__sublink:hover,
#khf-footer .khf-legal a:hover {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

/* Site Menu */
#khf-footer .khf-footer__menu-title {
	margin-bottom: clamp(20px, 0.8vw + 8px, 30px);
	font-size: var(--khf-fs-menu-title);
	font-weight: 700;
}

#khf-footer .khf-fmenu__list {
	width: min(100%, 9.5em);
}

#khf-footer .khf-fmenu__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

#khf-footer .khf-fmenu__link {
	display: block;
	padding: 0.2em 0;
	font-weight: 500;
	line-height: 1.4;
	white-space: nowrap;
}

#khf-footer .khf-fmenu__item.is-current > .khf-fmenu__row > .khf-fmenu__link {
	text-decoration: underline;
	text-underline-offset: 0.25em;
}

#khf-footer .khf-fmenu__toggle {
	display: grid;
	place-items: center;
	width: 1.6em;
	height: 1.6em;
	margin-right: -0.3em;
}

#khf-footer .khf-fmenu__toggle .khf-icon {
	transition: transform 0.2s ease;
}

#khf-footer .khf-fmenu__item.is-open .khf-fmenu__toggle .khf-icon {
	transform: rotate(180deg);
}

#khf-footer .khf-fmenu__sub {
	display: none;
	padding: 2px 0 8px 16px;
}

#khf-footer .khf-fmenu__item.is-open > .khf-fmenu__sub {
	display: block;
}

#khf-footer .khf-fmenu__sublink {
	display: block;
	padding: 0.25em 0;
	font-size: 0.9em;
	line-height: 1.35;
}

/* Accreditations */
#khf-footer .khf-footer__accred {
	--acc-unit: clamp(0.5px, 0.03vw + 0.23px, 1px);
	padding: clamp(36px, 1.6vw + 14px, 56px) 0 clamp(40px, 2vw + 10px, 60px);
	border-bottom: var(--khf-rule);
}

#khf-footer .khf-footer__accred-title {
	margin-bottom: clamp(28px, 2vw + 8px, 60px);
	font-size: var(--khf-fs-h2);
	font-weight: 700;
}

#khf-footer .khf-accred {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px clamp(16px, 0.8vw + 6px, 32px);
}

#khf-footer .khf-accred__item img {
	width: auto;
	height: calc(var(--h) * var(--acc-unit));
	max-width: none;
}

/* Bottom bar */
#khf-footer .khf-footer__bottom {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 40px;
	padding: clamp(24px, 1.2vw + 12px, 46px) 0 clamp(32px, 1.4vw + 16px, 56px);
}

#khf-footer .khf-legal__list {
	display: flex;
	flex-wrap: wrap;
	row-gap: 8px;
}

#khf-footer .khf-legal__list li {
	white-space: nowrap;
}

#khf-footer .khf-legal__list li + li::before {
	content: "|";
	margin: 0 clamp(12px, 0.5vw + 6px, 22px);
}

/* ---- Footer breakpoints ---- */

/* Laptop: top row flows, Site Menu becomes a narrow side column. */
@media (max-width: 1439px) {
	#khf-footer .khf-footer__top { display: flex; flex-wrap: wrap; column-gap: 48px; }
	#khf-footer .khf-footer__connect { flex: 1 1 auto; }
	#khf-footer .khf-footer__main { grid-template-columns: minmax(0, 1fr) auto; column-gap: 48px; }
}

/* Tablet: Site Menu drops below the offices. */
@media (max-width: 1199px) {
	#khf-footer .khf-footer__main { grid-template-columns: minmax(0, 1fr); }
}

/* Tablet: accreditation logos wrap centred. */
@media (max-width: 1023px) {
	#khf-footer .khf-accred { justify-content: center; gap: 28px 36px; }
}

/* Mobile */
@media (max-width: 767px) {
	#khf-footer .khf-footer__connect { flex-direction: column; align-items: flex-start; }

	#khf-footer .khf-offices { flex-direction: column; row-gap: 20px; }
	#khf-footer .khf-office { padding: 0; }
	#khf-footer .khf-office + .khf-office { padding: 20px 0 0; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.35); }

	#khf-footer .khf-fmenu__list { width: 100%; }
	#khf-footer .khf-fmenu__link { padding: 0.45em 0; }
	#khf-footer .khf-fmenu__row { min-height: 44px; }
	#khf-footer .khf-fmenu__toggle { width: 44px; height: 44px; margin-right: -12px; }
	#khf-footer .khf-legal__list { gap: 8px 24px; }
	#khf-footer .khf-legal__list li + li::before { content: none; }

	#khf-footer .khf-footer__bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 479px) {
	#khf-footer .khf-brand { flex-direction: column; align-items: flex-start; gap: 14px; }
}

@media (max-width: 420px) {
	#khf-footer .khf-footer__ctas { width: 100%; }
	#khf-footer .khf-footer__ctas .khf-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
	:is(#khf-header, #khf-footer) *,
	:is(#khf-header, #khf-footer) *::before,
	:is(#khf-header, #khf-footer) *::after {
		transition: none !important;
	}
}
