/**
 * Video sekcia
 *
 * Oblé okraje,
mäkký tieň,
náhľad s tlačidlom prehrania.
 * Prehrávač sa vloží až po kliknutí (viď script.js).
 */

.asp-video {
	--asp-video-radius: clamp(20px, 2.4vw, 34px);
	--asp-video-ratio: 16 / 9;

	position: relative;
	padding-block: var(--asp-section-y);

	/* Predvolene nekreslíme nič — sekcia preberie pozadie stránky.
	   Vlastný pás si vyžiadaš cez theme="dark" alebo theme="light". */
	background: transparent;
	color: inherit;
}

.asp-video--dark {
	background: var(--asp-ink);
	color: var(--asp-white);
}

.asp-video--light {
	background: var(--asp-bg);
	color: var(--asp-text);
}

.asp-video .asp-video__container {
	width: 100%;
	max-width: var(--asp-container);
	margin-inline: auto;
	padding-inline: var(--asp-gutter);
}

.asp-video--wide .asp-video__container {
	max-width: var(--asp-container-wide);
}

.asp-video--full .asp-video__container {
	max-width: none;
	padding-inline: 0;
}

.asp-video--full {
	--asp-video-radius: 0px;
}

/* --- Hlavička --------------------------------------------------- */

.asp-video__head {
	max-width: 54ch;
	margin: 0 auto clamp(28px, 4vw, 56px);
	text-align: center;
}

.asp-video .asp-video__eyebrow {
	margin: 0 0 14px;
	font-size: 12px;
	font-weight: 400;
	letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--asp-brand);
}

.asp-video .asp-video__title {
	margin: 0;
	font-size: clamp(24px, 3vw, 38px);
	font-family: var(--asp-font-bold);
	font-weight: 400;
	line-height: 1.04;
	letter-spacing: -0.03em;
}

.asp-video .asp-video__text {
	margin: 18px 0 0;
	font-size: clamp(16px, 1.3vw, 19px);
	line-height: var(--asp-lh-body);
	opacity: .78;
}

/* --- Rám videa -------------------------------------------------- */

.asp-video__figure {
	margin: 0;
}

.asp-video .asp-video__frame {
	position: relative;
	aspect-ratio: var(--asp-video-ratio);
	width: 100%;
	overflow: hidden;
	border-radius: var(--asp-video-radius);
	background: #000;
	box-shadow:
		0 30px 80px rgba(0, 0, 0, .34),
		inset 0 1px 0 rgba(255, 255, 255, .10);
	isolation: isolate;
}

.asp-video--light .asp-video__frame,
.asp-video--none .asp-video__frame {
	box-shadow:
		0 24px 60px rgba(0, 0, 0, .18),
		inset 0 1px 0 rgba(255, 255, 255, .10);
}

.asp-video .asp-video__poster,
.asp-video .asp-video__native,
.asp-video .asp-video__frame iframe {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.asp-video .asp-video__poster {
	object-fit: cover;
	transform: scale(1.01);
	transition: transform var(--asp-dur-slow) var(--asp-ease-out),
		filter var(--asp-dur-slow) var(--asp-ease-out);
}

.asp-video .asp-video__frame[data-asp-video]::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		to top,
		rgba(0, 0, 0, .55) 0%,
		rgba(0, 0, 0, .12) 42%,
		rgba(0, 0, 0, .28) 100%
	);
	opacity: .9;
	transition: opacity var(--asp-dur) var(--asp-ease);
	pointer-events: none;
}

/* --- Tlačidlo prehrania ----------------------------------------- */

.asp-video__play {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	z-index: 2;

	display: inline-flex;
	align-items: center;
	justify-content: center;

	width: clamp(72px, 9vw, 116px);
	aspect-ratio: 1;
	padding: 0;

	border: 0;
	border-radius: var(--asp-radius-pill);
	background: var(--asp-brand);
	color: var(--asp-white);
	cursor: pointer;

	box-shadow:
		0 18px 44px rgba(255, 54, 0, .42),
		inset 0 1px 0 rgba(255, 255, 255, .22);

	transition:
		transform var(--asp-dur) var(--asp-ease-out),
		background-color var(--asp-dur) var(--asp-ease),
		box-shadow var(--asp-dur) var(--asp-ease);
}

.asp-video .asp-video__play-icon {
	width: 38%;
	height: 38%;
	margin-left: 6%;
}

/* Pulzujúci prstenec okolo tlačidla. */
.asp-video__play-ring {
	position: absolute;
	inset: 0;
	border-radius: inherit;
	border: 2px solid var(--asp-brand);
	opacity: .55;
	animation: aspVideoPulse 2.6s var(--asp-ease-out) infinite;
	pointer-events: none;
}

@keyframes aspVideoPulse {
	0%   { transform: scale(1);    opacity: .55; }
	70% { transform: scale(1.45); opacity: 0;   }
	100% { transform: scale(1.45); opacity: 0;   }
}

.asp-video .asp-video__frame:hover .asp-video__poster {
	transform: scale(1.045);
	filter: saturate(1.06);
}

.asp-video .asp-video__frame:hover .asp-video__play,
.asp-video .asp-video__play:focus-visible {
	transform: translate(-50%, -50%) scale(1.08);
	background: var(--asp-brand-hover);
	box-shadow:
		0 22px 56px rgba(255, 54, 0, .52),
		inset 0 1px 0 rgba(255, 255, 255, .26);
}

.asp-video .asp-video__play:focus-visible {
	outline: 3px solid var(--asp-white);
	outline-offset: 4px;
}

/* --- Poznámka o načítaní prehrávača ------------------------------ */

.asp-video__hint {
	position: absolute;
	right: clamp(14px, 2vw, 26px);
	bottom: clamp(14px, 2vw, 26px);
	z-index: 2;

	padding: 7px 14px;
	border-radius: var(--asp-radius-pill);
	background: rgba(0, 0, 0, .55);
	backdrop-filter: blur(6px);

	font-size: 12px;
	letter-spacing: .01em;
	color: rgba(255, 255, 255, .88);
	pointer-events: none;
}

/* --- Popisok ----------------------------------------------------- */

.asp-video__caption {
	margin: 18px auto 0;
	max-width: 62ch;
	text-align: center;
	font-size: 14px;
	line-height: 1.6;
	opacity: .62;
}

/* --- Stav po načítaní prehrávača --------------------------------- */

.asp-video__frame.is-playing::after,
.asp-video .asp-video__frame.is-playing .asp-video__play,
.asp-video .asp-video__frame.is-playing .asp-video__hint,
.asp-video .asp-video__frame.is-playing .asp-video__poster {
	opacity: 0;
	visibility: hidden;
}

/* --- Upozornenie pre redaktora ----------------------------------- */

.asp-video-notice {
	margin: 1em 0;
	padding: 12px 16px;
	border-left: 4px solid var(--asp-brand);
	background: var(--asp-brand-tint);
	color: var(--asp-ink);
	font-size: 14px;
}

@media (max-width: 640px) {
	.asp-video__hint {
		display: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.asp-video__play-ring {
		animation: none;
	}

	.asp-video .asp-video__frame:hover .asp-video__poster {
		transform: none;
	}
}
