/**
 * Classiera landing page — the CSS Elementor cannot express.
 *
 * Scope rule for this file: if a control exists in the Elementor UI, the value
 * lives in the template JSON, not here. What remains is limited to
 *
 *   1. decorative `::before` / `::after` shapes (blobs, corner dots, rules),
 *   2. the two custom widgets (navigation + scroll tools),
 *   3. hover states Elementor has no control for (figcaption colour).
 *
 * Every class below is opt-in and applied from the Elementor "CSS Classes"
 * field, so nothing here fires unless a container asks for it.
 */

/* -------------------------------------------------------------------------
 * 1. Hero stat cards
 * The source drew a coloured quarter-circle bleeding out of the top-left
 * corner of each card. Elementor has no pseudo-element control, so it stays
 * CSS; the card's own padding, radius and shadow are Elementor settings.
 * ---------------------------------------------------------------------- */

.cle-stat {
	position: relative;
	overflow: hidden;
}

.cle-stat::before {
	content: "";
	position: absolute;
	top: -35px;
	left: -35px;
	width: 68px;
	height: 68px;
	border-radius: 50%;
	background-color: var(--cle-success);
}

/* All three tones are declared explicitly so the base rule is not silently
 * standing in for the success variant. */
.cle-stat--success::before {
	background-color: var(--cle-success);
}

.cle-stat--danger::before {
	background-color: var(--cle-danger);
}

.cle-stat--warning::before {
	background-color: var(--cle-warning);
}

/* -------------------------------------------------------------------------
 * 2. Feature-row blobs
 * A large rotated rounded rectangle sitting behind each alternating feature
 * row. Sized in vw exactly as the original so it scales identically.
 * ---------------------------------------------------------------------- */

.cle-blob {
	position: relative;
	overflow: hidden;
}

.cle-blob::before {
	content: "";
	position: absolute;
	z-index: 0;
	width: 20vw;
	height: 45vw;
	border-radius: 19.25rem;
	background-color: var(--cle-warning-faded);
	pointer-events: none;
}

.cle-blob > .e-con-inner,
.cle-blob > .elementor-widget,
.cle-blob > .e-con {
	position: relative;
	z-index: 1;
}

.cle-blob--left::before {
	top: -10.625vw;
	left: 0;
	transform: rotate(-45deg);
}

.cle-blob--right::before {
	top: -14.625vw;
	right: 6.13vw;
	transform: rotate(45deg);
}

.cle-blob--warning::before {
	background-color: var(--cle-warning-faded);
}

.cle-blob--danger::before {
	background-color: var(--cle-danger-faded);
}

.cle-blob--success::before {
	background-color: var(--cle-success-blob);
}

.cle-blob--primary::before {
	background-color: var(--cle-primary-faded);
}

/* -------------------------------------------------------------------------
 * 3. Earn-money row circles
 * Solid amber circles half off-canvas either side. Hidden on the mid range
 * exactly as the original did, where they would have collided with the text.
 * ---------------------------------------------------------------------- */

.cle-orb {
	position: relative;
}

.cle-orb::before {
	content: "";
	position: absolute;
	z-index: 0;
	top: 50%;
	width: 19.875vw;
	height: 19.875vw;
	border-radius: 50%;
	background-color: var(--cle-warning);
	transform: translateY(-50%);
	pointer-events: none;
}

.cle-orb > .e-con-inner,
.cle-orb > .e-con {
	position: relative;
	z-index: 1;
}

.cle-orb--left::before {
	left: -13vw;
}

.cle-orb--right::before {
	right: -11.5vw;
}

@media (min-width: 48rem) and (max-width: 81.25rem) {
	.cle-orb::before {
		display: none;
	}
}

/* -------------------------------------------------------------------------
 * 4. Elite-author underline
 * A 200px centred hairline under the sub-heading.
 * ---------------------------------------------------------------------- */

.cle-rule {
	position: relative;
}

.cle-rule::after {
	content: "";
	position: absolute;
	right: 0;
	bottom: 0;
	left: 0;
	width: 12.5rem;
	height: 1px;
	margin: 0 auto;
	background: #fff;
}

/* -------------------------------------------------------------------------
 * 5. Demo card hover
 * Elementor's heading widget has no hover colour control, and the caption is
 * inside the card link, so one rule covers all seventeen cards.
 * ---------------------------------------------------------------------- */

.cle-demo-card .elementor-heading-title {
	transition: color 0.2s ease;
}

.cle-demo-card:hover .elementor-heading-title {
	color: var(--cle-primary);
}

.cle-demo-card .elementor-widget-image img {
	transition: transform 0.3s ease;
}

.cle-demo-card:hover .elementor-widget-image img {
	transform: translateY(-4px);
}

/* -------------------------------------------------------------------------
 * 6. Navigation widget
 * ---------------------------------------------------------------------- */

.cle-nav {
	width: 100%;
}

.cle-nav__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1rem 12px;
}

.cle-nav__brand {
	font-family: var(--cle-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--cle-text-strong);
	text-decoration: none;
}

.cle-nav__brand img {
	display: block;
	width: auto;
	max-height: 48px;
}

.cle-nav__menu {
	display: flex;
	align-items: center;
	gap: 0.25rem;
	margin: 0 0 0 auto;
	padding: 0;
	list-style: none;
}

.cle-nav__link {
	display: block;
	padding: 0.5rem 0.75rem;
	color: rgba(0, 0, 0, 0.55);
	font-family: var(--cle-font-body);
	font-size: 1rem;
	text-decoration: none;
	border-radius: 4px;
	transition: color 0.15s ease;
}

.cle-nav__link:hover,
.cle-nav__link:focus-visible,
.cle-nav__link[aria-current="true"] {
	color: rgba(0, 0, 0, 0.9);
}

.cle-nav__cta {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	flex-shrink: 0;
	padding: 0.5rem 1rem;
	border: 1px solid var(--cle-primary);
	border-radius: 0.375rem;
	background-color: var(--cle-primary);
	color: #fff;
	font-family: var(--cle-font-body);
	font-size: 1rem;
	line-height: 1.5;
	text-decoration: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.cle-nav__cta:hover,
.cle-nav__cta:focus-visible {
	border-color: var(--cle-primary-hover);
	background-color: var(--cle-primary-hover);
	color: #fff;
}

.cle-nav__cta svg {
	width: 18px;
	height: auto;
	flex-shrink: 0;
}

.cle-nav__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 0.375rem;
	background: transparent;
	color: var(--cle-text-strong);
	cursor: pointer;
}

.cle-nav__toggle svg {
	width: 24px;
	height: 24px;
}

/* Off-canvas drawer, shown below the nav's breakpoint. */
.cle-nav__panel {
	position: fixed;
	z-index: 1000;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	flex-direction: column;
	width: min(400px, 85vw);
	padding: 1rem;
	background: #fff;
	box-shadow: 0 0 40px rgba(0, 0, 0, 0.15);
	transform: translateX(-100%);
	visibility: hidden;
	transition: transform 0.3s ease, visibility 0.3s ease;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.cle-nav__panel[data-open="true"] {
	transform: translateX(0);
	visibility: visible;
}

.cle-nav__panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 1rem;
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.cle-nav__panel-title {
	margin: 0;
	font-family: var(--cle-font-heading);
	font-size: 1.25rem;
	font-weight: 700;
}

.cle-nav__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: transparent;
	color: var(--cle-text-strong);
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.cle-nav__panel .cle-nav__menu {
	flex-direction: column;
	align-items: stretch;
	gap: 0;
	margin: 1.5rem 0;
}

.cle-nav__panel .cle-nav__link {
	padding: 0.65rem 0;
}

.cle-nav__panel .cle-nav__cta {
	justify-content: center;
}

.cle-nav__scrim {
	position: fixed;
	z-index: 999;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cle-nav__scrim[data-open="true"] {
	opacity: 1;
	visibility: visible;
}

@media (max-width: 1199px) {
	.cle-nav__bar > .cle-nav__menu,
	.cle-nav__bar > .cle-nav__cta {
		display: none;
	}

	.cle-nav__toggle {
		display: inline-flex;
	}
}

/* -------------------------------------------------------------------------
 * 7. Scroll tools — back to top and the floating purchase button.
 * Both slide in once the viewport has passed the hero.
 * ---------------------------------------------------------------------- */

.cle-scroll-tools__top,
.cle-scroll-tools__cta {
	position: fixed;
	z-index: 100;
	visibility: hidden;
	opacity: 0;
	transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.cle-scroll-tools__top {
	right: 20px;
	bottom: 20px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 0.375rem;
	background-color: var(--cle-primary);
	color: #fff;
	cursor: pointer;
	transform: translateY(80px);
}

.cle-scroll-tools__top:hover,
.cle-scroll-tools__top:focus-visible {
	background-color: var(--cle-primary-hover);
}

.cle-scroll-tools__cta {
	right: 20px;
	bottom: 76px;
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	background-color: var(--cle-success);
	color: #fff;
	font-family: var(--cle-font-body);
	font-size: 1.25rem;
	text-decoration: none;
	transform: translateX(120%);
}

.cle-scroll-tools__cta:hover,
.cle-scroll-tools__cta:focus-visible {
	color: #fff;
	filter: brightness(1.08);
}

.cle-scroll-tools.is-active .cle-scroll-tools__top,
.cle-scroll-tools.is-active .cle-scroll-tools__cta {
	visibility: visible;
	opacity: 1;
	transform: none;
}

@media (max-width: 767px) {
	.cle-scroll-tools__cta {
		font-size: 1rem;
	}
}
