/* EBK Case Studies & Site Blocks – case study page (FlowGuide style).
   Every block shares these tokens; colours and widths can be changed in EBK Website > Settings. */

@font-face {
	font-family: "Inter";
	font-style: normal;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-normal.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
	font-family: "Inter";
	font-style: italic;
	font-weight: 100 900;
	font-display: swap;
	src: url("../fonts/inter-latin-wght-italic.woff2") format("woff2-variations"), url("../fonts/inter-latin-wght-italic.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

.ebkcs {
	--ebkcs-font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--ebkcs-ink: #000;
	--ebkcs-ink-soft: #2e2e2e;
	--ebkcs-grey: #767676;
	--ebkcs-line: #e6e6e6;
	--ebkcs-tint: #f2f1ef;
	--ebkcs-accent: #6d1f2c;
	--ebkcs-max: 1240px;
	--ebkcs-pad: clamp(20px, 4vw, 48px);
	--ebkcs-gap: clamp(20px, 2.8vw, 40px);
	--ebkcs-cgap: clamp(8px, 1vw, 14px);
	--ebkcs-space: clamp(56px, 7.5vw, 112px);
	--ebkcs-radius: 10px;
	font-family: var(--ebkcs-font);
	font-size: 16px;
	line-height: 1.5;
	color: var(--ebkcs-grey);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}
/* Win over theme / Elementor kit fonts and text transforms inside every block. */
.ebkcs.ebkcs :is(h1, h2, h3, h4, h5, h6, p, li, dt, dd, a, button, blockquote, figcaption, span, summary) { font-family: var(--ebkcs-font); }
.ebkcs.ebkcs :is(h1, h2, h3, h4, h5, h6, button, summary) { text-transform: none; }
/* Theme / kit resets that would otherwise leak in (bold links, list gaps, image shadows).
   :where() keeps these at (0,2,0) so the component rules below still win by order. */
.ebkcs.ebkcs :where(a) { font-weight: inherit; }
.ebkcs.ebkcs :where(ul[role="list"] > li) { margin: 0; }
.ebkcs.ebkcs :where(img) { box-shadow: none; }
.ebkcs *, .ebkcs *::before, .ebkcs *::after { box-sizing: border-box; }
.ebkcs .ebkcs-wrap { width: 100%; max-width: calc(var(--ebkcs-max) + 2 * var(--ebkcs-pad)); margin-inline: auto; padding-inline: var(--ebkcs-pad); }

/* ---------- Header: large black heading, grey line under it ---------- */
.ebkcs .ebkcs-header { padding-block: clamp(48px, 7vw, 112px) clamp(32px, 4.5vw, 64px); }
.ebkcs .ebkcs-title {
	margin: 0; max-width: 20ch;
	color: var(--ebkcs-ink);
	font-size: clamp(2.375rem, 1.45rem + 3.4vw, 4.5rem);
	line-height: 1.04; font-weight: 600; letter-spacing: -0.035em;
	text-transform: none; text-wrap: balance;
}
.ebkcs .ebkcs-subtitle {
	margin: clamp(14px, 1.4vw, 22px) 0 0; max-width: 42rem;
	color: var(--ebkcs-grey);
	font-size: clamp(1.125rem, 1rem + 0.45vw, 1.5rem);
	line-height: 1.4; font-weight: 400; letter-spacing: -0.01em; text-transform: none;
}

/* ---------- Photos: centre image, a staggered pair either side, edge images bleeding off ---------- */
.ebkcs .ebkcs-collage { overflow: hidden; margin: 0 0 clamp(56px, 8vw, 120px); }
.ebkcs .ebkcs-collage__track {
	display: grid; align-items: center; gap: var(--ebkcs-cgap);
	grid-template-columns: 1fr 1fr 2fr 1fr 1fr;
	width: 113%; margin-left: -6.5%;
	aspect-ratio: 2.23 / 1;
}
.ebkcs .ebkcs-collage__center { height: 100%; }
.ebkcs .ebkcs-collage__edge { height: 60%; }
.ebkcs .ebkcs-collage__stack { display: flex; flex-direction: column; gap: var(--ebkcs-cgap); height: 86%; min-height: 0; }
.ebkcs .ebkcs-collage__stack--left > :first-child,
.ebkcs .ebkcs-collage__stack--right > :last-child { flex: 43 1 0; }
.ebkcs .ebkcs-collage__stack--left > :last-child,
.ebkcs .ebkcs-collage__stack--right > :first-child { flex: 57 1 0; }

.ebkcs .ebkcs-collage--5 .ebkcs-collage__track,
.ebkcs .ebkcs-collage--3 .ebkcs-collage__track {
	grid-template-columns: 1fr 2fr 1fr; width: auto; margin-left: 0;
	max-width: calc(var(--ebkcs-max) + 2 * var(--ebkcs-pad)); margin-inline: auto; padding-inline: var(--ebkcs-pad);
	aspect-ratio: auto; height: clamp(320px, 40vw, 620px);
}
.ebkcs .ebkcs-collage__stack--single { height: 74%; }
.ebkcs .ebkcs-collage__stack--single > * { flex: 1 1 0; }
.ebkcs .ebkcs-collage--1 .ebkcs-collage__track {
	display: block; width: auto; margin-left: 0; aspect-ratio: auto;
	max-width: calc(var(--ebkcs-max) + 2 * var(--ebkcs-pad)); margin-inline: auto; padding-inline: var(--ebkcs-pad);
}
.ebkcs .ebkcs-collage--1 .ebkcs-collage__center { height: auto; aspect-ratio: 16 / 9; max-height: 80vh; }

.ebkcs .ebkcs-photo {
	position: relative; display: block; overflow: hidden; min-height: 0;
	border-radius: var(--ebkcs-radius); background: var(--ebkcs-tint);
	text-decoration: none;
}
.ebkcs .ebkcs-photo .ebkcs-photo__img {
	position: absolute; inset: 0; display: block;
	width: 100%; height: 100%; max-width: none; margin: 0;
	object-fit: cover; border: 0; border-radius: 0; box-shadow: none;
	transition: transform 0.7s cubic-bezier(.2, .7, .2, 1);
}
.ebkcs a.ebkcs-photo:hover .ebkcs-photo__img { transform: scale(1.025); }
.ebkcs a.ebkcs-photo:focus-visible { outline: 2px solid var(--ebkcs-accent); outline-offset: 3px; }

/* Photos beyond the collage */
.ebkcs .ebkcs-more { margin: calc(-1 * clamp(32px, 5vw, 80px)) auto clamp(56px, 8vw, 120px); }
.ebkcs .ebkcs-more__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--ebkcs-cgap); }
.ebkcs .ebkcs-more__grid .ebkcs-photo { aspect-ratio: 4 / 3; }

/* ---------- Story: heading in the first column, text in the other two ---------- */
.ebkcs .ebkcs-content { padding-bottom: clamp(56px, 8vw, 120px); }
.ebkcs .ebkcs-content > .ebkcs-row:first-child { border-top: 1px solid var(--ebkcs-line); padding-top: clamp(28px, 3.5vw, 44px); }
.ebkcs .ebkcs-row {
	display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: var(--ebkcs-gap); row-gap: 16px; align-items: start;
}
.ebkcs .ebkcs-row + .ebkcs-row { margin-top: clamp(56px, 7vw, 104px); }
.ebkcs .ebkcs-row__title {
	grid-column: 1; margin: 0; padding: 0;
	color: var(--ebkcs-ink);
	font-size: 1rem; line-height: 1.45; font-weight: 600; letter-spacing: -0.005em; text-transform: none;
}
.ebkcs .ebkcs-row__title--lg { font-size: clamp(1.75rem, 1.2rem + 1.6vw, 2.5rem); line-height: 1.1; font-weight: 500; letter-spacing: -0.025em; }
.ebkcs .ebkcs-row__aside { grid-column: 3; }
.ebkcs .ebkcs-row__body { grid-column: 2; }
.ebkcs .ebkcs-row__body--cols { grid-column: 2 / span 2; columns: 2; column-gap: var(--ebkcs-gap); orphans: 3; widows: 3; }
.ebkcs .ebkcs-row__body--cols p { break-inside: avoid; }
.ebkcs .ebkcs-row__body--flow p { break-inside: auto; }

.ebkcs .ebkcs-highlight {
	margin: 0; color: var(--ebkcs-ink);
	font-size: 1.0625rem; line-height: 1.5; font-weight: 600; letter-spacing: -0.005em;
}
.ebkcs .ebkcs-text { color: var(--ebkcs-grey); font-size: 1rem; line-height: 1.65; }
.ebkcs .ebkcs-text p { margin: 0 0 1em; color: inherit; font-size: inherit; line-height: inherit; }
.ebkcs .ebkcs-text p:last-child { margin-bottom: 0; }
.ebkcs .ebkcs-highlight + .ebkcs-text { margin-top: 1em; }

/* Testimonial */
.ebkcs .ebkcs-quote { grid-column: 2 / span 2; margin: 0; }
.ebkcs .ebkcs-quote blockquote {
	margin: 0; padding: 0; border: 0; background: none; quotes: none;
	color: var(--ebkcs-ink);
	font-size: clamp(1.125rem, 1rem + 0.4vw, 1.375rem); line-height: 1.5; font-weight: 400; font-style: normal; letter-spacing: -0.01em;
}
.ebkcs .ebkcs-quote--long blockquote { font-size: clamp(1.0625rem, 1rem + 0.15vw, 1.1875rem); line-height: 1.6; }
.ebkcs .ebkcs-quote blockquote::before, .ebkcs .ebkcs-quote blockquote::after { content: none; }
.ebkcs .ebkcs-quote blockquote p { margin: 0 0 0.8em; color: inherit; font: inherit; }
.ebkcs .ebkcs-quote blockquote p:last-child { margin-bottom: 0; }
.ebkcs .ebkcs-quote figcaption { margin-top: 18px; color: var(--ebkcs-grey); font-size: 1rem; font-style: normal; }
.ebkcs .ebkcs-quote figcaption::before { content: "\2014\00a0"; }

/* Call to action */
.ebkcs a.ebkcs-btn {
	display: inline-flex; align-items: center; justify-content: center; margin-top: 22px;
	padding: 15px 26px; border-radius: 999px; border: 0;
	background: var(--ebkcs-accent); color: #fff;
	font-size: 0.9375rem; line-height: 1.25; font-weight: 600; letter-spacing: 0.01em; text-decoration: none; text-align: center;
	transition: background-color 0.2s ease;
}
.ebkcs a.ebkcs-btn:hover, .ebkcs a.ebkcs-btn:focus { background: color-mix(in srgb, var(--ebkcs-accent) 80%, #000); color: #fff; text-decoration: none; }
.ebkcs a.ebkcs-btn:focus-visible { outline: 2px solid var(--ebkcs-accent); outline-offset: 3px; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
	.ebkcs .ebkcs-row { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
	.ebkcs .ebkcs-row__aside, .ebkcs .ebkcs-row__body, .ebkcs .ebkcs-row__body--cols, .ebkcs .ebkcs-quote { grid-column: 2; }
	.ebkcs .ebkcs-row__body--cols { columns: auto; }
}

/* ---------- Phone ---------- */
@media (max-width: 767px) {
	.ebkcs .ebkcs-row { grid-template-columns: minmax(0, 1fr); }
	.ebkcs .ebkcs-row__title, .ebkcs .ebkcs-row__aside, .ebkcs .ebkcs-row__body, .ebkcs .ebkcs-row__body--cols, .ebkcs .ebkcs-quote { grid-column: 1; }
	.ebkcs .ebkcs-row--intro, .ebkcs .ebkcs-row--cta { row-gap: 20px; }

	.ebkcs .ebkcs-collage { padding-inline: var(--ebkcs-pad); }
	.ebkcs .ebkcs-collage .ebkcs-collage__track {
		grid-template-columns: 1fr 1fr; width: auto; margin: 0; padding: 0; height: auto; aspect-ratio: auto; max-width: none;
	}
	.ebkcs .ebkcs-collage__stack { display: contents; }
	.ebkcs .ebkcs-collage__track > .ebkcs-photo, .ebkcs .ebkcs-collage__stack > .ebkcs-photo { height: auto; aspect-ratio: 1 / 1; }
	.ebkcs .ebkcs-collage .ebkcs-collage__center { grid-column: 1 / -1; order: -1; aspect-ratio: 4 / 5; }
	.ebkcs .ebkcs-collage .ebkcs-collage__edge { order: 1; }
	.ebkcs .ebkcs-collage--1 .ebkcs-collage__center { aspect-ratio: 4 / 3; }
	.ebkcs .ebkcs-more__grid { grid-template-columns: 1fr 1fr; }
	.ebkcs .ebkcs-more { margin-top: calc(-1 * clamp(32px, 6vw, 56px)); }
}

@media (prefers-reduced-motion: reduce) {
	.ebkcs .ebkcs-photo .ebkcs-photo__img { transition: none; }
	.ebkcs a.ebkcs-photo:hover .ebkcs-photo__img { transform: none; }
}
