/**
 * Festival timings banner (homepage).
 *
 * Replaces the collapsed "Schedule" toggle with an always-visible statement.
 * Reuses the artwork and palette the toggle already used: Feather-scaled.jpg
 * and the #ed9321 orange, set in Montserrat like the rest of the page.
 *
 * The banner sits inside .ast-container, which is capped at 1240px, so it
 * breaks out of that to run the artwork the full width of the viewport while
 * its text stays aligned with the rest of the page.
 *
 * In the artwork the feather sits on the right and the left is empty pale
 * green, so the text sits left under a scrim that fades out towards the
 * right, leaving the feather visible.
 */

.festival-banner {
	--fb-accent: #ed9321;
	--fb-ink: #24352b;
	--fb-ink-soft: #55665b;
	--fb-wash: 238, 246, 228;

	/* Full-bleed: escape the 1240px container this sits inside. */
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);

	position: relative;
	overflow: hidden;
	background-color: rgb(var(--fb-wash));
	background-image: url("../../wp-content/uploads/2023/07/Feather-scaled.jpg");
	background-repeat: no-repeat;
	background-position: center right;
	background-size: cover;
	font-family: "Montserrat", sans-serif;
}

/*
 * The breakout above measures 100vw, which includes the scrollbar on
 * platforms that reserve space for it. Clip rather than hidden, so that
 * position:sticky elsewhere on the page keeps working.
 */
body {
	overflow-x: clip;
}

/* Fades the artwork out under the text, clearing towards the feather. */
.festival-banner::before {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to right,
		rgba(var(--fb-wash), 0.97) 0%,
		rgba(var(--fb-wash), 0.88) 45%,
		rgba(var(--fb-wash), 0.4) 72%,
		rgba(var(--fb-wash), 0) 90%
	);
}

.festival-banner__inner {
	position: relative; /* above the scrim */
	max-width: 1240px;
	margin: 0 auto;
	padding: 3.5rem 1.25rem;
}

/*
 * The date and headline stay in a narrow measure so they read well; the
 * timings below are free to use the full width of the banner.
 */
.festival-banner__date,
.festival-banner__headline {
	max-width: 44rem;
}

/* Date */
.festival-banner__date {
	display: inline-flex;
	align-items: center;
	gap: 0.6rem;
	margin: 0 0 0.9rem;
	color: var(--fb-accent);
	/* Scales down on narrow screens so it stops wrapping mid-phrase. */
	font-size: clamp(1.15rem, 0.7rem + 2vw, 2rem);
	font-weight: 700;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.festival-banner__date::before {
	content: "";
	width: 2.25rem;
	height: 2px;
	background: var(--fb-accent);
}

/* Headline: the darshan window */
.festival-banner__headline {
	margin: 0 0 2rem;
	color: var(--fb-ink);
	font-size: clamp(1.6rem, 1.1rem + 2.1vw, 2.6rem);
	font-weight: 700;
	line-height: 1.2;
}

.festival-banner__headline em {
	display: block;
	margin-bottom: 0.15em;
	color: var(--fb-ink-soft);
	font-size: 0.42em;
	font-style: normal;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

/* The timings */
.festival-banner__highlights {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(11.5rem, 1fr));
	gap: 0.85rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.festival-banner__highlights li {
	padding: 0.85rem 1.15rem;
	border-radius: 10px;
	border-left: 4px solid var(--fb-accent);
	background: rgba(255, 255, 255, 0.86);
	box-shadow: 0 1px 3px rgba(36, 53, 43, 0.09);
}

.festival-banner__label {
	display: block;
	color: var(--fb-ink-soft);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.festival-banner__time {
	display: block;
	margin-top: 0.2rem;
	color: var(--fb-ink);
	font-size: 1.15rem;
	font-weight: 700;
	white-space: nowrap;
}

@media (max-width: 880px) {
	/* Pull the feather clear of the text and even out the scrim. */
	.festival-banner {
		background-position: right -6rem center;
	}

	.festival-banner::before {
		background: linear-gradient(
			to right,
			rgba(var(--fb-wash), 0.96) 0%,
			rgba(var(--fb-wash), 0.82) 100%
		);
	}

	.festival-banner__inner {
		padding: 2.5rem 1.25rem;
	}
}

@media (max-width: 600px) {
	/*
	 * The rule before the date is decorative, and at this width the date
	 * wraps to two lines while the rule stays centred against the block,
	 * which reads as a stray mark. Drop it and tighten the tracking.
	 */
	.festival-banner__date::before {
		display: none;
	}

	.festival-banner__date {
		display: block;
		margin-bottom: 0.6rem;
		letter-spacing: 0.1em;
		line-height: 1.3;
	}

	.festival-banner__headline {
		margin-bottom: 1.5rem;
	}

	.festival-banner__headline em {
		font-size: 0.5em;
		letter-spacing: 0.1em;
	}

	/*
	 * One per row, laid out as name on the left and time on the right, so
	 * the times line up as a readable column instead of five stacked
	 * blocks each two lines tall.
	 */
	.festival-banner__highlights {
		grid-template-columns: 1fr;
		gap: 0.45rem;
	}

	.festival-banner__highlights li {
		display: flex;
		align-items: baseline;
		justify-content: space-between;
		gap: 1rem;
		padding: 0.7rem 0.9rem;
		border-radius: 8px;
	}

	.festival-banner__label {
		font-size: 0.78rem;
		letter-spacing: 0.06em;
	}

	.festival-banner__time {
		margin-top: 0;
		font-size: 1rem;
	}
}
