/* ==========================================================
   CUSTOM HERO SLIDER — FRONT-END STYLES
   All selectors are namespaced with .chs- to avoid collisions
   with themes, WPBakery, and other plugins.
========================================================== */

.chs-hero {
	--chs-ease: cubic-bezier(0.22, 1, 0.36, 1);
	--chs-transition: 900ms;
	--chs-height: 75vh;

	position: relative;
	width: 100%;
	height: var(--chs-height);
	min-height: 320px;
	overflow: hidden;
	isolation: isolate;
	background: #111;
	box-sizing: border-box;
	outline: none;
}

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

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

.chs-slides {
	position: absolute;
	inset: 0;
}

/* ---------------------------------------------------------
   SLIDE
--------------------------------------------------------- */

.chs-slide {
	position: absolute;
	inset: 0;
	z-index: 0;
	visibility: hidden;
	opacity: 0;
	transform: scale(1.035);
	pointer-events: none;
	transition:
		opacity var(--chs-transition) ease,
		transform calc(var(--chs-transition) * 1.7) var(--chs-ease),
		visibility var(--chs-transition);
}

.chs-hero.chs-anim-quick .chs-slide {
	transition:
		opacity calc(var(--chs-transition) * 0.6) ease,
		transform calc(var(--chs-transition) * 0.9) var(--chs-ease),
		visibility calc(var(--chs-transition) * 0.6);
}

.chs-slide.chs-is-active {
	z-index: 2;
	visibility: visible;
	opacity: 1;
	transform: scale(1);
	pointer-events: auto;
}

/* ---------------------------------------------------------
   IMAGE
--------------------------------------------------------- */

.chs-slide-image {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	background: #25231f;
}

.chs-slide-image.chs-image-fallback {
	background: linear-gradient(135deg, #2a2724, #171614);
}

/* ---------------------------------------------------------
   OVERLAY
--------------------------------------------------------- */

.chs-slide-overlay {
	position: absolute;
	inset: 0;
	z-index: 1;
	pointer-events: none;
	background:
		linear-gradient(90deg, rgba(24, 21, 18, 0.58) 0%, rgba(28, 25, 22, 0.38) 35%, rgba(20, 20, 19, 0.20) 68%, rgba(12, 12, 12, 0.30) 100%),
		linear-gradient(180deg, rgba(8, 8, 8, 0.10) 0%, rgba(8, 8, 8, 0.10) 42%, rgba(8, 8, 8, 0.72) 100%),
		rgba(25, 24, 22, 0.16);
	mix-blend-mode: multiply;
}

.chs-slide-overlay::after {
	content: "";
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse at 82% 50%, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.10) 28%, rgba(0, 0, 0, 0) 62%);
	pointer-events: none;
}

.chs-hero[data-chs-align="left"] .chs-slide-overlay::after {
	background: radial-gradient(ellipse at 18% 50%, rgba(0, 0, 0, 0.18) 0%, rgba(0, 0, 0, 0.10) 28%, rgba(0, 0, 0, 0) 62%);
}

.chs-hero[data-chs-align="center"] .chs-slide-overlay::after {
	background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, 0.20) 0%, rgba(0, 0, 0, 0.10) 30%, rgba(0, 0, 0, 0) 65%);
}

/* ---------------------------------------------------------
   CONTENT
--------------------------------------------------------- */

.chs-slide-content {
	position: relative;
	z-index: 5;
	width: 90%;
	max-width: 1280px;
	height: 100%;
	margin: 0 auto;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: flex-end;
	text-align: right;
}

.chs-hero[data-chs-align="left"] .chs-slide-content {
	align-items: flex-start;
	text-align: left;
}

.chs-hero[data-chs-align="center"] .chs-slide-content {
	align-items: center;
	text-align: center;
}

/* ---------------------------------------------------------
   HEADLINE
--------------------------------------------------------- */

.chs-slide-title {
	width: 100%;
	max-width: 980px;
	margin: 0;
	padding: 0;
	font-family: "Oswald", "Helvetica Neue", Arial, sans-serif;
	font-weight: 600;
	font-size: clamp(2.6rem, 6.5vw, 6.8rem);
	line-height: 1.02;
	letter-spacing: -0.018em;
	text-align: inherit;
	text-transform: uppercase;
	color: #fff;
	word-break: normal;
	overflow-wrap: normal;
	hyphens: none;
	text-shadow: none;
}

.chs-title-word {
	display: inline-block;
	white-space: nowrap;
	vertical-align: top;
}

.chs-title-word + .chs-title-word {
	margin-left: 0.24em;
}

.chs-letter {
	display: inline-block;
	opacity: 0;
	transform: translateY(48px) rotate(4deg);
	filter: blur(4px);
}

.chs-slide.chs-is-active .chs-letter {
	animation: chsLetterIn 650ms var(--chs-ease) forwards;
	animation-delay: calc(var(--chs-letter-index) * 55ms);
}

.chs-hero.chs-anim-quick .chs-slide.chs-is-active .chs-letter {
	animation-duration: 420ms;
	animation-delay: calc(var(--chs-letter-index) * 30ms);
}

@keyframes chsLetterIn {
	0% {
		opacity: 0;
		transform: translateY(48px) rotate(4deg);
		filter: blur(4px);
	}
	100% {
		opacity: 1;
		transform: translateY(0) rotate(0);
		filter: blur(0);
	}
}

/* ---------------------------------------------------------
   SUBHEADLINE
--------------------------------------------------------- */

.chs-slide-subtitle {
	width: 100%;
	max-width: 640px;
	margin: 30px 0 0;
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 18px;
	font-weight: 300;
	line-height: 1.65;
	letter-spacing: 0.005em;
	text-align: inherit;
	color: rgba(255, 255, 255, 0.90);
	text-shadow: none;
	opacity: 0;
	transform: translateY(30px);
}

.chs-hero[data-chs-align="right"] .chs-slide-subtitle,
.chs-hero[data-chs-align="left"] .chs-slide-subtitle {
	margin-left: 0;
}

.chs-hero[data-chs-align="right"] .chs-slide-subtitle {
	margin-left: auto;
}

.chs-hero[data-chs-align="center"] .chs-slide-subtitle {
	margin-left: auto;
	margin-right: auto;
}

.chs-slide.chs-is-active .chs-slide-subtitle {
	animation: chsRiseIn 850ms var(--chs-subtitle-delay, 700ms) var(--chs-ease) forwards;
}

.chs-hero.chs-anim-quick .chs-slide.chs-is-active .chs-slide-subtitle {
	animation-duration: 550ms;
}

@keyframes chsRiseIn {
	0% {
		opacity: 0;
		transform: translateY(30px);
	}
	100% {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ---------------------------------------------------------
   CTA BUTTON
--------------------------------------------------------- */

.chs-cta {
	display: inline-block;
	margin-top: 34px;
	padding: 14px 34px;
	font-family: "Montserrat", "Helvetica Neue", Arial, sans-serif;
	font-size: 13px;
	font-weight: 400;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	text-decoration: none;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.7);
	background: transparent;
	transition: background-color 250ms ease, color 250ms ease, border-color 250ms ease;
	opacity: 0;
	transform: translateY(24px);
}

.chs-cta:hover,
.chs-cta:focus-visible {
	background: #fff;
	color: #111;
}

.chs-cta:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.chs-slide.chs-is-active .chs-cta {
	animation: chsRiseIn 700ms var(--chs-cta-delay, 1200ms) var(--chs-ease) forwards;
}

.chs-hero.chs-anim-quick .chs-slide.chs-is-active .chs-cta {
	animation-duration: 480ms;
}

/* ---------------------------------------------------------
   PROGRESS BAR
--------------------------------------------------------- */

.chs-progress {
	position: absolute;
	left: 0;
	top: 0;
	z-index: 30;
	height: 2px;
	width: 100%;
	background: rgba(255, 255, 255, 0.10);
}

.chs-progress-bar {
	height: 100%;
	width: 0;
	background: rgba(255, 255, 255, 0.80);
}

.chs-progress-bar.chs-progress-running {
	animation: chsProgress linear forwards;
	animation-duration: var(--chs-progress-duration, 6000ms);
}

@keyframes chsProgress {
	from { width: 0; }
	to { width: 100%; }
}

/* ---------------------------------------------------------
   CONTROLS / ARROWS
--------------------------------------------------------- */

.chs-controls {
	position: absolute;
	left: 5%;
	bottom: 38px;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 8px;
}

.chs-hero[data-chs-align="left"] .chs-controls {
	left: auto;
	right: 5%;
}

.chs-arrow {
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.35);
	background: rgba(0, 0, 0, 0.10);
	color: #fff;
	cursor: pointer;
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	transition: background-color 250ms ease, border-color 250ms ease, transform 250ms ease;
	-webkit-tap-highlight-color: transparent;
}

.chs-arrow:hover {
	background: rgba(255, 255, 255, 0.12);
	transform: scale(1.06);
}

.chs-arrow:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 3px;
}

.chs-arrow svg {
	pointer-events: none;
}

/* ---------------------------------------------------------
   PAGINATION DOTS
--------------------------------------------------------- */

.chs-dots {
	position: absolute;
	right: 5%;
	bottom: 44px;
	z-index: 30;
	display: flex;
	align-items: center;
	gap: 10px;
}

.chs-hero[data-chs-align="left"] .chs-dots {
	right: auto;
	left: 5%;
}

.chs-hero[data-chs-align="center"] .chs-dots {
	left: 50%;
	right: auto;
	transform: translateX(-50%);
}

.chs-dot {
	width: 9px;
	height: 9px;
	padding: 0;
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.6);
	background: transparent;
	cursor: pointer;
	transition: background-color 250ms ease, width 250ms ease;
	-webkit-tap-highlight-color: transparent;
}

.chs-dot:hover {
	background: rgba(255, 255, 255, 0.4);
}

.chs-dot.chs-dot-active {
	width: 22px;
	background: #fff;
	border-color: #fff;
}

.chs-dot:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* ---------------------------------------------------------
   ADMIN NOTICE (front-end, editors only)
--------------------------------------------------------- */

.chs-admin-notice {
	padding: 16px 20px;
	background: #fff3cd;
	border: 1px solid #ffe69c;
	color: #664d03;
	font-family: sans-serif;
}

/* ---------------------------------------------------------
   MOBILE
--------------------------------------------------------- */

@media (max-width: 767px) {

	.chs-hero {
		height: min(var(--chs-height), 65vh);
		min-height: 380px;
	}

	.chs-slide-overlay {
		background:
			linear-gradient(180deg, rgba(20, 19, 17, 0.12) 0%, rgba(25, 23, 20, 0.16) 28%, rgba(20, 19, 17, 0.42) 55%, rgba(8, 8, 8, 0.84) 100%),
			linear-gradient(90deg, rgba(18, 17, 15, 0.20) 0%, rgba(18, 17, 15, 0.08) 55%, rgba(18, 17, 15, 0.30) 100%);
		mix-blend-mode: normal;
	}

	.chs-slide-content {
		width: 100%;
		padding: 24px 18px 62px;
		justify-content: center;
		align-items: flex-end;
	}

	.chs-hero[data-chs-align="left"] .chs-slide-content {
		align-items: flex-start;
	}

	.chs-hero[data-chs-align="center"] .chs-slide-content {
		align-items: center;
	}

	.chs-slide-title {
		font-size: clamp(2.1rem, 10.5vw, 4.2rem);
		line-height: 1.08;
		letter-spacing: -0.01em;
	}

	.chs-title-word + .chs-title-word {
		margin-left: 0.26em;
	}

	.chs-slide-subtitle {
		max-width: 400px;
		margin-top: 18px;
		font-size: clamp(0.92rem, 3.9vw, 1.12rem);
		line-height: 1.58;
	}

	.chs-cta {
		margin-top: 22px;
		padding: 12px 26px;
		font-size: 12px;
	}

	.chs-controls,
	.chs-dots {
		bottom: 16px;
	}

	.chs-controls { left: 18px; }
	.chs-hero[data-chs-align="left"] .chs-controls { right: 18px; left: auto; }
	.chs-dots { right: 18px; }
	.chs-hero[data-chs-align="left"] .chs-dots { left: 18px; right: auto; }

	.chs-arrow {
		width: 38px;
		height: 38px;
	}
}

@media (max-width: 380px) {
	.chs-slide-title { font-size: 2.1rem; }
	.chs-slide-subtitle { max-width: 300px; font-size: 0.85rem; }
	.chs-arrow { width: 34px; height: 34px; }
}

/* ---------------------------------------------------------
   REDUCED MOTION
--------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {

	.chs-slide {
		transition: opacity 200ms linear, visibility 200ms;
		transform: none !important;
	}

	.chs-letter,
	.chs-slide-subtitle,
	.chs-cta {
		animation: none !important;
		opacity: 1 !important;
		transform: none !important;
		filter: none !important;
	}

	.chs-progress-bar.chs-progress-running {
		animation: none !important;
		width: 100%;
	}
}

/* ---------------------------------------------------------
   NO-JS FALLBACK
   Without JavaScript, letters are never wrapped in .chs-letter
   spans, so .chs-slide-title simply shows as plain readable
   text (opacity defaults to visible for anything outside a
   .chs-letter/.chs-slide-subtitle/.chs-cta animation target).
   Only the first slide (server-rendered as chs-is-active) is
   shown; a no-JS visitor sees a static, fully usable hero with
   its background, headline, subheadline and CTA all visible.
--------------------------------------------------------- */
