/* Cinemart hero slider. Logical properties throughout, so HE (RTL) and EN (LTR) share one stylesheet. */
.cm-hero {
	--cm-accent: #da2a2a;
	--cm-gutter: clamp(20px, 5vw, 72px);
	--cm-fade: 1100ms;
	position: relative;
	isolation: isolate;
	overflow: hidden;
	block-size: 100vh;
	block-size: 100svh;
	min-block-size: 560px;
	background: #000;
	color: #fff;
	font-family: Heebo, "Helvetica Neue", Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.cm-hero *,
.cm-hero *::before,
.cm-hero *::after {
	box-sizing: border-box;
}

.cm-hero__slides,
.cm-hero__slide,
.cm-hero__media,
.cm-hero__content {
	position: absolute;
	inset: 0;
}

.cm-hero__slide {
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--cm-fade) ease, visibility 0s linear var(--cm-fade);
}

.cm-hero__slide.is-active {
	z-index: 1;
	opacity: 1;
	visibility: visible;
	transition: opacity var(--cm-fade) ease, visibility 0s;
}

/* Image: slow zoom-out while the slide is on screen. */
.cm-hero .cm-hero__img {
	position: absolute;
	inset: 0;
	inline-size: 100%;
	block-size: 100%;
	max-inline-size: none;
	object-fit: cover;
	transform: scale(1.1);
	transition: transform 8s cubic-bezier(0.2, 0.6, 0.3, 1);
	will-change: transform;
}

.cm-hero__slide.is-active .cm-hero__img {
	transform: scale(1);
}

/* Legibility scrim: darker at the bottom (text + controls) and at the top (transparent header). */
.cm-hero__media::after {
	content: "";
	position: absolute;
	inset: 0;
	background:
		linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, rgba(0, 0, 0, 0.28) 38%, rgba(0, 0, 0, 0.12) 62%, rgba(0, 0, 0, 0.45) 100%);
}

.cm-hero__inner {
	inline-size: min(1240px, 100% - 2 * var(--cm-gutter));
	margin-inline: auto;
}

.cm-hero__content {
	display: flex;
	align-items: center;
	padding-block: 120px 140px;
}

.cm-hero__count,
.cm-hero .cm-hero__title,
.cm-hero__cta {
	opacity: 0;
	transform: translateY(22px);
	transition: opacity 500ms ease, transform 500ms ease;
}

.cm-hero__slide.is-active .cm-hero__count,
.cm-hero__slide.is-active .cm-hero__title,
.cm-hero__slide.is-active .cm-hero__cta {
	opacity: 1;
	transform: none;
	transition: opacity 800ms ease, transform 900ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.cm-hero__slide.is-active .cm-hero__count { transition-delay: 250ms; }
.cm-hero__slide.is-active .cm-hero__title { transition-delay: 380ms; }
.cm-hero__slide.is-active .cm-hero__cta { transition-delay: 540ms; }

.cm-hero__count {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 clamp(14px, 2.2vh, 26px);
	font-size: 13px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.22em;
	color: rgba(255, 255, 255, 0.7);
	direction: ltr;
	justify-content: flex-start;
}

[dir="rtl"] .cm-hero__count {
	justify-content: flex-end;
}

.cm-hero__count b {
	font-weight: 500;
	color: #fff;
}

.cm-hero__count i {
	inline-size: 40px;
	block-size: 1px;
	background: rgba(255, 255, 255, 0.5);
}

.cm-hero .cm-hero__title {
	margin: 0 0 clamp(20px, 3.4vh, 40px);
	max-inline-size: 18ch;
	font-family: inherit;
	font-size: clamp(2.125rem, 1.15rem + 3.9vw, 4.75rem);
	font-weight: 300;
	line-height: 1.08;
	letter-spacing: -0.01em;
	color: #fff;
	text-wrap: balance;
	text-shadow: 0 2px 30px rgba(0, 0, 0, 0.35);
}

.cm-hero .cm-hero__cta {
	display: inline-flex;
	align-items: center;
	gap: 14px;
	padding-block: 10px;
	border-block-end: 2px solid var(--cm-accent);
	font-size: clamp(1rem, 0.92rem + 0.35vw, 1.25rem);
	font-weight: 400;
	line-height: 1.2;
	color: #fff;
	text-decoration: none;
}

.cm-hero__arrow {
	flex: none;
	transition: transform 300ms ease;
}

[dir="rtl"] .cm-hero__arrow {
	transform: scaleX(-1);
}

.cm-hero__cta:hover .cm-hero__arrow,
.cm-hero__cta:focus-visible .cm-hero__arrow {
	transform: translateX(6px);
}

[dir="rtl"] .cm-hero__cta:hover .cm-hero__arrow,
[dir="rtl"] .cm-hero__cta:focus-visible .cm-hero__arrow {
	transform: scaleX(-1) translateX(6px);
}

/* Controls */
.cm-hero__ui {
	position: absolute;
	z-index: 3;
	inset-inline: 0;
	inset-block-end: clamp(22px, 5vh, 56px);
	pointer-events: none;
}

.cm-hero__ui .cm-hero__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cm-hero__dots,
.cm-hero__nav {
	display: flex;
	align-items: center;
	pointer-events: auto;
}

.cm-hero__dots { gap: 10px; }
.cm-hero__nav { gap: 12px; }

.cm-hero .cm-hero__dot,
.cm-hero .cm-hero__btn {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	color: #fff;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.cm-hero .cm-hero__dot {
	display: flex;
	align-items: center;
	inline-size: 34px;
	block-size: 32px;
	transition: inline-size 400ms ease;
}

.cm-hero .cm-hero__dot.is-active {
	inline-size: 72px;
}

.cm-hero__dot span {
	position: relative;
	display: block;
	inline-size: 100%;
	block-size: 2px;
	overflow: hidden;
	background: rgba(255, 255, 255, 0.35);
	transition: background-color 200ms ease;
}

.cm-hero__dot:hover span {
	background: rgba(255, 255, 255, 0.7);
}

.cm-hero__dot span::after {
	content: "";
	position: absolute;
	inset: 0;
	background: #fff;
	transform: scaleX(0);
	transform-origin: left center;
}

[dir="rtl"] .cm-hero__dot span::after {
	transform-origin: right center;
}

.cm-hero__dot.is-active span::after {
	transform: scaleX(1);
}

.cm-hero.is-playing .cm-hero__dot.is-active span::after {
	animation: cm-hero-progress var(--cm-autoplay, 6000ms) linear both;
}

.cm-hero.is-paused .cm-hero__dot.is-active span::after {
	animation-play-state: paused;
}

@keyframes cm-hero-progress {
	from { transform: scaleX(0); }
	to { transform: scaleX(1); }
}

.cm-hero .cm-hero__btn {
	display: grid;
	place-items: center;
	inline-size: 52px;
	block-size: 52px;
	border: 1px solid rgba(255, 255, 255, 0.45);
	border-radius: 50%;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
}

.cm-hero .cm-hero__btn:hover {
	border-color: #fff;
	background: #fff;
	color: #111;
}

/* "Previous" points against the reading direction, "next" along it. */
.cm-hero__btn--prev .cm-hero__arrow { transform: scaleX(-1); }
[dir="rtl"] .cm-hero__btn--prev .cm-hero__arrow { transform: none; }

.cm-hero :focus-visible {
	outline: 2px solid #fff;
	outline-offset: 4px;
}

/* Tablet */
@media (max-width: 1024px) {
	.cm-hero {
		block-size: 88svh;
		min-block-size: 520px;
	}

	.cm-hero__content {
		align-items: flex-end;
		padding-block: 110px 150px;
	}

	.cm-hero .cm-hero__btn {
		inline-size: 48px;
		block-size: 48px;
	}
}

/* Mobile */
@media (max-width: 767px) {
	.cm-hero {
		block-size: 82svh;
		min-block-size: 480px;
	}

	.cm-hero__content {
		padding-block: 90px 124px;
	}

	.cm-hero .cm-hero__title {
		max-inline-size: 14ch;
	}

	.cm-hero .cm-hero__dot {
		inline-size: 22px;
	}

	.cm-hero .cm-hero__dot.is-active {
		inline-size: 44px;
	}

	.cm-hero__dots { gap: 8px; }
	.cm-hero__nav { gap: 10px; }

	.cm-hero .cm-hero__btn {
		inline-size: 44px;
		block-size: 44px;
	}
}

/* The site's accessibility button is fixed to the left edge; in LTR the text starts there, so step it clear. */
@media (max-width: 1024px) {
	[dir="ltr"] .cm-hero,
	.cm-hero[dir="ltr"] {
		--cm-gutter: 64px;
	}
}

/* Short landscape phones */
@media (max-height: 520px) and (orientation: landscape) {
	.cm-hero {
		block-size: 100svh;
		min-block-size: 340px;
	}

	.cm-hero__content {
		padding-block: 70px 84px;
	}

	.cm-hero .cm-hero__title {
		max-inline-size: none;
		font-size: 2rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.cm-hero {
		--cm-fade: 1ms;
	}

	.cm-hero .cm-hero__img,
	.cm-hero__count,
	.cm-hero .cm-hero__title,
	.cm-hero__cta,
	.cm-hero__arrow {
		transform: none !important;
		transition: opacity 1ms !important;
	}

	.cm-hero.is-playing .cm-hero__dot.is-active span::after {
		animation: none;
	}
}
