/*
 * SME - Partner.
 *
 * Read from cp-all-designer sme.html:92-128, css/sme.css:37-54, 110-208,
 * 652, 655-670.
 *
 * Colour, type, padding, the corner and the spaces between the parts arrive
 * from the Style tab and are not repeated here.
 */

.custom-sme-partner {
	--custom-sme-partner-edge: #EEF2F7;
	--custom-sme-partner-edge-on: #B9DAEE;
	position: relative;
	overflow: hidden;
}

/* the band's content stands over the leaf — sme.css:54 */
.custom-sme-partner .custom-sme-partner__inner {
	position: relative;
	z-index: 1;
}

/* sme.css:38-47 — the brand's leaf off the band's top corner, out of the way */
.custom-sme-partner .custom-sme-partner__leaf {
	position: absolute;
	top: -90px;                            /* sme.css:43 (-100.8 capped at -90) */
	right: -70px;                          /* sme.css:44 (-72 capped at -70) */
	z-index: 0;
	line-height: 0;
	pointer-events: none;
}

.custom-sme-partner .custom-sme-partner__leaf svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* sme.css:41 — the outline keeps its weight however large the leaf is drawn */
.custom-sme-partner .custom-sme-partner__leaf path {
	vector-effect: non-scaling-stroke;
}

/* ------------------------------------------------------------------ */
/* The picture — sme.css:143-160                                       */
/* ------------------------------------------------------------------ */

.custom-sme-partner .custom-sme-partner__cast {
	margin: 0;
	padding: 0;
}

/* a cut-out of the partners: no frame, a shadow that follows their shape */
.custom-sme-partner .custom-sme-partner__picture {
	width: 100%;
	margin-right: auto;
	margin-left: auto;
	aspect-ratio: 1000 / 440;              /* the design's file, assets/sme/sme-partner-opportunity.png */
	overflow: visible;
}

.custom-sme-partner .custom-sme-partner__picture > img {
	filter: drop-shadow(0 26px 34px rgba(22, 65, 140, 0.16));
}

/* sme.css:156-157 — it grows from its base as it is reached */
.custom-sme-partner .custom-sme-partner__cast[data-custom-reveal] {
	transform: scale(0.9) translateY(24px);
	transform-origin: bottom center;
}

.custom-sme-partner .custom-sme-partner__cast[data-custom-reveal].is-in {
	transform: none;
	transition: opacity 550ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            transform 1050ms cubic-bezier(0.18, 0.9, 0.24, 1);
}

/* ------------------------------------------------------------------ */
/* The second heading — sme.css:164-171, app.css:238-251               */
/* ------------------------------------------------------------------ */

.custom-sme-partner .custom-sme-partner__sub {
	margin-right: auto;
	margin-left: auto;
	text-align: center;
}

.custom-sme-partner .custom-sme-partner__sub-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: 0;
	text-transform: none;
}

.custom-sme-partner .custom-sme-partner__sub-title strong,
.custom-sme-partner .custom-sme-partner__sub-title b {
	font-weight: 700;
	color: inherit;
}

/* the word set apart: upright, a step larger than its line, its colour written into the heading */
.custom-sme-partner .custom-sme-partner__sub-title em {
	position: relative;
	display: inline-block;
	font-style: normal;
	font-weight: 700;
	font-size: 108%;
}

/* app.css:248-251 — .06em and .16em of a 32px heading */
.custom-sme-partner .custom-sme-partner__sub-title em::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 2px;
	left: 0;
	height: 6px;
	border-radius: 4px;                    /* app.css:250 measures 3px */
	background: currentColor;
	opacity: 0.18;
}

.custom-sme-partner .custom-sme-partner__sub-text {
	margin-right: auto;
	margin-bottom: 0;
	margin-left: auto;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: 0;
	text-transform: none;
}

/* ------------------------------------------------------------------ */
/* The channels — sme.css:173-208                                      */
/* ------------------------------------------------------------------ */

.custom-sme-partner .custom-sme-partner__channels {
	--custom-sme-partner-logo: 74px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-right: 0;
	margin-bottom: 0;
	margin-left: 0;
	padding: 0;
	list-style: none;
}

.custom-sme-partner .custom-sme-partner__channel {
	display: grid;
	justify-items: center;
	align-content: start;
	box-sizing: border-box;
	min-width: 0;
	margin: 0;
	border: 2px solid var(--custom-sme-partner-edge);   /* sme.css:182 measures 1px */
	box-shadow: 0 6px 18px -6px rgba(22, 65, 140, 0.14);   /* --sh-sm, app.css:159 */
	text-align: center;
	list-style: none;
	transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            box-shadow 400ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            border-color 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* sme.css:188 — reached by any pointer, a finger included, as the design has it */
.custom-sme-partner .custom-sme-partner__channel:hover {
	border-color: var(--custom-sme-partner-edge-on);
	box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);   /* --sh, app.css:160 */
	transform: translateY(-6px);
}

/* sme.css:192-204 — logos of every shape stand at one height and keep their own width */
.custom-sme-partner .custom-sme-partner__logo {
	width: 100%;
	background-color: transparent;
}

.custom-sme-partner .custom-sme-partner__logo > img {
	object-fit: contain;
}

/* sme.css:205-208 */
.custom-sme-partner .custom-sme-partner__channel-title {
	margin: 0;
	padding: 0;
	font-family: inherit;
	font-style: normal;
	font-weight: 600;
	line-height: 1.5;
	letter-spacing: 0;
	text-transform: none;
}

/* Elementor's sheet (frontend.min.css, `.elementor img`) comes after the plugin's
   and sets a picture's height to auto and caps its width: a slot's picture says
   its own here, heavily enough to stand */
.custom-sme-partner .custom-sme-partner__picture > img,
.custom-sme-partner .custom-sme-partner__logo > img {
	height: 100%;
	max-width: none;
}

/* ------------------------------------------------------------------ */
/* Tablet — 768px to 1024px                                            */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	/* sme.css:652 — the leaf goes */
	.custom-sme-partner .custom-sme-partner__leaf {
		display: none;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px (sme.css:663-670, drawn at 640)                */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	/* one to a row, the logo beside the name */
	.custom-sme-partner .custom-sme-partner__channels {
		grid-template-columns: minmax(0, 1fr);
	}
	.custom-sme-partner .custom-sme-partner__channel {
		grid-template-columns: var(--custom-sme-partner-logo) minmax(0, 1fr);
		justify-items: start;
		align-items: center;
		text-align: left;
	}
	.custom-sme-partner .custom-sme-partner__logo {
		width: var(--custom-sme-partner-logo);
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-sme-partner .custom-sme-partner__channel,
	.custom-sme-partner .custom-sme-partner__cast[data-custom-reveal] {
		transition: none;
	}
	.custom-sme-partner .custom-sme-partner__cast[data-custom-reveal],
	.custom-sme-partner .custom-sme-partner__channel:hover {
		transform: none;
	}
}
