/*
 * Sustainability - Reports.
 *
 * Read from cp-all-designer css/sustain-sd-report.css (.surp-book, .surp-feat,
 * .surp-tag, .surp-facts, .surp-grid, .surp-card).
 *
 * Colour, type, padding and the measures arrive from the Style tab and are not
 * repeated here.
 */

/* the archive's band runs white to the green at 6% */
.custom-sustainability-reports.custom-sustainability-reports[data-custom-partner-band] {
	background: linear-gradient(180deg,
		var(--custom-sustainability-reports-top, #FFFFFF) 0%,
		var(--custom-sustainability-reports-foot, #F5F9F3) 100%);
}

/* ---- a book: a leaf-cut cover that swings open on its spine ---- */
.custom-sustainability-reports .custom-sustainability-reports__book {
	position: relative;
	display: block;
	aspect-ratio: 210 / 297;
	perspective: 1200px;
}

.custom-sustainability-reports .custom-sustainability-reports__pages {
	position: absolute;
	inset: 2% 0 2% 7%;
	border: 2px solid color-mix(in srgb, #5CA13F 20%, #FFFFFF);   /* measures 1px */
	border-radius: var(--custom-sustainability-reports-curl, 46px) 0 var(--custom-sustainability-reports-curl, 46px) 0;
	background:
		repeating-linear-gradient(180deg, rgba(22, 65, 140, 0.06) 0 2px, transparent 2px 10px),
		linear-gradient(104deg, #FCFDFA 0%, #EEF6E8 100%);
	box-shadow: inset -10px 0 16px -12px rgba(22, 65, 140, 0.3);
	opacity: 0;
	transform: translateX(2px);
	transition: opacity 500ms cubic-bezier(0.2, 0.8, 0.2, 1), transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-sustainability-reports .custom-sustainability-reports__pages::after {
	content: "";
	position: absolute;
	inset: 12% 16% 12% 12%;
	border-left: 2px solid color-mix(in srgb, #5CA13F 22%, transparent);
	border-radius: var(--custom-sustainability-reports-curl, 46px) 0 0 0;
}

.custom-sustainability-reports .custom-sustainability-reports__cover {
	position: absolute;
	inset: 0;
	overflow: hidden;
	border-radius: var(--custom-sustainability-reports-curl, 46px) 0 var(--custom-sustainability-reports-curl, 46px) 0;
	background: linear-gradient(150deg, var(--custom-sustainability-reports-cover, #16418C) 0%, #0E1E54 54%, #3A5B2A 132%);
	box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);   /* --sh */
	transform: rotateY(0deg);
	transform-origin: left center;
	transition: transform 700ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* the year in figures, seen only where the cover has no picture */
.custom-sustainability-reports .custom-sustainability-reports__cover::before {
	content: attr(data-year);
	position: absolute;
	inset: 0;
	z-index: 0;
	display: grid;
	place-items: center;
	font-size: 32px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.9);
}

.custom-sustainability-reports .custom-sustainability-reports__cover img {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	border-radius: 0;
}

.custom-sustainability-reports .custom-sustainability-reports__spine {
	position: absolute;
	inset: 0 auto 0 0;
	z-index: 2;
	width: 10px;
	background: linear-gradient(90deg, rgba(9, 20, 52, 0.42), rgba(9, 20, 52, 0.06) 70%, transparent);
	pointer-events: none;
}

.custom-sustainability-reports .custom-sustainability-reports__sheen {
	position: absolute;
	inset: 0;
	z-index: 3;
	background: linear-gradient(102deg, transparent 34%, rgba(255, 255, 255, 0.42) 62%, transparent 84%);
	opacity: 0;
	pointer-events: none;
	transition: opacity 700ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-sustainability-reports .custom-sustainability-reports__book--big .custom-sustainability-reports__cover {
	box-shadow: 0 34px 80px -20px rgba(22, 65, 140, 0.3);   /* --sh-lg */
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__cover,
.custom-sustainability-reports a.custom-sustainability-reports__card:focus-visible .custom-sustainability-reports__cover,
.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__cover {
	box-shadow: 22px 26px 54px -18px rgba(22, 65, 140, 0.42);
	transform: rotateY(-30deg);
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__pages,
.custom-sustainability-reports a.custom-sustainability-reports__card:focus-visible .custom-sustainability-reports__pages,
.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__pages {
	opacity: 1;
	transform: translateX(0);
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__sheen,
.custom-sustainability-reports a.custom-sustainability-reports__card:focus-visible .custom-sustainability-reports__sheen,
.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__sheen {
	opacity: 1;
}

/* ---- the report on top: the book on its plate beside the words ---- */
.custom-sustainability-reports .custom-sustainability-reports__top {
	display: grid;
	grid-template-columns: minmax(240px, 340px) minmax(0, 1fr);
	align-items: center;
	margin-right: auto;
	margin-left: auto;
}

.custom-sustainability-reports .custom-sustainability-reports__stage {
	position: relative;
}

.custom-sustainability-reports .custom-sustainability-reports__plate {
	position: absolute;
	inset: 12% -9% -8% 12%;
	z-index: 0;
	border-radius: var(--custom-sustainability-reports-curl, 46px) 0 var(--custom-sustainability-reports-curl, 46px) 0;
	background: linear-gradient(146deg, color-mix(in srgb, #5CA13F 22%, transparent) 0%, color-mix(in srgb, #50A3D5 16%, transparent) 100%);
	pointer-events: none;
}

/* clamp(72, 9 --vwu, 140): 129.6 · 82.8 · 72 */
.custom-sustainability-reports .custom-sustainability-reports__ghost {
	position: absolute;
	top: -8%;
	right: -14%;
	z-index: 0;
	font-size: 130px;
	font-weight: 700;
	line-height: 1;
	color: color-mix(in srgb, #16418C 8%, transparent);
	pointer-events: none;
	user-select: none;
}

.custom-sustainability-reports .custom-sustainability-reports__top-book {
	position: relative;
	z-index: 1;
	display: block;
}

.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__tag {
	display: inline-block;
	margin: 0 0 14px;
	padding: 6px 16px;
	border-radius: 1000px;                 /* a pill: 999 */
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	color: #FFFFFF;
}

/* the heading at .h-sub: 500, 1.35, its coloured words bold and a step larger over a soft bar */
.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__top-heading {
	margin: 0;
	font-weight: 500;
	line-height: 1.35;
}

.custom-sustainability-reports .custom-sustainability-reports__top-heading em {
	position: relative;
	display: inline-block;
	font-size: 108%;
	font-style: normal;
	font-weight: 700;
}

.custom-sustainability-reports .custom-sustainability-reports__top-heading em::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 2px;                           /* .06em of the 34.56px word */
	left: 0;
	height: 6px;                           /* .16em of it: 5.53 */
	border-radius: 4px;                    /* measures 3px */
	background: currentColor;
	opacity: 0.18;
}

.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__top-text {
	max-width: var(--custom-sustainability-reports-measure, 620px);
	margin: 16px 0 0;
	font-weight: 400;
	line-height: 1.8;
}

.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__facts {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px 20px;
	max-width: var(--custom-sustainability-reports-measure, 620px);
	margin: 28px 0 0;
	padding: 0;
	line-height: 1.6;
	list-style: none;
}

.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__fact {
	display: flex;
	flex-direction: column;
	gap: 2px;
	margin: 0;
	padding: 14px;
	border-radius: 0 0 18px 0;
	background: #FFFFFF;
	box-shadow: 0 6px 18px -6px rgba(22, 65, 140, 0.14);   /* --sh-sm */
}

.custom-sustainability-reports .custom-sustainability-reports__fact-name {
	font-size: 14px;
	font-weight: 500;
	color: #94A3B8;                        /* --g500 */
}

.custom-sustainability-reports .custom-sustainability-reports__fact-value {
	font-size: 16px;
	font-weight: 600;
	color: #16418C;
}

.custom-sustainability-reports .custom-sustainability-reports__press {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	margin-top: 32px;
}

.custom-sustainability-reports .custom-sustainability-reports__press svg {
	display: block;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

/* ---- the books: a book over its year, name and download line ---- */
.custom-sustainability-reports .custom-sustainability-reports__books {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-right: auto;
	margin-left: auto;
}

.custom-sustainability-reports .custom-sustainability-reports__books .custom-sustainability-reports__card {
	display: flex;
	flex-direction: column;
	gap: 18px;
	color: inherit;
	text-decoration: none;
	transition: transform 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover,
.custom-sustainability-reports a.custom-sustainability-reports__card:focus-visible {
	transform: translateY(-8px);
}

.custom-sustainability-reports .custom-sustainability-reports__card-body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-left: 14px;
	border-left: 2px solid transparent;
	transition: border-color 500ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__card-body,
.custom-sustainability-reports a.custom-sustainability-reports__card:focus-visible .custom-sustainability-reports__card-body {
	border-left-color: var(--custom-sustainability-reports-accent, #5CA13F);
}

.custom-sustainability-reports .custom-sustainability-reports__year {
	font-weight: 700;
	line-height: 1.6;
}

.custom-sustainability-reports .custom-sustainability-reports__name {
	font-size: 14px;
	font-weight: 400;
	line-height: 1.5;
}

.custom-sustainability-reports .custom-sustainability-reports__word {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.6;
	color: var(--custom-sustainability-reports-accent, #5CA13F);
}

.custom-sustainability-reports .custom-sustainability-reports__word svg {
	display: block;
	width: 16px;
	height: 16px;
	transition: transform 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__word svg {
	transform: translateY(4px);            /* measures 3px */
}

@media (max-width: 1024px) {
	.custom-sustainability-reports .custom-sustainability-reports__top {
		grid-template-columns: minmax(0, 1fr);
		justify-items: center;
		text-align: center;
	}
	.custom-sustainability-reports .custom-sustainability-reports__stage {
		width: min(var(--custom-sustainability-reports-stage, 260px), 100%);
	}
	.custom-sustainability-reports .custom-sustainability-reports__ghost {
		top: -14%;
		right: -10%;
		font-size: 82px;
	}
	.custom-sustainability-reports .custom-sustainability-reports__plate {
		inset: 14% -12% -8% 14%;
	}
	.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__top-text,
	.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__facts {
		margin-right: auto;
		margin-left: auto;
	}
	.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__fact {
		align-items: center;
	}
	.custom-sustainability-reports .custom-sustainability-reports__press {
		justify-content: center;
	}
}

@media (max-width: 640px) {
	.custom-sustainability-reports .custom-sustainability-reports__ghost {
		font-size: 72px;
	}
	.custom-sustainability-reports .custom-sustainability-reports__top .custom-sustainability-reports__facts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 16px 20px;
	}
	.custom-sustainability-reports .custom-sustainability-reports__cover::before {
		font-size: 24px;
	}
	.custom-sustainability-reports .custom-sustainability-reports__press [data-custom-partner-button] {
		justify-content: center;
		width: 100%;
	}
}

/* a touch screen holds every book shut */
@media (hover: none) {
	.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__cover,
	.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__cover {
		box-shadow: 0 18px 44px -14px rgba(22, 65, 140, 0.2);
		transform: none;
	}
	.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__pages,
	.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__pages,
	.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__sheen,
	.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__sheen {
		opacity: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.custom-sustainability-reports .custom-sustainability-reports__cover,
	.custom-sustainability-reports .custom-sustainability-reports__pages,
	.custom-sustainability-reports .custom-sustainability-reports__sheen,
	.custom-sustainability-reports .custom-sustainability-reports__card,
	.custom-sustainability-reports .custom-sustainability-reports__card-body,
	.custom-sustainability-reports .custom-sustainability-reports__word svg {
		transition: none;
	}
	.custom-sustainability-reports a.custom-sustainability-reports__card:hover .custom-sustainability-reports__cover,
	.custom-sustainability-reports a.custom-sustainability-reports__top-book:hover .custom-sustainability-reports__cover {
		transform: none;
	}
}
