/*
 * Light Custom — the catalogue's own stylesheet.
 *
 * Loaded after the shared `events.css`, only while this template draws the
 * page. Light's markup in the site theme's look (JHLC), as the event page's
 * Light Custom has it: a light grey page, white square cards with no frame,
 * Tilda Sans, centred headings over a short green mark, the teal pill for a
 * button, green only for small accent marks. One column, the event page's
 * 1040px.
 *
 * Contents
 *   1. Tokens       4. The banner    7. Badges
 *   2. The page     5. The search    8. The pager
 *   3. Pictures     6. The cards     9. Less motion
 */

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

/*
 * Everything a site is likely to change, in one place — the theme's own
 * presets first. `.events-archive--light *` as well as the archive for the
 * `--event-*` ones: `events.css` sets them again on some of its own pieces,
 * and a 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;
	--event-radius: 0px;
	--event-radius-sm: 0px;
}

.events-archive--light {
	--light-font: var(--wp--preset--font-family--tilda-sans, 'Tilda Sans', TildaSans, Arial, sans-serif);

	--light-page: var(--wp--preset--color--ground, #f9f9f9);
	--light-card: var(--wp--preset--color--surface, #fff);
	--light-ink: var(--wp--preset--color--ink, #000);
	--light-copy: var(--wp--preset--color--copy, #333);
	--light-soft: rgb(0 0 0 / 0.6);
	--light-faint: rgb(0 0 0 / 0.42);
	--light-line: #e6e6e6;
	--light-line-strong: #d2d2d2;
	--light-wash: #f1f1f1;

	--light-accent: var(--wp--preset--color--teal, #179fa7);
	--light-accent-deep: var(--wp--preset--color--teal-strong, #127f86);
	--light-accent-soft: rgb(23 159 167 / 0.08);
	--light-mark: var(--wp--preset--color--green, #40d86f);

	--event-accent: var(--light-accent);
	--event-line: var(--light-line);
	--event-line-strong: var(--light-line-strong);
	--event-soft: var(--light-soft);

	/* The column: one, centred — the event page's width. */
	--light-width: 1040px;
	--light-gap: 20px;
	--light-pad: clamp(20px, 4vw, 40px);

	/* One badge's height: its 14px type at 1.25, its padding, its border. */
	--light-pill: calc(14px * 1.25 + 10px + 2px);
}

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

/* -- 2. The page ------------------------------------------------------------- */

body:has(.events-archive--light) {
	background: var(--light-page, #f9f9f9);
}

.events-archive.events-archive--light {
	display: grid;
	gap: var(--light-gap);
	max-width: calc(var(--light-width) + 2 * var(--wp--preset--spacing--gutter, 20px));
	margin: 0 auto;
	padding: clamp(16px, 3vw, 40px) var(--wp--preset--spacing--gutter, 20px) clamp(40px, 6vw, 80px);
	background: var(--light-page);
	color: var(--light-ink);
	font-family: var(--light-font);
	font-size: 18px;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
}

/*
 * A white square card, its title centred over a short green mark — the
 * catalogue's name, the banner, the list's head.
 */
.events-archive--light :is(.events-archive__header, .light-banner, .light-list__head) {
	min-width: 0;
	margin: 0;
	padding: var(--light-pad);
	background: var(--light-card);
	text-align: center;
}

.events-archive--light :is(.events-archive__title, .light-banner__title, .light-list__title) {
	margin: 0;
	color: var(--light-ink);
	font-family: inherit;
	font-weight: 600;
	line-height: 1.23;
	letter-spacing: normal;
	text-wrap: balance;
}

.events-archive--light :is(.events-archive__title, .light-banner__title, .light-list__title)::after {
	content: '';
	display: block;
	width: 40px;
	height: 3px;
	margin: 14px auto 0;
	background: var(--light-mark);
}

/* The catalogue's name: the event page's title size. */
.events-archive--light .events-archive__title {
	font-size: clamp(30px, 4.2vw, 46px);
}

.events-archive--light :is(.light-banner__title, .light-list__title) {
	font-size: clamp(22px, 2.6vw, 28px);
}

/* The catalogue's description, at a reading measure under its name. */
.events-archive--light .events-archive__blurb {
	max-width: 36em;
	margin: 20px auto 0;
	color: var(--light-soft);
	font-size: 17px;
}

.events-archive--light .events-archive__blurb > :first-child {
	margin-top: 0;
}

.events-archive--light .events-archive__blurb > :last-child {
	margin-bottom: 0;
}

/* -- 3. 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;
	transition: transform 0.4s ease;
}

/* An event with no picture: the page's grey and a teal calendar. */
.light-placeholder {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	background: var(--light-wash);
	color: var(--light-accent);
}

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

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

.light-sponsor {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #fff;
	color: var(--light-accent);
}

.light-slide__media .light-sponsor {
	top: 16px;
	right: 16px;
	width: 44px;
	height: 44px;
}

.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;
}

/* -- 4. The banner ----------------------------------------------------------- */

/*
 * Its own card: the title centred over its mark, the slides, then the arrows
 * and dots centred under them — the head is let go (`display: contents`) so
 * the controls can be put after the track without a change of markup.
 */
.events-archive--light .light-banner {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.light-banner__head {
	display: contents;
}

.light-banner__title {
	order: 1;
}

.light-banner__track {
	order: 2;
}

.light-banner__controls {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	order: 3;
	margin-top: -8px;
}

.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;
}

/* The arrows: round, a line round them, teal once a pointer is on them. */
.events-archive--light .light-banner__arrow {
	width: 44px;
	height: 44px;
	border: 1px solid var(--light-line-strong);
	border-radius: 50%;
	background: var(--light-card);
	color: var(--light-ink);
	transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

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

.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 teal 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(--light-line-strong);
	transition: width 0.2s ease, background-color 0.2s ease;
}

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

.events-archive--light :is(.light-banner__arrow, .light-banner__dot):focus-visible {
	outline: 2px solid var(--light-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;
}

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

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

/* The picture on the left, the words beside it on the page's grey. */
.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;
	background: var(--light-page);
	color: inherit;
	text-align: left;
	text-decoration: none;
}

.light-slide__media {
	display: block;
	min-height: 100%;
}

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

.events-archive--light .light-slide__link:hover .light-slide__media img {
	transform: scale(1.03);
}

.light-slide__body {
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 10px;
	min-width: 0;
	padding: clamp(20px, 3.5vw, 40px);
}

/* The date: the theme's eyebrow, in teal. */
.light-slide__when {
	color: var(--light-accent);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 2px;
	line-height: 1.3;
	text-transform: uppercase;
}

.light-slide__title {
	display: -webkit-box;
	overflow: hidden;
	color: var(--light-ink);
	font-size: clamp(24px, 2.8vw, 34px);
	font-weight: 600;
	line-height: 1.2;
	overflow-wrap: anywhere;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	line-clamp: 3;
}

.light-slide__where {
	color: var(--light-copy);
	font-size: 16px;
	font-weight: 500;
}

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

/* See the event: the theme's teal pill. */
.light-slide__cta {
	display: inline-flex;
	align-self: flex-start;
	align-items: center;
	justify-content: center;
	min-height: 50px;
	margin-top: 8px;
	padding: 14.5px 36px;
	border-radius: 30px;
	background: var(--light-accent);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	line-height: 21px;
	white-space: nowrap;
	transition: background-color 0.16s ease;
}

.light-slide__link:hover .light-slide__cta {
	background: var(--light-accent-deep);
}

/* 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;
	}

	.light-slide__cta {
		align-self: stretch;
	}
}

/* -- 5. The search ----------------------------------------------------------- */

/*
 * The list's head is a card of its own: the title over its mark, then the
 * search — a name, a date and the teal pill on one line, each field a line
 * under its words as the site's forms have them. On a phone the name across
 * the top, the date and the button under it.
 */
.events-archive--light .light-list__head {
	display: grid;
	gap: 28px;
	margin-bottom: clamp(28px, 4vw, 40px);
}

.light-search {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 16px 24px;
	width: 100%;
	max-width: 820px;
	margin: 0 auto;
	padding: 0;
	text-align: left;
}

.light-search__field {
	display: grid;
	gap: 2px;
	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(--light-soft);
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 1.5px;
	text-transform: uppercase;
}

/* The theme's own field look is reset: a line under, no box, 16px so a phone does not zoom. */
.events-archive--light .light-search input {
	width: 100%;
	min-width: 0;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-bottom: 1px solid var(--light-line-strong);
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	color: var(--light-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.2;
	transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.events-archive--light .light-search input::placeholder {
	color: var(--light-faint);
	opacity: 1;
}

.events-archive--light .light-search input:hover {
	border-bottom-color: color-mix(in srgb, var(--light-accent) 40%, var(--light-line-strong));
}

/* In use, the line turns teal and doubles — a shadow, so nothing moves by a pixel. */
.events-archive--light .light-search input:focus {
	outline: none;
	border-bottom-color: var(--light-accent);
	box-shadow: 0 1px 0 0 var(--light-accent);
}

.light-search__actions {
	display: flex;
	align-items: center;
	gap: 16px;
}

.events-archive--light .light-search__go {
	min-height: 50px;
	margin: 0;
	padding: 14.5px 40px;
	border: 0;
	border-radius: 30px;
	background: var(--light-accent);
	box-shadow: none;
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 21px;
	cursor: pointer;
	transition: background-color 0.16s ease;
}

.events-archive--light .light-search__go:hover {
	background: var(--light-accent-deep);
}

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

.events-archive--light .light-search__clear {
	color: var(--light-accent);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}

.events-archive--light .light-search__clear:hover {
	color: var(--light-accent-deep);
	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;
	}
}

/* -- 6. The cards ------------------------------------------------------------ */

/* A section per month: its name, the theme's eyebrow, centred with a line either side. */
.light-month + .light-month {
	margin-top: clamp(32px, 5vw, 48px);
}

.events-archive--light .light-month__title {
	display: flex;
	align-items: center;
	gap: 20px;
	margin: 0 0 20px;
	color: var(--light-soft);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 2.5px;
	line-height: 17px;
	text-transform: uppercase;
}

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

/*
 * One size, one gap. The columns are all one width (as many as fit at 18rem —
 * three across the 1040px column — 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.
 */
.events-archive--light .light-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 18rem), 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;
}

/* A white square card, no frame; a pointer on it brings the name to teal and the picture closer. */
.events-archive--light .light-card__link {
	display: flex;
	flex: 1;
	flex-direction: column;
	overflow: hidden;
	border: 0;
	border-radius: 0;
	background: var(--light-card);
	box-shadow: none;
	color: inherit;
	text-decoration: none;
	transition: box-shadow 0.2s ease;
}

.events-archive--light .light-card__link:hover {
	box-shadow: 0 18px 36px -24px rgb(0 0 0 / 0.35);
}

.events-archive--light .light-card__link:hover .light-card__media img {
	transform: scale(1.04);
}

.events-archive--light .light-card__link:hover .light-card__title {
	color: var(--light-accent);
}

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

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

.light-card__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 20px 22px 22px;
}

.light-card__title {
	display: -webkit-box;
	min-height: calc(2 * 1.3em);
	overflow: hidden;
	color: var(--light-ink);
	font-size: 20px;
	font-weight: 600;
	line-height: 1.3;
	overflow-wrap: anywhere;
	transition: color 0.16s ease;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	line-clamp: 2;
}

.light-card__when {
	color: var(--light-accent);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.4;
}

.light-card__where {
	min-height: 1.4em;
	overflow: hidden;
	color: var(--light-copy);
	font-size: 15px;
	line-height: 1.4;
	text-overflow: ellipsis;
	white-space: nowrap;
}

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

/* 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(14px + 2 * var(--light-pill) + 6px);
	margin-top: auto;
	padding-top: 14px;
}

/*
 * 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: 12px;
	}

	.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__media .light-sponsor {
		top: 8px;
		right: 8px;
		width: 28px;
		height: 28px;
	}

	.light-card__body {
		gap: 3px;
		padding: 14px 16px;
	}

	.light-card__title {
		font-size: 17px;
	}

	.light-card__when,
	.light-card__where {
		font-size: 14px;
	}

	.light-card__excerpt {
		display: none;
	}

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

/* -- 7. Badges --------------------------------------------------------------- */

/* A pass: its name, then its price — a small square tile, as on the event page. */
.light-passes {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.light-pass {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	max-width: 100%;
	padding: 5px 10px;
	overflow: hidden;
	border: 1px solid var(--light-line);
	background: var(--light-card);
	font-size: 14px;
	line-height: 1.25;
}

.light-pass__name {
	min-width: 0;
	overflow: hidden;
	color: var(--light-copy);
	font-size: 13px;
	font-weight: 500;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.light-pass__price {
	flex: none;
	color: var(--light-ink);
	font-weight: 600;
	white-space: nowrap;
}

.light-pass--more {
	color: var(--light-soft);
	font-size: 13px;
}

/* In the banner the tiles sit on the slide's grey, so they stay white. */
.light-slide__body .light-pass {
	font-size: 15px;
}

/* Nothing on, or nothing found: a line in the middle of a white card. */
.light-empty {
	margin: 0;
	padding: clamp(32px, 5vw, 48px) var(--light-pad);
	background: var(--light-card);
	color: var(--light-soft);
	font-size: 18px;
	text-align: center;
}

/* -- 8. The pager ------------------------------------------------------------ */

/* Earlier and Later: the quiet teal pill; the count between them. */
.events-archive--light .events-pager {
	gap: 16px;
	margin-top: clamp(32px, 5vw, 48px);
	font-size: 16px;
}

.events-archive--light .events-pager__link {
	min-height: 50px;
	padding: 14.5px 32px;
	border: 1px solid var(--light-accent);
	border-radius: 30px;
	background: none;
	color: var(--light-accent);
	font-size: 15px;
	font-weight: 600;
	line-height: 21px;
	transition: background-color 0.16s ease, color 0.16s ease;
}

.events-archive--light .events-pager__link:hover {
	background: var(--light-accent);
	color: #fff;
}

.events-archive--light .events-pager__count {
	color: var(--light-soft);
	font-size: 15px;
}

/* -- 9. Less motion ---------------------------------------------------------- */

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

	.events-archive--light *,
	.events-archive--light *::before {
		transition: none !important;
	}

	.events-archive--light .light-card__link:hover .light-card__media img,
	.events-archive--light .light-slide__link:hover .light-slide__media img {
		transform: none;
	}
}
