.brs {
	--brs-radius: 0;
	--brs-pad: 2rem;
	--brs-shade: rgba(0, 0, 0, 0.7);
	--brs-shade-height: 60%;
	--brs-arrow-bg: rgba(255, 255, 255, 0.85);
	--brs-arrow-color: #1b1b1b;
	--brs-arrow-size: 28px;
	--brs-desc-width: 30rem;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	width: 100%;
	aspect-ratio: var(--brs-ratio, 16 / 10);
	border-radius: var(--brs-radius);
	color: #fff;
}

.brs__viewport {
	position: absolute;
	inset: 0;
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
	outline-offset: -3px;
}
.brs__viewport.is-dragging { cursor: grabbing; }

.brs__track {
	display: flex;
	height: 100%;
	margin: 0;
	padding: 0;
	list-style: none;
	transition: transform var(--brs-speed, 600ms) cubic-bezier(0.65, 0, 0.35, 1);
	will-change: transform;
}
.brs__viewport.is-dragging .brs__track { transition: none; }

.brs__slide {
	flex: 0 0 100%;
	height: 100%;
	margin: 0;
	position: relative;
}
.brs__slide img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	user-select: none;
	-webkit-user-drag: none;
}

.brs--fade .brs__track {
	display: block;
	transform: none !important;
	transition: none;
}
.brs--fade .brs__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transition: opacity var(--brs-speed, 600ms) ease;
}
.brs--fade .brs__slide.is-active { opacity: 1; }

.brs__shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(to top, var(--brs-shade) 0%, transparent var(--brs-shade-height));
	pointer-events: none;
	z-index: 1;
}

.brs__caption {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	padding: var(--brs-pad);
	pointer-events: none;
}

.brs__title {
	margin: 0;
	font-size: 1.6rem;
	font-weight: 500;
	line-height: 1.3;
	color: inherit;
}

/* The description sits in a grid row that grows from 0 to its natural height.
   The caption is bottom aligned, so the heading rises as the row opens. */
.brs__desc {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	max-width: var(--brs-desc-width);
	transition: grid-template-rows var(--brs-reveal, 500ms) ease, opacity var(--brs-reveal, 500ms) ease;
}
.brs__desc-in {
	min-height: 0;
	overflow: hidden;
	line-height: 1.55;
}
.brs__desc-in > :first-child { margin-top: 1rem; }
.brs__desc-in > p:last-of-type { margin-bottom: 0; }
.brs__btn {
	display: inline-block;
	margin-top: 1rem;
	padding: 0.5em 1.1em;
	border: 1px solid currentColor;
	border-radius: 0;
	color: inherit;
	text-decoration: none;
	pointer-events: auto;
}

.brs:hover .brs__desc,
.brs:focus-within .brs__desc,
.brs[data-reveal='always'] .brs__desc {
	grid-template-rows: 1fr;
	opacity: 1;
}
@media (hover: none) {
	.brs .brs__desc {
		grid-template-rows: 1fr;
		opacity: 1;
	}
}

.brs__arrow {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 3;
	display: grid;
	place-items: center;
	width: var(--brs-arrow-size);
	height: var(--brs-arrow-size);
	padding: 0;
	border: 0;
	border-radius: 0;
	background: var(--brs-arrow-bg);
	color: var(--brs-arrow-color);
	cursor: pointer;
	transition: opacity 0.2s ease;
}
.brs__arrow:hover { opacity: 0.8; }
.brs__arrow[disabled] { opacity: 0.35; cursor: default; }
.brs__prev { left: 1.25rem; }
.brs__next { right: 1.25rem; }

.brs__dots {
	position: absolute;
	right: var(--brs-pad);
	bottom: calc(var(--brs-pad) * 0.75);
	z-index: 3;
	display: flex;
	gap: 8px;
}
.brs__dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.5);
	cursor: pointer;
}
.brs__dot.is-active { background: #fff; }

@media (prefers-reduced-motion: reduce) {
	.brs__track, .brs--fade .brs__slide, .brs__desc { transition-duration: 1ms; }
}
/* Narrow screens: a taller box so the text does not cover the photo. */
@media (max-width: 640px) {
	.brs {
		aspect-ratio: auto;
		min-height: 26rem;
	}
	.brs__caption { padding: calc(var(--brs-pad) * 0.7); }
	.brs__title { font-size: 1.35rem; }
	.brs__desc-in { font-size: 0.95rem; }
	.brs__arrow { top: 38%; }
}