/**
 * Setup video: a thumbnail you click to load the YouTube player.
 * No YouTube request is made until the visitor presses play.
 * Markup: figure.gvid > a.gvid__btn (img + span.gvid__play) + figcaption.gvid__cap
 */
.gvid {
	margin: 32px auto;
	max-width: 760px;
}
.gvid--flush { margin-left: 0; margin-right: 0; }

.gvid__btn {
	position: relative;
	display: block;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: var(--radius-lg);
	background: var(--ink-2);
	box-shadow: var(--shadow);
	cursor: pointer;
	text-decoration: none;
}
.gvid__img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	object-fit: cover;
	transition: transform .5s ease, filter .3s ease;
}
.gvid__btn:hover .gvid__img { transform: scale(1.03); filter: brightness(1.06); }

.gvid__play {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 76px;
	height: 76px;
	margin: -38px 0 0 -38px;
	border-radius: 50%;
	background: var(--grad);
	box-shadow: 0 14px 34px -8px rgba(76, 60, 220, .6), 0 0 0 8px rgba(255, 255, 255, .22);
	transition: transform .25s ease;
}
.gvid__play::before {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	clip-path: polygon(39% 29%, 39% 71%, 73% 50%);
}
.gvid__btn:hover .gvid__play { transform: scale(1.1); }
.gvid__btn:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }

.gvid__frame {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.gvid__cap {
	margin: 12px 0 0;
	font-size: 14px;
	line-height: 1.5;
	color: var(--muted);
	text-align: center;
}
.gvid--flush .gvid__cap { text-align: left; }

/* Homepage "How it works": the video fills the right-hand column */
.howgrid__flow { min-width: 0; }
.gvid--home { max-width: none; margin: 0; }
.gvid--home .gvid__btn { box-shadow: var(--shadow-lg); }

/* Card under the homepage video. On wide screens the video starts level with
   step 1 and this card stretches to end level with step 3. */
.gvid-cta {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	flex-wrap: wrap;
	margin-top: 16px;
	padding: 14px 24px 14px 28px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
	overflow: hidden;
}
.gvid-cta::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 4px;
	background: var(--grad);
}
.gvid-cta__t { display: block; font-size: 18px; font-weight: 700; color: var(--ink); font-family: var(--font-display); }
.gvid-cta__s { display: block; margin-top: 4px; font-size: 15px; line-height: 1.5; color: var(--muted); }

@media (min-width: 901px) {
	.howgrid__flow { display: flex; flex-direction: column; align-self: stretch; }
	.gvid--home { flex: none; }
	.gvid-cta { flex: 1; flex-wrap: nowrap; margin-top: 16px; }
	.gvid-cta > div { min-width: 0; }
	.gvid-cta .btn { flex: none; }
}

@media (max-width: 600px) {
	.gvid { margin: 24px auto; }
	.gvid__btn { border-radius: var(--radius); }
	.gvid__play { width: 60px; height: 60px; margin: -30px 0 0 -30px; }
}
@media (prefers-reduced-motion: reduce) {
	.gvid__img, .gvid__play { transition: none; }
	.gvid__btn:hover .gvid__img { transform: none; }
}
