
@layer demo {
	.carousel-card {
		--items: 6;
		--carousel-card-duration: 20s;
		margin-bottom: 4%;
		@media (width > 600px) {
			--carousel-card-duration: 15s;
		}
		--carousel-card-width: min(
			80vw,
			1200px
		); /* note - it will "break" if it gets too wide and there aren't enough items */
		--carousel-card-item-width: 280px;
		--carousel-card-item-height: 320px;
		--carousel-card-item-gap: 32px;

		--clr-cta: rgb(0, 132, 209);

		position: relative;
		width: var(--carousel-card-width);
		height: var(--carousel-card-item-height);
		overflow: clip;
		max-width: 100%; 
		box-sizing: border-box; 

		&[mask] {
			/* fade out on sides */
			mask-image: linear-gradient(
				to right,
				transparent,
				black 10% 90%,
				transparent
			);
		}

		&[reverse] > article {
			animation-direction: reverse;
		}
		/* hover pauses animation */
		&:hover > article {
			animation-play-state: paused;
		}
	}
	.carousel-card > article {
		position: absolute;
		top: 0;
		left: calc(100% + var(--carousel-card-item-gap));
		width: var(--carousel-card-item-width);
		height: var(--carousel-card-item-height);
		display: grid;
		grid-template-rows: 200px auto 1fr auto;
		gap:4px;
		z-index: 1; 
		border: 1px solid light-dark(rgba(0 0 0 / 0.25), rgba(255 255 255 / 0.15));

		padding-block-end: 16px;
		border-radius: 10px;
		background: light-dark(white, rgba(255 255 255 / 0.05));

		/* animation */
		will-change: transform;
		animation-name: marquee;
		animation-duration: var(--carousel-card-duration);
		animation-timing-function: linear;
		animation-iteration-count: infinite;
		animation-delay: calc(
			var(--carousel-card-duration) / var(--items) * 1 * var(--i) * -1
		);
		&:nth-child(1) {
			--i: 0;
		}
		&:nth-child(2) {
			--i: 1;
		}
		&:nth-child(3) {
			--i: 2;
		}
		&:nth-child(4) {
			--i: 3;
		}
		&:nth-child(5) {
			--i: 4;
		}
		&:nth-child(6) {
			--i: 5;
		}
		&:nth-child(7) {
			--i: 6;
		}
		&:nth-child(8) {
			--i: 7;
		}
	}
	.carousel-card img {
		width: 100%;
		height: auto;
		object-fit: cover;

		border-radius: 10px 10px 0 0;
	}
	.carousel-card > article > *:not(img) {
		padding: 0 16px;
	}
	.carousel-card > article > div {
		grid-row: span 2;
		display: grid;
		grid-template-rows: subgrid;
		font-size: 12.8px;
	}
	.carousel-card > article h2 {
		font-size: 19.2px;
		font-weight: 300;
		padding-block: 12px 4px;
		margin: 0;
	}
	.carousel-card > article p {
		margin: 0;
	}
	.carousel-card > article a {
		text-decoration: none;
		text-transform: lowercase;
		border: 1px solid var(--clr-cta);
		color: light-dark(var(--clr-cta), white);
		border-radius: 3px;
		padding: 4px 8px;
		place-self: start;
		transition: 150ms ease-in-out;
		&:hover,
		&:focus-visible {
			background-color: var(--clr-cta);
			color: white;
			outline: none;
		}
	}

	@keyframes marquee {
		100% {
			transform: translateX(
				calc(
					(var(--items) * (var(--carousel-card-item-width) + var(--carousel-card-item-gap))) *
						-1
				)
			);
		}
	}
}
.card-text{padding-right:10px;padding-left:10px;}
.card-text p{
     font-size: 16px;
    line-height: 1.6;
    margin-top: 0;
    margin-bottom: 0px;
    font-weight: 500;
}
/* general styling */
@layer base {
	* {
		box-sizing: border-box;
	}
	:root {
		color-scheme: light dark;

		--bg-dark: rgb(2, 6, 24);
		--bg-light: rgb(229, 229, 229);
		--txt-light: rgb(10, 10, 10);
		--txt-dark: rgb(245, 245, 245);
	}
	body {

	}
}