/*!
 * Elena's Bistro — featured popup.
 *
 * The dark-and-gold carousel of chosen events and live music nights. Every
 * rule is scoped to .elena-featured so nothing here can leak into the page
 * it overlays, and the palette is the theme's own: near-black ground, cream
 * type and one gold accent.
 *
 * The element is a native <dialog>. Its frame is the panel the theme draws;
 * the ::backdrop behind it is the browser's own layer, so the page under the
 * overlay is never painted by this file.
 */

.elena-featured {
	background: transparent;
	border: 0;
	color: var(--elena-cream);
	margin: auto;
	max-height: calc(100% - 2rem);
	max-width: min(64rem, calc(100vw - 2rem));
	overflow: visible;
	padding: 0;
	width: 100%;
}

/*
 * The panel is capped to the visual viewport rather than the layout one, so
 * a phone whose address bar slides away does not leave the foot of the card
 * under the browser chrome. The frame scrolls inside that cap, which is what
 * keeps a long description reachable without the whole overlay drifting.
 */
@supports (height: 100dvh) {
	.elena-featured {
		max-height: calc(100dvh - 2rem);
	}
}

.elena-featured::backdrop {
	background: rgba(6, 6, 5, 0.82);
}

.elena-featured__frame {
	background:
		radial-gradient(120% 90% at 50% -10%, rgba(201, 162, 74, 0.14), transparent 60%),
		var(--elena-night-2);
	border: 1px solid var(--elena-line);
	border-radius: var(--elena-radius-lg);
	box-shadow: var(--elena-shadow-lift);
	max-height: inherit;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: clamp(1.25rem, 0.5rem + 2vw, 2.5rem);
	position: relative;
	/* Above the dust layer, which is a sibling of the card. */
	z-index: 1;
}

/* -------------------------------------------------------------------------
 * Campaign header
 *
 * The card opens like an invitation: a small tracked label, the headline in
 * the theme's italic display face with a drawn star either side, then one
 * supporting line. The header keeps a right-hand lane clear of the close
 * button, so the two can never overlap at any width.
 * ---------------------------------------------------------------------- */

.elena-featured__intro {
	min-height: 3.25rem;
	padding-right: 3.25rem;
	position: relative;
}

.elena-featured__label {
	color: var(--elena-gold);
	font-family: var(--elena-font-body);
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.28em;
	margin: 0 0 0.85rem;
	text-transform: uppercase;
}

.elena-featured__heading {
	color: var(--elena-white);
	font-family: var(--elena-font-display);
	font-size: clamp(1.9rem, 1.4rem + 2.4vw, 3rem);
	font-style: italic;
	font-weight: 500;
	letter-spacing: 0.005em;
	line-height: 1.14;
	margin: 0 0 0.85rem;
	overflow-wrap: anywhere;
	text-wrap: balance;
}

/*
 * The headline stays in one flowing line box so the stars sit beside the
 * words rather than on lines of their own: a star ahead of the first word and
 * one after the last, whichever way the sentence wraps.
 */
.elena-featured__headline {
	display: inline;
}

/*
 * A four-point star, drawn as a clipped shape rather than a glyph so it
 * matches the ambience layer and does not depend on a font carrying the
 * character. It is ornament alone, so it is hidden from assistive tech in
 * the markup and takes no pointer events.
 */
.elena-featured__star {
	background: linear-gradient(160deg, var(--elena-gold-soft), var(--elena-gold-deep));
	clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
	display: inline-block;
	height: 0.95rem;
	margin: 0 0.75rem 0 0;
	opacity: 0.9;
	pointer-events: none;
	vertical-align: middle;
	width: 0.95rem;
}

.elena-featured__star--after {
	margin: 0 0 0 0.75rem;
	opacity: 0.6;
	transform: scale(0.78);
}

.elena-featured__message {
	color: var(--elena-muted);
	font-size: 0.98rem;
	line-height: 1.65;
	margin: 0 0 clamp(1.1rem, 0.6rem + 1.5vw, 1.75rem);
	max-width: 52ch;
}

/* A hairline under the header separates the invitation from the card. */
.elena-featured__intro::after {
	background: linear-gradient(90deg, var(--elena-line), transparent);
	content: "";
	display: block;
	height: 1px;
	margin-bottom: clamp(1.1rem, 0.6rem + 1.5vw, 1.75rem);
}

/* Nothing above the card: the header already ends with its own rule. */
.elena-featured__intro > :last-child {
	margin-bottom: 0;
}


.elena-featured__close {
	align-items: center;
	background: transparent;
	border: 1px solid var(--elena-line);
	border-radius: 50%;
	color: var(--elena-cream);
	cursor: pointer;
	display: inline-flex;
	height: 2.5rem;
	justify-content: center;
	margin: 0;
	padding: 0;
	position: absolute;
	right: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	top: clamp(0.75rem, 0.5rem + 1vw, 1.5rem);
	transition: border-color var(--elena-speed) var(--elena-ease), color var(--elena-speed) var(--elena-ease);
	width: 2.5rem;
	z-index: 2;
}

.elena-featured__close:hover,
.elena-featured__close:focus {
	border-color: var(--elena-gold);
	color: var(--elena-gold);
}

.elena-featured__close:focus-visible {
	outline: 2px solid var(--elena-gold);
	outline-offset: 3px;
}

/* Two strokes crossing at the centre, drawn rather than typed. */
.elena-featured__close-icon,
.elena-featured__close-icon::before {
	background: currentColor;
	display: block;
	height: 1px;
	width: 0.95rem;
}

.elena-featured__close-icon {
	transform: rotate(45deg);
}

.elena-featured__close-icon::before {
	content: "";
	transform: rotate(90deg);
}


/* -------------------------------------------------------------------------
 * Slide
 *
 * One column on a phone and two on a wide screen: the photograph keeps its
 * own proportion and the text keeps a readable measure, so neither is
 * stretched to fill the other.
 * ---------------------------------------------------------------------- */

.elena-featured__slide {
	display: grid;
	gap: clamp(1rem, 0.5rem + 2vw, 2rem);
	grid-template-columns: 1fr;
	margin: 0;
	min-width: 0;
}

.elena-featured__slide[hidden] {
	display: none;
}

.elena-featured__art {
	aspect-ratio: 16 / 10;
	background: var(--elena-night-3);
	border: 1px solid var(--elena-line);
	border-radius: var(--elena-radius);
	box-shadow: var(--elena-shadow-soft);
	margin: 0;
	overflow: hidden;
	position: relative;
}

/*
 * A hairline of gold inside the poster edge: the frame a printed invitation
 * would carry, drawn with an inset ring so it never changes the layout.
 */
.elena-featured__art::after {
	border: 1px solid rgba(217, 191, 130, 0.28);
	border-radius: calc(var(--elena-radius) - 1px);
	content: "";
	inset: 0.45rem;
	pointer-events: none;
	position: absolute;
}

.elena-featured__image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.elena-featured__body {
	align-self: center;
	min-width: 0;
	padding-top: 0.5rem;
}

/*
 * The close button sits in the header's right-hand lane, above the slide, so
 * a slide without a photograph needs no extra clearance of its own; only the
 * small top offset that keeps its label off the header's rule.
 */
.elena-featured__slide--no-art .elena-featured__body {
	padding-top: 0.25rem;
}

.elena-featured__kind {
	align-items: center;
	color: var(--elena-gold);
	display: flex;
	flex-wrap: wrap;
	font-family: var(--elena-font-body);
	font-size: 0.7rem;
	font-weight: 600;
	gap: 0.5rem;
	letter-spacing: 0.18em;
	margin: 0 0 0.85rem;
	text-transform: uppercase;
}

/* The record's kind is a quieter second word after the campaign label. */
.elena-featured__kind-type {
	color: var(--elena-muted-2);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.elena-featured__kind-type::before {
	color: var(--elena-gold-deep);
	content: "\2022";
	font-size: 0.9em;
}

.elena-featured__badge {
	align-items: center;
	border: 1px solid var(--elena-line);
	border-radius: var(--elena-radius);
	color: var(--elena-cream);
	display: inline-flex;
	flex-direction: column;
	gap: 0.1rem;
	line-height: 1.1;
	margin: 0 0 1rem;
	padding: 0.5rem 0.85rem;
	text-align: center;
}

.elena-featured__badge-day {
	font-family: var(--elena-font-display);
	font-size: 1.6rem;
	font-weight: 600;
}

.elena-featured__badge-month {
	color: var(--elena-gold-soft);
	font-size: 0.7rem;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.elena-featured__title {
	color: var(--elena-white);
	font-family: var(--elena-font-display);
	font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
	font-weight: 500;
	letter-spacing: 0.01em;
	line-height: 1.15;
	margin: 0 0 0.75rem;
	overflow-wrap: anywhere;
}

.elena-featured__when {
	color: var(--elena-gold-soft);
	font-size: 0.95rem;
	font-weight: 500;
	margin: 0 0 0.75rem;
}

.elena-featured__meta {
	color: var(--elena-muted);
	display: flex;
	flex-wrap: wrap;
	font-size: 0.9rem;
	gap: 0.35rem 0;
	list-style: none;
	margin: 0 0 1rem;
	padding: 0;
}

.elena-featured__meta li {
	padding-right: 1.1rem;
	position: relative;
}

.elena-featured__meta li + li {
	padding-left: 1.1rem;
}

/*
 * The divider is drawn inside each item rather than between them, so a
 * wrapped row never starts with a dot hanging on its own.
 */
.elena-featured__meta li:not( :first-child )::before {
	color: var(--elena-gold-deep);
	content: "\2022";
	left: 0;
	position: absolute;
}

.elena-featured__text {
	color: var(--elena-muted);
	font-size: 0.98rem;
	line-height: 1.7;
	margin: 0 0 1.25rem;
	max-width: 46ch;
}

.elena-featured__text > :last-child {
	margin-bottom: 0;
}

.elena-featured__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin: 0;
}

/* -------------------------------------------------------------------------
 * Controls
 * ---------------------------------------------------------------------- */

.elena-featured__controls {
	align-items: center;
	border-top: 1px solid var(--elena-line-soft);
	display: flex;
	gap: 0.75rem;
	justify-content: space-between;
	margin-top: clamp(1.25rem, 0.75rem + 1.5vw, 2rem);
	padding-top: 1rem;
}

.elena-featured__arrow {
	align-items: center;
	background: transparent;
	border: 1px solid var(--elena-line);
	border-radius: 50%;
	color: var(--elena-cream);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: var(--elena-font-display);
	font-size: 1.4rem;
	height: 2.5rem;
	justify-content: center;
	line-height: 1;
	margin: 0;
	padding: 0 0 0.15rem;
	transition: border-color var(--elena-speed) var(--elena-ease), color var(--elena-speed) var(--elena-ease);
	width: 2.5rem;
}

.elena-featured__arrow:hover,
.elena-featured__arrow:focus {
	border-color: var(--elena-gold);
	color: var(--elena-gold);
}

.elena-featured__arrow:focus-visible {
	outline: 2px solid var(--elena-gold);
	outline-offset: 3px;
}

.elena-featured__position {
	color: var(--elena-muted-2);
	font-size: 0.8rem;
	letter-spacing: 0.12em;
	margin: 0;
	text-align: center;
	text-transform: uppercase;
}

/* The dots sit below the arrows and scroll sideways rather than wrap, so a
   full carousel of twelve never pushes the panel taller than the viewport. */
.elena-featured__dots {
	display: flex;
	gap: 0.5rem;
	justify-content: center;
	list-style: none;
	margin: 0.85rem 0 0;
	overflow-x: auto;
	padding: 0.15rem 0;
	scrollbar-width: none;
}

.elena-featured__dots::-webkit-scrollbar {
	display: none;
}

.elena-featured__dots li {
	flex: 0 0 auto;
	margin: 0;
}

.elena-featured__dot {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--elena-muted-2);
	cursor: pointer;
	display: inline-flex;
	font-family: var(--elena-font-body);
	font-size: 0.72rem;
	font-weight: 600;
	gap: 0.4rem;
	letter-spacing: 0.06em;
	line-height: 1;
	margin: 0;
	padding: 0.45rem 0.6rem;
	transition: color var(--elena-speed) var(--elena-ease);
}

.elena-featured__dot-mark {
	background: currentColor;
	border-radius: 50%;
	display: block;
	height: 0.45rem;
	opacity: 0.55;
	transition: opacity var(--elena-speed) var(--elena-ease), width var(--elena-speed) var(--elena-ease);
	width: 0.45rem;
}

.elena-featured__dot:hover,
.elena-featured__dot:focus {
	color: var(--elena-gold-soft);
}

.elena-featured__dot:focus-visible {
	outline: 2px solid var(--elena-gold);
	outline-offset: 2px;
}

.elena-featured__dot[aria-current="true"] {
	color: var(--elena-gold);
}

.elena-featured__dot[aria-current="true"] .elena-featured__dot-mark {
	opacity: 1;
	width: 1.1rem;
	border-radius: 999px;
}

/* A carousel of one carries no controls at all, so nothing here is needed. */

/* -------------------------------------------------------------------------
 * Gold dust around the panel
 *
 * The sparks are the same four-point star the campaign header uses, scattered
 * around the outside of the card so the overlay arrives with the theme's one
 * accent already in motion. The layer is a sibling of the frame, is drawn
 * behind the card and takes no pointer events, so it decorates the overlay
 * without ever touching it.
 *
 * Each spark is placed by its own pair of custom properties further down, so
 * this block is only what they share. They run for a few seconds when the
 * dialog opens and then stop: a permanent shimmer around a card someone is
 * reading is a distraction, and the overlay is not the place for one.
 *
 * Only the layer's own position is declared here. The dialog is already the
 * positioned box it is measured against, so the card only has to be told to
 * sit above its own dust.
 * ---------------------------------------------------------------------- */

.elena-featured__sparks {
	inset: -1.25rem;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.elena-featured__spark {
	background: linear-gradient(160deg, var(--elena-gold-soft), var(--elena-gold-deep));
	clip-path: polygon(50% 0%, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0% 50%, 38% 38%);
	height: 0.5rem;
	opacity: 0;
	position: absolute;
	width: 0.5rem;
}

.elena-featured__spark:nth-child(1) {
	left: 6%;
	top: -0.35rem;
	--elena-spark-delay: 40ms;
	--elena-spark-drift: -0.5rem;
}

.elena-featured__spark:nth-child(2) {
	right: 8%;
	top: 4%;
	--elena-spark-delay: 180ms;
	--elena-spark-drift: 0.45rem;
}

.elena-featured__spark:nth-child(3) {
	left: -0.3rem;
	top: 34%;
	--elena-spark-delay: 300ms;
	--elena-spark-drift: -0.6rem;
}

.elena-featured__spark:nth-child(4) {
	right: -0.3rem;
	top: 58%;
	--elena-spark-delay: 120ms;
	--elena-spark-drift: 0.55rem;
}

.elena-featured__spark:nth-child(5) {
	bottom: 6%;
	left: 12%;
	--elena-spark-delay: 240ms;
	--elena-spark-drift: -0.4rem;
}

.elena-featured__spark:nth-child(6) {
	bottom: -0.35rem;
	right: 14%;
	--elena-spark-delay: 60ms;
	--elena-spark-drift: 0.5rem;
}

.elena-featured__spark:nth-child(7) {
	left: 30%;
	top: -0.55rem;
	--elena-spark-delay: 340ms;
	--elena-spark-drift: 0.3rem;
}

.elena-featured__spark:nth-child(8) {
	right: 26%;
	bottom: -0.55rem;
	--elena-spark-delay: 200ms;
	--elena-spark-drift: -0.35rem;
}

.elena-featured__spark:nth-child(9) {
	right: 2%;
	top: 76%;
	--elena-spark-delay: 280ms;
	--elena-spark-drift: 0.4rem;
}

.elena-featured__spark:nth-child(10) {
	left: 2%;
	top: 12%;
	--elena-spark-delay: 420ms;
	--elena-spark-drift: -0.45rem;
}

/*
 * A spark rises the small distance it was given, turns once and settles. It
 * is `both` so the resting state is the invisible one: the card is left with
 * no dust on it once the arrival is over.
 */
@keyframes elena-featured-spark {
	0% {
		opacity: 0;
		transform: translate3d(0, 0.4rem, 0) rotate(0deg) scale(0.4);
	}

	35% {
		opacity: 0.85;
	}

	100% {
		opacity: 0;
		transform: translate3d(0, var(--elena-spark-drift, -0.4rem), 0) rotate(135deg) scale(1);
	}
}

/* Only while the dialog is open: a closed dialog is not painted at all. */
.elena-featured[open] .elena-featured__spark {
	animation: elena-featured-spark 2600ms var(--elena-ease-out) both;
	animation-delay: var(--elena-spark-delay, 0ms);
}

/* -------------------------------------------------------------------------
 * Page state while the overlay is open
 * ---------------------------------------------------------------------- */

html.elena-featured-is-open {
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Wider screens
 * ---------------------------------------------------------------------- */

@media (min-width: 48rem) {
	.elena-featured__slide {
		align-items: center;
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
	}

	.elena-featured__slide--no-art .elena-featured__body {
		padding: 1rem 3rem 1rem 0;
	}
}

/*
 * Phones: the card is given the tallest shape the viewport allows and its
 * frame is the thing that scrolls. The whole card is set a notch tighter here
 * than on a desktop, because at this width every rule of margin and every
 * point of type is spent on one column: this is what lets the header, the
 * poster, the title and both actions share a 375x812 screen without the guest
 * scrolling to find the booking button.
 */
@media (max-width: 47.99rem) {
	.elena-featured {
		max-height: calc(100% - 1rem);
		max-width: calc(100vw - 1rem);
	}

	@supports (height: 100dvh) {
		.elena-featured {
			max-height: calc(100dvh - 1rem);
		}
	}

	.elena-featured__frame {
		padding: clamp(0.9rem, 0.6rem + 1.5vw, 1.25rem);
	}

	.elena-featured__intro {
		padding-right: 2.9rem;
	}

	.elena-featured__label {
		font-size: 0.64rem;
		letter-spacing: 0.24em;
		margin-bottom: 0.6rem;
	}

	.elena-featured__heading {
		font-size: clamp(1.35rem, 1.1rem + 1.6vw, 1.8rem);
		margin-bottom: 0.6rem;
	}

	.elena-featured__star {
		height: 0.85rem;
		width: 0.85rem;
	}

	.elena-featured__message {
		font-size: 0.9rem;
		line-height: 1.55;
		margin-bottom: 0.8rem;
	}

	.elena-featured__intro::after {
		margin-bottom: 0.8rem;
	}

	.elena-featured__art {
		aspect-ratio: 16 / 9;
	}

	.elena-featured__kind {
		font-size: 0.64rem;
		margin-bottom: 0.5rem;
	}

	.elena-featured__title {
		font-size: clamp(1.3rem, 1.1rem + 1.6vw, 1.6rem);
		margin-bottom: 0.45rem;
	}

	.elena-featured__when {
		font-size: 0.88rem;
		margin-bottom: 0.45rem;
	}

	.elena-featured__meta {
		font-size: 0.82rem;
		gap: 0.2rem 0;
		margin-bottom: 0.6rem;
	}

	.elena-featured__text {
		font-size: 0.9rem;
		line-height: 1.55;
		margin-bottom: 0.85rem;
	}

	.elena-featured__controls {
		margin-top: 0.8rem;
		padding-top: 0.7rem;
	}

	.elena-featured__dots {
		margin-top: 0.6rem;
	}
}

/*
 * Short phones: a 640px-tall screen still cannot hold the card at the sizes
 * above, so the poster is given a wider crop and the description is clamped.
 * The card scrolls internally by the remainder, and the poster, the title and
 * the first action all stay within reach of the fold.
 */
@media (max-width: 47.99rem) and (max-height: 44rem) {
	.elena-featured__frame {
		padding: 0.8rem;
	}

	.elena-featured__intro {
		padding-right: 2.75rem;
	}

	.elena-featured__label {
		font-size: 0.62rem;
		letter-spacing: 0.22em;
		margin-bottom: 0.45rem;
	}

	.elena-featured__heading {
		font-size: 1.3rem;
		line-height: 1.16;
		margin-bottom: 0.45rem;
	}

	.elena-featured__message {
		display: -webkit-box;
		font-size: 0.86rem;
		line-height: 1.45;
		margin-bottom: 0.6rem;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}

	.elena-featured__intro::after {
		margin-bottom: 0.6rem;
	}

	.elena-featured__art {
		aspect-ratio: 2.6 / 1;
	}

	.elena-featured__kind {
		font-size: 0.62rem;
		margin-bottom: 0.35rem;
	}

	.elena-featured__title {
		font-size: 1.2rem;
		margin-bottom: 0.3rem;
	}

	.elena-featured__when {
		font-size: 0.85rem;
		margin-bottom: 0.3rem;
	}

	.elena-featured__meta {
		font-size: 0.8rem;
		gap: 0.15rem 0;
		margin-bottom: 0.45rem;
	}

	.elena-featured__text {
		display: -webkit-box;
		font-size: 0.86rem;
		line-height: 1.45;
		margin-bottom: 0.6rem;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 2;
		line-clamp: 2;
		overflow: hidden;
	}

	.elena-featured__text p {
		margin: 0;
	}

	.elena-featured__controls {
		margin-top: 0.55rem;
		padding-top: 0.5rem;
	}

	.elena-featured__dots {
		margin-top: 0.4rem;
	}
}

/*
 * The smallest phones still in use are under 660px tall. Everything that can
 * give way without losing information gives way here: the poster takes the
 * widest crop, the description drops to a single line, and the header is set
 * at its smallest. What is left is the label, the headline, the poster, the
 * record's name and date, both actions and the controls.
 */
@media (max-width: 47.99rem) and (max-height: 41rem) {
	.elena-featured__heading {
		font-size: 1.22rem;
	}

	.elena-featured__art {
		aspect-ratio: 3 / 1;
	}

	.elena-featured__text {
		-webkit-line-clamp: 1;
		line-clamp: 1;
		margin-bottom: 0.5rem;
	}

	/*
	 * At 360px wide the two actions are a few pixels too wide to share a row,
	 * so they wrap and cost the card a second row it cannot spare. Trimming
	 * the side padding and the gap brings them back onto one line. Wrapping
	 * stays enabled, so an owner who sets a long button label still gets two
	 * neat rows rather than a label squeezed out of view.
	 */
	.elena-featured__actions {
		gap: 0.5rem;
	}

	.elena-featured__actions .elena-btn {
		padding-left: 0.9rem;
		padding-right: 0.9rem;
	}

	.elena-featured__controls {
		margin-top: 0.45rem;
		padding-top: 0.4rem;
	}

	.elena-featured__dots {
		margin-top: 0.3rem;
	}
}

@media (min-width: 77.5rem) {
	.elena-featured {
		max-width: 66rem;
	}
}

/* -------------------------------------------------------------------------
 * Reduced motion
 *
 * Nothing here animates on its own, and a visitor who asks for less motion
 * is not shown the overlay at all; this only removes the transitions that
 * are left.
 * ---------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
	.elena-featured *,
	.elena-featured *::before,
	.elena-featured *::after {
		transition-duration: 0.01ms !important;
	}
}

/* -------------------------------------------------------------------------
 * Launcher
 *
 * The small gold gift that brings the carousel back once it has been
 * dismissed. It is not part of the overlay: it sits on the page, in the same
 * bottom-right row as the theme's back-to-top button, so both are always
 * reachable and the two can never cover each other.
 *
 * The row is laid out by arithmetic rather than by a wrapper, because the
 * back-to-top button is injected by the theme's own script and neither
 * element can be relied on to exist: the launcher is simply placed one
 * button-width plus a gap further in from the right edge. That keeps the
 * two clear of each other whether or not the other one is on screen.
 *
 * It carries `hidden` until the script has decided it may be offered, and the
 * `[hidden]` rule below is written out rather than left to the browser, because
 * the display value set on the button itself would otherwise win. The script
 * reveals it once the page has settled, on every page the popup is drawn on:
 * on the homepage that is after the carousel has been closed, and elsewhere it
 * is simply the only way to the carousel.
 * ---------------------------------------------------------------------- */

.elena-featured-launcher {
	align-items: center;

	/*
	 * The gold of the theme, warmed at the top so the disc reads as a small
	 * prize rather than a flat swatch of colour. The ring is drawn with a
	 * box-shadow rather than a border, so it never changes the size of the
	 * button the offset above was calculated from.
	 */
	background-image: linear-gradient(160deg, var(--elena-gold-soft), var(--elena-gold) 58%, var(--elena-gold-deep));
	border: 0;
	border-radius: 999px;
	bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 10px 26px rgba(0, 0, 0, 0.42), 0 0 0 1px rgba(0, 0, 0, 0.28);
	color: var(--elena-night);
	cursor: pointer;
	display: inline-flex;
	height: 2.9rem;
	isolation: isolate;
	justify-content: center;
	padding: 0;
	position: fixed;
	right: calc(1.5rem + env(safe-area-inset-right, 0px) + 2.9rem + 0.6rem);
	transition: box-shadow var(--elena-speed) var(--elena-ease), transform var(--elena-speed) var(--elena-ease);
	/* Above the back-to-top button (90), below the lightbox (200). */
	z-index: 91;
	width: 2.9rem;
}

/* The attribute has to be honoured explicitly: the display above outranks it. */
.elena-featured-launcher[hidden] {
	display: none;
}

.elena-featured-launcher__icon {
	display: block;
	height: 1.25rem;
	/* Above the halo and the motes, which are the two layers behind it. */
	position: relative;
	width: 1.25rem;
	z-index: 2;
}

.elena-featured-launcher:hover {
	box-shadow: 0 14px 30px rgba(0, 0, 0, 0.48), 0 0 0 1px rgba(0, 0, 0, 0.28), 0 0 0 0.4rem var(--elena-gold-glow);
	transform: translateY(-2px);
}

.elena-featured-launcher:focus-visible {
	outline: 2px solid var(--elena-cream);
	outline-offset: 3px;
}

.elena-featured-launcher:active {
	transform: translateY(0);
}

/*
 * It arrives only once, at the moment the visitor closes the popup, so the
 * movement is short and upward: the eye is already at the centre of the
 * screen and follows the gift to the corner it will live in.
 *
 * The button itself only fades; the icon is what scales. A transform on the
 * button would be a real offset while the animation runs, which would move
 * the control under the pointer and away from the corner it is anchored to.
 * Keeping the movement inside the icon leaves the hit area exactly where the
 * rule above put it, whether the animation runs, is paused by a browser or
 * never starts at all.
 */
@keyframes elena-featured-launcher-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes elena-featured-launcher-icon-in {
	from {
		transform: translateY(0.35rem) scale(0.82);
	}

	to {
		transform: none;
	}
}

.elena-featured-launcher {
	animation: elena-featured-launcher-in 260ms var(--elena-ease-out) backwards;
}

.elena-featured-launcher__icon {
	animation: elena-featured-launcher-icon-in 420ms var(--elena-ease-out) backwards;
}

@media (min-width: 48rem) {
	.elena-featured-launcher {
		height: 3.5rem;
		width: 3.5rem;
	}

	.elena-featured-launcher__icon {
		height: 1.45rem;
		width: 1.45rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.elena-featured-launcher,
	.elena-featured-launcher__icon {
		animation: none;
		transition-duration: 0.01ms !important;
	}

	.elena-featured-launcher:hover {
		transform: none;
	}
}

/* -------------------------------------------------------------------------
 * The gift's glow
 *
 * The launcher is now the one piece of the campaign a guest meets on every
 * page, so it is allowed a little life of its own: a halo that breathes, and
 * a ring of gold motes drifting around the disc.
 *
 * Both layers are children of the button rather than extra elements on the
 * page, which means they travel with it, are hidden with it and cannot be
 * clicked: `pointer-events: none` is set on each layer, so the hit area stays
 * the disc itself and nothing new is put in the way of a tap. The button is
 * `isolation: isolate`, so the motes are stacked against the disc rather than
 * against whatever happens to be behind it.
 *
 * The drift is slow and small. Nothing here is a notification: the gift is
 * already the loudest thing in the corner, and the movement only has to say
 * that it is still there.
 * ---------------------------------------------------------------------- */

/*
 * The halo is a ring, not a disc: its inner stops are left clear so the gold
 * of the button itself stays the brightest thing in the corner. The clear
 * radius is chosen to match the disc's own edge, which is what makes the glow
 * read as light coming off the gift rather than as a wash over it.
 *
 * `z-index: 0` rather than a negative value on purpose: a negative child of an
 * isolated box is still painted over that box's own background, so the halo
 * would tint the gold it is meant to shine around. Zero puts the two layers
 * above the disc and below the icon, which is the order they are wanted in.
 */
.elena-featured-launcher__aura {
	background: radial-gradient(
		circle,
		rgba(217, 191, 130, 0) 0%,
		rgba(217, 191, 130, 0) 58%,
		rgba(217, 191, 130, 0.55) 72%,
		rgba(201, 162, 74, 0.22) 84%,
		rgba(201, 162, 74, 0) 100%
	);
	/*
	 * The halo reaches 0.6rem past the disc, which is just inside the gap
	 * between the gift and the back-to-top button beside it: the two controls
	 * share the corner, and a glow that spilled onto the neighbour would read
	 * as a smear rather than as light.
	 */
	border-radius: inherit;
	inset: -0.6rem;
	opacity: 0.8;
	pointer-events: none;
	position: absolute;
	z-index: 0;
}

.elena-featured-launcher__motes {
	/*
	 * The orbit radius. It is small on purpose: the ring has to stay clear of
	 * the back-to-top button the launcher shares its corner with, and it has to
	 * stay inside the viewport at the bottom edge, where the disc sits closer to
	 * the glass than at the sides.
	 */
	--elena-mote-orbit: -2rem;
	inset: -0.75rem;
	pointer-events: none;
	position: absolute;
	z-index: 1;
}

.elena-featured-launcher__mote {
	background: var(--elena-gold-soft);
	border-radius: 50%;
	box-shadow: 0 0 4px var(--elena-gold-glow);
	height: 0.2rem;
	left: 50%;
	opacity: 0;
	position: absolute;
	top: 50%;
	width: 0.2rem;
}

/*
 * Eight motes on one shared orbit, each a step further round and a step later
 * than the one before, so the ring turns evenly without eight timings to keep
 * in step by hand. A mote fades in as it leaves the disc and out again before
 * it comes back to the bottom, which keeps the loop from looking drawn.
 *
 * The radius is a custom property rather than a second keyframe block, so a
 * narrow screen only has to change one number to pull the ring in.
 */
@keyframes elena-featured-mote-orbit {
	0% {
		opacity: 0;
		transform: translate(-50%, -50%) rotate(0deg) translateY(var(--elena-mote-orbit, -2.1rem)) scale(0.6);
	}

	25% {
		opacity: 0.9;
	}

	75% {
		opacity: 0.7;
	}

	100% {
		opacity: 0;
		transform: translate(-50%, -50%) rotate(360deg) translateY(var(--elena-mote-orbit, -2.1rem)) scale(0.6);
	}
}

@keyframes elena-featured-aura-breathe {
	0%,
	100% {
		opacity: 0.6;
		transform: scale(0.94);
	}

	50% {
		opacity: 0.95;
		transform: scale(1.04);
	}
}

.elena-featured-launcher__aura {
	animation: elena-featured-aura-breathe 5200ms var(--elena-ease) infinite;
}

.elena-featured-launcher__mote {
	animation: elena-featured-mote-orbit 9000ms linear infinite;
}

.elena-featured-launcher__mote:nth-child(1) {
	animation-delay: 0ms;
}

.elena-featured-launcher__mote:nth-child(2) {
	animation-delay: -1125ms;
}

.elena-featured-launcher__mote:nth-child(3) {
	animation-delay: -2250ms;
}

.elena-featured-launcher__mote:nth-child(4) {
	animation-delay: -3375ms;
}

.elena-featured-launcher__mote:nth-child(5) {
	animation-delay: -4500ms;
}

.elena-featured-launcher__mote:nth-child(6) {
	animation-delay: -5625ms;
}

.elena-featured-launcher__mote:nth-child(7) {
	animation-delay: -6750ms;
}

.elena-featured-launcher__mote:nth-child(8) {
	animation-delay: -7875ms;
}

/*
 * The first tap sends a single ring outward: the gift is opened rather than
 * toggled, so one short pulse is all the acknowledgement it needs. It is drawn
 * on the aura, which is already the layer behind the icon, so the markup does
 * not carry a second decoration for it.
 */
@keyframes elena-featured-aura-pulse {
	0% {
		opacity: 0.9;
		transform: scale(0.9);
	}

	100% {
		opacity: 0;
		transform: scale(1.6);
	}
}

.elena-featured-launcher.is-pulsing .elena-featured-launcher__aura {
	animation: elena-featured-aura-pulse 620ms var(--elena-ease-out);
}

/*
 * A phone gets the same gift with less going on. Four motes carry the shape of
 * the ring just as well as eight do, and the disc itself is smaller, so the
 * orbit is pulled in: this is the difference between an ornament and something
 * that follows a thumb around the screen.
 */
@media (max-width: 47.99rem) {
	.elena-featured-launcher__motes {
		--elena-mote-orbit: -1.55rem;
	}

	.elena-featured-launcher__mote:nth-child(n + 5) {
		display: none;
	}

	/*
	 * Dust around the card is trimmed on a phone. The card is nearly the full
	 * width of the screen here, so it has no side room to spare: the sparks on
	 * the left and right edges are dropped rather than drawn against the glass,
	 * and the six that sit above and below the card are kept. They are also
	 * drawn a notch smaller, which is what makes them read as dust.
	 */
	.elena-featured__spark:nth-child(3),
	.elena-featured__spark:nth-child(4),
	.elena-featured__spark:nth-child(n + 9) {
		display: none;
	}

	.elena-featured__spark {
		height: 0.4rem;
		width: 0.4rem;
	}
}

/*
 * Reduced motion: the gift stays exactly where it is and keeps its gold, but
 * nothing breathes, orbits or pulses. The halo is left at a fixed opacity
 * rather than removed, so the corner still reads as the same control on a
 * device that asked for stillness.
 */
@media (prefers-reduced-motion: reduce) {
	.elena-featured-launcher__aura,
	.elena-featured-launcher__mote {
		animation: none;
	}

	.elena-featured-launcher__aura {
		opacity: 0.6;
	}

	.elena-featured-launcher__mote {
		display: none;
	}

	.elena-featured-launcher.is-pulsing .elena-featured-launcher__aura {
		animation: none;
		opacity: 0.6;
	}

	.elena-featured[open] .elena-featured__spark {
		animation: none;
	}
}

/* -------------------------------------------------------------------------
 * The event ticket
 *
 * The launcher used to carry a gift box; it now carries the ticket that stands
 * for the live music and the evening events. Only the drawing inside the disc
 * changed -- the button, its gold, its size, its place in the corner and the
 * halo and motes around it are all untouched.
 *
 * The movement is deliberately small. At 1.25rem the icon is about 20 pixels
 * wide, so a whole pixel of travel is already a visible drift: the ticket rises
 * and falls by roughly half a pixel and tilts by a degree or so, on a slow
 * seven-second cycle with an ease that has no corner in it. Nothing here is
 * meant to catch the eye from across the room -- the halo and the motes are
 * doing that job already.
 *
 * `transform-box: fill-box` is what puts the origin at the middle of the
 * drawing rather than at the middle of the SVG viewport, so the tilt turns the
 * ticket about itself. Without it the rotation would swing the card sideways.
 * ---------------------------------------------------------------------- */

.elena-featured-launcher__ticket {
	animation: elena-featured-ticket-float 7s cubic-bezier(0.45, 0, 0.55, 1) infinite;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes elena-featured-ticket-float {
	0% {
		transform: translateY(0.3px) rotate(0deg);
	}

	22% {
		transform: translateY(-0.45px) rotate(-1.5deg);
	}

	46% {
		transform: translateY(-0.1px) rotate(0.7deg);
	}

	70% {
		transform: translateY(-0.5px) rotate(1.3deg);
	}

	88% {
		transform: translateY(0.1px) rotate(-0.6deg);
	}

	100% {
		transform: translateY(0.3px) rotate(0deg);
	}
}

/*
 * The star keeps its gold at all times: the glow behind it is what fades in and
 * out, not the star itself, so the mark never disappears mid-shimmer. The
 * cycle is the same seven seconds as the float, and the flare sits late in it,
 * which is what makes the sparkle read as occasional rather than as a loop.
 */
.elena-featured-launcher__star-glow {
	animation: elena-featured-ticket-shimmer 7s ease-in-out infinite;
	opacity: 0.32;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes elena-featured-ticket-shimmer {
	0%,
	56% {
		opacity: 0.32;
		transform: scale(0.86);
	}

	66% {
		opacity: 0.9;
		transform: scale(1.08);
	}

	76% {
		opacity: 0.45;
		transform: scale(0.98);
	}

	100% {
		opacity: 0.32;
		transform: scale(0.86);
	}
}

.elena-featured-launcher__sparkle {
	animation: elena-featured-ticket-sparkle 7s ease-out infinite;
	opacity: 0;
	transform-box: fill-box;
	transform-origin: center;
}

@keyframes elena-featured-ticket-sparkle {
	0%,
	58% {
		opacity: 0;
		transform: scale(0.3);
	}

	63% {
		opacity: 1;
		transform: scale(1);
	}

	72% {
		opacity: 0.3;
		transform: scale(1.3) rotate(22deg);
	}

	80%,
	100% {
		opacity: 0;
		transform: scale(0.3) rotate(22deg);
	}
}

/*
 * Hover: the button already lifts and takes a gold ring of its own. All the icon
 * adds is a warm bloom around the star, eased rather than switched on, so the
 * two movements arrive together.
 */
.elena-featured-launcher__star {
	transition: filter var(--elena-speed) var(--elena-ease);
}

.elena-featured-launcher:hover .elena-featured-launcher__star,
.elena-featured-launcher:focus-visible .elena-featured-launcher__star {
	filter: drop-shadow(0 0 1.6px rgba(253, 244, 216, 0.8));
}

/*
 * Reduced motion: the ticket keeps its gold and its star, and is simply still.
 * The glow is left at a fixed soft value so the star still reads as lit on a
 * device that asked for no animation.
 */
@media (prefers-reduced-motion: reduce) {
	.elena-featured-launcher__ticket,
	.elena-featured-launcher__star-glow,
	.elena-featured-launcher__sparkle {
		animation: none;
	}

	.elena-featured-launcher__star-glow {
		opacity: 0.5;
	}

	.elena-featured-launcher__sparkle {
		opacity: 0;
	}

	.elena-featured-launcher__star {
		transition-duration: 0.01ms;
	}
}

