/**
 * NxtLevel Animated CTA — frontend styles.
 * Fully scoped under .nxtlevel-animated-cta. Uses transform/opacity only for
 * anything that moves. The component is complete and usable with JS disabled.
 */

/* ---------------------------------------------------------------------
 * Tokens (defaults; style presets and Elementor controls override these)
 * ------------------------------------------------------------------ */
.nxtlevel-animated-cta {
	--nxt-cta-bg: #0e1418;
	--nxt-cta-heading: #f4f7f8;
	--nxt-cta-desc: #9aa8b2;
	--nxt-cta-border: rgba(255, 255, 255, 0.12);
	--nxt-cta-accent: #3ec3ab;
	--nxt-cta-btn-bg: #f4f7f8;
	--nxt-cta-btn-text: #0e1418;
	--nxt-cta-btn-hover-bg: #3ec3ab;
	--nxt-cta-btn-hover-text: #06201a;
	--nxt-cta-radius: 20px;
	--nxt-cta-btn-radius: 999px;
	--nxt-cta-glow-alpha: 0.35;
	--nxt-cta-justify: flex-start;
	--nxt-cta-ease: cubic-bezier(0.22, 0.61, 0.2, 1);

	position: relative;
	background: var(--nxt-cta-bg);
	border: 1px solid var(--nxt-cta-border);
	border-radius: var(--nxt-cta-radius);
	padding: clamp(36px, 6vw, 72px);
	overflow: hidden;
	isolation: isolate;
}

/* ---------------------------------------------------------------------
 * Style presets (defaults only — Elementor color controls win)
 * ------------------------------------------------------------------ */
.nxtlevel-animated-cta[data-nxt-style="light"] {
	--nxt-cta-bg: #ffffff;
	--nxt-cta-heading: #101820;
	--nxt-cta-desc: #5c6a76;
	--nxt-cta-border: rgba(16, 24, 32, 0.12);
	--nxt-cta-accent: #0e4f4b;
	--nxt-cta-btn-bg: #101820;
	--nxt-cta-btn-text: #ffffff;
	--nxt-cta-btn-hover-bg: #0e4f4b;
	--nxt-cta-btn-hover-text: #ffffff;
}

.nxtlevel-animated-cta[data-nxt-style="accent"] {
	--nxt-cta-bg: #0b2b27;
	--nxt-cta-heading: #eefaf6;
	--nxt-cta-desc: #9fc4bb;
	--nxt-cta-border: rgba(62, 195, 171, 0.28);
	--nxt-cta-accent: #3ec3ab;
	--nxt-cta-btn-bg: #3ec3ab;
	--nxt-cta-btn-text: #06201a;
	--nxt-cta-btn-hover-bg: #5ad8c2;
	--nxt-cta-btn-hover-text: #06201a;
}

.nxtlevel-animated-cta[data-nxt-style="glass"] {
	--nxt-cta-bg: rgba(255, 255, 255, 0.06);
	--nxt-cta-heading: inherit;
	--nxt-cta-desc: inherit;
	--nxt-cta-border: rgba(127, 127, 127, 0.25);
	--nxt-cta-accent: #3ec3ab;
	--nxt-cta-btn-bg: rgba(127, 127, 127, 0.16);
	--nxt-cta-btn-text: inherit;
	--nxt-cta-btn-hover-bg: rgba(127, 127, 127, 0.28);
	--nxt-cta-btn-hover-text: inherit;
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
}

.nxtlevel-animated-cta[data-nxt-style="outline"] {
	--nxt-cta-bg: transparent;
	--nxt-cta-heading: inherit;
	--nxt-cta-desc: inherit;
	--nxt-cta-border: rgba(127, 127, 127, 0.35);
	--nxt-cta-accent: #3ec3ab;
	--nxt-cta-btn-bg: transparent;
	--nxt-cta-btn-text: inherit;
	--nxt-cta-btn-hover-bg: rgba(127, 127, 127, 0.12);
	--nxt-cta-btn-hover-text: inherit;
}

.nxtlevel-animated-cta[data-nxt-style="outline"] .nxt-cta-btn {
	border: 1px solid var(--nxt-cta-border);
}

.nxtlevel-animated-cta[data-nxt-style="mono"] {
	--nxt-cta-bg: #000000;
	--nxt-cta-heading: #ffffff;
	--nxt-cta-desc: #bdbdbd;
	--nxt-cta-border: rgba(255, 255, 255, 0.18);
	--nxt-cta-accent: #ffffff;
	--nxt-cta-btn-bg: #ffffff;
	--nxt-cta-btn-text: #000000;
	--nxt-cta-btn-hover-bg: #e6e6e6;
	--nxt-cta-btn-hover-text: #000000;
}

/* ---------------------------------------------------------------------
 * Structure
 * ------------------------------------------------------------------ */
.nxtlevel-animated-cta .nxt-cta-inner {
	display: flex;
	flex-direction: column;
	gap: 26px;
	position: relative;
	z-index: 2;
}

.nxtlevel-animated-cta .nxt-cta-heading {
	margin: 0;
	color: var(--nxt-cta-heading);
	font-size: clamp(1.6rem, 4.2vw, 2.6rem);
	font-weight: 700;
	line-height: 1.12;
	letter-spacing: -0.02em;
}

.nxtlevel-animated-cta .nxt-cta-description {
	margin: 10px 0 0;
	color: var(--nxt-cta-desc);
	font-size: 1.02rem;
	line-height: 1.6;
	max-width: 56ch;
}

.nxtlevel-animated-cta .nxt-cta-action {
	display: flex;
	justify-content: var(--nxt-cta-justify);
}

/* ---------------------------------------------------------------------
 * Button (real <a>, semantic, keyboard-friendly)
 * ------------------------------------------------------------------ */
.nxtlevel-animated-cta .nxt-cta-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 15px 30px;
	border-radius: var(--nxt-cta-btn-radius);
	background: var(--nxt-cta-btn-bg);
	color: var(--nxt-cta-btn-text);
	font-weight: 600;
	font-size: 0.98rem;
	line-height: 1;
	text-decoration: none;
	overflow: hidden;
	cursor: pointer;
	will-change: transform;
	transition: color 260ms var(--nxt-cta-ease), background-color 260ms var(--nxt-cta-ease), box-shadow 260ms var(--nxt-cta-ease);
}

.nxtlevel-animated-cta .nxt-cta-btn:focus-visible {
	outline: 2px solid var(--nxt-cta-accent);
	outline-offset: 3px;
}

.nxtlevel-animated-cta .nxt-cta-btn > * {
	position: relative;
	z-index: 2;
}

.nxtlevel-animated-cta .nxt-cta-icon {
	display: inline-flex;
	align-items: center;
	font-size: 0.9em;
}

.nxtlevel-animated-cta .nxt-cta-icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* CSS fallback hover (works without JS; JS refines it) */
@media (hover: hover) {
	.nxtlevel-animated-cta .nxt-cta-btn:hover {
		background: var(--nxt-cta-btn-hover-bg);
		color: var(--nxt-cta-btn-hover-text);
	}
}

/* --- Fill preset ---------------------------------------------------- */
.nxtlevel-animated-cta .nxt-cta-btn-fill {
	position: absolute;
	z-index: 1;
	width: 32px;
	height: 32px;
	border-radius: 999px;
	background: var(--nxt-cta-btn-hover-bg);
	transform: translate(-50%, -50%) scale(0);
	pointer-events: none;
}

.nxtlevel-animated-cta.nxt-cta--hover-fill .nxt-cta-btn:hover {
	background: var(--nxt-cta-btn-bg); /* fill span provides the hover color */
}

/* --- Text shift preset ---------------------------------------------- */
.nxtlevel-animated-cta .nxt-cta-btn-label {
	position: relative;
	display: inline-block;
	overflow: hidden;
}

.nxtlevel-animated-cta .nxt-cta-btn-text,
.nxtlevel-animated-cta .nxt-cta-btn-text-alt {
	display: inline-block;
	white-space: nowrap;
}

.nxtlevel-animated-cta .nxt-cta-btn-text-alt {
	position: absolute;
	left: 0;
	top: 0;
	transform: translateY(110%);
}

/* --- Border sweep preset -------------------------------------------- */
.nxtlevel-animated-cta .nxt-cta-sweep {
	--nxt-sweep-angle: 0deg;
	position: absolute;
	inset: 0;
	z-index: 1;
	border-radius: inherit;
	padding: 1px;
	background: conic-gradient(
		from var(--nxt-sweep-angle),
		transparent 0deg,
		transparent 300deg,
		var(--nxt-cta-accent) 330deg,
		transparent 360deg
	);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity 300ms var(--nxt-cta-ease);
	pointer-events: none;
}

.nxtlevel-animated-cta.nxt-cta--hover-bordersweep:hover .nxt-cta-sweep {
	opacity: 1;
}

/* --- Glow preset ----------------------------------------------------- */
.nxtlevel-animated-cta.nxt-cta--hover-glow .nxt-cta-btn:hover {
	box-shadow: 0 8px 32px -8px color-mix(in srgb, var(--nxt-cta-accent) calc(var(--nxt-cta-glow-alpha) * 100%), transparent);
}

/* --- Cursor badge ----------------------------------------------------- */
.nxtlevel-animated-cta .nxt-cta-cursor {
	position: absolute;
	z-index: 5;
	top: 0;
	left: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	border-radius: 999px;
	background: var(--nxt-cta-accent);
	color: var(--nxt-cta-bg);
	font-size: 0.72rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	transform: translate(-50%, -50%) scale(0);
	pointer-events: none;
}

/* ---------------------------------------------------------------------
 * Layouts
 * ------------------------------------------------------------------ */

/* Minimal: no chrome, just type + button */
.nxtlevel-animated-cta.nxt-cta--minimal {
	background: transparent;
	border: none;
	padding: 0;
	overflow: visible;
}

/* Split & full width: content left, action right */
.nxtlevel-animated-cta.nxt-cta--split .nxt-cta-inner,
.nxtlevel-animated-cta.nxt-cta--fullwidth .nxt-cta-inner {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	flex-wrap: wrap;
}

.nxtlevel-animated-cta.nxt-cta--split {
	background: transparent;
	border-width: 1px 0;
	border-radius: 0;
	padding-left: 0;
	padding-right: 0;
	overflow: visible;
}

.nxtlevel-animated-cta.nxt-cta--fullwidth {
	border-radius: var(--nxt-cta-radius);
	padding: clamp(44px, 7vw, 96px) clamp(32px, 6vw, 80px);
}

.nxtlevel-animated-cta.nxt-cta--fullwidth .nxt-cta-heading {
	font-size: clamp(1.9rem, 5vw, 3.2rem);
}

/* Hero: large, centered */
.nxtlevel-animated-cta.nxt-cta--hero {
	text-align: center;
	--nxt-cta-justify: center;
	padding: clamp(56px, 9vw, 120px) clamp(28px, 6vw, 72px);
}

.nxtlevel-animated-cta.nxt-cta--hero .nxt-cta-heading {
	font-size: clamp(2.1rem, 6vw, 3.8rem);
}

.nxtlevel-animated-cta.nxt-cta--hero .nxt-cta-description {
	margin-left: auto;
	margin-right: auto;
}

/* Magnetic: button-focused, quiet surroundings */
.nxtlevel-animated-cta.nxt-cta--magnetic {
	text-align: center;
	--nxt-cta-justify: center;
	background: transparent;
	border: none;
	overflow: visible;
}

.nxtlevel-animated-cta.nxt-cta--magnetic .nxt-cta-heading {
	font-size: clamp(1.2rem, 2.6vw, 1.5rem);
	font-weight: 600;
}

.nxtlevel-animated-cta.nxt-cta--magnetic .nxt-cta-btn {
	padding: 22px 44px;
	font-size: 1.05rem;
}

/* Project: compact portfolio CTA */
.nxtlevel-animated-cta.nxt-cta--project {
	padding: clamp(26px, 4vw, 40px);
}

.nxtlevel-animated-cta.nxt-cta--project .nxt-cta-inner {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
	flex-wrap: wrap;
}

.nxtlevel-animated-cta.nxt-cta--project .nxt-cta-heading {
	font-size: clamp(1.15rem, 2.4vw, 1.45rem);
}

.nxtlevel-animated-cta.nxt-cta--project .nxt-cta-description {
	font-size: 0.92rem;
	margin-top: 6px;
}

/* ---------------------------------------------------------------------
 * Responsive
 * ------------------------------------------------------------------ */
@media (max-width: 767px) {
	.nxtlevel-animated-cta.nxt-cta--split .nxt-cta-inner,
	.nxtlevel-animated-cta.nxt-cta--fullwidth .nxt-cta-inner,
	.nxtlevel-animated-cta.nxt-cta--project .nxt-cta-inner {
		flex-direction: column;
		align-items: flex-start;
	}

	.nxtlevel-animated-cta .nxt-cta-btn {
		padding: 15px 26px; /* comfortable touch target */
	}

	.nxtlevel-animated-cta .nxt-cta-cursor {
		display: none;
	}
}

/* ---------------------------------------------------------------------
 * Reduced motion: static, fully functional component
 * ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
	.nxtlevel-animated-cta,
	.nxtlevel-animated-cta * {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}

	.nxtlevel-animated-cta [data-nxt-reveal] {
		opacity: 1 !important;
		transform: none !important;
	}

	.nxtlevel-animated-cta .nxt-cta-sweep,
	.nxtlevel-animated-cta .nxt-cta-cursor {
		display: none !important;
	}
}
