.pe-demos,
.pe-demos *,
.pe-demos *::before,
.pe-demos *::after {
	box-sizing: border-box;
}

.pe-demos {
	margin-inline: calc(var(--pe-header-gutter, 40px) * -1);
	padding: 60px var(--pe-header-gutter, 40px);
	background: #fff;
	color: #2b2b2f;
	font: 400 16px/1.3 Play, Arial, sans-serif;
	scroll-margin-top: 24px;
}

body:has(.pe-header.is-overlay) .pe-demos {
	margin-inline: 0;
}

.pe-demos * {
	min-width: 0;
}

.pe-demos h2 {
	margin: 0;
	color: #2b2b2f;
	font-family: Tektur, "Arial Narrow", sans-serif;
	font-weight: 500;
	font-size: 48px;
	line-height: 1.29;
	letter-spacing: -0.5px;
}

.pe-demos__text {
	max-width: 720px;
	margin: 16px 0 0;
	color: #59535f;
	font-size: 16px;
	line-height: 1.5;
}

.pe-demos__empty {
	margin: 0;
	padding: 24px;
}

.pe-demos__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 30px;
	margin-bottom: 40px;
}

.pe-demos__grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

.pe-demos__card {
	position: relative;
	display: block;
	width: 100%;
	min-height: 300px;
	aspect-ratio: 16 / 10;
	padding: 0;
	overflow: hidden;
	isolation: isolate;
	border: 0;
	background: #4c4c4c;
	color: #fff;
	text-align: left;
	cursor: pointer;
}

.pe-demos__card:focus-visible {
	outline: 2px solid #c7a6f1;
	outline-offset: 4px;
}

.pe-demos__poster {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.65s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pe-demos__card::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(rgba(0, 0, 0, 0.53), rgba(0, 0, 0, 0.08) 48%, rgba(0, 0, 0, 0.62));
	pointer-events: none;
}

.pe-demos__caption {
	position: absolute;
	right: 24px;
	bottom: 20px;
	left: 24px;
	z-index: 2;
	display: flex;
	flex-direction: column;
	gap: 6px;
	max-width: calc(100% - 48px);
}

.pe-demos__card h3 {
	margin: 0;
	color: #fff;
	font-family: Tektur, "Arial Narrow", sans-serif;
	font-weight: 500;
	font-size: clamp(18px, 1.5vw, 28px);
	line-height: 1.25;
	letter-spacing: -0.5px;
	overflow-wrap: break-word;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.pe-demos__meta {
	font-size: 14px;
	letter-spacing: 0.02em;
	overflow-wrap: anywhere;
	text-shadow: 0 1px 8px rgba(0, 0, 0, 0.2);
}

.pe-demos__symbol {
	position: absolute;
	top: 24px;
	right: 24px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	border-radius: 50%;
	background: rgba(40, 40, 44, 0.22);
	color: #fff;
	font-size: 26px;
	line-height: 1;
	transition: background 0.25s, border-color 0.25s;
}

.pe-demos__card[data-media-type="video"] .pe-demos__symbol {
	top: 50%;
	right: auto;
	left: 50%;
	width: 64px;
	height: 64px;
	border-color: rgba(255, 255, 255, 0.7);
	background: rgba(41, 41, 47, 0.4);
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.pe-demos__symbol svg {
	display: block;
	width: 22px;
	height: 22px;
}

.pe-demos__card[data-media-type="video"] .pe-demos__symbol svg {
	width: 26px;
	height: 26px;
}

@media (hover: hover) and (pointer: fine) {
	.pe-demos__card:hover .pe-demos__poster {
		transform: scale(1.025);
	}

	.pe-demos__card:hover .pe-demos__symbol {
		border-color: #fff;
		background: rgba(40, 40, 44, 0.533);
	}

	.pe-demos__card[data-media-type="video"]:hover .pe-demos__symbol {
		border-color: #fff;
		background: rgba(41, 41, 47, 0.65);
	}
}

.pe-demos--ink {
	background: #2b2b2f;
	color: #fff;
	border-bottom: 1px solid #8b8b8d;
}

.pe-demos__grid:has(> :only-child),
.pe-demos--ink .pe-demos__grid:has(> :only-child) {
	max-width: 960px;
	grid-template-columns: 1fr;
}

.pe-demos--ink h2 {
	color: #fff;
	font-size: 36px;
	line-height: 1.18;
}

.pe-demos--ink .pe-demos__head {
	display: block;
}

.pe-demos--ink .pe-demos__text {
	max-width: 720px;
	margin-top: 20px;
	color: #fff;
	line-height: 1.3;
}

.pe-demos--ink .pe-demos__grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.pe-demos--ink .pe-demos__grid:has(> :nth-child(4)) {
	grid-template-columns: 1fr 1fr;
}

.pe-demos__dialog {
	box-sizing: border-box;
	width: min(920px, calc(100vw - 48px));
	max-height: calc(100dvh - 48px);
	margin: auto;
	padding: 22px 22px 8px;
	overflow: auto;
	border: 0;
	background: #2a2a2e;
	color: #fff;
	font: 400 16px/1.3 Play, Arial, sans-serif;
}

.pe-demos__dialog::backdrop {
	background: rgba(12, 12, 14, 0.78);
}

.pe-demos__dialog-bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.pe-demos__dialog-bar p {
	min-width: 0;
	margin: 0;
	overflow-wrap: break-word;
	font: 500 22px/1.25 Tektur, "Arial Narrow", sans-serif;
}

.pe-demos__dialog-bar button {
	display: grid;
	flex: 0 0 44px;
	width: 44px;
	height: 44px;
	place-items: center;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.pe-demos__dialog-stage {
	position: relative;
	overflow: hidden;
	aspect-ratio: 16 / 9;
	background: #111;
}

.pe-demos__dialog iframe,
.pe-demos__dialog video {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
	background: #000;
	object-fit: contain;
}

.pe-demos__dialog iframe[hidden],
.pe-demos__dialog video[hidden] {
	display: none;
}

.pe-demos__dialog-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0 10px;
	color: #c8c8cc;
	font-size: 14px;
}

.pe-demos__dialog-foot a {
	flex-shrink: 0;
	color: #fff;
	text-underline-offset: 4px;
}

@media (max-width: 600px) {
	.pe-demos__dialog {
		width: calc(100vw - 16px);
		padding: 14px 14px 6px;
	}

	.pe-demos__dialog-bar p {
		font-size: 18px;
	}

	.pe-demos__dialog-foot {
		align-items: flex-start;
		flex-wrap: wrap;
	}
}

.pe-demos--frame .pe-demos__frames {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.pe-demos__stage {
	margin: 0;
}

.pe-demos__stage figcaption {
	margin: 0 0 12px;
	font-family: Tektur, "Arial Narrow", sans-serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-transform: uppercase;
}

.pe-demos__frame {
	position: relative;
	overflow: hidden;
	border-radius: 18px;
	background: #7b42d1;
}

.pe-demos__stage--demo .pe-demos__frame {
	height: 530px;
}

.pe-demos__stage--tour .pe-demos__frame {
	height: 720px;
}

.pe-demos__frame .pe-demos__still,
.pe-demos__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
}

.pe-demos__frame .pe-demos__still {
	object-fit: cover;
}

.pe-demos__stage.is-locked iframe {
	pointer-events: none;
}

.pe-demos__start {
	position: absolute;
	inset: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 24px;
	border: 0;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	cursor: pointer;
}

.pe-demos__start span {
	max-width: 90%;
	color: #fff;
	font-family: Tektur, "Arial Narrow", sans-serif;
	font-size: clamp(22px, 2.6vw, 36px);
	font-weight: 600;
	letter-spacing: 0.02em;
	line-height: 1.2;
	text-align: center;
	text-shadow: 0 2px 24px rgba(0, 0, 0, 0.45);
}

.pe-demos__start:hover {
	background: rgba(0, 0, 0, 0.78);
}

.pe-demos__start:focus-visible {
	outline: 2px solid #c7a6f1;
	outline-offset: -4px;
}

@media (max-width: 800px) {
	.pe-demos__stage--demo .pe-demos__frame,
	.pe-demos__stage--tour .pe-demos__frame {
		height: min(70vh, 520px);
		min-height: 360px;
	}
}

@media (max-width: 960px) {
	.pe-demos--ink .pe-demos__grid {
		grid-template-columns: 1fr;
	}

	.pe-demos {
		padding-block: 48px;
	}

	.pe-demos h2 {
		font-size: 36px;
	}
}

@media (max-width: 600px) {
	.pe-demos {
		padding-block: 40px;
	}

	.pe-demos__head {
		margin-bottom: 30px;
	}

	.pe-demos h2 {
		font-size: 30px;
		line-height: 1.2;
	}

	.pe-demos__grid {
		grid-template-columns: 1fr;
	}

	.pe-demos__card {
		min-height: 250px;
	}

	.pe-demos__card[data-media-type="video"] .pe-demos__symbol {
		width: 56px;
		height: 56px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pe-demos__poster,
	.pe-demos__symbol {
		transition: none;
	}
}
