/*
	The subject hub: one page per genre, one per story type. Loads after tokens.css and
	news.css (pageStyles: [tokens, news, hub]), so the masthead, the wrap and the tag-row
	grammar arrive from news.css and this file only styles what the page adds: the hub
	header and the story list, each row wearing the same colour family its home card wears.

	It is the artist tag page's layout with a different subject, and it is written to stay
	that way: same measure, same header rhythm, same rows. The one thing a hub adds is the
	kicker's colour, which a type hub takes from its family so the page reads as the same
	thing the cards below it are. A genre hub sends "house" and lands on the default here,
	because a genre holds every type at once and one type's hue would misdescribe it.

	Keyboard hyphen only, sentence-case, no BEM: descriptive names and native nesting.
*/

.hub-main {
	padding-block-end: clamp(3rem, 7vw, 5.5rem);
}

.hub-inner {
	max-width: 44rem;
	margin-inline: auto;
	padding-block-start: clamp(1.75rem, 4vw, 2.75rem);
}

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

.hub-head {
	--head-accent: var(--accent-text);

	padding-block-end: clamp(1.5rem, 3vw, 2.25rem);
	border-block-end: 1px solid var(--hairline);
	margin-block-end: clamp(1.5rem, 3vw, 2.25rem);
}

.hub-head[data-accent='tour'] {
	--head-accent: var(--tracker-tour-text);
}

.hub-head[data-accent='festival'] {
	--head-accent: var(--tracker-festival-text);
}

.hub-head[data-accent='award'] {
	--head-accent: var(--tracker-award-text);
}

.hub-head[data-accent='band'] {
	--head-accent: var(--type-band-text);
}

.hub-head[data-accent='industry'] {
	--head-accent: var(--type-industry-text);
}

.hub-head[data-accent='new'] {
	--head-accent: var(--type-new-text);
}

/* The obituaries hub stays matte, the way a death notice does everywhere else. */
.hub-head[data-accent='matte'] {
	--head-accent: var(--type-matte-text);
}

.hub-kicker {
	font-family: var(--font-display);
	font-size: 0.72rem;
	letter-spacing: 0.13em;
	text-transform: uppercase;
	color: var(--head-accent);
}

.hub-label {
	margin-block-start: 0.4rem;
	font-family: var(--font-display);
	font-size: clamp(1.9rem, 5vw, 3.15rem);
	font-weight: 400;
	line-height: 1.02;
	letter-spacing: -0.03em;
	color: var(--text);
	text-wrap: balance;
}

.hub-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	column-gap: 1rem;
	row-gap: 0.4rem;
	margin-block-start: 0.9rem;
}

.hub-count {
	font-family: var(--font-mono);
	font-size: 0.82rem;
	letter-spacing: 0.02em;
	font-variant-numeric: tabular-nums;
	color: var(--muted);
}

/* The subscribe surface, the artist page's button in the same place at the same weight.
   Inked in the house accent rather than the hub's family: it is the action on the page,
   and a type hub tinting its own button would set the action's colour by subject. The
   icon is the conventional feed mark, the words carry the meaning. */
.hub-feed {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	font-family: var(--font-display);
	font-size: 0.78rem;
	letter-spacing: 0.11em;
	text-transform: uppercase;
	color: var(--accent-text);
	text-decoration: none;
	border: 1px solid var(--hairline-bright);
	padding: 0.4rem 0.7rem;

	.icon {
		font-size: 0.85rem;
	}

	&:hover {
		border-color: var(--accent);
		color: var(--text);
	}
}

/* The obituaries hub keeps its restraint on the button too: no orange on a page of
   death notices, matching the matte kicker above it. */
.hub-head[data-accent='matte'] .hub-feed {
	color: var(--type-matte-text);

	&:hover {
		border-color: var(--muted);
		color: var(--text);
	}
}

/* One line under the count, and on an empty hub it is the whole page body: the honest
   sentence that says nothing has been filed here yet. */
.hub-note {
	margin-block-start: 1rem;
	font-size: 0.95rem;
	line-height: 1.55;
	color: var(--muted);
	max-width: 52ch;
}

/* ---------------------------------------------------------------- the stories */

.hub-stories {
	display: grid;
	gap: 0.85rem;
}

/* One row per story, the whole row one link, wearing the story's colour family the
   same way its home card does: a tinted panel with the type's ink on the leading edge. */
.hub-story {
	--row-accent: var(--accent);
	--row-accent-text: var(--accent-text);

	display: block;
	padding: 1rem 1.05rem;
	background: color-mix(in srgb, var(--row-accent) 3%, var(--panel));
	border: 1px solid color-mix(in srgb, var(--row-accent) 22%, var(--hairline));
	border-inline-start: 3px solid var(--row-accent);
	border-radius: 2px;
	text-decoration: none;

	&:hover {
		border-color: color-mix(in srgb, var(--row-accent) 45%, var(--hairline));
	}

	.tag-type {
		color: var(--row-accent-text);
	}
}

.hub-story[data-accent='tour'] {
	--row-accent: var(--tracker-tour);
	--row-accent-text: var(--tracker-tour-text);
}

.hub-story[data-accent='festival'] {
	--row-accent: var(--tracker-festival);
	--row-accent-text: var(--tracker-festival-text);
}

.hub-story[data-accent='award'] {
	--row-accent: var(--tracker-award);
	--row-accent-text: var(--tracker-award-text);
}

.hub-story[data-accent='band'] {
	--row-accent: var(--type-band);
	--row-accent-text: var(--type-band-text);
}

.hub-story[data-accent='industry'] {
	--row-accent: var(--type-industry);
	--row-accent-text: var(--type-industry-text);
}

.hub-story[data-accent='new'] {
	--row-accent: var(--type-new);
	--row-accent-text: var(--type-new-text);
}

/* A death story stays matte here as everywhere: no tint, no colour on its edge. */
.hub-story[data-accent='matte'] {
	--row-accent: var(--type-matte);
	--row-accent-text: var(--type-matte-text);

	background: var(--panel);
}

.hub-story-headline {
	margin-block-start: 0.55rem;
	font-family: var(--font-display);
	font-size: clamp(1.15rem, 2.4vw, 1.5rem);
	font-weight: 400;
	line-height: 1.15;
	letter-spacing: -0.02em;
	color: var(--text);
	text-wrap: balance;
}

.hub-story:hover .hub-story-headline {
	color: var(--row-accent-text);
}

.hub-story-dek {
	margin-block-start: 0.45rem;
	font-size: 0.95rem;
	line-height: 1.5;
	color: var(--muted);
	max-width: 52ch;
}

/* A 34px box is a fine mouse target and a poor thumb one; the type scale stays where it
   is and only the box grows (audited 2026-08-28). */
@media (width < 64rem) {
	.hub-feed {
		min-height: 2.5rem;
	}
}
