/*
 * Light — its own stylesheet.
 *
 * Loaded after the shared `events.css`, only while Light draws the page. Every
 * background is a flat white — `--event-ground`, `--event-raised` and
 * `--event-sunk` all commit to `#fff` rather than being mixed from
 * `currentColor` against the page's own ground. Borders and shadows are left
 * to `events.css`: they are mixed from `currentColor` at a low alpha, so a
 * white card still reads as bounded on a white page.
 *
 * Contents
 *   1. Tokens    3. The banner    5. The cards    7. The pager
 *   2. Pictures  4. The search    6. Badges       8. Less motion
 */

/* -- 1. Tokens --------------------------------------------------------------- */

/*
 * `.events-archive--light *`, not only the archive: `events.css` sets these
 * same properties again on some of its own pieces, and a custom property set
 * on an element beats one it would only inherit.
 */
.events-archive--light,
.events-archive--light * {
	--event-ground: #fff;
	--event-raised: #fff;
	--event-sunk: #fff;
}

.events-archive--light {
	/* The Forms default's blue, so the list and the registration forms agree. */
	--event-accent: #2563eb;
	--light-gap: clamp(1rem, 2.5vw, 1.5rem);

	/* One badge's height: its 0.8rem type at 1.2, its padding, its border. */
	--light-pill: calc(0.8rem * 1.2 + 0.6rem + 2px);
	--light-tint: color-mix(in srgb, var(--event-accent) 12%, #fff);
	--light-tint-soft: color-mix(in srgb, var(--event-accent) 4%, #fff);
	--light-shadow-lift: 0 2px 4px color-mix(in srgb, currentColor 6%, transparent), 0 16px 32px -18px color-mix(in srgb, currentColor 35%, transparent);
}

.events-archive--light *,
.events-archive--light *::before,
.events-archive--light *::after {
	box-sizing: border-box;
}

/* -- 2. Pictures ------------------------------------------------------------- */

/* Every picture fills its frame, whatever its own shape. */
.events-archive--light :is(.light-card__media, .light-slide__media) img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	border-radius: 0;
}

/* An event with no picture: a soft wash of the accent and a calendar. */
.light-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, var(--light-tint), var(--light-tint-soft));
	color: color-mix(in srgb, var(--event-accent) 55%, #fff);
}

.light-placeholder svg {
	width: clamp(2.25rem, 18%, 3.5rem);
	height: auto;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.5;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/*
 * The sponsorship mark: a white disc in the picture's top right corner, a gold
 * medal on it. The words are for a screen reader (and a pointer's tooltip).
 */
.light-card__media,
.light-slide__media {
	position: relative;
}

.light-sponsor {
	position: absolute;
	top: 0.6rem;
	right: 0.6rem;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 2px rgb(15 23 42 / 0.12), 0 6px 14px -6px rgb(15 23 42 / 0.4);
	color: #b7791f;
}

.light-slide__media .light-sponsor {
	top: 0.9rem;
	right: 0.9rem;
	width: 2.75rem;
	height: 2.75rem;
}

.light-sponsor svg {
	width: 62%;
	height: 62%;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.7;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.light-sponsor svg path:nth-of-type(1) {
	fill: currentColor;
	stroke: none;
}

.light-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}

/* -- 3. The banner ----------------------------------------------------------- */

.light-banner {
	margin-bottom: clamp(2rem, 5vw, 3rem);
}

.light-banner__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem 1rem;
	margin-bottom: 0.9rem;
}

.events-archive--light .light-banner__title,
.events-archive--light .light-list__title {
	margin: 0;
	font-size: 1.25rem;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.01em;
}


.light-banner__controls {
	display: flex;
	align-items: center;
	gap: 0.25rem;
}

.light-banner__controls[hidden] {
	display: none;
}

.light-banner__dots {
	display: flex;
}

/* Buttons of this page's own: a theme's button look is reset, not inherited. */
.events-archive--light .light-banner__arrow,
.events-archive--light .light-banner__dot {
	display: inline-grid;
	place-items: center;
	margin: 0;
	padding: 0;
	border: 0;
	background: none;
	box-shadow: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.events-archive--light .light-banner__arrow {
	width: 44px;
	height: 44px;
	border: 1px solid var(--event-line);
	border-radius: 50%;
	background: #fff;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.events-archive--light .light-banner__arrow:hover {
	border-color: var(--event-accent);
	color: var(--event-accent);
}

.light-banner__arrow svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

/* A dot is 44px tall to press, and draws an 8px one — the current one a bar. */
.events-archive--light .light-banner__dot {
	width: 24px;
	height: 44px;
}

.light-banner__dot::before {
	content: '';
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: var(--event-line-strong);
	transition: width 0.2s ease, background 0.2s ease;
}

.light-banner__dot[aria-current='true']::before {
	width: 20px;
	background: var(--event-accent);
}

.events-archive--light :is(.light-banner__arrow, .light-banner__dot):focus-visible {
	outline: 2px solid var(--event-accent);
	outline-offset: 2px;
}

/* One slide to a view, swiped or scrolled — and stepped by the controls. */
.light-banner__track {
	position: relative;
	display: flex;
	overflow-x: auto;
	overscroll-behavior-x: contain;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	scrollbar-width: none;
	border-radius: var(--event-radius);
}

.light-banner__track::-webkit-scrollbar {
	display: none;
}

.light-slide {
	flex: 0 0 100%;
	min-width: 0;
	scroll-snap-align: start;
}

.events-archive--light .light-slide__link {
	display: grid;
	grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
	height: 100%;
	min-height: clamp(18rem, 30vw, 24rem);
	overflow: hidden;
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius);
	background: #fff;
	color: inherit;
	text-decoration: none;
}

.light-slide__media {
	position: relative;
	display: block;
	min-height: 100%;
	overflow: hidden;
}

.events-archive--light .light-slide__media img,
.light-slide__media .light-placeholder {
	position: absolute;
	inset: 0;
}

.light-slide__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 0.55rem;
	min-width: 0;
	padding: clamp(1.25rem, 3.5vw, 2.5rem);
}

.light-slide__when {
	color: var(--event-accent);
	font-size: 0.85rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.light-slide__title {
	display: -webkit-box;
	overflow: hidden;
	font-size: clamp(1.5rem, 2.8vw, 2.25rem);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.light-slide__where {
	color: var(--event-soft);
	font-weight: 600;
}

.light-slide__excerpt {
	display: -webkit-box;
	overflow: hidden;
	color: var(--event-soft);
	line-height: 1.55;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.light-slide__cta {
	display: inline-flex;
	align-self: flex-start;
	margin-top: 0.6rem;
	align-items: center;
	min-height: 44px;
	padding-inline: 1.25rem;
	border-radius: 999px;
	background: var(--event-accent);
	color: #fff;
	font-weight: 650;
	transition: filter 0.15s ease;
}

.light-slide__link:hover .light-slide__cta {
	filter: brightness(1.1);
}


/* A phone: the picture above the words, and a shorter summary. */
@media (max-width: 720px) {
	.events-archive--light .light-slide__link {
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr;
		min-height: 0;
	}

	.light-slide__media {
		aspect-ratio: 16 / 9;
		min-height: 0;
	}

	.light-slide__body {
		justify-content: flex-start;
	}

	.light-slide__excerpt {
		-webkit-line-clamp: 2;
		line-clamp: 2;
	}
}

/* -- 4. The search ----------------------------------------------------------- */

/*
 * The list's heading, then the search: a name, a date and a button in one
 * white bar — on a phone the name across the top, the date and the button
 * under it.
 */
.light-list__head {
	display: grid;
	gap: 0.9rem;
	margin-bottom: var(--light-gap);
}

.light-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 0.75rem;
	margin: 0;
	padding: 0.9rem;
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius);
	background: #fff;
	box-shadow: var(--event-shadow);
}

.light-search__field {
	display: grid;
	gap: 0.3rem;
	min-width: 0;
	margin: 0;
}

.light-search__field--name {
	flex: 1 1 16rem;
}

.light-search__field--date {
	flex: 0 1 12rem;
}

.light-search__label {
	color: var(--event-soft);
	font-size: 0.8rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

/* The theme's own field look is reset: one height, one border, 16px so a phone does not zoom. */
.events-archive--light .light-search input {
	width: 100%;
	min-width: 0;
	height: 44px;
	margin: 0;
	padding: 0 0.85rem;
	border: 1px solid var(--event-line-strong);
	border-radius: var(--event-radius-sm);
	background: #fff;
	box-shadow: none;
	color: inherit;
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
}

.events-archive--light .light-search input:focus-visible {
	outline: none;
	border-color: var(--event-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--event-accent) 18%, transparent);
}

.light-search__actions {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.events-archive--light .light-search__go {
	height: 44px;
	margin: 0;
	padding: 0 1.4rem;
	border: 0;
	border-radius: var(--event-radius-sm);
	background: var(--event-accent);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-weight: 650;
	cursor: pointer;
}

.events-archive--light .light-search__go:hover {
	filter: brightness(1.1);
}

.events-archive--light .light-search__go:focus-visible {
	outline: 2px solid var(--event-accent);
	outline-offset: 2px;
}

.events-archive--light .light-search__clear {
	color: var(--event-soft);
	font-size: 0.9rem;
	text-decoration: underline;
	text-underline-offset: 0.2em;
}

@media (max-width: 560px) {
	.light-search__field--name {
		flex-basis: 100%;
	}

	.light-search__field--date {
		flex: 1 1 8rem;
	}
}

/* -- 5. The cards ------------------------------------------------------------ */

/* A section per month: its name, a hairline running on from it, its cards. */
.light-month + .light-month {
	margin-top: clamp(2rem, 5vw, 3rem);
}

.events-archive--light .light-month__title {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 0 0 1rem;
	font-size: 1.05rem;
	font-weight: 650;
	line-height: 1.3;
	letter-spacing: -0.005em;
}

.light-month__title::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--event-line);
}

/*
 * One size, one gap. The columns are all one width (as many as fit at 16.5rem,
 * one on a phone), every ROW is the height of the tallest (`grid-auto-rows:
 * 1fr`), and the gap is the same across and down. Each month is a grid of its
 * own, so the card keeps its OWN room for everything that may or may not be
 * there — two lines of name, a line of address, three of summary, two rows of
 * badges — and is the same size in one month as in the next. Only an event
 * whose badges run to a third row is taller, and its month with it.
 */
.events-archive--light .light-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
	grid-auto-rows: 1fr;
	gap: var(--light-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.events-archive--light .light-card {
	display: flex;
	min-width: 0;
	margin: 0;
	padding: 0;
}

.events-archive--light .light-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid var(--event-line);
	border-radius: var(--event-radius);
	background: #fff;
	box-shadow: var(--event-shadow);
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.events-archive--light .light-card__link:hover {
	box-shadow: var(--light-shadow-lift);
	transform: translateY(-2px);
}

.events-archive--light :is(.light-card__link, .light-slide__link):focus-visible {
	outline: 2px solid var(--event-accent);
	outline-offset: 3px;
}

.light-card__media {
	display: block;
	flex: none;
	aspect-ratio: 16 / 10;
	overflow: hidden;
}

.light-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 0.3rem;
	min-width: 0;
	padding: 1rem 1.1rem 1.1rem;
}

.light-card__title {
	display: -webkit-box;
	min-height: calc(2 * 1.3em);
	overflow: hidden;
	font-size: 1.1rem;
	font-weight: 650;
	line-height: 1.3;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.light-card__when {
	color: var(--event-accent);
	font-size: 0.875rem;
	font-weight: 650;
}

.light-card__where {
	min-height: 1.4em;
	overflow: hidden;
	line-height: 1.4;
	color: var(--event-soft);
	font-size: 0.875rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.light-card__excerpt {
	display: -webkit-box;
	overflow: hidden;
	margin-top: 0.2rem;
	color: var(--event-soft);
	font-size: 0.875rem;
	line-height: 1.5;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
	min-height: calc(3 * 1.5em);
}

/* The badges sit at the card's foot, in room for two rows of them. */
.light-card__body .light-passes {
	align-content: flex-end;
	min-height: calc(0.6rem + 2 * var(--light-pill) + 0.35rem);
	margin-top: auto;
	padding-top: 0.6rem;
}

/*
 * A phone: one card to a row, so each is a line rather than a poster — the
 * picture a square on the left, the words beside it, no summary. Still one
 * size, and a list of twenty is a short scroll rather than a long one.
 */
@media (max-width: 560px) {
	.events-archive--light .light-grid {
		gap: 0.75rem;
	}

	.events-archive--light .light-card__link {
		flex-direction: row;
	}

	.light-card__media {
		width: 6.5rem;
		aspect-ratio: auto;
		align-self: stretch;
	}

	.light-card__media .light-placeholder svg {
		width: 1.75rem;
	}

	.light-card__body {
		gap: 0.2rem;
		padding: 0.75rem 0.9rem;
	}

	.light-card__title {
		font-size: 1rem;
	}

	.light-card__excerpt {
		display: none;
	}

	.light-card__body .light-passes {
		min-height: calc(0.35rem + 2 * var(--light-pill) + 0.35rem);
		padding-top: 0.35rem;
	}
}

/* -- 6. Badges --------------------------------------------------------------- */

/* A pass: its name, then its price on a tint of the accent — one pill. */
.light-passes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.light-pass {
	display: inline-flex;
	align-items: stretch;
	max-width: 100%;
	overflow: hidden;
	border: 1px solid var(--event-line);
	border-radius: 999px;
	background: #fff;
	font-size: 0.8rem;
	line-height: 1.2;
}

.light-pass__name,
.light-pass__price,
.light-pass--more {
	padding: 0.3rem 0.6rem;
}

.light-pass__name {
	min-width: 0;
	overflow: hidden;
	color: var(--event-soft);
	text-overflow: ellipsis;
	white-space: nowrap;
}

.light-pass__price {
	flex: none;
	background: var(--light-tint);
	color: color-mix(in srgb, var(--event-accent) 80%, #000);
	font-weight: 650;
	white-space: nowrap;
}

.light-pass--more {
	color: var(--event-soft);
}

.light-slide__body .light-pass {
	font-size: 0.875rem;
}

.light-empty {
	margin: 0;
	padding: 2.5rem 1rem;
	border: 1px dashed var(--event-line-strong);
	border-radius: var(--event-radius);
	color: var(--event-soft);
	text-align: center;
}

/* -- 7. The pager ------------------------------------------------------------ */

.events-archive--light .events-pager__link {
	color: inherit;
}

/* -- 8. Less motion ---------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.light-banner__track {
		scroll-behavior: auto;
	}

	.events-archive--light .light-card__link,
	.light-banner__dot::before {
		transition: none;
	}

	.events-archive--light .light-card__link:hover {
		transform: none;
	}
}
