/**
 * HTML sitemap.
 *
 * Dense by design: the point of the page is to scan a lot of links quickly, so
 * the rows are tight and the type is small, with the grouping doing the work
 * that whitespace would do elsewhere.
 */

.epc-sitemap {
	background: var(--epc-black);
	color: var(--epc-silver);
	border-top: 1px solid var(--epc-line-soft);
}

.epc-sitemap__inner {
	width: 100%;
	max-width: var(--epc-container);
	margin-inline: auto;
	padding: 3.5rem var(--epc-gutter);
}

@media (min-width: 768px) {
	.epc-sitemap__inner {
		padding-block: 5rem;
	}
}

.epc-sitemap__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 560px) {
	.epc-sitemap__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.epc-sitemap__grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem;
	}
}

.epc-sitemap__block {
	padding: 1.6rem 1.35rem 1.4rem;
	background: linear-gradient(150deg, var(--epc-ink-850) 0%, var(--epc-ink-950) 60%, var(--epc-black) 100%);
	border: 1px solid rgb(141 143 142 / 28%);
	border-radius: 16px;
	box-shadow: inset 0 1px 0 rgb(255 255 255 / 6%);
}

/* The fleet and the articles need the full row, not a third of it. */
.epc-sitemap__block--wide {
	margin-top: 1.5rem;
}

.epc-sitemap__title {
	margin: 0 0 1rem;
	padding-bottom: 0.75rem;
	font-family: var(--epc-font-sans);
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--epc-white);
	border-bottom: 1px solid var(--epc-line-soft);
}

.epc-sitemap__list {
	display: grid;
	gap: 0.15rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Long lists run in columns rather than one very tall stack. */
@media (min-width: 560px) {
	.epc-sitemap__list--columns {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 0.15rem 1.5rem;
	}
}

@media (min-width: 1024px) {
	.epc-sitemap__list--columns {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.epc-sitemap__list a {
	display: flex;
	gap: 0.5rem;
	align-items: baseline;
	padding: 0.4rem 0.4rem 0.4rem 0;
	font-family: var(--epc-font-sans);
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--epc-silver);
	text-decoration: none;
	border-radius: 6px;
	transition: color 280ms var(--epc-ease-soft),
		padding-left 280ms var(--epc-ease-soft);
}

.epc-sitemap__list a:hover,
.epc-sitemap__list a:focus-visible {
	color: var(--epc-white);
	padding-left: 0.35rem;
}

.epc-sitemap__list i {
	flex: none;
	font-size: 0.625rem;
	color: var(--epc-grey);
	transition: color 280ms var(--epc-ease-soft);
}

.epc-sitemap__list a:hover i,
.epc-sitemap__list a:focus-visible i {
	color: var(--epc-white);
}

/* --- Articles by category ------------------------------------- */

.epc-sitemap__cats {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 640px) {
	.epc-sitemap__cats {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.epc-sitemap__cats {
		grid-template-columns: repeat(3, minmax(0, 1fr));
		gap: 1.5rem 2rem;
	}
}

.epc-sitemap__cat-title {
	display: flex;
	gap: 0.6rem;
	align-items: baseline;
	justify-content: space-between;
	margin: 0 0 0.5rem;
	font-family: var(--epc-font-serif);
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--epc-white);
}

.epc-sitemap__cat-title a {
	color: inherit;
	text-decoration: none;
	transition: color 280ms var(--epc-ease-soft);
}

.epc-sitemap__cat-title a:hover,
.epc-sitemap__cat-title a:focus-visible {
	color: var(--epc-silver);
}

.epc-sitemap__count {
	flex: none;
	padding: 0.1rem 0.45rem;
	font-family: var(--epc-font-sans);
	font-size: 0.625rem;
	font-weight: 600;
	color: var(--epc-grey);
	background: var(--epc-wash);
	border: 1px solid var(--epc-line-soft);
	border-radius: 999px;
}

/* --- Footnote -------------------------------------------------- */

.epc-sitemap__note {
	display: flex;
	gap: 0.65rem;
	align-items: flex-start;
	margin: 2rem 0 0;
	padding: 0.9rem 1.1rem;
	font-family: var(--epc-font-sans);
	font-size: 0.75rem;
	line-height: 1.7;
	color: var(--epc-silver);
	background: var(--epc-wash);
	border: 1px solid var(--epc-line-soft);
	border-radius: 12px;
}

.epc-sitemap__note i {
	margin-top: 0.2em;
	color: var(--epc-white);
}

.epc-sitemap__note a {
	color: var(--epc-white);
	text-decoration: underline;
	text-underline-offset: 3px;
	text-decoration-color: rgb(255 255 255 / 40%);
	word-break: break-word;
}

@media (prefers-reduced-motion: reduce) {
	.epc-sitemap__list a,
	.epc-sitemap__list i,
	.epc-sitemap__cat-title a {
		transition-duration: 0.01ms !important;
	}

	.epc-sitemap__list a:hover {
		padding-left: 0;
	}
}
