/* BEC Expanding Cards */
.bec-xc {
	--bec-xc-height: 580px;
	--bec-xc-grow: 4.2;
	--bec-xc-gap: 12px;
	--bec-xc-collapsed: 92px;
	--bec-xc-expanded: 440px;
	--bec-xc-duration: 800ms;
	--bec-xc-zoom: 1.04;
	--bec-xc-tag-x: 20px;
	--bec-xc-tag-y: 20px;
	--bec-xc-indent: 96px;
	--bec-xc-title-gap: 12px;
	--bec-xc-ease: cubic-bezier(.22, .8, .2, 1);
	display: flex;
	gap: var(--bec-xc-gap);
	width: 100%;
	text-align: left;
}
.bec-xc.is-horizontal { flex-direction: row; height: var(--bec-xc-height); }
.bec-xc.is-vertical { flex-direction: column; height: auto; }

.bec-xc, .bec-xc *, .bec-xc *::before, .bec-xc *::after { box-sizing: border-box; }
.bec-xc__card {
	position: relative;
	isolation: isolate;
	overflow: hidden;
	flex: 1 1 0;
	min-width: 0;
	min-height: 0;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	padding: 24px;
	border-radius: 24px;
	background-color: #073D30;
	color: #FFFFFF;
	cursor: pointer;
	contain: layout paint;
	transition: flex-grow var(--bec-xc-duration) var(--bec-xc-ease), height var(--bec-xc-duration) var(--bec-xc-ease);
}
.bec-xc__card.is-active { cursor: default; }
.bec-xc.is-horizontal .bec-xc__card.is-active { flex-grow: var(--bec-xc-grow); }
.bec-xc.is-vertical .bec-xc__card { flex: none; height: var(--bec-xc-collapsed); }
.bec-xc.is-vertical .bec-xc__card.is-active { height: var(--bec-xc-expanded); }
.bec-xc__card:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

/* image */
.bec-xc__media { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.bec-xc__media img {
	position: absolute;
	top: 50%;
	left: 50%;
	width: var(--bec-xc-img-w, 100%) !important;
	height: var(--bec-xc-img-h, 100%) !important;
	max-width: none !important;
	object-fit: cover;
	object-position: var(--bec-xc-focus, center center);
	transform: translate3d(-50%, -50%, 0) scale(1);
	backface-visibility: hidden;
	will-change: transform;
	transition: transform calc(var(--bec-xc-duration) * 1.5) var(--bec-xc-ease);
}
.bec-xc__card.is-active .bec-xc__media img { transform: translate3d(-50%, -50%, 0) scale(var(--bec-xc-zoom)); }
.bec-xc.is-horizontal { --bec-xc-img-h: 100%; }
.bec-xc.is-vertical { --bec-xc-img-w: 100%; }
.bec-xc__overlay {
	position: absolute;
	inset: 0;
	z-index: -1;
	background-image: linear-gradient(180deg, rgba(10, 10, 6, .1) 38%, rgba(10, 10, 6, .82) 100%);
	transition: opacity .6s ease;
	pointer-events: none;
}

/* tag */
.bec-xc__tag {
	position: absolute;
	z-index: 2;
	top: var(--bec-xc-tag-y);
	left: var(--bec-xc-tag-x);
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px 6px 10px;
	border-radius: 999px;
	background-color: #FBF6EE;
	color: #14110A;
	font-size: 13px;
	line-height: 1.2;
	letter-spacing: .06em;
	white-space: nowrap;
	transition: transform .4s var(--bec-xc-ease), opacity .4s ease, background-color .3s, color .3s;
}
.bec-xc__tag-icon { display: inline-flex; line-height: 1; font-size: 18px; }
.bec-xc__tag-icon svg { width: 18px; height: 18px; fill: currentColor; }
.bec-xc-tag-fx-lift .bec-xc__card.is-active .bec-xc__tag { transform: translateY(-3px); }
.bec-xc-tag-fx-grow .bec-xc__card.is-active .bec-xc__tag { transform: scale(1.08); }
.bec-xc-tag-fx-fade .bec-xc__card:not(.is-active) .bec-xc__tag { opacity: .6; }

/* text */
.bec-xc__content { position: relative; display: flex; flex-direction: column; min-height: 0; max-width: 560px; }
.bec-xc__title {
	margin: 0;
	color: inherit;
	font-weight: 400;
	transition: opacity .3s ease;
}
.bec-xc__card.is-active .bec-xc__head { margin-bottom: var(--bec-xc-title-gap); }

/* title icon: above the title on the open card */
.bec-xc { --bec-xc-ticon: 40px; --bec-xc-ticon-closed: 24px; --bec-xc-ticon-gap: 16px; }
.bec-xc__head { display: flex; flex-direction: column; align-items: flex-start; gap: var(--bec-xc-ticon-gap); min-height: 0; min-width: 0; }
.bec-xc__title-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	line-height: 1;
	color: inherit;
	font-size: var(--bec-xc-ticon);
	border-radius: 50%;
}
.bec-xc__title-icon svg { width: var(--bec-xc-ticon); height: var(--bec-xc-ticon); fill: currentColor; }
.bec-xc__card:not(.is-active) .bec-xc__title-icon { font-size: var(--bec-xc-ticon-closed); }
.bec-xc__card:not(.is-active) .bec-xc__title-icon svg { width: var(--bec-xc-ticon-closed); height: var(--bec-xc-ticon-closed); }
.bec-xc-ticon-closed- .bec-xc__card:not(.is-active) .bec-xc__title-icon { display: none; }
/* closed + horizontal: icon upright at the base, rotated title rising from it */
.bec-xc-rotate-yes .bec-xc.is-horizontal .bec-xc__card:not(.is-active) .bec-xc__head { flex-direction: column-reverse; max-height: 100%; }
/* closed + vertical: icon and title on one line */
.bec-xc.is-vertical .bec-xc__card:not(.is-active) .bec-xc__head { flex-direction: row; align-items: center; gap: calc(var(--bec-xc-ticon-gap) * .75); }

/* closed + horizontal: the title runs up the strip */
.bec-xc-rotate-yes .bec-xc.is-horizontal .bec-xc__card:not(.is-active) .bec-xc__content { max-height: 100%; }
.bec-xc-rotate-yes .bec-xc.is-horizontal .bec-xc__card:not(.is-active) .bec-xc__title {
	writing-mode: vertical-rl;
	transform: rotate(180deg);
	align-self: flex-start;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-height: 100%;
}

/* closed + vertical: one line, beside the tag */
.bec-xc.is-vertical .bec-xc__card:not(.is-active) { justify-content: center; }
.bec-xc.is-vertical .bec-xc__card.has-tag:not(.is-active) .bec-xc__content { padding-left: var(--bec-xc-indent); }
.bec-xc.is-vertical .bec-xc__card:not(.is-active) .bec-xc__tag { top: 50% !important; bottom: auto !important; transform: translateY(-50%); }
.bec-xc__overlay::after { content: ""; position: absolute; inset: 0; background: rgba(10, 10, 6, var(--bec-xc-closed-dim, .35)); opacity: 0; transition: opacity .4s ease; }
.bec-xc.is-vertical .bec-xc__card:not(.is-active) .bec-xc__overlay::after { opacity: 1; }
.bec-xc.is-vertical .bec-xc__card:not(.is-active) .bec-xc__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* subtitle + button reveal smoothly without guessing a height */
.bec-xc__more {
	display: grid;
	grid-template-rows: 0fr;
	opacity: 0;
	transition: grid-template-rows var(--bec-xc-duration) var(--bec-xc-ease), opacity .3s ease;
}
.bec-xc__card.is-active .bec-xc__more { grid-template-rows: 1fr; opacity: 1; transition-delay: 0s, calc(var(--bec-xc-duration) * .35); }
.bec-xc__more-inner { overflow: hidden; min-height: 0; }
.bec-xc__subtitle { margin: 0 0 20px; color: inherit; text-align: inherit; }
.bec-xc__subtitle:last-child { margin-bottom: 0; }

/* button */
.bec-xc__btn-wrap { display: flex; justify-content: flex-start; }
.bec-xc__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	padding: 12px 20px;
	border-radius: 999px;
	background-color: #FFFFFF;
	color: #14110A;
	text-decoration: none;
	cursor: pointer;
	transition: transform .25s var(--bec-xc-ease), background-color .25s, color .25s, border-color .25s, box-shadow .25s;
}
.bec-xc :where(.bec-xc__btn):hover, .bec-xc :where(.bec-xc__btn):focus { color: #14110A; }
.bec-xc__btn:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
.bec-xc-btn-icon-before .bec-xc__btn { flex-direction: row-reverse; }
.bec-xc__btn-icon { display: inline-flex; line-height: 1; font-size: 16px; transition: transform .25s var(--bec-xc-ease); }
.bec-xc__btn-icon svg { width: 16px; height: 16px; fill: currentColor; }
.bec-xc-btn-fx-slide.bec-xc-btn-icon-after .bec-xc__btn:hover .bec-xc__btn-icon { transform: translateX(4px); }
.bec-xc-btn-fx-slide.bec-xc-btn-icon-before .bec-xc__btn:hover .bec-xc__btn-icon { transform: translateX(-4px); }
.bec-xc-btn-fx-lift .bec-xc__btn:hover { transform: translateY(-2px); }
.bec-xc-btn-fx-grow .bec-xc__btn:hover { transform: scale(1.04); }

/* keep the layout readable before the script runs */
.bec-xc:not(.is-ready) .bec-xc__card { transition: none; }

/* Text reveal. The open card's text is laid out at its final width from the start (JS sets
   --bec-xc-text-w), so it never re-wraps while the card grows; it then appears once the card
   is mostly open. is-opening / is-closing are set only on the two cards that change. */
.bec-xc { --bec-xc-reveal-at: .55; --bec-xc-stagger: 60ms; }
.bec-xc-reveal-letters .bec-xc { --bec-xc-stagger: 18ms; }
.bec-xc.is-horizontal .bec-xc__card.is-active .bec-xc__content { flex: none; width: var(--bec-xc-text-w, auto); }
@keyframes bec-xc-show-open { from { opacity: 0; transform: translate3d(0, 10px, 0); } to { opacity: 1; transform: none; } }
@keyframes bec-xc-show-closed { from { opacity: 0; } to { opacity: 1; } }
.bec-xc__card.is-opening .bec-xc__content { animation: bec-xc-show-open calc(var(--bec-xc-duration) * .45) var(--bec-xc-ease) calc(var(--bec-xc-duration) * var(--bec-xc-reveal-at)) both; }
.bec-xc__card.is-closing .bec-xc__content { animation: bec-xc-show-closed .3s ease calc(var(--bec-xc-duration) * .6) both; }
.bec-xc-reveal-none .bec-xc__card .bec-xc__content { animation: none; }
.bec-xc__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.bec-xc__w { display: inline-block; white-space: nowrap; }
.bec-xc-reveal-words .bec-xc__card.is-opening .bec-xc__w,
.bec-xc-reveal-letters .bec-xc__card.is-opening .bec-xc__l {
	display: inline-block;
	animation: bec-xc-show-open .5s var(--bec-xc-ease) calc(var(--bec-xc-duration) * var(--bec-xc-reveal-at) + var(--i) * var(--bec-xc-stagger)) both;
}

@media (prefers-reduced-motion: reduce) {
	.bec-xc__content, .bec-xc__w, .bec-xc__l { animation: none !important; }
	.bec-xc__card, .bec-xc__media img, .bec-xc__more, .bec-xc__title, .bec-xc__tag, .bec-xc__btn, .bec-xc__btn-icon { transition: none !important; }
}
