/* Section 3 — use cases (Figma «Landing · Use cases» 1440 wide, «Mobile · Use cases» 390 wide).
   Each card sets --brand and --brand-dark (its slide's gradient, its circles, its button). Below 1024px the four
   cards are a carousel: scroll-snap, right to left, 265px cards so the next one shows, and dots. */

.usecases { padding: 80px 0 89px; } /* .sec: the frame (base.css). */

.usecases__inner {
	width: var(--container);
	margin: 0 auto;
	padding: 70px 40px 0;
}

.usecases__title {
	max-width: 1000px;
	font-size: clamp(26px, 3.61vw, 52px);
	font-weight: 900;
	line-height: 1.35;
}
.usecases__title span { color: var(--subtle); }

.usecases__scroller { margin-top: 72px; }

.usecases__list {
	display: flex;
	gap: 20px;
}

.ucase {
	display: flex;
	flex: 1 1 0;
	flex-direction: column;
	min-width: 0;
	padding: 10px 10px 0;
	border: 1px solid rgba(21, 19, 31, 0.08);
	border-radius: 36px;
	background: var(--white);
	transition: transform 0.35s var(--ease-out);
}

/* The picture: a row of story circles over one of Pelk's text slides. */
.ucase__visual {
	display: flex;
	flex-direction: column;
	align-items: center;
	height: 470px;
	overflow: hidden;
	border-radius: 28px;
	background: color-mix(in srgb, var(--brand) 8%, transparent);
}

.ucase__bar {
	display: flex;
	gap: 10px;
	margin-top: 20px;
}

.ucase__story {
	position: relative;
	width: 44px;
	height: 44px;
	color: var(--brand);
}

.ucase__ring {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.ucase__cover {
	position: absolute;
	inset: 3.4px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: color-mix(in srgb, var(--brand) 12%, transparent);
	color: var(--brand-dark);
}
.ucase__cover svg { width: 18px; height: 18px; } /* Iconsax draws inside a 24px box with room around it. */
.ucase__cover svg [stroke-width="1.5"],
.uslide__avatar svg [stroke-width="1.5"] { stroke-width: 2; }

.uslide {
	position: relative;
	flex: none;
	width: 200px;
	height: 368px;
	margin-top: 16px;
	overflow: hidden;
	border-radius: 24px;
	background: linear-gradient(126deg, var(--brand) 14%, var(--brand-dark) 86%);
	box-shadow: 0 18px 36px color-mix(in srgb, var(--brand-dark) 35%, transparent);
	color: var(--white);
}

.uslide__progress {
	position: absolute;
	top: 12px;
	right: 12px;
	left: 10px;
	display: flex;
	gap: 5px;
}
.uslide__progress i {
	position: relative;
	flex: 1;
	height: 2.5px;
	overflow: hidden;
	border-radius: 2px;
	background: rgba(255, 255, 255, 0.35);
}
.uslide__progress i:first-child::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--white);
	transform-origin: right;
}

.uslide__head {
	position: absolute;
	top: 24px;
	right: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.uslide__avatar {
	display: grid;
	place-items: center;
	width: 26px;
	height: 26px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.22);
}
.uslide__avatar svg { width: 15px; height: 15px; }

.uslide__names {
	display: flex;
	flex-direction: column;
}
.uslide__names b { font-size: 11px; font-weight: 700; line-height: 14px; }
.uslide__names span { color: rgba(255, 255, 255, 0.7); font-size: 9px; font-weight: 500; line-height: 12px; }

.uslide__content {
	position: absolute;
	right: 14px;
	bottom: 16px;
	left: 14px;
	display: flex;
	flex-direction: column;
	align-items: flex-start; /* RTL: the right edge. */
	gap: 8px;
}

.uslide__label {
	padding: 3px 9px 4px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.2);
	font-size: 10px;
	font-weight: 600;
	line-height: 13px;
}

.uslide__title {
	font-size: 18px;
	font-weight: 900;
	line-height: 1.4;
}

.uslide__item {
	display: flex;
	align-items: center;
	gap: 7px;
	color: rgba(255, 255, 255, 0.92);
	font-size: 10.5px;
	font-weight: 500;
	line-height: 14px;
}
.uslide__item i {
	display: grid;
	flex: none;
	place-items: center;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--white);
	color: var(--brand-dark);
	font-size: 9px;
	font-style: normal;
	font-weight: 700;
	line-height: 12px;
}

.uslide__cta {
	align-self: stretch;
	height: 35px;
	margin-top: 12px;
	padding: 9px 0 10px;
	border-radius: 999px;
	background: var(--white);
	color: var(--brand-dark);
	font-size: 12px;
	font-weight: 700;
	line-height: 16px;
	text-align: center;
}

/* Hover (optional in the design): the card rises and the slide plays its first segment. */
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
	.ucase:hover { transform: translateY(-6px); }
	.ucase:hover .uslide__progress i:first-child::after { animation: usecases-play 3s linear; }
}
@keyframes usecases-play { from { transform: scaleX(0); } }

.usecases__dots { display: none; }

@media (max-width: 1180px) {
	.usecases__inner { padding-inline: 0; }
}

/* Tablets and phones: a carousel. ------------------------------------------------------------------------------ */

@media (max-width: 1023px) {
	.usecases__scroller {
		--bleed: calc((100vw - var(--container)) / 2);
		margin: 28px calc(-1 * var(--bleed)) 0;
		padding: 4px var(--bleed) 26px;
		overflow-x: auto;
		overscroll-behavior-x: contain;
		scroll-padding-inline: var(--bleed);
		scroll-snap-type: x mandatory;
		scrollbar-width: none;
	}
	.usecases__scroller::-webkit-scrollbar { display: none; }

	.usecases__list {
		gap: 12px;
		width: max-content;
	}

	.ucase {
		flex: 0 0 265px;
		scroll-snap-align: start;
	}

	.usecases__dots {
		display: flex;
		justify-content: center;
		gap: 6px;
		margin-top: 14px;
	}

	.usecases__dot {
		position: relative;
		width: 6px;
		height: 6px;
		padding: 0;
		border: 0;
		border-radius: 3px;
		background: rgba(21, 19, 31, 0.15);
		cursor: pointer;
		transition: width 0.25s var(--ease-out), background-color 0.25s;
	}
	.usecases__dot::after { content: ""; position: absolute; inset: -10px -4px; } /* A bigger target. */
	.usecases__dot.is-active { width: 20px; background: var(--coral); }
}

@media (max-width: 767px) {
	.usecases { padding: 36px 0 12px; }
	.usecases__inner { padding-top: 48px; }
	.usecases__title { font-size: 26px; line-height: 1.4; }
}
