/* Cyberpunk Style Addons
 * Layout, colours and spacing live in Elementor (global classes cp-*).
 * This file only adds what Elementor V4 can't express: highlighted spans,
 * keyframe effects, JS-driven player states and the accordion indicator.
 */

:root {
	--cp-cyan: #00FFE7;
	--cp-yellow: #FFE330;
	--cp-black: #000000;
	--cp-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* ---------- Neon highlight inside headings / leads ---------- */
/* In headings, bold (Ctrl+B in Elementor) or a <span> = yellow neon.
 * In cp-lead paragraphs only <span> is highlighted, so normal bold stays as is. */
.cp-h1 span,
.cp-h1 strong,
.cp-h1 b,
.cp-h2 span,
.cp-h2 strong,
.cp-h2 b,
.cp-h3 span,
.cp-h3 strong,
.cp-h3 b,
.cp-lead span {
	color: var(--cp-yellow);
	font-weight: inherit;
	text-shadow: 0 0 18px rgba(255, 227, 48, .45), 0 0 46px rgba(255, 227, 48, .18);
}

.cp-h1 span,
.cp-h1 strong,
.cp-h1 b {
	animation: cp-flicker 6s infinite;
}

@keyframes cp-flicker {
	0%, 91%, 95%, 100% { opacity: 1; }
	92%  { opacity: .55; }
	93%  { opacity: 1; }
	94%  { opacity: .7; }
}

/* Terminal cursor after the "// kicker" labels */
.cp-kicker::after {
	content: '_';
	margin-left: .15em;
	animation: cp-blink 1.1s steps(1) infinite;
}

@keyframes cp-blink {
	50% { opacity: 0; }
}

/* ---------- Before / After player ---------- */
body .cp-player .cp-ab-btn {
	cursor: pointer;
	user-select: none;
}

body .cp-player .cp-ab-btn.is-active[data-cp-mode="before"] {
	background-color: #ffffff;
	color: var(--cp-black);
}

body .cp-player .cp-ab-btn.is-active[data-cp-mode="after"] {
	background-color: var(--cp-yellow);
	color: var(--cp-black);
	box-shadow: 0 0 16px rgba(255, 227, 48, .55);
}

body .cp-player.is-playing {
	border-color: rgba(0, 255, 231, .55);
	box-shadow: inset 0 1px 0 rgba(0, 255, 231, .8), 0 0 36px rgba(0, 255, 231, .16), 0 20px 50px rgba(0, 0, 0, .45);
}

/* Play button */
.cp-play {
	border: 0;
	position: relative;
}

.cp-play svg {
	width: 18px;
	height: 18px;
	display: block;
	fill: currentColor;
}

.cp-play .cp-icon-pause,
.cp-player.is-playing .cp-play .cp-icon-play {
	display: none;
}

.cp-player.is-playing .cp-play .cp-icon-pause {
	display: block;
}

.cp-play:focus-visible,
.cp-ab-btn:focus-visible,
.cp-wave:focus-visible {
	outline: 2px solid var(--cp-cyan);
	outline-offset: 3px;
}

.cp-play[aria-disabled="true"] {
	opacity: .35;
	cursor: not-allowed;
}

.cp-player.is-loading .cp-play svg {
	opacity: 0;
}

.cp-player.is-loading .cp-play::after {
	content: '';
	position: absolute;
	inset: 13px;
	border-radius: 50%;
	border: 2px solid rgba(0, 0, 0, .2);
	border-top-color: var(--cp-black);
	animation: cp-spin .7s linear infinite;
}

@keyframes cp-spin {
	to { transform: rotate(360deg); }
}

/* Waveform */
.cp-wave {
	position: relative;
	cursor: pointer;
}

.cp-wave canvas {
	display: block;
	width: 100%;
	height: 100%;
}

.cp-player[data-cp-demo] .cp-wave {
	cursor: default;
}

/* Volume */
.cp-vol-label {
	font-family: var(--cp-mono);
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .14em;
	color: #ffffff;
}

.cp-vol input[type="range"] {
	--cp-val: 85%;
	-webkit-appearance: none;
	appearance: none;
	flex: 1;
	min-width: 0;
	height: 4px;
	margin: 0;
	border-radius: 4px;
	background: linear-gradient(90deg, var(--cp-yellow) var(--cp-val), rgba(255, 255, 255, .15) var(--cp-val));
	cursor: pointer;
}

.cp-vol input[type="range"]::-webkit-slider-thumb {
	-webkit-appearance: none;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--cp-yellow);
	box-shadow: 0 0 10px rgba(255, 227, 48, .8);
	border: 0;
}

.cp-vol input[type="range"]::-moz-range-thumb {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--cp-yellow);
	box-shadow: 0 0 10px rgba(255, 227, 48, .8);
	border: 0;
}

@media (max-width: 767px) {
	.cp-vol-label { display: none; }
}

/* ---------- FAQ accordion indicator ---------- */
details.cp-card > summary {
	list-style: none;
}

details.cp-card > summary::-webkit-details-marker {
	display: none;
}

details.cp-card > summary::after {
	content: '+';
	flex: 0 0 auto;
	font-family: var(--cp-mono);
	font-size: 22px;
	line-height: 1;
	color: var(--cp-cyan);
	text-shadow: 0 0 10px rgba(0, 255, 231, .6);
	transition: transform .25s ease;
}

details.cp-card[open] > summary::after {
	transform: rotate(45deg);
}

/* ---------- Buy button: pulse + light sweep ---------- */
html {
	scroll-behavior: smooth;
}

/* Wrapper: breathing neon glow (no scale, so it never pushes the layout) */
.cp-btn-glow {
	animation: cp-glow 2.4s ease-in-out infinite;
}

.cp-topbar .cp-btn-glow {
	animation-duration: 3.2s;
}

@keyframes cp-glow {
	0%, 100% { filter: drop-shadow(0 0 10px rgba(0, 255, 231, .45)) drop-shadow(0 0 0 rgba(255, 43, 214, 0)); }
	50%      { filter: drop-shadow(0 0 24px rgba(0, 255, 231, .85)) drop-shadow(0 0 10px rgba(255, 43, 214, .35)); }
}

/* Button: flowing cyan gradient + scanlines */
.cp-btn {
	position: relative;
	overflow: hidden;
	background-image:
		repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px),
		linear-gradient(110deg, #00FFE7 0%, #00FFE7 35%, #C9FFFA 50%, #00FFE7 65%, #00FFE7 100%);
	background-size: 100% 100%, 260% 100%;
	animation: cp-flow 3.2s linear infinite;
}

.cp-btn:hover,
.cp-btn:focus-visible {
	background-image:
		repeating-linear-gradient(0deg, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px),
		linear-gradient(110deg, #FFE330 0%, #FFE330 35%, #FFF6B8 50%, #FFE330 65%, #FFE330 100%);
}

@keyframes cp-flow {
	from { background-position: 0 0, 130% 0; }
	to   { background-position: 0 0, -130% 0; }
}

/* RGB-split glitch: two copies of the label (set by JS as data-text) flash in slices */
.cp-btn[data-text]::before,
.cp-btn[data-text]::after {
	content: attr(data-text);
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: inherit;
	background-position: inherit;
	opacity: 0;
	pointer-events: none;
}

.cp-btn[data-text]::before {
	text-shadow: -2px 0 #FF2BD6;
	animation: cp-glitch-a 4.2s steps(1) infinite;
}

.cp-btn[data-text]::after {
	text-shadow: 2px 0 #2B5BFF;
	animation: cp-glitch-b 4.2s steps(1) infinite;
}

.cp-btn[data-text]:hover::before,
.cp-btn[data-text]:hover::after {
	animation-duration: .9s;
}

@keyframes cp-glitch-a {
	0%, 86%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
	87% { opacity: 1; transform: translateX(-4px); clip-path: inset(8% 0 58% 0); }
	89% { opacity: 1; transform: translateX(3px);  clip-path: inset(62% 0 12% 0); }
	91% { opacity: 1; transform: translateX(-2px); clip-path: inset(30% 0 44% 0); }
	93% { opacity: 0; }
}

@keyframes cp-glitch-b {
	0%, 87%, 100% { opacity: 0; transform: none; clip-path: inset(0 0 100% 0); }
	88% { opacity: 1; transform: translateX(4px);  clip-path: inset(48% 0 22% 0); }
	90% { opacity: 1; transform: translateX(-3px); clip-path: inset(14% 0 70% 0); }
	92% { opacity: 1; transform: translateX(2px);  clip-path: inset(70% 0 6% 0); }
	94% { opacity: 0; }
}

/* ---------- Real-sales toast (Gumroad Ping) ---------- */
.cp-toast {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 1000;
	display: flex;
	align-items: center;
	gap: 12px;
	max-width: 340px;
	padding: 12px 16px 12px 12px;
	background: rgba(11, 13, 15, .94);
	border: 1px solid rgba(0, 255, 231, .35);
	border-radius: 8px;
	box-shadow: 0 0 24px rgba(0, 255, 231, .15), 0 14px 40px rgba(0, 0, 0, .55);
	backdrop-filter: blur(10px);
	color: #fff;
	font-family: 'Google Sans Flex', system-ui, sans-serif;
	font-size: 14px;
	line-height: 1.35;
	transform: translateY(140%);
	opacity: 0;
	transition: transform .45s cubic-bezier(.2, .9, .3, 1.2), opacity .3s ease;
}

.cp-toast.is-in {
	transform: none;
	opacity: 1;
}

.cp-toast-icon {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(0, 255, 231, .12);
	border: 1px solid rgba(0, 255, 231, .5);
	color: var(--cp-cyan);
	font-family: var(--cp-mono);
	font-weight: 700;
}

.cp-toast strong {
	color: var(--cp-yellow);
	font-weight: 600;
}

.cp-toast-meta {
	display: block;
	margin-top: 2px;
	font-family: var(--cp-mono);
	font-size: 11px;
	letter-spacing: .08em;
	color: rgba(214, 213, 227, .65);
	text-transform: uppercase;
}

.cp-toast-close {
	align-self: flex-start;
	margin-left: 4px;
	padding: 0 2px;
	background: none;
	border: 0;
	color: rgba(255, 255, 255, .5);
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

@media (max-width: 767px) {
	.cp-toast {
		left: 12px;
		right: 12px;
		max-width: none;
		bottom: 100px; /* above the sticky buy bar */
	}
}

/* ---------- Fixed header ---------- */
@media (min-width: 783px) {
	/* body + class beats Elementor's own ".elementor .cp-topbar { top: 0 }", which loads later */
	body.admin-bar .cp-topbar {
		top: 32px;
	}
}

/* ---------- Mobile sticky CTA ---------- */
.cp-sticky {
	transition: transform .35s ease;
}

.cp-sticky.is-hidden {
	transform: translateY(110%);
}

/* ---------- Video carousel ---------- */
.cp-car-track {
	scrollbar-width: none;
}

/* Snap offset = the track's 4px inner padding, so scroll position 0 is already a snap point.
   Without it the browser scrolls the track 4px on load, and Chrome stops recording LCP. */
.elementor .cp-carousel .cp-car-track {
	scroll-padding-inline: 4px;
}

.cp-car-track::-webkit-scrollbar {
	display: none;
}

.cp-car-btn[aria-disabled="true"] {
	opacity: .3;
	pointer-events: none;
}

/* all videos side by side, no arrows (JS sets .cp-car-fit: up to 5 videos on
   desktop, or a single video on any screen); cards keep the carousel card width */
.elementor .cp-carousel.cp-car-fit .cp-car-track {
	display: grid;
	grid-template-columns: repeat(var(--cp-car-n, 5), minmax(0, 260px));
	justify-content: center;
	overflow: visible;
	scroll-snap-type: none;
}

.elementor .cp-carousel.cp-car-fit .cp-short {
	width: auto;
}

.elementor .cp-carousel.cp-car-fit .cp-car-nav {
	display: none;
}

/* ---------- Reviews marquee ---------- */
.cp-marquee {
	-webkit-mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
	mask-image: linear-gradient(90deg, transparent 0, #000 6%, #000 94%, transparent 100%);
}

/* padding-right = the track's gap, so -50% lands exactly on the cloned set */
.cp-marquee-track.is-running,
.elementor .cp-marquee-track.is-running {
	padding-right: 20px;
	animation: cp-marquee var(--cp-marquee-time, 80s) linear infinite;
}

.cp-marquee-track.is-running.is-rev {
	animation-direction: reverse;
}

.cp-marquee:hover .cp-marquee-track.is-running {
	animation-play-state: paused;
}

/* touch screens: swipeable strip, JS drives the drift (see touchMarquee) */
.elementor .cp-marquee.is-touch,
.cp-marquee.is-touch {
	overflow-x: auto;
	overflow-y: hidden;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}

.cp-marquee.is-touch::-webkit-scrollbar {
	display: none;
}

.cp-marquee.is-touch .cp-marquee-track.is-running {
	animation: none;
}

@keyframes cp-marquee {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
	.cp-h1 span,
	.cp-h1 strong,
	.cp-h1 b,
	.cp-kicker::after,
	.cp-btn-glow,
	.cp-btn,
	.cp-btn[data-text]::before,
	.cp-btn[data-text]::after,
	.cp-marquee-track.is-running {
		animation: none;
	}

	.cp-toast {
		transition: opacity .3s ease;
		transform: none;
	}

	.cp-marquee {
		overflow-x: auto;
	}
}
