/* ==========================================================================
   Coach Bhairy Widgets — Hero Carousel (.cb-hc) + Page Hero (.cb-ph)
   Brand: maroon #962D3E · charcoal #515151 · accent gold #E9B85C
   ========================================================================== */

.cb-hc,
.cb-ph {
	--cb-brand: #962D3E;
	--cb-brand-dark: #5e1724;
	--cb-accent: #E9B85C;
	--cb-ink: #1c1214;
	--cb-overlay: .85;
	--cb-font-head: "Playfair Display", Georgia, "Times New Roman", serif;
	--cb-font-body: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	position: relative;
	overflow: hidden;
	isolation: isolate;
	color: #fff;
	background: var(--cb-ink);
	font-family: var(--cb-font-body);
}

/* ---------- Shared buttons ---------- */
.cb-btn {
	display: inline-flex;
	align-items: center;
	gap: .6em;
	padding: .95em 1.7em;
	border-radius: 999px;
	font: 600 .95rem/1 var(--cb-font-body);
	letter-spacing: .02em;
	text-decoration: none !important;
	transition: transform .25s ease, background-color .25s ease, color .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.cb-btn svg { transition: transform .25s ease; }
.cb-btn:hover svg { transform: translateX(4px); }
.cb-btn--primary {
	background: var(--cb-brand);
	color: #fff !important;
	box-shadow: 0 10px 30px -10px rgba(150, 45, 62, .8);
}
.cb-btn--primary:hover { background: var(--cb-brand-dark); transform: translateY(-2px); }
.cb-btn--ghost {
	border: 1.5px solid rgba(255, 255, 255, .7);
	color: #fff !important;
	background: rgba(255, 255, 255, .06);
	backdrop-filter: blur(4px);
}
.cb-btn--ghost:hover { background: #fff; color: var(--cb-brand) !important; border-color: #fff; }
.cb-btn:focus-visible,
.cb-hc button:focus-visible,
.cb-hc__scroll:focus-visible,
.cb-ph__crumbs a:focus-visible {
	outline: 3px solid var(--cb-accent);
	outline-offset: 3px;
}

/* ---------- Shared eyebrow ---------- */
.cb-hc__eyebrow,
.cb-ph__eyebrow {
	display: inline-flex;
	align-items: center;
	gap: .8em;
	margin: 0 0 1.1rem;
	color: var(--cb-accent);
	font: 600 .8rem/1.2 var(--cb-font-body);
	letter-spacing: .22em;
	text-transform: uppercase;
}
.cb-hc__eyebrow::before,
.cb-ph__eyebrow::before {
	content: "";
	width: 2.6em;
	height: 2px;
	background: currentColor;
	border-radius: 2px;
}

/* ==========================================================================
   HERO CAROUSEL
   ========================================================================== */
.cb-hc {
	--cb-hc-h: 88vh;
	height: var(--cb-hc-h);
	min-height: 600px;
	max-height: 1000px;
	outline: none;
}
.cb-hc__track { position: absolute; inset: 0; }

.cb-hc__slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	visibility: hidden;
	transition: opacity 1.1s ease, visibility 0s linear 1.1s;
}
.cb-hc__slide.is-active {
	opacity: 1;
	visibility: visible;
	z-index: 2;
	transition: opacity 1.1s ease, visibility 0s;
}
.cb-hc__slide.is-leaving { visibility: visible; z-index: 1; }

.cb-hc__media,
.cb-hc__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}
.cb-hc__media img {
	object-fit: cover;
	object-position: center;
	transform: scale(1.06);
	transform-origin: 60% 50%;
}
.cb-hc__slide--left .cb-hc__media img { object-position: 25% 50%; }
.cb-hc__slide--right .cb-hc__media img { object-position: 75% 50%; }
.cb-hc__slide.is-active .cb-hc__media img,
.cb-hc__slide.is-leaving .cb-hc__media img {
	animation: cbKenBurns 9s cubic-bezier(.2, .6, .35, 1) forwards;
}
@keyframes cbKenBurns {
	/* gentle: a big zoom upscales the photo and makes it look soft */
	from { transform: scale(1.06) translate3d(0, 0, 0); }
	to   { transform: scale(1.0) translate3d(-.5%, 0, 0); }
}

.cb-hc__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg,
			rgba(28, 12, 16, var(--cb-overlay)) 0%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .72)) 38%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .2)) 72%,
			rgba(28, 12, 16, 0) 100%),
		linear-gradient(0deg, rgba(20, 8, 11, .65) 0%, rgba(20, 8, 11, 0) 35%),
		radial-gradient(120% 80% at 0% 100%, rgba(150, 45, 62, .45), transparent 60%);
}

/* text on the right: mirror gradient + push content right */
.cb-hc__slide--text-right .cb-hc__shade {
	background:
		linear-gradient(270deg,
			rgba(28, 12, 16, var(--cb-overlay)) 0%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .72)) 38%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .2)) 72%,
			rgba(28, 12, 16, 0) 100%),
		linear-gradient(0deg, rgba(20, 8, 11, .65) 0%, rgba(20, 8, 11, 0) 35%),
		radial-gradient(120% 80% at 100% 100%, rgba(150, 45, 62, .45), transparent 60%);
}
.cb-hc__slide--text-right .cb-hc__content { justify-content: flex-end; }
.cb-hc__slide--text-right .cb-hc__inner { max-width: 600px; }

.cb-hc__content {
	position: relative;
	z-index: 3;
	height: 100%;
	max-width: 1240px;
	margin: 0 auto;
	/* top: clears the fixed header; bottom: clears the slide numbers / arrows */
	padding: 96px 32px 124px;
	display: flex;
	align-items: center;
}
.cb-hc__inner { max-width: 660px; }

.cb-hc__title {
	margin: 0 0 1.25rem;
	color: #fff;
	font: 700 clamp(2.2rem, 4.8vw, 4.1rem)/1.08 var(--cb-font-head);
	letter-spacing: -.01em;
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.cb-hc__text {
	margin: 0 0 2rem;
	max-width: 34em;
	color: rgba(255, 255, 255, .9);
	font: 400 clamp(1rem, 1.3vw, 1.15rem)/1.7 var(--cb-font-body);
}
.cb-hc__actions { display: flex; flex-wrap: wrap; gap: 14px; }

/* staggered entrance */
.cb-hc__eyebrow, .cb-hc__title, .cb-hc__text, .cb-hc__actions { opacity: 0; }
.cb-hc__slide.is-active .cb-hc__eyebrow { animation: cbRise .8s .35s cubic-bezier(.2, .7, .2, 1) both; }
.cb-hc__slide.is-active .cb-hc__title   { animation: cbRise .9s .5s  cubic-bezier(.2, .7, .2, 1) both; }
.cb-hc__slide.is-active .cb-hc__text    { animation: cbRise .9s .68s cubic-bezier(.2, .7, .2, 1) both; }
.cb-hc__slide.is-active .cb-hc__actions { animation: cbRise .9s .85s cubic-bezier(.2, .7, .2, 1) both; }
@keyframes cbRise {
	from { opacity: 0; transform: translate3d(0, 28px, 0); }
	to   { opacity: 1; transform: none; }
}

/* controls */
.cb-hc__ui {
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: 34px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 32px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	pointer-events: none;
}
.cb-hc__ui > * { pointer-events: auto; }
.cb-hc__dots { display: flex; gap: 6px; }
.cb-hc__dot {
	position: relative;
	padding: 10px 0 12px;
	width: 56px;
	border: 0;
	background: none;
	color: rgba(255, 255, 255, .55);
	font: 600 .78rem/1 var(--cb-font-body);
	letter-spacing: .08em;
	text-align: left;
	cursor: pointer;
	transition: color .25s ease;
}
.cb-hc__dot::after {
	content: "";
	position: absolute;
	left: 0;
	right: 8px;
	bottom: 0;
	height: 2px;
	background: rgba(255, 255, 255, .3);
	transition: background-color .25s ease;
}
.cb-hc__dot:hover,
.cb-hc__dot.is-active { color: #fff; }
.cb-hc__dot.is-active::after { background: var(--cb-accent); }

.cb-hc__arrows { display: flex; gap: 10px; }
.cb-hc__arrow {
	display: grid;
	place-items: center;
	width: 50px;
	height: 50px;
	padding: 0;
	border: 1.5px solid rgba(255, 255, 255, .45);
	border-radius: 50%;
	background: rgba(255, 255, 255, .06);
	backdrop-filter: blur(4px);
	color: #fff;
	cursor: pointer;
	transition: background-color .25s ease, border-color .25s ease, color .25s ease, transform .25s ease;
}
.cb-hc__arrow:hover { background: #fff; border-color: #fff; color: var(--cb-brand); transform: translateY(-2px); }
.cb-hc__pause .i-play { display: none; }
.cb-hc__pause[aria-pressed="true"] .i-play { display: block; }
.cb-hc__pause[aria-pressed="true"] .i-pause { display: none; }

.cb-hc__progress {
	position: absolute;
	z-index: 5;
	left: 0;
	right: 0;
	bottom: 0;
	height: 4px;
	background: rgba(255, 255, 255, .12);
}
.cb-hc__progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient(90deg, var(--cb-brand), var(--cb-accent));
}
.cb-hc.is-ticking .cb-hc__progress span { animation: cbProgress var(--cb-hc-delay, 6500ms) linear forwards; }
.cb-hc.is-paused .cb-hc__progress span { animation-play-state: paused; }
@keyframes cbProgress { from { width: 0; } to { width: 100%; } }

.cb-hc__scroll {
	position: absolute;
	z-index: 5;
	left: 50%;
	bottom: 30px;
	width: 26px;
	height: 42px;
	margin-left: -13px;
	border: 2px solid rgba(255, 255, 255, .6);
	border-radius: 14px;
}
.cb-hc__scroll span {
	position: absolute;
	left: 50%;
	top: 8px;
	width: 4px;
	height: 8px;
	margin-left: -2px;
	border-radius: 2px;
	background: #fff;
	animation: cbScroll 1.8s ease-in-out infinite;
}
@keyframes cbScroll {
	0% { opacity: 0; transform: translateY(0); }
	30% { opacity: 1; }
	100% { opacity: 0; transform: translateY(14px); }
}
.cb-hc__end { position: absolute; bottom: 0; }

/* ==========================================================================
   PAGE HERO
   ========================================================================== */
.cb-ph {
	--cb-ph-h: 64vh;
	--cb-ph-curve: #fff;
	--cb-overlay: .8;
	/* grows with its text on short screens instead of letting a long title run under the header */
	min-height: clamp(460px, var(--cb-ph-h), 760px);
	display: flex;
	align-items: center;
}
.cb-ph__media,
.cb-ph__media img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}
.cb-ph__media img {
	object-fit: cover;
	object-position: center;
	animation: cbPhZoom 14s ease-out both;
}
.cb-ph--focus-left .cb-ph__media img { object-position: 25% 50%; }
.cb-ph--focus-right .cb-ph__media img { object-position: 75% 50%; }
.cb-ph--focus-left.cb-ph--focus-top .cb-ph__media img { object-position: 25% 0%; }
.cb-ph--focus-center.cb-ph--focus-top .cb-ph__media img { object-position: 50% 0%; }
.cb-ph--focus-right.cb-ph--focus-top .cb-ph__media img { object-position: 75% 0%; }
.cb-ph--focus-left.cb-ph--focus-bottom .cb-ph__media img { object-position: 25% 100%; }
.cb-ph--focus-center.cb-ph--focus-bottom .cb-ph__media img { object-position: 50% 100%; }
.cb-ph--focus-right.cb-ph--focus-bottom .cb-ph__media img { object-position: 75% 100%; }
.cb-ph--focus-top .cb-ph__media img { transform-origin: 50% 0; }
.cb-ph--still .cb-ph__media img { animation: none; }
@keyframes cbPhZoom { from { transform: scale(1.05); } to { transform: scale(1); } }

.cb-ph__shade {
	position: absolute;
	inset: 0;
	background:
		linear-gradient(90deg,
			rgba(28, 12, 16, var(--cb-overlay)) 0%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .7)) 45%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .25)) 100%),
		radial-gradient(90% 90% at 100% 0%, rgba(233, 184, 92, .18), transparent 55%),
		radial-gradient(110% 90% at 0% 100%, rgba(150, 45, 62, .55), transparent 60%);
}
.cb-ph--center .cb-ph__shade {
	background:
		linear-gradient(0deg, rgba(28, 12, 16, var(--cb-overlay)), rgba(28, 12, 16, calc(var(--cb-overlay) * .55))),
		radial-gradient(110% 90% at 50% 100%, rgba(150, 45, 62, .5), transparent 60%);
}

.cb-ph--right .cb-ph__shade {
	background:
		linear-gradient(270deg,
			rgba(28, 12, 16, var(--cb-overlay)) 0%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .7)) 45%,
			rgba(28, 12, 16, calc(var(--cb-overlay) * .25)) 100%),
		radial-gradient(90% 90% at 0% 0%, rgba(233, 184, 92, .18), transparent 55%),
		radial-gradient(110% 90% at 100% 100%, rgba(150, 45, 62, .55), transparent 60%);
}
.cb-ph--right .cb-ph__inner { margin-left: auto; max-width: 640px; }

.cb-ph__content {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 1240px;
	margin: 0 auto;
	padding: calc(var(--cb-header-h, 92px) + 36px) 32px 96px;
}
.cb-ph__inner { max-width: 720px; }
.cb-ph--center .cb-ph__inner { margin: 0 auto; text-align: center; }
.cb-ph--center .cb-ph__crumbs,
.cb-ph--center .cb-ph__actions { justify-content: center; }

.cb-ph__crumbs {
	display: flex;
	flex-wrap: wrap;
	gap: .6em;
	margin-bottom: 1.4rem;
	color: rgba(255, 255, 255, .75);
	font: 500 .85rem/1.4 var(--cb-font-body);
}
.cb-ph__crumbs a { color: #fff; text-decoration: none; }
.cb-ph__crumbs a:hover { color: var(--cb-accent); }

.cb-ph__title {
	margin: 0 0 1.1rem;
	color: #fff;
	font: 700 clamp(2rem, 4.2vw, 3.5rem)/1.12 var(--cb-font-head);
	text-wrap: balance;
	text-shadow: 0 2px 24px rgba(0, 0, 0, .25);
}
.cb-ph__subtitle {
	margin: 0;
	max-width: 36em;
	color: rgba(255, 255, 255, .9);
	font: 400 clamp(1rem, 1.3vw, 1.15rem)/1.7 var(--cb-font-body);
}
.cb-ph--center .cb-ph__subtitle { margin: 0 auto; }
.cb-ph__actions { display: flex; margin-top: 2rem; }

.cb-ph__crumbs, .cb-ph__eyebrow, .cb-ph__title, .cb-ph__subtitle, .cb-ph__actions { animation: cbRise .9s cubic-bezier(.2, .7, .2, 1) both; }
.cb-ph__eyebrow  { animation-delay: .15s; }
.cb-ph__title    { animation-delay: .3s; }
.cb-ph__subtitle { animation-delay: .45s; }
.cb-ph__actions  { animation-delay: .6s; }

.cb-ph__curve {
	position: absolute;
	z-index: 3;
	left: 0;
	bottom: -1px;
	width: 100%;
	height: 60px;
	color: var(--cb-ph-curve);
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.cb-hc__content, .cb-hc__ui, .cb-ph__content { padding-left: 24px; padding-right: 24px; }
	.cb-hc__scroll { display: none; }
}

@media (max-width: 767px) {
	.cb-hc { min-height: 620px; height: min(var(--cb-hc-h), 100svh); }
	.cb-hc__shade {
		background:
			linear-gradient(0deg,
				rgba(28, 12, 16, .95) 0%,
				rgba(28, 12, 16, calc(var(--cb-overlay) * .8)) 45%,
				rgba(28, 12, 16, .15) 80%,
				rgba(28, 12, 16, .3) 100%);
	}
	.cb-hc__content { align-items: flex-end; padding: 0 20px 112px; }
	.cb-hc__title { font-size: clamp(1.9rem, 8.4vw, 2.5rem); }
	.cb-hc__text { font-size: .98rem; margin-bottom: 1.5rem; }
	.cb-hc__btn, .cb-btn { padding: .9em 1.35em; font-size: .9rem; }
	.cb-hc__ui { bottom: 26px; padding: 0 20px; }
	.cb-hc__dot { width: 38px; font-size: .72rem; }
	.cb-hc__arrow { width: 42px; height: 42px; }
	.cb-hc__arrow[data-dir] { display: none; } /* swipe on mobile; keep pause */

	.cb-ph { min-height: max(540px, 72svh); align-items: flex-end; }
	.cb-ph__shade {
		background: linear-gradient(0deg, rgba(28, 12, 16, .95) 0%, rgba(28, 12, 16, calc(var(--cb-overlay) * .7)) 55%, rgba(28, 12, 16, .3) 100%);
	}
	.cb-ph__content { padding: calc(var(--cb-header-h, 72px) + 40px) 20px 70px; }
	.cb-ph__curve { height: 32px; }
}

/* Short laptop screens (e.g. 1366×650 browser viewport): tighten the hero type so the
   text block always ends above the slide numbers / arrows. */
@media (min-width: 768px) and (max-height: 820px) {
	.cb-hc__content { padding-top: 92px; padding-bottom: 104px; }
	.cb-hc__eyebrow { margin-bottom: .8rem; }
	.cb-hc__title { font-size: clamp(2rem, 3.3vw, 2.9rem); margin-bottom: .9rem; }
	.cb-hc__text { margin-bottom: 1.3rem; font-size: 1rem; line-height: 1.6; }
	.cb-hc__ui { bottom: 26px; }
}
@media (prefers-reduced-motion: reduce) {
	.cb-hc *, .cb-ph * { animation: none !important; transition: none !important; }
	.cb-hc__eyebrow, .cb-hc__title, .cb-hc__text, .cb-hc__actions { opacity: 1; }
	.cb-hc__media img { transform: none; }
}
