/*
Theme Name: KES Group
Theme URI: https://www.kes.co.zw
Author: KES Group
Author URI: https://www.kes.co.zw
Description: A corporate communications and conference-organisation theme for Kutting Edge (KES) — strategic communications, public diplomacy, VVIP state protocol, industrial and mining commissionings and in-house video production. Layout inspired by large European corporate group sites: oversized typographic statements, full-bleed parallax heroes, a YouTube video hero slider, numbered capability overviews, key-figure bars, proof-point case studies and a multi-column corporate footer. Ships with a one-click demo importer and a full Theme Builder (Customizer plus drag-to-reorder homepage sections).
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: kes-group
Tags: business, portfolio, blog, news, custom-logo, custom-menu, featured-images, translation-ready, block-styles, wide-blocks, editor-style, custom-colors, full-width-template, rtl-language-support, theme-options, threaded-comments
*/

/* ==========================================================================
   1. DESIGN TOKENS
   All values are overridable live from the Theme Builder (Customizer).
   ========================================================================== */

:root {
	/* Brand palette */
	--kes-primary: #81d742;
	--kes-primary-dark: #64b32c;
	--kes-accent: #ed8536;
	--kes-accent-dark: #e87635;
	--kes-dark: #1c1917;
	--kes-dark-soft: #2b2622;
	--kes-light: #ffffff;
	--kes-off-white: #fafaf9;
	--kes-off-white-2: #f4f4f2;
	--kes-border: #e6e4e0;
	--kes-muted: #6f6a66;

	/* Typography */
	--kes-font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--kes-font-display: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--kes-fs-body: 1.0625rem;
	--kes-lh-body: 1.75;

	--kes-fs-display: clamp(2.75rem, 7.2vw, 6.5rem);
	--kes-fs-h1: clamp(2.25rem, 5.4vw, 4.5rem);
	--kes-fs-h2: clamp(1.85rem, 3.9vw, 3.25rem);
	--kes-fs-h3: clamp(1.35rem, 2.2vw, 1.9rem);
	--kes-fs-h4: clamp(1.1rem, 1.5vw, 1.3rem);
	--kes-fs-eyebrow: 0.75rem;
	--kes-fs-lead: clamp(1.05rem, 1.55vw, 1.375rem);

	/* Layout */
	--kes-container: 1320px;
	--kes-container-narrow: 880px;
	--kes-gutter: clamp(1.25rem, 4vw, 3rem);
	--kes-section-y: clamp(4rem, 8.5vw, 8.5rem);
	--kes-header-h: 82px;

	/* Effects */
	--kes-radius: 0;
	--kes-radius-pill: 100px;
	--kes-transition: 0.45s cubic-bezier(0.22, 0.61, 0.36, 1);
	--kes-ease: cubic-bezier(0.22, 0.61, 0.36, 1);
	--kes-shadow-sm: 0 2px 10px rgba(28, 25, 23, 0.06);
	--kes-shadow: 0 18px 50px -22px rgba(28, 25, 23, 0.35);
}

/* ==========================================================================
   2. RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
	scroll-padding-top: calc(var(--kes-header-h) + 24px);
}

body {
	margin: 0;
	background: var(--kes-off-white);
	color: var(--kes-dark);
	font-family: var(--kes-font-body);
	font-size: var(--kes-fs-body);
	line-height: var(--kes-lh-body);
	font-weight: 400;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: hidden;
}

body.kes-no-scroll {
	overflow: hidden;
}

img,
svg,
video,
iframe {
	max-width: 100%;
	height: auto;
	display: block;
}

img {
	border-style: none;
}

/* Kill the WP alignment float gap while we use a real grid. */
.alignleft {
	float: left;
	margin: 0.35rem 2rem 1rem 0;
}

.alignright {
	float: right;
	margin: 0.35rem 0 1rem 2rem;
}

.aligncenter {
	display: block;
	margin-inline: auto;
}

.wp-caption {
	max-width: 100%;
}

.wp-caption-text,
figcaption {
	font-size: 0.8125rem;
	color: var(--kes-muted);
	letter-spacing: 0.02em;
	margin-top: 0.75rem;
	line-height: 1.6;
}

.screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute !important;
	width: 1px;
	word-wrap: normal !important;
}

.screen-reader-text:focus {
	background: var(--kes-light);
	clip: auto !important;
	clip-path: none;
	color: var(--kes-dark);
	display: block;
	font-size: 1rem;
	height: auto;
	left: 6px;
	line-height: normal;
	padding: 14px 22px;
	text-decoration: none;
	top: 6px;
	width: auto;
	z-index: 100000;
	border-radius: 3px;
	box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.2);
}

.skip-link:focus {
	outline: 3px solid var(--kes-primary);
	outline-offset: 3px;
}

/* ==========================================================================
   3. TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 0.6em;
	font-family: var(--kes-font-display);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.025em;
	color: var(--kes-dark);
	text-wrap: balance;
}

h1 { font-size: var(--kes-fs-h1); letter-spacing: -0.035em; }
h2 { font-size: var(--kes-fs-h2); letter-spacing: -0.03em; }
h3 { font-size: var(--kes-fs-h3); }
h4 { font-size: var(--kes-fs-h4); font-weight: 600; letter-spacing: -0.01em; }
h5 { font-size: 1.0625rem; font-weight: 600; }
h6 { font-size: 0.9375rem; font-weight: 600; }

p {
	margin: 0 0 1.25em;
}

a {
	color: inherit;
	text-decoration: none;
	transition: color var(--kes-transition), opacity var(--kes-transition);
}

a:hover {
	color: var(--kes-accent);
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
	outline: 3px solid var(--kes-primary);
	outline-offset: 3px;
	border-radius: 2px;
}

strong, b { font-weight: 700; }
em, i { font-style: italic; }

blockquote {
	margin: 0 0 1.5em;
	padding: 0;
	border: 0;
	font-size: 1.125em;
	font-style: italic;
	color: var(--kes-muted);
}

blockquote cite,
blockquote .wp-block-quote__citation {
	display: block;
	margin-top: 0.75rem;
	font-size: 0.8125rem;
	font-style: normal;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--kes-muted);
}

code, kbd, pre, samp {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

pre {
	background: var(--kes-dark);
	color: #f4f4f2;
	padding: 1.25rem 1.5rem;
	overflow: auto;
	border-radius: var(--kes-radius);
}

ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.4em; }

hr {
	border: 0;
	border-top: 1px solid var(--kes-border);
	margin: 3rem 0;
}

table {
	width: 100%;
	border-collapse: collapse;
	margin-bottom: 2rem;
	font-size: 0.9375rem;
}

th, td {
	border-bottom: 1px solid var(--kes-border);
	padding: 0.85rem 1rem;
	text-align: left;
	vertical-align: top;
}

th {
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--kes-muted);
	font-weight: 600;
}

/* ==========================================================================
   4. LAYOUT PRIMITIVES
   ========================================================================== */

.kes-container {
	width: 100%;
	max-width: var(--kes-container);
	margin-inline: auto;
	padding-inline: var(--kes-gutter);
}

.kes-container--narrow {
	max-width: var(--kes-container-narrow);
}

.kes-container--wide {
	max-width: 1680px;
}

.kes-section {
	position: relative;
	padding-block: var(--kes-section-y);
}

.kes-section--tight {
	padding-block: clamp(2.5rem, 5vw, 4.5rem);
}

.kes-section--flush-top {
	padding-top: 0;
}

.kes-section--flush-bottom {
	padding-bottom: 0;
}

/* Background variants */
.kes-theme-light { background: var(--kes-light); color: var(--kes-dark); }
.kes-theme-off-white { background: var(--kes-off-white); color: var(--kes-dark); }
.kes-theme-off-white-2 { background: var(--kes-off-white-2); color: var(--kes-dark); }
.kes-theme-dark { background: var(--kes-dark); color: rgba(255, 255, 255, 0.82); }
.kes-theme-primary { background: var(--kes-primary); color: var(--kes-dark); }
.kes-theme-accent { background: var(--kes-accent); color: var(--kes-dark); }

.kes-theme-dark h1,
.kes-theme-dark h2,
.kes-theme-dark h3,
.kes-theme-dark h4,
.kes-theme-dark h5,
.kes-theme-dark h6,
.kes-theme-dark .kes-section__title,
.kes-theme-primary h1,
.kes-theme-primary h2,
.kes-theme-primary h3,
.kes-theme-primary h4,
.kes-theme-primary h5,
.kes-theme-primary h6,
.kes-theme-primary .kes-section__title,
.kes-theme-accent h1,
.kes-theme-accent h2,
.kes-theme-accent h3,
.kes-theme-accent h4,
.kes-theme-accent h5,
.kes-theme-accent h6,
.kes-theme-accent .kes-section__title {
	color: currentColor;
}

.kes-theme-dark .kes-eyebrow { color: var(--kes-primary); }
.kes-theme-dark a:hover { color: var(--kes-primary); }

/* Section headers */
.kes-section__head {
	max-width: 62ch;
	margin-bottom: clamp(2.25rem, 4vw, 4rem);
}

.kes-section__head--center {
	margin-inline: auto;
	text-align: center;
}

.kes-section__title {
	font-size: var(--kes-fs-h2);
	margin-bottom: 0.45em;
	color: inherit;
}

.kes-section__lead {
	font-size: var(--kes-fs-lead);
	line-height: 1.65;
	color: var(--kes-muted);
	margin-bottom: 0;
	max-width: 60ch;
}

.kes-theme-dark .kes-section__lead,
.kes-theme-primary .kes-section__lead,
.kes-theme-accent .kes-section__lead {
	color: currentColor;
	opacity: 0.85;
}

.kes-eyebrow {
	display: inline-flex;
	align-items: center;
	gap: 0.7em;
	font-size: var(--kes-fs-eyebrow);
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--kes-accent);
	margin: 0 0 1.15rem;
}

.kes-eyebrow::before {
	content: "";
	width: 34px;
	height: 2px;
	background: currentColor;
	flex: none;
}

.kes-section__head--center .kes-eyebrow::after {
	content: "";
	width: 34px;
	height: 2px;
	background: currentColor;
	flex: none;
}

.kes-grid {
	display: grid;
	gap: clamp(1.5rem, 2.6vw, 2.75rem);
}

.kes-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kes-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kes-grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.kes-grid--5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }

/* ==========================================================================
   5. BUTTONS
   ========================================================================== */

.kes-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.7em;
	padding: 0.95em 1.9em;
	font-family: var(--kes-font-body);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	line-height: 1.2;
	text-align: center;
	border: 1px solid transparent;
	border-radius: var(--kes-radius-pill);
	cursor: pointer;
	transition: background-color var(--kes-transition), color var(--kes-transition),
		border-color var(--kes-transition), transform var(--kes-transition);
	white-space: nowrap;
}

.kes-btn svg,
.kes-btn .kes-btn__icon {
	width: 1em;
	height: 1em;
	flex: none;
	transition: transform var(--kes-transition);
}

.kes-btn:hover svg,
.kes-btn:hover .kes-btn__icon {
	transform: translateX(4px);
}

.kes-btn--primary {
	background: var(--kes-primary);
	color: var(--kes-dark);
}

.kes-btn--primary:hover {
	background: var(--kes-primary-dark);
	color: var(--kes-dark);
	transform: translateY(-2px);
}

.kes-btn--accent {
	background: var(--kes-accent);
	color: var(--kes-light);
}

.kes-btn--accent:hover {
	background: var(--kes-accent-dark);
	color: var(--kes-light);
	transform: translateY(-2px);
}

.kes-btn--dark {
	background: var(--kes-dark);
	color: var(--kes-light);
}

.kes-btn--dark:hover {
	background: var(--kes-dark-soft);
	color: var(--kes-primary);
}

.kes-btn--light {
	background: var(--kes-light);
	color: var(--kes-dark);
}

.kes-btn--light:hover {
	background: var(--kes-primary);
	color: var(--kes-dark);
	transform: translateY(-2px);
}

.kes-btn--outline {
	background: transparent;
	color: currentColor;
	border-color: currentColor;
}

.kes-btn--outline:hover {
	background: currentColor;
	color: var(--kes-dark);
	transform: translateY(-2px);
}

.kes-theme-dark .kes-btn--outline:hover {
	color: var(--kes-dark);
}

/* Underline / ghost link */
.kes-link {
	display: inline-flex;
	align-items: center;
	gap: 0.6em;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	padding-bottom: 0.4em;
	position: relative;
}

.kes-link::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: 0;
	width: 100%;
	height: 1px;
	background: currentColor;
	transform-origin: right;
	transform: scaleX(1);
	transition: transform var(--kes-transition);
}

.kes-link:hover::after {
	transform-origin: left;
	transform: scaleX(0.35);
}

.kes-link svg,
.kes-link .kes-btn__icon {
	width: 1em;
	height: 1em;
	flex: none;
	transition: transform var(--kes-transition);
}

.kes-link:hover svg,
.kes-link:hover .kes-btn__icon {
	transform: translateX(4px);
}

.kes-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	align-items: center;
	margin-top: 2.25rem;
}

/* ==========================================================================
   6. HEADER
   ========================================================================== */

.kes-header {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	z-index: 9000;
	transition: background-color var(--kes-transition), box-shadow var(--kes-transition),
		border-color var(--kes-transition), transform 0.4s var(--kes-ease);
	border-bottom: 1px solid transparent;
}

.kes-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: clamp(1rem, 3vw, 3rem);
	min-height: var(--kes-header-h);
	max-width: 1680px;
	margin-inline: auto;
	padding-inline: var(--kes-gutter);
	/*
	 * Breathing room above the logo and menu. `height` is gone in favour of
	 * `min-height` so this padding can only ever make the header taller, never
	 * squash the contents that used to rely on a fixed box.
	 */
	padding-top: clamp(0.75rem, 1.6vw, 1.35rem);
	padding-bottom: clamp(0.75rem, 1.6vw, 1.35rem);
	position: relative;
}

/* Mobile/tablet: burger left, logo centred (reference behaviour). */
@media (max-width: 991px) {
	.kes-header__inner {
		justify-content: center;
	}

	.kes-header__inner > .kes-site-logo {
		margin-inline: auto;
	}

	.kes-header__burger {
		position: absolute;
		left: var(--kes-gutter);
	}
}

.kes-header__end {
	display: none;
}

/*
 * Desktop: the logo is centred and the primary menu is split into two halves
 * that flank it, matching the reference header.
 */
@media (min-width: 992px) {
	.kes-header__inner {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		align-items: center;
		gap: clamp(1rem, 2.5vw, 2.5rem);
	}

	.kes-nav--start {
		justify-self: end;
	}

	.kes-nav--end {
		justify-self: start;
	}

	.kes-header__end {
		display: flex;
		align-items: center;
		gap: clamp(0.75rem, 1.6vw, 1.5rem);
		justify-self: start;
	}

	.kes-header__inner > .kes-site-logo {
		margin-inline: 0;
	}
}

/* Transparent state (over hero) */
.kes-header:not(.is-solid) {
	background: transparent;
}

.kes-header:not(.is-solid) .kes-nav__link,
.kes-header:not(.is-solid) .kes-header__utility,
.kes-header:not(.is-solid) .kes-header__burger {
	color: var(--kes-light);
}

.kes-header:not(.is-solid) .kes-site-logo img {
	/* keeps the logo readable on imagery */
	filter: drop-shadow(0 1px 10px rgba(0, 0, 0, 0.35));
}

.kes-header:not(.is-solid) .kes-nav__link:hover {
	color: var(--kes-primary);
}

/* Solid state: opaque white, so the header never tints the content behind it. */
.kes-header.is-solid {
	background: #fff;
	-webkit-backdrop-filter: saturate(180%) blur(14px);
	backdrop-filter: saturate(180%) blur(14px);
	border-bottom-color: var(--kes-border);
	box-shadow: 0 1px 24px rgba(28, 25, 23, 0.06);
}

.kes-header.is-hidden {
	transform: translateY(-100%);
}

.kes-site-logo {
	display: inline-flex;
	align-items: center;
	flex: none;
	margin-right: auto;
}

.kes-site-logo img {
	max-height: 62px;
	width: auto;
	transition: filter var(--kes-transition);
}

/* Primary navigation */
.kes-nav {
	display: none;
}

.kes-nav__list {
	display: flex;
	align-items: center;
	gap: clamp(0.5rem, 1.6vw, 1.9rem);
	list-style: none;
	margin: 0;
	padding: 0;
}

.kes-nav__list li {
	margin: 0;
	position: relative;
}

.kes-nav__link {
	display: inline-flex;
	align-items: center;
	gap: 0.45em;
	font-size: 0.8125rem;
	font-weight: 600;
	/* Wide tracking on small caps mirrors the reference menu. */
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--kes-dark);
	padding: 0.5rem 0.35rem;
	white-space: nowrap;
}

.kes-nav__caret {
	width: 9px;
	height: 9px;
	flex: none;
	transition: transform var(--kes-transition);
	opacity: 0.65;
}

.kes-nav__item:hover .kes-nav__caret,
.kes-nav__item:focus-within .kes-nav__caret {
	transform: rotate(180deg);
}

.kes-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2px;
	background: var(--kes-primary);
	transform: scaleX(0);
	transform-origin: right;
	transition: transform var(--kes-transition);
}

.kes-nav__item:hover > .kes-nav__link::after,
.kes-nav__link.current-menu-item::after,
.kes-nav__link.current-menu-ancestor::after {
	transform: scaleX(1);
	transform-origin: left;
}

/* Dropdown / mega panel */
.kes-nav__submenu {
	position: absolute;
	top: calc(100% + 14px);
	left: 50%;
	transform: translateX(-50%) translateY(10px);
	min-width: 300px;
	background: var(--kes-light);
	border: 1px solid var(--kes-border);
	box-shadow: var(--kes-shadow);
	padding: 0.75rem 0;
	list-style: none;
	margin: 0;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity var(--kes-transition), transform var(--kes-transition), visibility var(--kes-transition);
}

.kes-nav__submenu::before {
	content: "";
	position: absolute;
	top: -14px;
	left: 0;
	right: 0;
	height: 14px;
}

.kes-nav__item:hover > .kes-nav__submenu,
.kes-nav__item:focus-within > .kes-nav__submenu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translateX(-50%) translateY(0);
}

.kes-nav__submenu li {
	margin: 0;
}

.kes-nav__submenu a {
	display: block;
	padding: 0.7rem 1.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	letter-spacing: 0.01em;
	color: var(--kes-dark);
	white-space: normal;
	border-left: 2px solid transparent;
}

.kes-nav__submenu a:hover {
	background: var(--kes-off-white);
	border-left-color: var(--kes-primary);
	color: var(--kes-dark);
}

/* Right-hand utility */
.kes-header__utility {
	display: none;
	align-items: center;
	gap: 1.1rem;
	flex: none;
	color: var(--kes-dark);
}

/*
 * The reference site carries no filled button in its header, just a quiet
 * underlined link, so the CTA is styled as text with a sliding arrow.
 */
.kes-header__cta {
	display: none;
	align-items: center;
	gap: 0.5em;
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
	padding: 0.4rem 0;
	border-bottom: 1px solid currentColor;
	transition: color var(--kes-transition), border-color var(--kes-transition);
}

.kes-header__cta svg {
	width: 13px;
	height: 13px;
	flex: none;
	transition: transform var(--kes-transition);
}

.kes-header__cta:hover,
.kes-header__cta:focus-visible {
	color: var(--kes-primary);
	border-color: var(--kes-primary);
}

.kes-header__cta:hover svg,
.kes-header__cta:focus-visible svg {
	transform: translateX(4px);
}

.kes-header:not(.is-solid) .kes-header__cta:hover {
	color: var(--kes-light);
	border-color: var(--kes-light);
}

.kes-header__search {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid currentColor;
	border-radius: 50%;
	opacity: 0.75;
	transition: opacity var(--kes-transition), background-color var(--kes-transition);
}

.kes-header__search:hover {
	opacity: 1;
	background: var(--kes-primary);
	color: var(--kes-dark);
	border-color: var(--kes-primary);
}

.kes-header__search svg {
	width: 15px;
	height: 15px;
}

/* Burger */
.kes-header__burger {
	display: inline-flex;
	flex-direction: column;
	justify-content: center;
	gap: 5px;
	width: 42px;
	height: 42px;
	padding: 0 9px;
	background: none;
	border: 0;
	cursor: pointer;
	color: var(--kes-dark);
	flex: none;
}

.kes-header__burger span {
	display: block;
	height: 2px;
	width: 100%;
	background: currentColor;
	transition: transform 0.35s var(--kes-ease), opacity 0.2s linear;
}

.kes-header__burger[aria-expanded="true"] span:nth-child(1) {
	transform: translateY(7px) rotate(45deg);
}

.kes-header__burger[aria-expanded="true"] span:nth-child(2) {
	opacity: 0;
}

.kes-header__burger[aria-expanded="true"] span:nth-child(3) {
	transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   6b. OFF-CANVAS MOBILE PANEL
   -------------------------------------------------------------------------- */

.kes-mobile-panel {
	position: fixed;
	inset: 0;
	z-index: 9500;
	display: flex;
	flex-direction: column;
	background: var(--kes-dark);
	color: var(--kes-light);
	transform: translateY(-100%);
	visibility: hidden;
	transition: transform 0.55s var(--kes-ease), visibility 0.55s;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.kes-mobile-panel.is-open {
	transform: translateY(0);
	visibility: visible;
}

.kes-mobile-panel__top {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1.25rem var(--kes-gutter);
	border-bottom: 1px solid rgba(255, 255, 255, 0.14);
	position: sticky;
	top: 0;
	background: var(--kes-dark);
	z-index: 2;
}

.kes-mobile-panel__top img {
	max-height: 46px;
	width: auto;
}

.kes-mobile-panel__close {
	width: 42px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 50%;
	background: none;
	color: var(--kes-light);
	cursor: pointer;
	position: relative;
	flex: none;
}

.kes-mobile-panel__close::before,
.kes-mobile-panel__close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 15px;
	height: 1.5px;
	background: currentColor;
}

.kes-mobile-panel__close::before { transform: translate(-50%, -50%) rotate(45deg); }
.kes-mobile-panel__close::after { transform: translate(-50%, -50%) rotate(-45deg); }

.kes-mobile-panel__body {
	padding: 2rem var(--kes-gutter) 3rem;
	flex: 1;
}

.kes-mobile-nav {
	list-style: none;
	margin: 0 0 2.5rem;
	padding: 0;
}

.kes-mobile-nav li {
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	margin: 0;
}

.kes-mobile-nav a {
	display: block;
	padding: 1rem 0;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
	color: var(--kes-light);
}

.kes-mobile-nav .kes-mobile-nav__sub a {
	font-size: 1rem;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.72);
	padding-left: 1rem;
}

/*
 * Nested items sit inside their parent's row, so they drop the full-width
 * divider and hang off a short rule instead. Without this the submenu reads as
 * a flat continuation of the main list rather than as children of the item
 * directly above it.
 */
.kes-mobile-nav__sub {
	list-style: none;
	margin: 0 0 0.75rem;
	padding: 0;
}

.kes-mobile-nav__sub li {
	border-bottom: 0;
	border-left: 1px solid rgba(255, 255, 255, 0.18);
	margin: 0;
	padding-left: 0.75rem;
}

.kes-mobile-nav__sub a {
	padding-top: 0.45rem;
	padding-bottom: 0.45rem;
}

.kes-mobile-panel__foot {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-top: 2rem;
	font-size: 0.9375rem;
	color: rgba(255, 255, 255, 0.72);
}

.kes-mobile-panel__foot a {
	color: var(--kes-light);
}

.kes-mobile-panel__foot p {
	margin: 0 0 0.5rem;
}

/* Search overlay */
.kes-search {
	position: fixed;
	inset: 0;
	z-index: 9600;
	background: var(--kes-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--kes-gutter);
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--kes-transition), visibility var(--kes-transition);
}

.kes-search.is-open {
	opacity: 1;
	visibility: visible;
}

.kes-search__inner {
	width: 100%;
	max-width: 760px;
}

.kes-search__form,
.kes-searchform {
	display: flex;
	align-items: center;
	gap: 1rem;
	border-bottom: 2px solid rgba(255, 255, 255, 0.35);
	padding-bottom: 0.75rem;
}

.kes-search__form input[type="search"],
.kes-searchform input[type="search"] {
	flex: 1;
	background: none;
	border: 0;
	color: var(--kes-light);
	font-family: var(--kes-font-display);
	font-size: clamp(1.5rem, 4vw, 2.75rem);
	font-weight: 700;
	letter-spacing: -0.03em;
	padding: 0.25rem 0;
	min-width: 0;
}

.kes-search__form input[type="search"]::placeholder,
.kes-searchform input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.35);
}

.kes-search__form input[type="search"]:focus,
.kes-searchform input[type="search"]:focus {
	outline: none;
}

.kes-search__form .kes-btn,
.kes-searchform .kes-btn {
	display: none;
}

.kes-search__close {
	margin-top: 1.5rem;
}

/* ==========================================================================
   7. FOOTER
   ========================================================================== */

.kes-footer {
	position: relative;
	background: var(--kes-dark);
	color: rgba(255, 255, 255, 0.7);
	overflow: hidden;
}

/* 1. Utility row: back to top + social */
.kes-footer__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	flex-wrap: wrap;
	padding-block: 1.75rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.kes-footer__top-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.22);
	color: rgba(255, 255, 255, 0.75);
	transition: all var(--kes-transition);
}

.kes-footer__top-link svg {
	width: 15px;
	height: 15px;
}

.kes-footer__top-link:hover {
	background: var(--kes-primary);
	border-color: var(--kes-primary);
	color: var(--kes-dark);
}

/* 2. Menu grid */
.kes-footer__menu {
	display: grid;
	gap: 2.5rem clamp(1.5rem, 3vw, 3rem);
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding-block: clamp(2.75rem, 5vw, 4.25rem);
}

.kes-footer__col {
	min-width: 0;
}

.kes-footer__title {
	font-family: var(--kes-font-display);
	font-size: 1.0625rem;
	font-weight: 600;
	letter-spacing: -0.01em;
	color: var(--kes-light);
	margin: 0 0 1.15rem;
}

.kes-footer__col ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.kes-footer__col li {
	margin-bottom: 0.6rem;
}

.kes-footer__col a {
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.9375rem;
}

.kes-footer__col a:hover {
	color: var(--kes-primary);
}

.kes-footer__contact {
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.9375rem;
}

.kes-footer__contact li {
	margin-bottom: 0.75rem;
	display: flex;
	gap: 0.75rem;
	align-items: flex-start;
}

.kes-footer__contact span {
	display: grid;
	gap: 0.15rem;
	min-width: 0;
}

.kes-footer__contact svg {
	width: 16px;
	height: 16px;
	flex: none;
	margin-top: 0.42em;
	color: var(--kes-primary);
}

/* 3. Legal link row */
.kes-footer__submenu {
	border-top: 1px solid rgba(255, 255, 255, 0.12);
	padding-block: 1.75rem;
}

.kes-footer__legal {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem 1.75rem;
	list-style: none;
	margin: 0;
	padding: 0;
	font-size: 0.75rem;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.kes-footer__legal a {
	color: rgba(255, 255, 255, 0.5);
}

.kes-footer__legal a:hover {
	color: var(--kes-primary);
}

/* 4. Copyright block */
.kes-footer__copyright {
	padding-block: clamp(2rem, 4vw, 3rem);
	text-align: center;
	display: grid;
	justify-items: center;
	gap: 0.35rem;
}

.kes-footer__copyright-mark {
	margin: 0 0 0.75rem;
}

.kes-footer__copyright-mark img {
	max-height: 40px;
	width: auto;
}

.kes-footer__copyright-title {
	margin: 0;
	font-size: 0.875rem;
	color: rgba(255, 255, 255, 0.72);
}

.kes-footer__copyright-subtitle {
	margin: 0;
	font-size: 0.75rem;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.42);
}

.kes-social {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.kes-social a {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 50%;
	color: rgba(255, 255, 255, 0.75);
	transition: all var(--kes-transition);
}

.kes-social a:hover {
	background: var(--kes-primary);
	border-color: var(--kes-primary);
	color: var(--kes-dark);
	transform: translateY(-3px);
}

.kes-social svg {
	width: 15px;
	height: 15px;
}

/* Scroll-to-top */
.kes-to-top {
	position: fixed;
	right: clamp(1rem, 2.5vw, 2rem);
	bottom: clamp(1rem, 2.5vw, 2rem);
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--kes-dark);
	color: var(--kes-light);
	border: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	z-index: 8000;
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px);
	transition: all var(--kes-transition);
	box-shadow: var(--kes-shadow);
}

.kes-to-top.is-visible {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.kes-to-top:hover {
	background: var(--kes-primary);
	color: var(--kes-dark);
}

.kes-to-top svg {
	width: 15px;
	height: 15px;
}

/* Preloader */
.kes-preloader {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: var(--kes-dark);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.6s ease, visibility 0.6s;
}

.kes-preloader.is-done {
	opacity: 0;
	visibility: hidden;
}

.kes-preloader__mark {
	font-family: var(--kes-font-display);
	font-size: 1rem;
	font-weight: 700;
	letter-spacing: 0.4em;
	text-transform: uppercase;
	color: var(--kes-light);
	opacity: 0.9;
	animation: kes-pulse 1.6s ease-in-out infinite;
}

@keyframes kes-pulse {
	0%, 100% { opacity: 0.35; }
	50% { opacity: 1; }
}

/* Page hero (inner pages) */
.kes-page-hero {
	position: relative;
	padding-top: calc(var(--kes-header-h) + clamp(3rem, 7vw, 6.5rem));
	padding-bottom: clamp(3rem, 6vw, 5.5rem);
	background: var(--kes-dark);
	color: var(--kes-light);
	overflow: hidden;
}

.kes-page-hero__bg {
	position: absolute;
	inset: -8% 0;
	background-size: cover;
	background-position: center;
	opacity: 0.34;
	will-change: transform;
}

/*
 * When the editor sets a header image or video the still is an <img> instead of
 * a background, so it can be sized and cropped like every other picture on the
 * site. `object-fit` is what stops a portrait upload from being squashed.
 */
.kes-page-hero__poster {
	position: absolute;
	inset: 0;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	transform: translate3d(0, var(--kes-drift, 0px), 0);
	will-change: transform;
	opacity: 1;
	transition: opacity 0.6s ease;
}

/*
 * The header video starts on load, so the still has to get out of the way the
 * moment playback is genuinely running. Until then it doubles as the loading
 * frame, which also stops a flash of empty background.
 */
.kes-page-hero.kes-is-playing .kes-page-hero__poster {
	opacity: 0;
	pointer-events: none;
}

/* A header with no video has nothing to cross-fade to, so it simply holds. */
.kes-page-hero__poster--still {
	transition: none;
}

/* A header with no media at all leans on the dark background alone. */
.kes-page-hero--plain::after {
	background: linear-gradient(90deg, rgba(28, 25, 23, 0.96) 0%, rgba(28, 25, 23, 0.86) 100%);
}

/* The video layer fills the header and never intercepts clicks on the copy. */
.kes-page-hero--video .kes-page-hero__bg {
	pointer-events: none;
}

.kes-page-hero--video .kes-hero__video,
.kes-page-hero--video .kes-hero__video iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	pointer-events: none;
}

.kes-page-hero__controls {
	top: calc(var(--kes-header-h) + 0.75rem);
}

.kes-page-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, rgba(28, 25, 23, 0.92) 0%, rgba(28, 25, 23, 0.72) 45%, rgba(28, 25, 23, 0.45) 100%);
}

.kes-page-hero .kes-container {
	position: relative;
	z-index: 2;
}

.kes-page-hero__title {
	color: var(--kes-light);
	margin-bottom: 0.4em;
}

.kes-page-hero__lead {
	font-size: var(--kes-fs-lead);
	color: rgba(255, 255, 255, 0.75);
	max-width: 58ch;
	margin: 0;
}

.kes-breadcrumb {
	font-size: 0.75rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.55);
	margin-bottom: 1.5rem;
}

.kes-breadcrumb a {
	color: var(--kes-primary);
}

.kes-breadcrumb .sep {
	margin: 0 0.6em;
	opacity: 0.5;
}

/* ==========================================================================
   8. EDITOR / BLOCK COMPAT
   ========================================================================== */

/*
 * The fit contract.
 *
 * `kes_image()` always tags its output with `kes-img` plus one `kes-img--*`
 * modifier, so `object-fit` is guaranteed by the markup rather than by whatever
 * context the image happens to land in. That is what makes swapping a picture
 * safe: a portrait dropped into a 16:9 slot is cropped, not squashed, and a logo
 * is fitted whole rather than having its edges trimmed.
 *
 * Deliberately no `height` here. Fixed-ratio frames such as
 * `.kes-page-hero__poster` and `.kes-person__media img` rely on `height: 100%`,
 * and a bare `height: auto` on an equally specific selector would win on source
 * order and collapse them.
 */
.kes-img {
	max-width: 100%;
}

.kes-img--cover {
	object-fit: cover;
}

.kes-img--contain {
	object-fit: contain;
}

.kes-img--fill {
	object-fit: fill;
}

.kes-img--none {
	object-fit: none;
}

.kes-img--scale-down {
	object-fit: scale-down;
}

/*
 * Safety net for images an editor drops straight into a page body. These never
 * pass through `kes_image()` and so carry no `kes-img` class of their own.
 * `height: auto` is what actually stops a squash.
 */
.kes-prose img,
.kes-page-body img {
	max-width: 100%;
	height: auto;
}

/* Inline icons and badges are sized by their own rules, never cropped. */
.kes-prose .kes-icon,
.kes-prose .kes-btn img {
	width: auto;
	height: auto;
	object-fit: contain;
}

.wp-block-image img {
	border-radius: var(--kes-radius);
}

.wp-block-button__link {
	border-radius: var(--kes-radius-pill);
	font-size: 0.8125rem;
	font-weight: 600;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	padding: 0.95em 1.9em;
	background: var(--kes-primary);
	color: var(--kes-dark);
}

.wp-block-quote {
	border-left: 3px solid var(--kes-primary);
	padding-left: 1.75rem;
	font-size: 1.25rem;
	color: var(--kes-dark);
}

.wp-block-separator {
	border-top: 1px solid var(--kes-border);
	max-width: 100px;
}

/* ==========================================================================
   9. RESPONSIVE
   ========================================================================== */

@media (min-width: 768px) {
	.kes-footer__menu { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 992px) {
	.kes-nav { display: block; }
	.kes-header__utility { display: flex; }
	.kes-header__cta { display: inline-flex; }
	.kes-header__burger { display: none; }

	.kes-footer__menu { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 991px) {
	:root { --kes-header-h: 70px; }

	.kes-grid--3,
	.kes-grid--4,
	.kes-grid--5 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.alignleft,
	.alignright {
		float: none;
		margin: 0 0 1.25rem;
	}
}

@media (max-width: 640px) {
	.kes-grid--2,
	.kes-grid--3,
	.kes-grid--4,
	.kes-grid--5 {
		grid-template-columns: minmax(0, 1fr);
	}

	.kes-actions .kes-btn {
		width: 100%;
	}

	.kes-footer__menu {
		grid-template-columns: minmax(0, 1fr);
		gap: 2rem;
	}

	.kes-footer__header {
		justify-content: center;
	}
}

/* ==========================================================================
   10. ACCESSIBILITY / MOTION
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}

	.kes-hero__media,
	.kes-hero__content {
		transform: none !important;
	}
}

@media print {
	.kes-header,
	.kes-footer,
	.kes-to-top,
	.kes-preloader,
	.kes-mobile-panel,
	.kes-search {
		display: none !important;
	}
}