/* LemonFM microsite. Everything is scoped to .lfm-body / .lfm-app so the theme is unaffected. */

body.lfm-body {
	--lfm-bg: #fbf6dc;
	--lfm-text: #22301a;
	--lfm-accent: #f2c200;
	--lfm-gutter: clamp(14px, 6vw, 104px);
	--lfm-arrow-w: 66px;
	--lfm-arrow-h: 50px;
	--lfm-display: "Bricolage Grotesque", "Avenir Next", "Segoe UI", system-ui, sans-serif;
	--lfm-body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

	margin: 0;
	background: var(--lfm-bg);
	color: var(--lfm-text);
}

.lfm-app,
.lfm-app *,
.lfm-app *::before,
.lfm-app *::after {
	box-sizing: border-box;
}

.lfm-app {
	min-height: 100vh;
	min-height: 100svh;
	font-family: var(--lfm-body);
	font-size: 1.0625rem;
	line-height: 1.65;
}

/* Header ---------------------------------------------------------------- */

.lfm-app .lfm-header {
	padding: 18px var(--lfm-gutter);
}

.lfm-app .lfm-header__default {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 1rem;
}

.lfm-app .lfm-brand {
	font-family: var(--lfm-display);
	font-weight: 800;
	font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
	letter-spacing: -0.03em;
	color: var(--lfm-text);
	text-decoration: none;
}

.lfm-app .lfm-home {
	font-size: 0.9rem;
	color: var(--lfm-text);
	opacity: 0.7;
	text-decoration: none;
}

.lfm-app .lfm-home:hover {
	opacity: 1;
	text-decoration: underline;
}

/* Carousel --------------------------------------------------------------- */

.lfm-app .lfm-main {
	padding: 0 var(--lfm-gutter) 72px;
}

.lfm-app .lfm-slide {
	animation: lfm-in 0.35s ease-out;
}

.lfm-app .lfm-slide[hidden] {
	display: none;
}

@keyframes lfm-in {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: none; }
}

.lfm-app .lfm-player {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
	border-radius: 14px;
	overflow: hidden;
}

.lfm-app .lfm-player iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.lfm-app .lfm-player__missing {
	position: absolute;
	inset: 0;
	margin: 0;
	display: grid;
	place-items: center;
	color: #fff;
	opacity: 0.7;
}

/* Show notes ------------------------------------------------------------- */

.lfm-app .lfm-notes {
	max-width: 68ch;
	margin: clamp(24px, 4vw, 44px) auto 0;
}

.lfm-app .lfm-title {
	font-family: var(--lfm-display);
	font-weight: 800;
	font-size: clamp(1.9rem, 1.2rem + 3vw, 3.4rem);
	line-height: 1.02;
	letter-spacing: -0.035em;
	margin: 0;
	color: var(--lfm-text);
}

.lfm-app .lfm-title:focus {
	outline: none;
}

.lfm-app .lfm-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1rem;
	margin: 0.75rem 0 0;
	font-size: 0.95rem;
}

.lfm-app .lfm-number {
	font-family: var(--lfm-display);
	font-weight: 700;
	padding: 0 0.6em;
	border-radius: 999px;
	background: var(--lfm-accent);
	color: var(--lfm-text);
}

.lfm-app .lfm-meta time {
	opacity: 0.7;
}

.lfm-app .lfm-content {
	margin-top: 1.75rem;
}

.lfm-app .lfm-content > * {
	margin-top: 0;
	margin-bottom: 1.1em;
}

.lfm-app .lfm-content h2,
.lfm-app .lfm-content h3,
.lfm-app .lfm-content h4 {
	font-family: var(--lfm-display);
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.15;
	margin-top: 1.8em;
	margin-bottom: 0.5em;
	color: var(--lfm-text);
}

.lfm-app .lfm-content h2 { font-size: 1.6rem; }
.lfm-app .lfm-content h3 { font-size: 1.3rem; }

.lfm-app .lfm-content a {
	color: inherit;
	text-decoration-color: var(--lfm-accent);
	text-decoration-thickness: 3px;
	text-underline-offset: 3px;
}

.lfm-app .lfm-content img,
.lfm-app .lfm-content video {
	max-width: 100%;
	height: auto;
}

.lfm-app .lfm-content table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95rem;
}

.lfm-app .lfm-content th,
.lfm-app .lfm-content td {
	text-align: left;
	padding: 0.45em 0.6em;
	border-bottom: 1px solid color-mix(in srgb, var(--lfm-text) 18%, transparent);
}

.lfm-app .lfm-empty {
	font-family: var(--lfm-display);
	font-size: 1.5rem;
	text-align: center;
	padding: 20vh 0;
	margin: 0;
}

/* Arrows: lemon-shaped, pinned to the middle of each screen edge --------- */

.lfm-app .lfm-arrow {
	position: fixed;
	top: 50%;
	z-index: 50;
	width: var(--lfm-arrow-w);
	height: var(--lfm-arrow-h);
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--lfm-accent);
	color: var(--lfm-text);
	text-decoration: none;
	transform: translateY(-50%);
	box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--lfm-text) 60%, transparent);
	transition: transform 0.15s ease;
}

/* The two little tips that make the ellipse a lemon. */
.lfm-app .lfm-arrow::before,
.lfm-app .lfm-arrow::after {
	content: "";
	position: absolute;
	top: 50%;
	width: 12px;
	height: 12px;
	background: var(--lfm-accent);
	border-radius: 50%;
	transform: translateY(-50%);
}

.lfm-app .lfm-arrow::before { left: -4px; }
.lfm-app .lfm-arrow::after  { right: -4px; }

.lfm-app .lfm-arrow svg {
	position: relative;
	z-index: 1;
}

.lfm-app .lfm-arrow[hidden] {
	display: none;
}

.lfm-app .lfm-arrow--prev {
	left: max(8px, calc((var(--lfm-gutter) - var(--lfm-arrow-w)) / 2));
}

.lfm-app .lfm-arrow--next {
	right: max(8px, calc((var(--lfm-gutter) - var(--lfm-arrow-w)) / 2));
}

.lfm-app .lfm-arrow--prev:hover { transform: translateY(-50%) translateX(-3px) rotate(-6deg); }
.lfm-app .lfm-arrow--next:hover { transform: translateY(-50%) translateX(3px) rotate(6deg); }

.lfm-app .lfm-arrow:focus-visible {
	outline: 3px solid var(--lfm-text);
	outline-offset: 5px;
}

/* Screen-reader-only live region. */
.lfm-app .lfm-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Small screens: arrows shrink and sit over the page edge. */
@media (max-width: 760px) {
	body.lfm-body {
		--lfm-arrow-w: 44px;
		--lfm-arrow-h: 34px;
	}

	.lfm-app .lfm-player {
		border-radius: 8px;
	}

	.lfm-app .lfm-arrow {
		opacity: 0.92;
	}

	.lfm-app .lfm-arrow::before,
	.lfm-app .lfm-arrow::after {
		width: 8px;
		height: 8px;
		left: auto;
		right: auto;
	}

	.lfm-app .lfm-arrow::before { left: -3px; }
	.lfm-app .lfm-arrow::after  { right: -3px; }

	.lfm-app .lfm-arrow svg {
		width: 18px;
		height: 18px;
	}

	.lfm-app .lfm-notes {
		padding: 0 6px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.lfm-app .lfm-slide,
	.lfm-app .lfm-arrow {
		animation: none;
		transition: none;
	}
}
