/* =============================================================================
   ECR — the multilingual brochure download band
   Achievements 2019-2024 · ECR Priorities 2024-2029

   Six cards, one per language, at the top of a page that is otherwise long
   prose. Same tokens, radius, border, shadow and hover lift as the Logos &
   Branding grid and the "Who we are" tiles, so the three download surfaces on
   this site read as one thing.

   Scoped entirely to `.ecr-doc`. Nothing here can reach the prose below it.
   ========================================================================== */

.ecr-doc {
	--doc-primary: var(--ecr-primary, #1866A5);
	--doc-primary-dark: var(--ecr-primary-dark, #114C7D);
	--doc-text: var(--ecr-text, #1E293B);
	--doc-border: var(--ecr-border, #E2E8F0);
	--doc-white: var(--ecr-white, #FFFFFF);
	--doc-muted: #667085;
	--doc-tint: #EFF6FF;

	box-sizing: border-box;
	margin: 0 0 3rem;
	color: var(--doc-text);
}

/* --- header --------------------------------------------------------------- */

.ecr-doc__header {
	margin-bottom: 1.5rem;
}

.ecr-doc__eyebrow {
	display: block;
	margin-bottom: .4rem;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--doc-primary);
}

.ecr-doc .ecr-doc__title {
	margin: 0 0 .4rem;
	font-size: 1.5rem;
	line-height: 1.25;
	color: var(--doc-text);
}

.ecr-doc__lede {
	margin: 0;
	font-size: .9375rem;
	line-height: 1.5;
	color: var(--doc-muted);
}

.ecr-doc__empty {
	margin: 0;
	color: var(--doc-muted);
}

/* --- the grid ------------------------------------------------------------- */

/* Three across at desktop: six languages then read as two even rows rather
   than a row of four and a row of two. */
.ecr-doc-grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1rem;
}

/* Salient re-applies a list marker to `li` inside page content, so both the
   list and its items have to opt out — the same defect the Logos grid hit. */
.ecr-doc-grid,
.ecr-doc-item {
	list-style: none !important;
}

.ecr-doc-item {
	margin: 0;
	padding: 0;
}

.ecr-doc-item::before,
.ecr-doc-item::marker {
	content: none;
}

/* --- one language card ---------------------------------------------------- */

/* The WHOLE card is the link, because it has exactly one destination. */
.ecr-doc-card {
	display: flex;
	flex-direction: column;
	gap: .25rem;
	height: 100%;
	box-sizing: border-box;
	padding: 1.15rem 1.35rem;
	background: var(--doc-white);
	border: 1px solid var(--doc-border);
	border-radius: 15px;
	box-shadow: 0 2px 10px rgba(15, 23, 42, .04);
	text-decoration: none;
	color: var(--doc-text);
	transition: transform .3s ease, box-shadow .3s ease, border-color .3s ease, background-color .25s ease, color .25s ease;
}

.ecr-doc-card:hover,
.ecr-doc-card:focus-visible {
	transform: translateY(-2px);
	box-shadow: var(--ecr-shadow-hover, 0 20px 60px rgba(15, 23, 42, .12));
	border-color: transparent;
	background: var(--doc-primary);
	color: var(--doc-white);
}

.ecr-doc-card:focus-visible {
	outline: 3px solid var(--doc-primary-dark);
	outline-offset: 3px;
}

.ecr-doc-card__lang {
	font-size: 1.0625rem;
	font-weight: 700;
	line-height: 1.25;
	/* A language name cannot be hyphenated at a sensible point, so it wraps
	   rather than overflowing its card at 375px. */
	overflow-wrap: anywhere;
}

.ecr-doc-card__meta {
	font-size: .8125rem;
	letter-spacing: .02em;
	color: var(--doc-muted);
	transition: color .25s ease;
}

.ecr-doc-card:hover .ecr-doc-card__meta,
.ecr-doc-card:focus-visible .ecr-doc-card__meta {
	color: rgba(255, 255, 255, .85);
}

/* The word "Download" is the affordance; it is `aria-hidden` in the markup
   because the link's own `aria-label` already says it, in full, once. */
.ecr-doc-card__cue {
	margin-top: auto;
	padding-top: .8rem;
	font-size: .8125rem;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
	color: var(--doc-primary);
	transition: color .25s ease;
}

.ecr-doc-card:hover .ecr-doc-card__cue,
.ecr-doc-card:focus-visible .ecr-doc-card__cue {
	color: var(--doc-white);
}

/* --- responsive ----------------------------------------------------------- */

@media (max-width: 1024px) {
	.ecr-doc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
	.ecr-doc-grid { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
	.ecr-doc-card { padding: 1rem 1.15rem; }
	.ecr-doc .ecr-doc__title { font-size: 1.3125rem; }
}

@media (prefers-reduced-motion: reduce) {
	.ecr-doc-card { transition: none; }
	.ecr-doc-card:hover { transform: none; }
}
