/* KS Composites theme styles. Written for this theme; sits on top of Bootstrap 5 (MIT). */

:root {
	--ks-red: #ea0029;
	--ks-navy: #091924;
	--ks-text: #212529;
	--ks-muted: rgba(33, 37, 41, 0.75);
	--ks-grey-200: #e9ecef;
	--ks-grey-400: #ced4da;
	--ks-grey-500: #adb5bd;
	--ks-grey-600: #6c757d;
	--ks-font: "FK Grotesk", "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
	--ks-header-h: 95px;
	--ks-header-h-stuck: 65px;
	--ks-ease: cubic-bezier(0.2, 0.7, 0.2, 1);

	--bs-primary: var(--ks-red);
	--bs-primary-rgb: 234, 0, 41;
	--bs-link-color: var(--ks-red);
	--bs-link-color-rgb: 234, 0, 41;
	--bs-link-hover-color: #b80020;
	--bs-body-font-family: var(--ks-font);
	--bs-body-color: var(--ks-text);
	--bs-secondary-color: var(--ks-muted);
}

body {
	font-family: var(--ks-font);
	font-size: 16px;
	font-weight: 300;
	line-height: 30px;
	color: var(--ks-text);
	padding-top: var(--ks-header-h);
}

h1, h2, h3, h4, .h1, .h2, .h3, .h4 {
	color: var(--ks-navy);
	letter-spacing: -1px;
}
h1, .h1 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 700; line-height: 1.2; letter-spacing: -1.5px; }
h2, .h2 { font-size: clamp(28px, 3vw, 36px); font-weight: 600; line-height: 1.2; }
h3, .h3 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 600; line-height: 1.2; }
h4, .h4 { font-size: 20px; font-weight: 600; line-height: 1.2; letter-spacing: -0.5px; }

.text-muted { color: var(--ks-muted) !important; }
.ks-muted-heading { color: var(--ks-grey-500); font-weight: 500; }
.fw-medium { font-weight: 500 !important; }

.ks-skip:focus { position: fixed; top: 8px; left: 8px; z-index: 2000; background: #fff; padding: 8px 12px; }

.ks-icon { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; flex: none; }

/* Arrow nudge on hover, used by buttons, cards and links. */
.ks-icon--arrow { transition: transform 0.3s var(--ks-ease); }
.ks-arrow-hover:hover .ks-icon--arrow,
.ks-arrow-hover:focus-visible .ks-icon--arrow { transform: translateX(6px); }

/* Text links whose arrow is hidden until hover, then slides in to the right. */
.ks-arrow-reveal .ks-icon--arrow { opacity: 0; transform: translateX(-12px); transition: opacity 0.25s var(--ks-ease), transform 0.35s var(--ks-ease); }
.ks-arrow-reveal:hover .ks-icon--arrow,
.ks-arrow-reveal:focus-visible .ks-icon--arrow { opacity: 1; transform: translateX(4px); }
@media (hover: none) { .ks-arrow-reveal .ks-icon--arrow { opacity: 1; transform: none; } }

/* Buttons */
.ks-btn {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding: 6px 20px;
	border: 1px solid var(--ks-red);
	background: var(--ks-red);
	color: #fff;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 21.75px;
	text-transform: uppercase;
	text-decoration: none;
	clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
	transition: background-color 0.2s, border-color 0.2s;
}
.ks-btn:hover, .ks-btn:focus-visible { background: #c80023; border-color: #c80023; color: #fff; }
.ks-btn__arrow { width: 24px; height: 17px; }

.ks-square-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 57px;
	height: 56px;
	background: var(--ks-red);
	color: #fff;
	/* Cut bottom-left corner, same as the text buttons. */
	clip-path: polygon(0 0, 100% 0, 100% 100%, 10px 100%, 0 calc(100% - 10px));
}
.ks-square-btn .ks-icon { width: 39px; height: 21px; }

/* Header */
.ks-header {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 1030;
	background: #fff;
}
.ks-header.is-stuck {
	position: fixed;
	box-shadow: 0 1px 1px rgba(9, 25, 36, 0.1);
	animation: ks-drop 0.3s var(--ks-ease);
}
@keyframes ks-drop { from { transform: translateY(-100%); } to { transform: translateY(0); } }
/* Keep the header clear of the WordPress admin bar for logged-in editors. */
.admin-bar .ks-header { top: 32px; }
@media (max-width: 782px) {
	.admin-bar .ks-header { top: 46px; }
	.admin-bar .ks-header.is-stuck { top: 0; }
}
.ks-header.is-stuck .ks-topbar { display: none !important; }

.ks-topbar {
	font-size: 12px;
	line-height: 14px;
	padding: 4px 0;
	color: var(--ks-grey-600);
	border-bottom: 1px solid rgba(173, 181, 189, 0.25);
}
.ks-topbar a { color: inherit; text-decoration: none; }
.ks-topbar a:hover { color: var(--ks-navy); }

.ks-mainbar { height: var(--ks-header-h); transition: height 0.3s var(--ks-ease); }
.ks-header.is-stuck .ks-mainbar { height: var(--ks-header-h-stuck); }

.ks-logo { display: block; height: 100%; margin-right: 64px; }
.ks-logo img { display: block; width: var(--ks-header-h); height: var(--ks-header-h); transition: width 0.3s var(--ks-ease), height 0.3s var(--ks-ease); }
.ks-header.is-stuck .ks-logo img { width: var(--ks-header-h-stuck); height: var(--ks-header-h-stuck); }

.ks-nav__link {
	margin-right: 40px;
	font-size: 14.5px;
	font-weight: 500;
	line-height: 30px;
	color: var(--ks-navy);
	text-transform: uppercase;
	text-decoration: none;
	position: relative;
}
.ks-nav__link::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: -2px;
	height: 2px;
	background: var(--ks-red);
	transform: scaleX(0);
	transform-origin: left;
	transition: transform 0.25s var(--ks-ease);
}
.ks-nav__link:hover, .ks-nav__link.is-active { color: var(--ks-navy); }
.ks-nav__link:hover::after, .ks-nav__link.is-active::after { transform: scaleX(1); }

.ks-burger {
	width: 44px;
	height: 44px;
	padding: 10px 8px;
	border: 0;
	background: none;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}
.ks-burger span { display: block; height: 2px; background: var(--ks-navy); transition: transform 0.25s, opacity 0.2s; }
.ks-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(10px) rotate(45deg); }
.ks-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.ks-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-10px) rotate(-45deg); }

/* Mobile menu */
.ks-menu {
	position: fixed;
	inset: var(--ks-header-h) 0 0 0;
	z-index: 1020;
	background: var(--ks-navy);
	color: #fff;
	overflow-y: auto;
	padding: 48px 0;
}
.ks-header.is-stuck ~ .ks-menu { top: var(--ks-header-h-stuck); }
.admin-bar .ks-menu { top: calc(var(--ks-header-h) + 32px); }
@media (max-width: 782px) { .admin-bar .ks-menu { top: calc(var(--ks-header-h) + 46px); } }
.ks-menu[hidden] { display: none; }
.ks-menu a { color: #fff; text-decoration: none; }
.ks-menu a:hover, .ks-menu a.is-active { color: var(--ks-red); }
.ks-menu__nav li { padding-bottom: 24px; }
.ks-menu__nav a { font-size: 28px; font-weight: 500; letter-spacing: -0.5px; }
.ks-menu h4 { color: #fff; margin-bottom: 16px; }
.ks-menu__contact { margin-bottom: 40px; font-size: 20px; }
.ks-menu__contact li { display: flex; align-items: center; gap: 20px; padding: 8px 0; }
/* LinkedIn button: 60px LinkedIn-blue square, white logo (as on the live site). */
.ks-social { display: inline-flex; width: 60px; height: 60px; align-items: center; justify-content: center; background: #0077b5; color: #fff !important; transition: background-color 0.2s; }
.ks-social:hover, .ks-social:focus-visible { background: #005e8f; color: #fff !important; }
.ks-social .ks-icon { width: 30px; height: 30px; vertical-align: 0; }
body.ks-menu-open { overflow: hidden; }

/* Home banner */
.ks-hero {
	padding-top: 72px;
	background-color: #f8f9fa;
	background-size: cover;
	background-position: 50% 50%;
	overflow: hidden;
}
/* Navy fade from the bottom edge to half way up, behind the heading and panels. */
.ks-hero__inner { min-height: max(600px, 60vh); background-image: linear-gradient(0deg, var(--ks-navy) 0%, rgba(9, 25, 36, 0) 50%); }
.ks-hero__title {
	color: #fff;
	margin: 0 0 8px;
	text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}
.ks-hero__lead {
	color: var(--ks-grey-400);
	font-size: clamp(18px, 2.1vw, 28px);
	font-weight: 500;
	line-height: 1.8;
	letter-spacing: -0.5px;
	text-shadow: 0 2px 3px rgba(0, 0, 0, 0.4);
}
@media (min-width: 992px) { .ks-hero__title { margin-bottom: 0; } }

.ks-panel {
	position: relative;
	display: flex;
	gap: 24px;
	padding: 16px 16px 20px;
	background: rgba(40, 42, 46, 0.82);
	border-bottom: 4px solid var(--ks-red);
	clip-path: polygon(0 0, 100% 0, 100% 100%, 21px 100%, 0 calc(100% - 21px));
}
@media (min-width: 1200px) { .ks-panel { padding: 16px 24px 20px; } }
.ks-panel--outlined { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25); }
.ks-panel__num { color: var(--ks-red); font-size: 20px; font-weight: 700; line-height: 24px; }
.ks-panel__link { color: #fff; font-weight: 700; line-height: 1.2; text-decoration: none; }
.ks-panel__link:hover { color: #fff; }
.ks-panel > .vstack { flex: 1 1 auto; }
/* Keep "Learn more" on the bottom line of every panel, whatever the heading length. */
.ks-panel__more { margin-top: auto; color: var(--ks-grey-500); font-weight: 500; line-height: 1.2; }
.ks-panel__more .ks-icon { width: 22px; height: 16px; }
.ks-panel__thumb img { max-width: 110px; height: auto; display: block; }
.ks-panel__stripes { position: absolute; right: 0; bottom: 0; width: 70px; height: 11px; color: var(--ks-red); }

/* Image with white chevron mark, bottom right */
.ks-chevron-img { position: relative; }
.ks-chevron-img img { display: block; width: 100%; height: auto; }
/* Equal-height photos, cropped to fill (Home: Celebrating our excellence). */
.ks-chevron-img--fill { aspect-ratio: 5 / 4; overflow: hidden; }
.ks-chevron-img--fill img { height: 100%; object-fit: cover; }
.ks-chevron-img__mark { position: absolute; right: 0; bottom: -1px; width: 100px; height: 16px; color: #fff; }

.ks-divider { text-align: center; color: var(--ks-grey-200); }
.ks-divider .ks-icon { width: 120px; height: 19px; }

/* Project card */
.ks-project { position: relative; overflow: hidden; }
.ks-project img { width: 100%; height: 100%; object-fit: cover; }
.ks-project::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(0deg, var(--ks-navy) 0%, rgba(9, 25, 36, 0) 50%);
	transform: translateY(50px);
	transition: transform 0.4s var(--ks-ease);
	pointer-events: none;
}
.ks-project:hover::after { transform: translateY(0); }
.ks-project__title {
	position: absolute;
	inset: auto 0 0 0;
	z-index: 2;
	padding: 24px;
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 16px;
}
.ks-project__title h3 { font-weight: 500; }
.ks-project__title a { color: #fff; text-decoration: none; }
.ks-project__arrow { width: 56px; height: 40px; color: #fff; }

/* Split panels */
.ks-split { position: relative; background: var(--ks-red); overflow: hidden; }
@media (min-width: 992px) {
	.ks-split::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 50%; background: var(--ks-navy); }
}
.ks-split__col--dark { background: var(--ks-navy); }
.ks-split__col--red { background: var(--ks-red); }
@media (min-width: 992px) { .ks-split__col--dark, .ks-split__col--red { background: transparent; } }
.ks-split__text { padding: 48px 24px 24px; }
@media (min-width: 992px) { .ks-split__col--dark .ks-split__text { padding-left: 0; } }
.ks-split h3 { font-weight: 500; }
.ks-split__label { color: var(--ks-grey-500); }
.ks-split__col--red .ks-split__label { color: var(--ks-grey-400); }
.ks-split__link { color: #fff; text-decoration: none; }
.ks-split__link:hover { color: #fff; }
.ks-split__arrow { width: 24px; height: 17px; margin-left: 6px; }
.ks-split__media { position: relative; display: block; }
.ks-split__media img { display: block; width: 100%; height: auto; }
.ks-split__media .ks-square-btn { position: absolute; left: 24px; bottom: 24px; }
@media (min-width: 992px) { .ks-split__col--red .ks-split__media { margin-left: 16px; } }

/* Footer */
.ks-footer { color: var(--ks-navy); }
.ks-footer__top { padding: 24px 48px 24px 0; }
@media (min-width: 768px) { .ks-footer__top { padding: 96px 48px 96px 0; } }
.ks-footer__logo img { display: block; width: 100px; height: 100px; }
.ks-footer__main li, .ks-footer__legal li { padding: 8px 0; }
.ks-footer__main a { color: var(--ks-navy); font-size: 20px; font-weight: 500; text-decoration: none; }
.ks-footer__legal a { color: var(--ks-muted); text-decoration: none; }
.ks-footer a:hover { color: var(--ks-red); }
.ks-footer__base {
	font-size: 13px;
	color: var(--ks-grey-600);
	border-top: 1px solid var(--ks-grey-200);
	padding: 30px 0;
}
.ks-footer__chevrons { display: flex; justify-content: flex-end; height: 19px; margin-top: 48px; color: var(--ks-red); }
.ks-footer__chevrons .ks-icon { width: 120px; height: 19px; position: relative; top: 1px; }
.ks-footer__bar { height: 8px; background: var(--ks-red); }

/* Generic page content */
.ks-content { padding: 48px 0 72px; }
.ks-content > * + * { margin-top: 1em; }
.lead { font-size: clamp(18px, 1.6vw, 22px); line-height: 1.8; }
.lead.fw-medium { color: var(--ks-navy); }
.ks-narrow { max-width: 700px; }
.ks-prose h1 { margin-bottom: 24px; }
.ks-prose h2, .ks-prose h3 { margin: 32px 0 12px; }
.ks-prose ul, .ks-prose ol { padding-left: 1.25rem; }
.ks-btn--lg { padding: 10px 26px; font-size: 16px; }

/* Text with timeline */
.ks-history__text p { color: var(--ks-muted); }
.ks-history__text strong, .ks-history__text b { color: var(--ks-text); font-weight: 500; }
.ks-timeline { position: relative; }
.ks-timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 12px; width: 1px; background: var(--ks-grey-300, #dee2e6); }
.ks-timeline__item { position: relative; display: flex; gap: 24px; align-items: flex-start; padding-bottom: 24px; }
.ks-timeline__year { position: relative; flex: 0 0 86px; padding: 24px 0 24px 24px; font-weight: 700; color: var(--ks-text); }
.ks-timeline__year::before { content: ""; position: absolute; left: 8px; top: 39px; width: 9px; height: 9px; border-radius: 50%; background: #fff; border: 1px solid var(--ks-grey-500); }
.ks-timeline__text { position: relative; flex: 1; padding: 24px; background: var(--ks-navy); color: #fff; font-weight: 500; line-height: 1.6; }
.ks-timeline__text::before { content: ""; position: absolute; left: -8px; top: 34px; border: 8px solid transparent; border-left: 0; border-right-color: var(--ks-navy); }

/* Grey band */
.ks-band .lead { margin-bottom: 1.25rem; }
.ks-note { display: flex; gap: 16px; padding: 24px 24px 24px 16px; background: #dee2e6; color: var(--ks-muted); font-weight: 500; }
.ks-note__icon { flex: none; width: 22px; height: 16px; margin-top: 7px; color: var(--ks-red); }

/* Photo cards with description */
.ks-card { display: flex; flex-direction: column; }
.ks-card__media { position: relative; overflow: hidden; }
.ks-card__media img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.ks-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 25, 36, 0.85) 0%, rgba(9, 25, 36, 0) 55%); }
.ks-card__title { position: absolute; left: 24px; right: 24px; bottom: 24px; z-index: 1; margin: 0; color: #fff; }
.ks-card__text { flex: 1; padding: 24px; background: #f8f9fa; color: var(--ks-text); }

/* Team */
.ks-person { position: relative; overflow: hidden; }
.ks-person img { display: block; width: 100%; height: auto; }
.ks-person::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(9, 25, 36, 0.85) 0%, rgba(9, 25, 36, 0) 50%); }
.ks-person__caption { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; padding: 24px; color: #fff; }
.ks-person__caption h3 { color: #fff; }
.ks-person__caption p { font-size: 14px; line-height: 1.5; }

/* Call to action banner */
.ks-cta { position: relative; overflow: hidden; clip-path: polygon(0 0, 100% 0, 100% 100%, 32px 100%, 0 calc(100% - 32px)); }
.ks-cta--red { background: var(--ks-red); }
.ks-cta--dark { background: var(--ks-navy); }
.ks-cta__text { padding: 48px 16px 24px; }
.ks-cta h3 { font-weight: 500; }
.ks-cta__label { color: var(--ks-grey-400); }
.ks-cta__link { color: #fff; text-decoration: none; }
.ks-cta__link:hover { color: #fff; }
.ks-cta__media { position: relative; display: block; }
.ks-cta__media img { display: block; width: 100%; height: auto; }
.ks-cta__media .ks-square-btn { position: absolute; left: 24px; bottom: 24px; }
@media (min-width: 992px) {
	.ks-cta { display: flex; gap: 24px; }
	.ks-cta__text { flex: none; padding: 48px 48px 24px; white-space: nowrap; }
	.ks-cta__media { flex: 1; min-width: 0; margin-left: 16px; align-self: flex-end; }
}

/* Contact */
.ks-contact { max-width: 1100px; }
.ks-contact__box { margin-bottom: 24px; padding: 16px; border: 1px solid #dee2e6; color: var(--ks-text); }
.ks-contact__box a { color: var(--ks-text); text-decoration: none; }
.ks-contact__box a:hover { color: var(--ks-red); }
.ks-contact__box .ks-icon { color: var(--ks-grey-600); }
.ks-form__missing { padding: 16px; border: 1px dashed var(--ks-red); color: var(--ks-red); }
.ks-form label, .ks-form .ff-el-input--label label { font-weight: 400; margin-bottom: 4px; }
.ks-form input[type="text"], .ks-form input[type="email"], .ks-form input[type="tel"], .ks-form textarea {
	width: 100%;
	padding: 6px 12px;
	border: 1px solid #dee2e6;
	border-radius: 0;
	font: inherit;
	font-weight: 300;
}
.ks-form input:focus, .ks-form textarea:focus { outline: 0; border-color: var(--ks-navy); box-shadow: 0 0 0 0.2rem rgba(9, 25, 36, 0.15); }
.ks-form button[type="submit"], .ks-form .ff-btn-submit {
	margin-top: 16px;
	padding: 8px 40px;
	border: 0;
	border-radius: 0;
	background: var(--ks-navy) !important;
	color: #fff !important;
	font-weight: 500;
}
.ks-form button[type="submit"]:hover, .ks-form .ff-btn-submit:hover { background: #000 !important; }

/* Single project */
.ks-hero__lead--sm { font-size: clamp(16px, 1.4vw, 18px); line-height: 1.8; }
.ks-project-body .lead { font-size: 22px; font-weight: 500; line-height: 1.8; color: var(--ks-text); }
.ks-project-body .card { border-radius: 6px; }
.ks-project-body .card-title { font-size: 20px; font-weight: 500; letter-spacing: 0; }
.ks-project-body h4 { font-weight: 500; letter-spacing: 0; }
.ks-project-body .list-group-item { padding: 16px 0; font-size: 16px; }
.ks-project-body blockquote footer { font-size: 14px; }
