/**
 * Ohmwork — the site footer.
 *
 * One footer for every page of ohmwork.net, the static browser taster
 * at /try/ included. This file is the single source, beside
 * css/site-header.css: the theme enqueues it and
 * tools/build-web-taster.sh copies it into website/try/css/. Edit it
 * here only, then run the build.
 *
 * Two parts, both the full width of the sheet. Above, three columns:
 * the mark, the tagline and the promise about your data; the section
 * links; how to get in touch. Below, the drawing's title block — every
 * proper sheet carries one — as a ruled strip of cells: project, drawn
 * by, checked, sheet, revision. Every colour and face has a fallback,
 * so the file stands alone wherever it is loaded.
 *
 * Mobile first: one column, then two, then three.
 *
 * Author: Steve Austen, The PCGP.
 */

.site-footer {
	margin-top: 3rem;
	border-top: 1px solid var(--rule, #dddad2);
	color: var(--ink, #202020);
	font-family: var(--sans, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
}

.site-footer a:focus-visible {
	outline: 2px solid var(--wire, #2e5e2e);
	outline-offset: 3px;
	border-radius: 4px;
}

/* ---- The columns -------------------------------------------------- */
.site-footer-grid {
	display: grid;
	gap: 2rem 2.5rem;
	padding: 2.25rem 1rem 2rem;
}

/* Brand: the mark and name, the tagline, the promise, the copyright. */
.site-footer-brand {
	max-width: 26rem;
}

.site-footer-mark {
	display: inline-flex;
	align-items: center;
	gap: 0.55rem;
	color: var(--ink, #202020);
	text-decoration: none;
}

.site-footer-mark:hover {
	color: var(--ink, #202020);
}

.site-footer-mark img {
	width: 30px;
	height: 30px;
	flex: none;
}

.site-footer-mark span {
	font-family: var(--serif, "Fraunces", Georgia, "Times New Roman", serif);
	font-size: 1.35rem;
	font-weight: 500;
	letter-spacing: 0.005em;
	line-height: 1;
}

.site-footer-tagline {
	margin: 1rem 0 0;
	font-family: var(--serif, "Fraunces", Georgia, "Times New Roman", serif);
	font-size: 1.15rem;
	line-height: 1.35;
	text-wrap: balance;
}

.site-footer-note {
	margin: 0.75rem 0 0;
	color: var(--ink-soft, #52524e);
	font-size: 0.92rem;
	line-height: 1.55;
}

.site-footer-copy {
	margin: 1.25rem 0 0;
	color: var(--ink-soft, #52524e);
	font-family: var(--mono, "IBM Plex Mono", Menlo, Consolas, monospace);
	font-size: 0.72rem;
	letter-spacing: 0.03em;
}

/* Column headings in the instrument voice, each with a short wire. */
.site-footer-heading {
	margin: 0 0 0.9rem;
	color: var(--ink-soft, #52524e);
	font-family: var(--mono, "IBM Plex Mono", Menlo, Consolas, monospace);
	font-size: 0.68rem;
	font-weight: 500;
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.site-footer-heading::after {
	content: "";
	display: block;
	width: 2rem;
	height: 2px;
	margin-top: 0.55rem;
	background: var(--wire, #2e5e2e);
}

.site-footer-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 0.55rem;
}

.site-footer-list a {
	color: var(--ink, #202020);
	font-size: 0.95rem;
	text-decoration: underline;
	text-decoration-color: var(--rule, #dddad2);
	text-decoration-thickness: 1.5px;
	text-underline-offset: 4px;
	transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

.site-footer-list a:hover,
.site-footer-list a:focus-visible {
	color: var(--wire, #2e5e2e);
	text-decoration-color: var(--wire, #2e5e2e);
}

/* A link marked current is the page being read. */
.site-footer-list a[aria-current] {
	color: var(--wire, #2e5e2e);
	text-decoration-color: var(--wire, #2e5e2e);
}

/* ---- The title block ---------------------------------------------- */
.site-title-block {
	display: flex;
	flex-wrap: wrap;
	margin: 0;
	border-top: 1.5px solid rgba(32, 32, 32, 0.55);
	background: var(--panel, #ffffff);
}

.site-title-block > div {
	/* Three cells to a row on a phone, all five in one row once there
	   is room. */
	flex: 1 1 6rem;
	padding: 0.5rem 1rem 0.55rem;
	border-right: 1px solid var(--rule, #dddad2);
	border-bottom: 1px solid var(--rule, #dddad2);
	min-width: 0;
}

.site-title-block dt {
	margin: 0;
	color: var(--ink-soft, #52524e);
	font-family: var(--mono, "IBM Plex Mono", Menlo, Consolas, monospace);
	font-size: 0.6rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.site-title-block dd {
	margin: 0;
	color: var(--ink, #202020);
	font-family: var(--mono, "IBM Plex Mono", Menlo, Consolas, monospace);
	font-size: 0.82rem;
	font-weight: 500;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ---- Two columns, the brand across the top ------------------------- */
@media (min-width: 40rem) {
	.site-footer-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		padding: 2.5rem 1.25rem 2.25rem;
	}

	.site-footer-brand {
		grid-column: 1 / -1;
	}

	.site-title-block > div {
		flex-basis: 8rem;
		border-bottom: 0;
	}

	.site-title-block > div:last-child {
		border-right: 0;
	}
}

/* ---- Three columns: brand, site, contact --------------------------- */
@media (min-width: 52rem) {
	.site-footer-grid {
		grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
		gap: 2rem 3rem;
		padding: 3rem 1.25rem 2.5rem;
	}

	.site-footer-brand {
		grid-column: auto;
	}
}

@media (min-width: 64rem) {
	.site-footer-grid {
		padding-left: 1.75rem;
		padding-right: 1.75rem;
	}

	.site-title-block > div {
		padding-left: 1.75rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.site-footer-list a {
		transition: none;
	}
}
