/* -----------------------------------------------------------------------------
 * The two utility templates: the generic page and 404.
 *
 * Both are deliberately thin. The hero, the accent variables, the cards, the
 * pathway grid, the section furniture and the editorial measure all come from
 * pages.css, components.css and editorial.css; nothing already defined there is
 * re-declared here. This file adds only what those two templates introduce.
 * -------------------------------------------------------------------------- */

/* ========================== Generic page ================================= */
/*
 * A generic page has no motif and no section furniture of its own — it is a
 * title and the editor's words. The hero keeps its faint radial ground so the
 * page still reads as part of the site rather than as an unstyled document.
 */
.uz-page--generic { --uz-page-accent: var(--uz-orbit-blue); }

.uz-page--generic .uz-page-hero { padding-block: clamp(2.75rem, 1.75rem + 5vw, 5.5rem); }

.uz-page--generic .uz-page-hero__title {
	font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4rem);
}

/*
 * The featured image, when a page has one. Same rule as the article hero: the
 * frame takes the picture's own proportions so there is neither a crop nor a
 * letterbox, and a portrait is capped so it cannot tower over the page.
 */
.uz-page-figure { margin: 0; padding-top: var(--uz-space-3xl); }

.uz-page-figure .uz-media {
	aspect-ratio: var(--uz-media-ratio, 16 / 10);
	border: 1px solid var(--uz-border);
	border-radius: var(--uz-radius-lg);
}

.uz-page-figure--portrait .uz-media {
	max-width: 30rem;
	margin-inline: auto;
}

.uz-page-figure__caption {
	margin-top: var(--uz-space-sm);
	font-size: var(--uz-text-sm);
	color: var(--uz-muted-text);
	text-align: center;
}

/* ================================= 404 =================================== */
/*
 * A distinct accent, so a reader who lands here can see at a glance that this
 * is not the page they asked for, without the page shouting about it.
 */
.uz-page--404 { --uz-page-accent: var(--uz-human-amber); }

.uz-page--404 .uz-page-hero__title {
	font-size: clamp(2.25rem, 1.5rem + 3.4vw, 4.25rem);
}

.uz-404__search {
	max-width: 30rem;
	margin-inline: auto;
}

/* The pathway section already carries the grid; it only needs its own edge. */
.uz-404__pathways { border-top: 1px solid var(--uz-border); }

/*
 * The game's "New Game" button ships white text on #e63b2e, which measures
 * 4.18:1 at 18px bold — just under the 4.5:1 WCAG 2.2 AA needs at that size
 * (large-text relief starts at 18.66px bold). The same hue is darkened by 5%
 * to #DA382C, which measures 4.58:1 and is visually indistinguishable.
 *
 * This is a contrast correction to third-party plugin styling, not a redesign,
 * and it is the only plugin colour this theme overrides. Delete this rule to
 * hand the button straight back to the plugin.
 */
.uz-entry__content .irezumi-2048 .btn.newgame {
	background: #DA382C;
}

/* ============================ Page gallery =============================== */
/*
 * The collection section on a page that is a gallery rather than an essay —
 * /art/ today. The grid, the cards, the media frames and the pagination are all
 * existing components; only this section's own furniture is defined here.
 */
.uz-gallery { border-top: 1px solid var(--uz-border); }

.uz-gallery__head { margin-bottom: var(--uz-space-2xl); max-width: 52ch; }

.uz-gallery__title { margin-bottom: var(--uz-space-sm); }

.uz-gallery__intro {
	color: var(--uz-muted-text);
	font-size: var(--uz-text-lg);
	margin-bottom: var(--uz-space-sm);
}

.uz-gallery__count {
	margin-bottom: 0;
	color: var(--uz-muted-text);
	font-family: var(--uz-font-heading);
	font-size: var(--uz-text-sm);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.uz-gallery__archive { margin-top: var(--uz-space-2xl); }

.uz-gallery__empty {
	padding-block: var(--uz-space-xl);
	color: var(--uz-muted-text);
	max-width: 46ch;
}
.uz-gallery__empty p:last-child { margin-bottom: 0; }
