/*
 * We ALL Grow - Paths.
 *
 * Read from cp-all-designer we-all-grow.html:158-234, css/we-all-grow.css:339-561,
 * 623-631, 1162-1166 and 1186-1222.
 *
 * Colour, type, padding and the spaces between the parts arrive from the
 * Style tab and are not repeated here.
 *
 * Left behind: we-all-grow.css:1213-1216, smaller copy on a desktop window
 * under 720px tall — a fourth tier inside the desktop one.
 */

.custom-we-all-grow-paths {
	--custom-we-all-grow-paths-leaf: 30px;
	--custom-we-all-grow-paths-lift: 16px;
	--custom-we-all-grow-paths-inset: 14px;
	--custom-we-all-grow-paths-picture: 188px;
	--custom-we-all-grow-paths-rule: #CE2929;
	--custom-we-all-grow-paths-rule-on: #5CA13F;
	--custom-we-all-grow-paths-dot: rgba(255, 255, 255, 0.34);
	--custom-we-all-grow-paths-dot-on: #FFFFFF;
	/* we-all-grow.css:396 — past its mark and back: the picture springs */
	--custom-we-all-grow-paths-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* we-all-grow.css:373-377 — one row of four */
.custom-we-all-grow-paths .custom-we-all-grow-paths__cards {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	align-items: stretch;
}

/* we-all-grow.css:378-383, 1162-1166 — the leaf corner; the picture stands over
   the top edge, so the card does not clip */
.custom-we-all-grow-paths .custom-we-all-grow-paths__card {
	display: flex;
	flex-direction: column;
	min-width: 0;
	border-radius: var(--custom-we-all-grow-paths-leaf) 4px var(--custom-we-all-grow-paths-leaf) 4px;
	box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);   /* --sh, app.css:160 */
	transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1),
	            box-shadow 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* we-all-grow.css:417-424 — lifted over the card's top edge, in a white frame */
.custom-we-all-grow-paths .custom-we-all-grow-paths__picture {
	flex: none;
	box-sizing: border-box;
	height: var(--custom-we-all-grow-paths-picture);
	margin: calc(-1 * var(--custom-we-all-grow-paths-lift)) var(--custom-we-all-grow-paths-inset) 0;
	border-style: solid;
	border-radius: var(--custom-we-all-grow-paths-leaf) 4px var(--custom-we-all-grow-paths-leaf) 4px;
	background-color: #F0F4FA;             /* --g150, app.css:61 */
	box-shadow: 0 6px 18px -6px rgba(22, 65, 140, 0.14);   /* --sh-sm, app.css:159 */
	transition: transform 450ms var(--custom-we-all-grow-paths-spring),
	            box-shadow 450ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* we-all-grow.css:425-428, 623-631 — the files carry a mark in their foot
   corner, so they are drawn 108% and held at the top corner */
.custom-we-all-grow-paths .custom-we-all-grow-paths__picture > img {
	width: 108%;
	height: 108%;
	max-width: none;
	object-fit: cover;
	object-position: left top;
	transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-we-all-grow-paths .custom-we-all-grow-paths__body {
	display: flex;
	flex: 1;
	flex-direction: column;
}

.custom-we-all-grow-paths .custom-we-all-grow-paths__number,
.custom-we-all-grow-paths .custom-we-all-grow-paths__name,
.custom-we-all-grow-paths .custom-we-all-grow-paths__line,
.custom-we-all-grow-paths .custom-we-all-grow-paths__text {
	margin-right: 0;
	margin-left: 0;
	font-family: inherit;
	font-style: normal;
	letter-spacing: 0;
	text-transform: none;
}

/* we-all-grow.css:436-445 — the number over a red rule as wide as itself */
.custom-we-all-grow-paths .custom-we-all-grow-paths__number {
	position: relative;
	margin-top: 0;
	padding-top: 0;
	font-weight: 700;
	line-height: 1;
}

.custom-we-all-grow-paths .custom-we-all-grow-paths__number::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	width: 34px;
	height: 4px;                           /* we-all-grow.css:444 measures 3px */
	border-radius: 2px;
	background-color: var(--custom-we-all-grow-paths-rule);
	transition: background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* we-all-grow.css:446-449 */
.custom-we-all-grow-paths .custom-we-all-grow-paths__name {
	margin-top: 0;
	margin-bottom: 0;
	padding: 0;
	font-weight: 700;
	line-height: 1.3;
}

/* we-all-grow.css:450-452 */
.custom-we-all-grow-paths .custom-we-all-grow-paths__line {
	margin-bottom: 0;
	padding: 0;
	font-weight: 500;
	line-height: 1.5;
}

/* we-all-grow.css:454-459 — a hairline before the grey copy */
.custom-we-all-grow-paths .custom-we-all-grow-paths__text {
	margin-bottom: 0;
	padding-right: 0;
	padding-bottom: 0;
	padding-left: 0;
	border-top: 2px solid #EEF2F7;         /* we-all-grow.css:457 measures 1px */
	font-weight: 400;
	line-height: 1.7;
}

/* we-all-grow.css:399-404 — a pointer that rests on a card lifts it, springs
   the picture and turns the rule green */
@media (hover: hover) {
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover {
		transform: translateY(-6px);
		box-shadow: 0 34px 80px -20px rgba(22, 65, 140, 0.3);   /* --sh-lg, app.css:161 */
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover .custom-we-all-grow-paths__picture {
		transform: translateY(-8px) scale(1.03);
		box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover .custom-we-all-grow-paths__picture > img {
		transform: scale(1.05);
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover .custom-we-all-grow-paths__number::after {
		background-color: var(--custom-we-all-grow-paths-rule-on);
	}
}

/* the dots are made by the script for the phone's rail alone */
.custom-we-all-grow-paths .custom-we-all-grow-paths__dots {
	display: none;
}

/* ------------------------------------------------------------------ */
/* Tablet — 768px to 1024px (we-all-grow.css:470-476)                  */
/* ------------------------------------------------------------------ */

@media (max-width: 1024px) {
	/* two to a row; the space between rows carries the picture's lift */
	.custom-we-all-grow-paths .custom-we-all-grow-paths__cards {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	/* we-all-grow.css:419 — the picture keeps 16 : 11 at the card's width,
	   unless the Style tab asks for more height */
	.custom-we-all-grow-paths .custom-we-all-grow-paths__picture {
		height: auto;
		min-height: var(--custom-we-all-grow-paths-picture);
		aspect-ratio: 16 / 11;
	}
}

/* ------------------------------------------------------------------ */
/* Mobile — up to 767px (we-all-grow.css:486-561, drawn at 620)        */
/* ------------------------------------------------------------------ */

@media (max-width: 767px) {
	/* a rail moved sideways, one card to a view; it runs to the window's edges
	   while the cards start on the content's edge */
	.custom-we-all-grow-paths .custom-we-all-grow-paths__cards {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
		-webkit-overflow-scrolling: touch;
		overscroll-behavior-x: contain;
		/* room for the lifted picture over the rail and the cards' shadow under it */
		margin-top: -20px;
		margin-right: calc(-1 * var(--custom-we-all-grow-paths-gutter, 24px));
		margin-left: calc(-1 * var(--custom-we-all-grow-paths-gutter, 24px));
		padding: 20px var(--custom-we-all-grow-paths-gutter, 24px) 28px;
		scroll-padding-inline: var(--custom-we-all-grow-paths-gutter, 24px);
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__cards::-webkit-scrollbar {
		display: none;
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card {
		flex: 0 0 100%;
		scroll-snap-align: start;
	}
	/* we-all-grow.css:536-557 */
	.custom-we-all-grow-paths .custom-we-all-grow-paths__dots {
		display: flex;
		justify-content: center;
		align-items: center;
		gap: 8px;
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__dot {
		position: relative;
		width: 8px;
		height: 8px;
		margin: 0;
		padding: 0;
		border: 0;
		border-radius: 8px;
		background-color: var(--custom-we-all-grow-paths-dot);
		cursor: pointer;
		transition: width 350ms cubic-bezier(0.2, 0.8, 0.2, 1),
		            background-color 350ms cubic-bezier(0.2, 0.8, 0.2, 1);
	}
	/* a 44px target without a larger dot */
	.custom-we-all-grow-paths .custom-we-all-grow-paths__dot::after {
		content: "";
		position: absolute;
		top: 50%;
		left: 50%;
		width: 44px;
		height: 44px;
		transform: translate(-50%, -50%);
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__dot[aria-current="true"] {
		width: 26px;
		background-color: var(--custom-we-all-grow-paths-dot-on);
		cursor: default;
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__dot:focus-visible {
		outline: 2px solid var(--custom-we-all-grow-paths-dot-on);
		outline-offset: 4px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card,
	.custom-we-all-grow-paths .custom-we-all-grow-paths__picture,
	.custom-we-all-grow-paths .custom-we-all-grow-paths__picture > img {
		transition: none;
	}
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover,
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover .custom-we-all-grow-paths__picture,
	.custom-we-all-grow-paths .custom-we-all-grow-paths__card:hover .custom-we-all-grow-paths__picture > img {
		transform: none;
	}
}
