/**
 * Daygas video player and the places of the films (inc/films.php; the front page hero is in home.css).
 * White design (0.4.1, 20.10.2026): the page stays light, only the frame of the film itself is dark.
 *
 * 1. Player   2. Page head (sector hero, business page): the film above the text on a phone, beside it on a desktop
 * 3. Product page: a row with the series at work
 */

/* 1. Player ------------------------------------------------------------------------------------------ */

.dg-video {
	position: relative;
	margin: 0;
	overflow: hidden;
	aspect-ratio: var(--dg-video-ratio, 16 / 9);
	border-radius: var(--dg-radius-lg);
	background: var(--dg-ink);
}

.dg-video__el {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* A still picture in the place of a film (inc/films.php, 21.10.2026). */
.dg-still {
	background: var(--dg-bg-soft);
}

.dg-still__img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dg-video__toggle {
	position: absolute;
	right: var(--dg-space-3);
	bottom: var(--dg-space-3);
	display: grid;
	place-items: center;
	width: var(--dg-tap);
	height: var(--dg-tap);
	padding: 0;
	border: 1px solid color-mix(in srgb, var(--dg-white) 30%, transparent);
	border-radius: 50%;
	background: color-mix(in srgb, var(--dg-ink) 55%, transparent);
	color: var(--dg-white);
	cursor: pointer;
}

.dg-video__toggle[hidden] {
	display: none;
}

.dg-video__toggle:focus-visible {
	outline: none;
	box-shadow: var(--dg-focus);
}

.dg-video__icon {
	width: 14px;
	height: 16px;
	background:
		linear-gradient(currentcolor, currentcolor) left / 4px 100% no-repeat,
		linear-gradient(currentcolor, currentcolor) right / 4px 100% no-repeat;
}

.dg-video.is-paused .dg-video__icon {
	width: 0;
	height: 0;
	margin-inline-start: 4px;
	border-block: 9px solid transparent;
	border-inline-start: 14px solid currentcolor;
	background: none;
}

/* 2. Page head --------------------------------------------------------------------------------------- */

/* The film is the first child of the head's .dg-wrap; the block gap of the theme is not used between the two. */
.dg-hero--film > .dg-wrap > * {
	margin-block: 0;
}

/* Phones: the film above the label and the headline, inside the page margins. */
.dg-hero--film > .dg-wrap > .dg-hero__film {
	margin-block-end: var(--dg-space-5);
}

.dg-hero__film .dg-video {
	--dg-video-ratio: 16 / 9;
}

/* Desktop: the text on the left, the film on the right. The film holds the right side, so the buttons leave the
   second column of the hero grid and follow the text. */
@media (min-width: 960px) {
	.dg-hero--film > .dg-wrap {
		display: grid;
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
		gap: clamp(32px, 5vw, 72px);
		align-items: center;
	}

	.dg-hero--film > .dg-wrap > * {
		grid-column: 1;
		grid-row: 1;
		min-width: 0;
	}

	.dg-hero--film > .dg-wrap > .dg-hero__film {
		grid-column: 2;
		margin: 0;
	}

	.dg-hero__film .dg-video {
		--dg-video-ratio: 4 / 3;
	}

	.dg-hero--film .dg-hero__grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.dg-hero--film .dg-hero__grid > * {
		grid-column: 1;
		grid-row: auto;
	}

	.dg-hero--film .dg-hero__eyebrow { order: 1; }
	.dg-hero--film .dg-hero__title { order: 2; }
	.dg-hero--film .dg-hero__lead { order: 3; }
	.dg-hero--film .dg-hero__actions { order: 4; }
	.dg-hero--film .dg-fit { order: 4; }
	.dg-hero--film .dg-hero__link { order: 5; }

	/* Half a row is narrower than the head was: the headline steps down one size. */
	.dg-hero--film .dg-hero__title,
	.dg-hero--film .dg-pagehead__title {
		font-size: clamp(2rem, 1.2rem + 2.2vw, 3.25rem);
	}
}

/* 3. Product page ------------------------------------------------------------------------------------- */

.dg-pp-film {
	display: grid;
	gap: var(--dg-space-5);
	align-items: center;
}

.dg-pp-film__media .dg-video {
	--dg-video-ratio: 16 / 10;
}

.dg-pp-film__text {
	display: flex;
	flex-direction: column;
	gap: var(--dg-space-3);
}

.dg-pp-film__text > * {
	margin: 0;
}

.dg-pp-film .dg-pp-film__title {
	margin: 0;
	color: var(--dg-ink);
	font-size: clamp(1.375rem, 1.15rem + 0.9vw, 1.875rem);
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
	text-wrap: balance;
}

.dg-pp-film .dg-pp-film__lead {
	max-width: 32em;
	color: var(--dg-text);
	font-size: var(--dg-fs-md);
}

.dg-pp-film__link a {
	color: var(--dg-ink);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-color: var(--dg-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 6px;
}

.dg-pp-film__link a:hover {
	text-decoration-color: currentColor;
}

@media (min-width: 900px) {
	.dg-pp-film {
		grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
		gap: var(--dg-pp-gap, 40px);
	}
}
