/*
 * The margin grid. A narrow column carries the date and the passages a piece
 * rests on; the wide column carries the text. Below 720px the margin moves
 * above the text and takes a left rule instead of a right one.
 */

.alight-row {
	display: grid;
	grid-template-columns: 168px 1fr;
	gap: 0 36px;
	align-items: start;
}

.alight-row__aside {
	font-size: 0.86rem;
	line-height: 1.5;
	color: var(--wp--preset--color--muted);
	text-align: end;
	padding-block-start: 6px;
	padding-inline-end: 18px;
	border-inline-end: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 32%, transparent);
}

.alight-row__aside p { margin: 0 0 10px; }
.alight-row__aside p:last-child { margin-block-end: 0; }
.alight-row__aside .wp-block-post-date { color: var(--wp--preset--color--ink); font-weight: 600; }
.alight-row__aside a { color: inherit; }

/*
 * The measure is capped here rather than by a constrained block layout.
 * A constrained layout centres its children in the available width, which
 * left the text floating in the middle of its own column.
 */
.alight-row__body { max-inline-size: 64ch; }
.alight-row__body > * { max-inline-size: 100%; }
.alight-row__body > :first-child { margin-block-start: 0; }

/* A section heading sits on a heavy rule, the way a running head does. */
.alight-sechead {
	border-block-start: 2px solid var(--wp--preset--color--ink);
	padding-block-start: 12px;
}

.alight-post {
	padding-block: 28px;
	border-block-end: 1px solid color-mix(in srgb, var(--wp--preset--color--muted) 32%, transparent);
}

@media (max-width: 720px) {
	.alight-row {
		grid-template-columns: 1fr;
		gap: 14px;
	}
	.alight-row__aside {
		text-align: start;
		padding-inline-end: 0;
		border-inline-end: 0;
		padding-inline-start: 14px;
		border-inline-start: 2px solid color-mix(in srgb, var(--wp--preset--color--muted) 32%, transparent);
	}
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------------------------------------------------------------------------
 * Image bands.
 *
 * Deliberately shallow. This is a reading site, and a tall image at the top of
 * every page pushes the writing below the fold, which is the opposite of what
 * the design is for. The band sets its own height by aspect ratio so nothing
 * shifts while the image loads.
 * ------------------------------------------------------------------------ */

.alight-band,
.alight-hero {
	position: relative;
	overflow: hidden;
	background: color-mix(in srgb, var(--wp--preset--color--muted) 12%, var(--wp--preset--color--paper));
}

.alight-band img,
.alight-hero img {
	display: block;
	inline-size: 100%;
	block-size: 100%;
	object-fit: cover;
	/* The generated landscapes carry their subject low, so favour the lower
	   part of the frame when the crop is tight. */
	object-position: 50% 62%;
}

.alight-hero {
	aspect-ratio: 21 / 7;
	margin-block-start: var(--wp--preset--spacing--m);
}

.alight-band {
	aspect-ratio: 21 / 6;
	margin-block-start: var(--wp--preset--spacing--m);
}

/* Phones get a squarer crop, because a 21:6 strip on a narrow screen is a
   sliver that reads as a rendering fault rather than a photograph. */
@media (max-width: 720px) {
	.alight-hero { aspect-ratio: 16 / 9; }
	.alight-band { aspect-ratio: 3 / 2; }
}

/* A caption sits under the band in the margin column's voice, not over the
   image, so it never fights the photograph for contrast. */
.alight-band__note {
	margin-block-start: 8px;
	font-size: 0.8rem;
	color: var(--wp--preset--color--muted);
}

/* An editorial note: text that is scaffolding and must be replaced before the
   site goes public. Deliberately conspicuous, so it cannot be published by
   accident. */
.alight-note {
	border-inline-start: 3px solid var(--wp--preset--color--blue);
	background: color-mix(in srgb, var(--wp--preset--color--blue) 6%, var(--wp--preset--color--paper));
	padding: 14px 18px;
	margin-block: var(--wp--preset--spacing--m);
	font-size: 0.92rem;
}
.alight-note > :first-child { margin-block-start: 0; }
.alight-note > :last-child  { margin-block-end: 0; }

/* The mark sits on the same baseline as the wordmark beside it. */
.alight-mark { display: block; flex: none; }
.alight-wordmark {
	display: flex;
	align-items: flex-end;
	gap: 11px;
}
.alight-wordmark .wp-block-site-title { margin: 0; line-height: 1; }
