/**
 * Home page sections.
 *
 * Layers on top of group-pages.css, which supplies the design tokens and the
 * shared components (buttons, section headings, cards). Nothing here redefines
 * a token: the palette lives in one place so the home page and the group pages
 * cannot drift apart.
 *
 * Page rhythm alternates light and burgundy so the eye has somewhere to rest:
 *   header (gradient) -> hero (tint) -> next up (white) -> groups (white)
 *   -> support (burgundy) -> news (white) -> footer (burgundy)
 */

/* ---------- Cover photo ---------- */

/*
 * Full-bleed cover band above the hero. Height is clamped to the 300-400px
 * band that was asked for, and the image is cropped rather than distorted, so
 * any photo Kay uploads sits correctly whatever its proportions.
 */
.csmb-cover {
	margin-bottom: 0;
	border-top: 5px solid var(--csmb-accent);
	border-radius: var(--csmb-radius) var(--csmb-radius) 0 0;
	overflow: hidden;
	background: var(--csmb-surface);
}

.csmb-cover__img {
	display: block;
	width: 100%;
	height: clamp(300px, 32vw, 400px);
	object-fit: cover;
	object-position: center;
}

/* The cover already carries the top rule, so the hero drops its own.
   Doubled class (0,2,0) so it wins over `.csmb-hero` (0,1,0) regardless of the
   order the two rules appear in this file. */
.csmb-hero.csmb-hero--under-cover {
	border-top: 0;
	border-radius: 0 0 var(--csmb-radius) var(--csmb-radius);
}

@media (max-width: 600px) {
	.csmb-cover__img {
		height: clamp(200px, 46vw, 300px);
	}
}

/* ---------- Hero ---------- */

.csmb-hero {
	margin-bottom: var(--csmb-section-gap);
	border-top: 5px solid var(--csmb-accent);
	border-radius: 0 0 var(--csmb-radius) var(--csmb-radius);
	/* Echoes the header band, which runs white on the left to burgundy on the
	   right. Keeps the copy on a near-white field and puts the color in the
	   space beside it. */
	background: linear-gradient(100deg, #fff 0%, #fff 42%, var(--csmb-accent-tint) 100%);
}

.csmb-hero__inner {
	padding: clamp(2rem, 5vw, 3.75rem) clamp(1.25rem, 4vw, 3rem);
	max-width: 46rem;
}

/* ---------- Hero image ---------- */

/*
 * Only the hero WITH an image becomes a two-column row. With no image the
 * section is left exactly as it was before this field existed: the text block
 * stays in its original left column at its original width, and the space to its
 * right simply stays empty. No container is emitted when nothing is chosen, so
 * there is nothing holding the gap open either.
 */
.csmb-hero--has-image {
	display: flex;
	align-items: center;
	gap: clamp(1rem, 3vw, 2.5rem);
}

.csmb-hero--has-image .csmb-hero__inner {
	flex: 1 1 46rem;
}

.csmb-hero__media {
	flex: 1 1 34%;
	align-self: stretch;
	display: flex;
	align-items: center;
	padding: clamp(1rem, 2.5vw, 2rem) clamp(1.25rem, 3vw, 2.5rem) clamp(1rem, 2.5vw, 2rem) 0;
}

.csmb-hero__img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: var(--csmb-radius);
}

@media (max-width: 860px) {
	/*
	 * Stack, image below the text. Capped so it cannot push the headline off
	 * the first screen on a phone.
	 */
	.csmb-hero--has-image {
		display: block;
	}

	.csmb-hero__media {
		padding: 0 clamp(1.25rem, 4vw, 3rem) clamp(1.5rem, 4vw, 2.5rem);
	}

	.csmb-hero__img {
		max-height: 42vh;
		object-fit: cover;
	}
}

.csmb-hero__eyebrow {
	margin: 0 0 0.9rem;
	color: var(--csmb-accent);
	font-size: 0.76rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.csmb-hero__title {
	margin: 0;
	font-size: clamp(2.1rem, 5.4vw, 3.4rem);
	font-weight: 700;
	line-height: 1.08;
	letter-spacing: -0.02em;
}

.csmb-hero__text {
	margin: 1.15rem 0 0;
	max-width: 40ch;
	font-size: clamp(1.05rem, 2.1vw, 1.22rem);
	line-height: 1.65;
}

.csmb-hero__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 1.9rem 0 0;
}

.csmb-hero__meta {
	margin: 1.6rem 0 0;
	padding-top: 1.1rem;
	border-top: 1px solid rgba(139, 35, 50, 0.18);
	/* Not --csmb-muted: on the tinted end of the hero gradient that measures
	   4.48:1, just under AA. This tone clears it on tint and on white. */
	color: #646464;
	font-size: 0.85rem;
	letter-spacing: 0.02em;
}

.csmb-hero__meta span {
	margin: 0 0.45rem;
	color: var(--csmb-accent);
}

/* ---------- Featured event ---------- */

.csmb-featured {
	display: grid;
	grid-template-columns: auto 1fr;
	gap: clamp(1.25rem, 3vw, 2rem);
	align-items: start;
	padding: clamp(1.25rem, 3vw, 1.9rem);
	border: 1px solid var(--csmb-line);
	border-left: 5px solid var(--csmb-accent);
	border-radius: var(--csmb-radius);
	background: #fff;
}

.csmb-featured__date {
	min-width: 6.2rem;
	padding: 0.9rem 0.7rem;
	border-radius: var(--csmb-radius);
	background: var(--csmb-accent);
	color: #fff;
	text-align: center;
	line-height: 1.1;
}

.csmb-featured__day {
	display: block;
	font-size: 1.35rem;
	font-weight: 700;
}

.csmb-featured__year {
	display: block;
	margin-top: 0.2rem;
	font-size: 0.8rem;
	opacity: 0.85;
}

.csmb-featured__title {
	margin: 0;
	font-size: clamp(1.25rem, 2.6vw, 1.6rem);
	font-weight: 700;
	line-height: 1.25;
}

.csmb-featured__meta {
	margin: 0.5rem 0 0;
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	color: var(--csmb-muted);
	font-size: 0.92rem;
}

.csmb-featured__venue::before {
	content: "\00b7";
	margin-right: 0.85rem;
	color: var(--csmb-line);
}

.csmb-featured__text {
	margin: 0.9rem 0 0;
	max-width: 62ch;
	line-height: 1.65;
}

.csmb-featured__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.9rem 1.4rem;
	margin: 1.4rem 0 0;
}

/* ---------- Group quick links ---------- */

.csmb-grouplinks {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(258px, 1fr));
	margin: 0;
	padding: 0;
	list-style: none;
}

.csmb-grouplink {
	display: flex;
}

.csmb-grouplink__link {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 1.35rem 1.35rem 3rem;
	border: 1px solid var(--csmb-line);
	border-top: 3px solid var(--csmb-accent);
	border-radius: var(--csmb-radius);
	background: #fff;
	color: inherit;
	text-decoration: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.csmb-grouplink__link:hover,
.csmb-grouplink__link:focus-visible {
	border-color: #d2d2d2;
	border-top-color: var(--csmb-accent);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.07);
	transform: translateY(-2px);
}

.csmb-grouplink__name {
	font-size: 1.1rem;
	font-weight: 700;
	color: var(--csmb-ink);
	line-height: 1.25;
}

.csmb-grouplink__season {
	margin-top: 0.4rem;
	color: var(--csmb-accent);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.4;
}

.csmb-grouplink__text {
	margin-top: 0.8rem;
	font-size: 0.93rem;
	line-height: 1.6;
	color: var(--csmb-body);
}

.csmb-grouplink__cue {
	position: absolute;
	left: 1.35rem;
	bottom: 1.25rem;
	color: var(--csmb-accent);
	font-size: 1.15rem;
	line-height: 1;
	transition: transform 0.15s ease;
}

.csmb-grouplink__link:hover .csmb-grouplink__cue,
.csmb-grouplink__link:focus-visible .csmb-grouplink__cue {
	transform: translateX(4px);
}

/* ---------- Responsive ---------- */

@media (max-width: 600px) {
	.csmb-featured {
		grid-template-columns: 1fr;
	}

	.csmb-featured__date {
		justify-self: start;
		min-width: 0;
		padding: 0.6rem 1.1rem;
	}

	.csmb-hero__actions .csmb-button {
		width: 100%;
		text-align: center;
	}
}
