/**
 * NextExtManager: JoomBoost brand homepage.
 *
 * Calm and simple on purpose (user feedback 2026-11-25: "polished, pro, easy on the
 * eyes, less flame"): a plain night-indigo hero with a few faint, still stars, white
 * text, one soft rose accent and solid buttons. No glow and no gradients on text.
 * The one moving thing is the rocket (the user likes it): a slow float, a flickering
 * flame and a soft exhaust trail, shown on wide screens only. Loaded only on
 * view=home when siteTheme=joomboost (Home\HtmlView picks the
 * com_nextextmanager.home.joomboost asset). Brand colour variables live in
 * templates/nextsoftware/css/brands/joomboost.css.
 */

.nxt-jb-hero {
	background: #1E1B4B;
	color: #fff;
}

[data-theme="dark"] .nxt-jb-hero {
	background: #14113A;
}

/* A few faint, still stars */
.nxt-jb-stars {
	pointer-events: none;
	opacity: .55;
	background-image:
		radial-gradient(1px 1px at 9% 24%, rgba(255, 255, 255, .5) 50%, transparent 51%),
		radial-gradient(1px 1px at 22% 72%, rgba(255, 255, 255, .35) 50%, transparent 51%),
		radial-gradient(1px 1px at 36% 14%, rgba(255, 255, 255, .45) 50%, transparent 51%),
		radial-gradient(1px 1px at 63% 84%, rgba(255, 255, 255, .35) 50%, transparent 51%),
		radial-gradient(1px 1px at 78% 20%, rgba(255, 255, 255, .5) 50%, transparent 51%),
		radial-gradient(1px 1px at 91% 62%, rgba(255, 255, 255, .4) 50%, transparent 51%);
}

.nxt-jb-badge {
	color: #E0DEF5;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .12);
}

.nxt-jb-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #FB7185;
}

.nxt-jb-accent {
	color: #FB7185;
}

.nxt-jb-hero-sub {
	color: #CFCDEA;
}

.nxt-jb-cta {
	background: #E11D48;
	transition: background-color .15s;
}

.nxt-jb-cta:hover,
.nxt-jb-cta:focus-visible {
	background: #BE123C;
	color: #fff;
}

.nxt-jb-ghost {
	color: #fff;
	border: 1px solid rgba(255, 255, 255, .24);
	transition: border-color .15s, background-color .15s;
}

.nxt-jb-ghost:hover,
.nxt-jb-ghost:focus-visible {
	color: #fff;
	border-color: rgba(255, 255, 255, .5);
	background: rgba(255, 255, 255, .05);
}

.nxt-jb-stats > div {
	text-align: center;
}

.nxt-jb-stats > div + div {
	border-left: 1px solid rgba(255, 255, 255, .12);
}

.nxt-jb-stats dt {
	font-size: .7rem;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #A9A6CF;
	margin: 4px 0 0;
	order: 2;
}

.nxt-jb-stats > div {
	display: flex;
	flex-direction: column;
}

.nxt-jb-stats dd {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 800;
	letter-spacing: -.02em;
	color: #fff;
	order: 1;
}

/* Why JoomBoost cards */
.nxt-jb-why {
	transition: border-color .2s, box-shadow .2s;
}

.nxt-jb-why:hover {
	border-color: rgba(225, 29, 72, .3);
	box-shadow: 0 10px 24px -18px rgba(30, 27, 75, .35);
}

.nxt-jb-why-icon {
	color: #E11D48;
	background: #FFF1F3;
}

[data-theme="dark"] .nxt-jb-why-icon {
	color: #FB7185;
	background: rgba(244, 63, 94, .12);
}

/* ── The rocket ─────────────────────────────────────────────────────────────
 * Right side of the hero, wide screens only (the text is centred).
 * .nxt-jb-rocket        launches once on page load: rises from below the hero, settles
 * .nxt-jb-rocket-inner  then floats along its flight line with a slight sway
 * .nxt-jb-fl-*          three flame layers flickering at different speeds
 * .nxt-jb-trail         exhaust line with a slow shimmer running down it
 * Speed: only transform/opacity animate (GPU, no repaint of the page), no filters,
 * no JS animation, and everything pauses while the hero is off screen.
 * .nxt-jb-spark         five embers leaving the nozzle and fading out
 * The nozzle sits at about (27%, 73%) of the box: the mark is tilted 45deg. */
.nxt-jb-rocket {
	display: none;
	pointer-events: none;
	width: clamp(110px, 11vw, 168px);
	height: clamp(110px, 11vw, 168px);
	right: 8%;
	top: 17%;
	animation: nxt-jb-launch 2.2s cubic-bezier(.22, .9, .32, 1) both;
	will-change: transform;
}

@media (min-width: 1180px) {
	.nxt-jb-rocket { display: block; }
}

.nxt-jb-rocket-inner {
	position: relative;
	width: 100%;
	height: 100%;
	animation: nxt-jb-float 5.5s ease-in-out 2.2s infinite;
	will-change: transform;
}

.nxt-jb-rocket svg {
	position: relative;
	z-index: 2;
	width: 100%;
	height: 100%;
	display: block;
}

/* Flame layers: grow from the nozzle (top of each path's box) */
.nxt-jb-fl {
	transform-box: fill-box;
	transform-origin: 50% 0;
}

.nxt-jb-fl-1 { animation: nxt-jb-flick-a .42s ease-in-out infinite alternate; opacity: .85; }
.nxt-jb-fl-2 { animation: nxt-jb-flick-b .31s ease-in-out infinite alternate; }
.nxt-jb-fl-3 { animation: nxt-jb-flick-c .23s ease-in-out infinite alternate; }

/* Exhaust line: from the nozzle down to the lower left */
.nxt-jb-trail {
	position: absolute;
	z-index: 1;
	right: 73%;
	top: 73%;
	width: 24vw;
	max-width: 380px;
	height: 2px;
	border-radius: 2px;
	transform-origin: right center;
	transform: rotate(-45deg);
	overflow: hidden;
	background: linear-gradient(90deg, transparent, rgba(244, 63, 94, .25) 45%, rgba(245, 158, 11, .75));
}

.nxt-jb-trail::after {
	content: '';
	position: absolute;
	inset: 0;
	width: 30%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent);
	animation: nxt-jb-shimmer 2.6s linear infinite;
	will-change: transform;
}

/* Embers: start at the nozzle, drift down-left along the trail, fade */
.nxt-jb-spark {
	position: absolute;
	z-index: 1;
	left: 27%;
	top: 73%;
	width: 5px;
	height: 5px;
	margin: -2.5px 0 0 -2.5px;
	border-radius: 50%;
	background: #FBBF24;
	box-shadow: 0 0 6px rgba(251, 191, 36, .8);
	opacity: 0;
	animation: nxt-jb-ember 1.8s ease-out infinite;
	will-change: transform, opacity;
}

.nxt-jb-spark:nth-of-type(2) { animation-delay: .36s; --dx: 6px;  background: #FB7185; box-shadow: 0 0 6px rgba(251, 113, 133, .8); }
.nxt-jb-spark:nth-of-type(3) { animation-delay: .72s; --dx: -5px; width: 4px; height: 4px; }
.nxt-jb-spark:nth-of-type(4) { animation-delay: 1.08s; --dx: 3px; background: #FB7185; box-shadow: 0 0 6px rgba(251, 113, 133, .8); }
.nxt-jb-spark:nth-of-type(5) { animation-delay: 1.44s; --dx: -2px; width: 4px; height: 4px; }

/* Rises from below the hero's bottom edge (the hero clips it) and settles in place */
@keyframes nxt-jb-launch {
	from { transform: translate(-260px, 620px); }
	to   { transform: translate(0, 0); }
}

/* Float along the 45deg flight line, with a gentle sway */
@keyframes nxt-jb-float {
	0%, 100% { transform: translate(0, 0) rotate(0deg); }
	30%      { transform: translate(5px, -5px) rotate(-1.5deg); }
	60%      { transform: translate(9px, -9px) rotate(1deg); }
}

@keyframes nxt-jb-flick-a {
	from { transform: scale(.92, .82); }
	to   { transform: scale(1.04, 1.12); }
}

@keyframes nxt-jb-flick-b {
	from { transform: scale(1.05, 1.1); }
	to   { transform: scale(.9, .85); }
}

@keyframes nxt-jb-flick-c {
	from { transform: scale(.85, .8); opacity: .8; }
	to   { transform: scale(1.1, 1.15); opacity: 1; }
}

/* The highlight runs from the nozzle (right end) outwards */
@keyframes nxt-jb-shimmer {
	from { transform: translateX(340%); }
	to   { transform: translateX(-120%); }
}

@keyframes nxt-jb-ember {
	0%   { transform: translate(0, 0) scale(1); opacity: 0; }
	12%  { opacity: 1; }
	100% { transform: translate(calc(-64px + var(--dx, 0px)), calc(64px + var(--dx, 0px))) scale(.3); opacity: 0; }
}

/* Paused while the hero is scrolled out of view: no work off screen */
.nxt-jb-hero.is-offscreen .nxt-jb-rocket,
.nxt-jb-hero.is-offscreen .nxt-jb-rocket *,
.nxt-jb-hero.is-offscreen .nxt-jb-rocket *::after {
	animation-play-state: paused;
}

@media (prefers-reduced-motion: reduce) {
	.nxt-jb-rocket, .nxt-jb-rocket-inner, .nxt-jb-fl, .nxt-jb-trail::after { animation: none; }
	.nxt-jb-spark { display: none; }
}
