/**
 * Radu Sava Widgets — Showreel Hero Slider Styles
 *
 * Scoped strictly under .rs-showreel.
 * Full viewport height, dark theme, smooth slide transitions, and interactive controls.
 */

/* ==========================================================================
   Root Section Container
   ========================================================================== */

.rs-showreel {
	position: relative;
	width: 100%;
	min-height: 100vh;
	min-height: 100svh;
	overflow: hidden;
	background: var(--rs-film, #0b0b0a);
	color: var(--rs-white, #ffffff);
	padding-top: var(--rs-header-h, 0px);
	box-sizing: border-box;
	touch-action: pan-y;
	user-select: none;
	-webkit-user-select: none;
}

/* ==========================================================================
   Slides Stage & Transitions
   ========================================================================== */

.rs-showreel__slides {
	position: absolute;
	inset: 0;
	z-index: 0;
	isolation: isolate;
	overflow: hidden;
}

.rs-showreel__slide {
	position: absolute;
	inset: 0;
	overflow: hidden;
	visibility: hidden;
	will-change: transform;
	background: var(--rs-film, #0b0b0a);
}

.rs-showreel__slide.is-active {
	visibility: visible;
}

.rs-showreel__img {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-repeat: no-repeat;
	transform: scale(1.04);
}

.rs-showreel__slide.is-active .rs-showreel__img {
	animation: rs-kb 7s linear forwards;
}

@keyframes rs-kb {
	from {
		transform: scale(1.04);
	}
	to {
		transform: scale(1);
	}
}

.rs-showreel__video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* Gradient shade over media */
.rs-showreel__shade {
	position: absolute;
	inset: 0;
	z-index: 1;
	background: linear-gradient(
		0deg,
		rgba(0, 0, 0, 0.82) 0%,
		rgba(0, 0, 0, 0.5) 26%,
		rgba(0, 0, 0, 0.12) 52%,
		rgba(0, 0, 0, 0) 64%
	);
	pointer-events: none;
}

/* Drag touch zone */
.rs-showreel__drag-zone {
	position: absolute;
	inset: 0;
	z-index: 2;
	cursor: auto;
}

.rs-showreel.is-dragging .rs-showreel__drag-zone {
	cursor: auto;
}

/* ==========================================================================
   Round Drag Cursor
   ========================================================================== */

.rs-showreel__dcur {
	position: fixed;
	left: 0;
	top: 0;
	z-index: 45;
	width: 88px;
	height: 88px;
	margin: -44px 0 0 -44px;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.85);
	color: var(--rs-white, #ffffff);
	display: grid;
	place-items: center;
	pointer-events: none;
	opacity: 0;
	scale: 0.6;
	transition: opacity 0.25s ease, scale 0.25s ease;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
	box-sizing: border-box;
}

.rs-showreel__dcur.is-on {
	opacity: 1;
	scale: 1;
}

.rs-showreel__dcur.is-press {
	scale: 0.85;
}

.rs-showreel__dcur span {
	font-family: var(--rs-font-mono, "IBM Plex Mono", ui-monospace, monospace);
	font-size: 10px;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	display: flex;
	gap: 10px;
	align-items: center;
	color: var(--rs-white, #ffffff);
	user-select: none;
	-webkit-user-select: none;
}

@media (hover: none) {
	.rs-showreel__dcur {
		display: none !important;
	}
}

/* ==========================================================================
   Bottom Foot Bar Layout
   ========================================================================== */

.rs-showreel__foot {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 4;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
	align-items: end;
	gap: 24px;
	padding: clamp(16px, 1.8vw, 36px) var(--rs-gutter, clamp(1rem, 3.2vw, 3.84rem));
	text-shadow: 0 1px 14px rgba(0, 0, 0, 0.35);
	box-sizing: border-box;
}

/* Captions (Left) */
.rs-showreel__cap {
	display: flex;
	flex-direction: column;
	gap: 10px;
	text-decoration: none;
	color: var(--rs-white, #ffffff);
	justify-self: start;
	min-width: 0;
	transition: opacity 0.3s ease;
}

.rs-showreel__cap:hover {
	opacity: 0.85;
}

.rs-showreel__cap .rs-mono {
	opacity: 0.8;
	font-family: var(--rs-font-mono, "IBM Plex Mono", ui-monospace, monospace);
	font-size: clamp(10px, 0.68vw, 14px);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.rs-showreel__cap b {
	font-family: var(--rs-font-display, "Cormorant Garamond", Georgia, serif);
	font-weight: 300;
	font-style: italic;
	font-size: clamp(44px, 5.4vw, 140px);
	line-height: 0.9;
	letter-spacing: -0.01em;
	color: var(--rs-white, #ffffff);
}

/* Fade swap animation */
.rs-showreel__swap {
	transition: opacity 0.45s ease, transform 0.45s ease;
}

.rs-showreel__swap.is-out {
	opacity: 0;
	transform: translateY(8px);
}

/* Center Navigation Controls */
.rs-showreel__mid {
	justify-self: center;
	align-self: end;
	display: flex;
	align-items: flex-end;
	gap: clamp(24px, 3vw, 72px);
}

.rs-showreel .rs-showreel__na,
.rs-showreel__na {
	-webkit-appearance: none;
	appearance: none;
	background: none !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--rs-white, #ffffff);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 14px;
	min-height: 44px;
	padding: 8px 4px;
	opacity: 0.72;
	transition: opacity 0.3s ease;
	font-family: var(--rs-font-mono, "IBM Plex Mono", ui-monospace, monospace);
	font-size: clamp(10px, 0.68vw, 14px);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.rs-showreel .rs-showreel__na:hover,
.rs-showreel .rs-showreel__na:focus,
.rs-showreel .rs-showreel__na:focus-visible,
.rs-showreel__na:hover,
.rs-showreel__na:focus,
.rs-showreel__na:focus-visible {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--rs-white, #ffffff);
	opacity: 1;
}

.rs-showreel .rs-showreel__na:focus-visible,
.rs-showreel__na:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

.rs-showreel .rs-showreel__na svg,
.rs-showreel__na svg {
	width: clamp(44px, 3.4vw, 72px);
	height: 12px;
	overflow: visible;
	transition: transform 0.45s var(--rs-ease, cubic-bezier(.2, .7, .2, 1));
}

.rs-showreel .rs-showreel__na--prev:hover svg,
.rs-showreel__na--prev:hover svg {
	transform: translateX(-6px);
}

.rs-showreel .rs-showreel__na--next:hover svg,
.rs-showreel__na--next:hover svg {
	transform: translateX(6px);
}

/* Scroll to next section button */
.rs-showreel .rs-showreel__scroll,
.rs-showreel__scroll {
	-webkit-appearance: none;
	appearance: none;
	align-self: end;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--rs-white, #ffffff);
	cursor: pointer;
	padding: 8px 12px;
	font-family: var(--rs-font-mono, "IBM Plex Mono", ui-monospace, monospace);
	font-size: clamp(10px, 0.68vw, 14px);
	letter-spacing: 0.16em;
	text-transform: uppercase;
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.rs-showreel .rs-showreel__scroll:hover,
.rs-showreel .rs-showreel__scroll:focus,
.rs-showreel .rs-showreel__scroll:focus-visible,
.rs-showreel__scroll:hover,
.rs-showreel__scroll:focus,
.rs-showreel__scroll:focus-visible {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	color: var(--rs-white, #ffffff);
	opacity: 1;
}

.rs-showreel .rs-showreel__scroll:focus-visible,
.rs-showreel__scroll:focus-visible {
	outline: 1px solid currentColor;
	outline-offset: 4px;
}

.rs-showreel .rs-showreel__scroll i,
.rs-showreel__scroll i {
	position: relative;
	width: 1px;
	height: clamp(40px, 4vw, 84px);
	background: rgba(255, 255, 255, 0.28);
	overflow: hidden;
	display: block;
}

.rs-showreel .rs-showreel__scroll i::after,
.rs-showreel__scroll i::after {
	content: "";
	position: absolute;
	left: 0;
	top: 0;
	width: 1px;
	height: 40%;
	background: var(--rs-white, #ffffff);
	animation: rs-scrolldrop 2.2s cubic-bezier(.7, 0, .2, 1) infinite;
}

@keyframes rs-scrolldrop {
	0% {
		transform: translateY(-100%);
	}
	100% {
		transform: translateY(260%);
	}
}

/* Right CTA with Ring */
.rs-showreel__cta {
	justify-self: end;
	display: flex;
	align-items: center;
	gap: 16px;
	text-decoration: none;
	color: var(--rs-white, #ffffff);
	min-height: 48px;
}

.rs-showreel__cta-txt {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	text-align: right;
}

.rs-showreel__cta-txt small {
	opacity: 0.7;
	font-family: var(--rs-font-mono, "IBM Plex Mono", ui-monospace, monospace);
	font-size: clamp(10px, 0.68vw, 14px);
	letter-spacing: 0.16em;
	text-transform: uppercase;
}

.rs-showreel__cta-txt b {
	font-weight: 500;
	font-size: clamp(12px, 0.86vw, 17px);
	font-family: var(--rs-font-body, "Manrope", system-ui, sans-serif);
}

.rs-showreel__ring {
	width: clamp(64px, 5vw, 110px);
	aspect-ratio: 1;
	border-radius: 50%;
	border: 1px solid rgba(255, 255, 255, 0.75);
	display: grid;
	place-items: center;
	transition: background 0.4s ease, color 0.4s ease, transform 0.4s ease;
	flex-shrink: 0;
}

.rs-showreel__cta:hover .rs-showreel__ring,
.rs-showreel__cta:focus-visible .rs-showreel__ring {
	background: var(--rs-white, #ffffff);
	color: var(--rs-film, #0b0b0a);
}

.rs-showreel__ring svg {
	width: 30%;
	height: auto;
}

.rs-showreel__arr {
	display: block;
}

.rs-showreel__ply {
	display: none;
}

/* Film slide CTA icon toggle */
.rs-showreel__cta--film .rs-showreel__arr {
	display: none;
}

.rs-showreel__cta--film .rs-showreel__ply {
	display: block;
}

/* ==========================================================================
   Progress Bars Row
   ========================================================================== */

.rs-showreel__progrow {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: clamp(12px, 1.2vw, 24px);
	margin-top: clamp(14px, 1.4vw, 28px);
	width: 100%;
}

.rs-showreel__prog {
	flex: 1;
	display: flex;
	gap: 6px;
	width: 100%;
}

.rs-showreel .rs-showreel__prog button,
.rs-showreel__prog button {
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	height: 22px;
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	padding: 10px 0;
	cursor: pointer;
	position: relative;
}

.rs-showreel .rs-showreel__prog button:hover,
.rs-showreel .rs-showreel__prog button:focus,
.rs-showreel .rs-showreel__prog button:focus-visible,
.rs-showreel__prog button:hover,
.rs-showreel__prog button:focus,
.rs-showreel__prog button:focus-visible {
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	outline: none;
}

.rs-showreel .rs-showreel__prog button::before,
.rs-showreel__prog button::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: 10px;
	height: 1px;
	background: rgba(255, 255, 255, 0.3);
}

.rs-showreel .rs-showreel__prog button i,
.rs-showreel__prog button i {
	position: absolute;
	left: 0;
	top: 10px;
	height: 1px;
	width: 0;
	background: var(--rs-white, #ffffff);
	display: block;
}

.rs-showreel .rs-showreel__prog button.is-done i,
.rs-showreel__prog button.is-done i {
	width: 100%;
}

.rs-showreel .rs-showreel__prog button.is-active i,
.rs-showreel__prog button.is-active i {
	animation: rs-prog-fill 5.5s linear forwards;
}

@keyframes rs-prog-fill {
	to {
		width: 100%;
	}
}

/* ==========================================================================
   Responsive Breakpoints
   ========================================================================== */

@media (max-width: 767px) {
	.rs-showreel__foot {
		grid-template-columns: 1fr 1fr;
	}

	.rs-showreel__cap {
		order: 0;
	}

	.rs-showreel__cta {
		order: 1;
	}

	.rs-showreel__mid {
		order: 2;
		grid-column: 1 / -1;
		justify-self: stretch;
		justify-content: space-between;
	}

	.rs-showreel__progrow {
		order: 3;
	}

	.rs-showreel__cta-txt small,
	.rs-showreel .rs-showreel__scroll,
	.rs-showreel__scroll {
		display: none;
	}

	.rs-showreel .rs-showreel__na svg,
	.rs-showreel__na svg {
		width: 36px;
	}

	.rs-showreel__cta-txt b {
		font-size: 11px;
	}
}

/* ==========================================================================
   Accessibility & Reduced Motion
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
	.rs-showreel *,
	.rs-showreel__slide *,
	.rs-showreel__foot * {
		animation: none !important;
		transition: none !important;
	}

	.rs-showreel__img {
		transform: none !important;
	}

	.rs-showreel__dcur {
		transition: opacity 0.25s ease !important;
		scale: 1 !important;
	}

	.rs-showreel__dcur.is-press {
		scale: 1 !important;
	}
}
