/**
 * TiorAI section head — the shared archive section title treatment.
 *
 * One voice for every section that opens a block of an archive. Strong enough
 * that a section reads as a section rather than as a caption, quiet enough that
 * it never competes with the page H1 above it.
 *
 * Scale is the differentiator against the old treatment: the three discovery
 * sections were each drawing a 14px/600 label, which at 8px of separation read as
 * one list with captions. This is ~1.25rem and primary-toned, so the eye stops.
 *
 * @package TiorAI
 */

.tr-sectionhead {
	margin: 0 0 var(--space-6);
}

.tr-sectionhead--center {
	max-width: 62ch;
	margin-inline: auto;
	text-align: center;
}

.tr-sectionhead--start {
	text-align: left;
}

/*
 * Optional kicker. Used sparingly and never as section grammar — a tiny tracked
 * label above EVERY heading is AI scaffolding, so this is opt-in and the prompt
 * archive uses it on none of its three sections.
 */
.tr-sectionhead__eyebrow {
	margin: 0 0 var(--space-2);
	font-size: var(--font-size-xs);
	font-weight: var(--font-weight-semibold);
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--color-primary);
}

.tr-sectionhead__title {
	margin: 0;
	font-family: var(--font-family-heading);
	font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.375rem);
	font-weight: var(--font-weight-bold);
	line-height: var(--line-height-tight);
	letter-spacing: -0.015em;
	color: var(--color-text-primary);
}

/*
 * The deck. Capped at 58ch rather than inheriting the head's 62ch: a supporting
 * sentence set to the same measure as its title reads as a second title, and the
 * shorter measure is what makes it read as support.
 */
.tr-sectionhead__deck {
	max-width: 58ch;
	margin: var(--space-2) 0 0;
	font-size: var(--font-size-sm);
	line-height: var(--line-height-relaxed);
	color: var(--color-text-secondary);
}

.tr-sectionhead--center .tr-sectionhead__deck {
	margin-inline: auto;
}

@media (max-width: 640px) {
	/* Centred text is harder to scan the narrower it gets, and at phone widths a
	   two-line deck centred under a two-line title is four ragged edges. Every
	   section head goes left-aligned below this width regardless of its setting. */
	.tr-sectionhead--center {
		text-align: left;
		margin-inline: 0;
	}

	.tr-sectionhead--center .tr-sectionhead__deck {
		margin-inline: 0;
	}
}
