/* OVERLAY */
*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

#popup.overlay {
	position: fixed !important;
	inset: 0 !important;
	background: rgba(4, 5, 20, 0.82);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 999999 !important;
	padding: 20px;
	animation: fadeIn .3s ease;
	font-family: 'Inter', sans-serif !important;
	line-height: normal;
}

@keyframes fadeIn {
	from {
		opacity: 0
	}

	to {
		opacity: 1
	}
}

#popup.overlay.hidden {
	display: none !important;
}

/* MODAL */
#popup .modal {
	display: flex !important;
	width: 100%;
	max-width: 900px;
	min-height: 540px;
	max-height: 90vh;
	border-radius: 24px;
	overflow: hidden;
	position: relative;
	box-shadow:
		0 0 0 1px rgba(124, 58, 237, .3),
		0 0 80px rgba(124, 58, 237, .2),
		0 50px 100px rgba(0, 0, 0, .8);
	animation: popIn .42s cubic-bezier(.22, .9, .34, 1.02);
}

@keyframes popIn {
	from {
		transform: translateY(36px) scale(.96);
		opacity: 0
	}

	to {
		transform: translateY(0) scale(1);
		opacity: 1
	}
}

/* ═══════════════════════════════════
   LEFT DARK PANEL
═══════════════════════════════════ */
.panel-left {
	flex: 0 0 44%;
	background: linear-gradient(160deg, #0e0b2e 0%, #1b0545 45%, #0a1535 100%);
	position: relative;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 42px 34px 36px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	max-height: 90vh;
}

#nodeCanvas {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: .5;
	pointer-events: none;
}

.orb {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
	filter: blur(60px);
}

.orb-1 {
	width: 240px;
	height: 240px;
	background: rgba(124, 58, 237, .22);
	top: -70px;
	left: -70px;
}

.orb-2 {
	width: 160px;
	height: 160px;
	background: rgba(6, 182, 212, .15);
	bottom: -30px;
	right: -30px;
}

.orb-3 {
	width: 120px;
	height: 120px;
	background: rgba(168, 85, 247, .12);
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.lp-inner {
	position: relative;
	z-index: 2;
	display: flex;
	flex-direction: column;
	height: 100%;
}

/* Logo badge */
.kir-logo {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin-bottom: 28px;
}

.kir-logo-hex {
	width: 36px;
	height: 36px;

	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 0 16px rgba(124, 58, 237, .5);
}

.kir-logo span {
	font-family: 'Orbitron', monospace;
	font-size: 13px;
	font-weight: 700;
	color: #c4b5fd;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.lp-eyebrow {
	font-family: 'Orbitron', monospace;
	font-size: 9.5px;
	font-weight: 600;
	color: #06b6d4;
	letter-spacing: .16em;
	text-transform: uppercase;
	margin-bottom: 10px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.lp-eyebrow::before {
	content: '';
	display: block;
	width: 16px;
	height: 2px;
	background: #06b6d4;
	border-radius: 2px;
}

.lp-title {
	font-family: 'Orbitron', monospace;
	font-size: clamp(18px, 2.1vw, 25px);
	font-weight: 900;
	color: #fff;
	line-height: 1.22;
	margin-bottom: 10px;
}

.lp-title .hl {
	background: linear-gradient(90deg, #a855f7, #06b6d4);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.lp-sub {
	font-size: 12.5px;
	color: rgba(255, 255, 255, .52);
	line-height: 1.6;
	margin-bottom: 22px;
}

/* Perks */
.perks {
	display: flex;
	flex-direction: column;
	gap: 13px;
	margin-bottom: auto;
}

.perk {
	display: flex;
	align-items: flex-start;
	gap: 13px;
}

.perk-icon {
	width: 32px;
	height: 32px;
	border-radius: 9px;
	background: linear-gradient(135deg, rgba(124, 58, 237, .35), rgba(6, 182, 212, .2));
	border: 1px solid rgba(124, 58, 237, .3);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.perk-icon svg {
	width: 14px;
	height: 14px;
	color: #c4b5fd;
}

.perk-text strong {
	display: block;
	font-size: 12.5px;
	font-weight: 600;
	color: #e9e3ff;
	margin-bottom: 2px;
}

.perk-text span {
	font-size: 11px;
	color: rgba(255, 255, 255, .38);
	line-height: 1.4;
}

/* Stats bar */
.stats-row {
	display: flex;
	gap: 0;
	margin-top: 20px;
	background: rgba(255, 255, 255, .04);
	border: 1px solid rgba(124, 58, 237, .18);
	border-radius: 14px;
	overflow: hidden;
	flex-shrink: 0;
}

.stat {
	flex: 1;
	padding: 11px 10px;
	text-align: center;
	border-right: 1px solid rgba(124, 58, 237, .15);
}

.stat:last-child {
	border-right: none;
}

.stat-num {
	font-family: 'Orbitron', monospace;
	font-size: 15px;
	font-weight: 800;
	background: linear-gradient(90deg, #a855f7, #06b6d4);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
	display: block;
	margin-bottom: 2px;
}

.stat-label {
	font-size: 9.5px;
	color: rgba(255, 255, 255, .35);
	letter-spacing: .04em;
}

/* ═══════════════════════════════════
   RIGHT LIGHT PANEL
═══════════════════════════════════ */
.panel-right {
	flex: 1;
	background: #ffffff;
	padding: 0;
	display: flex;
	flex-direction: column;
	position: relative;
	min-width: 0;
	max-height: 90vh;
	overflow-y: auto;
	/* prevents flex child from overflowing on narrow widths */
}

/* Light panel subtle top bar */
.rp-topbar {
	height: 4px;
	background: linear-gradient(90deg, #7c3aed, #a855f7, #06b6d4);
	flex-shrink: 0;
}

#popup .rp-inner {
	padding: 30px 42px 30px !important;
	display: flex !important;
	flex-direction: column !important;
	flex: 1;
}

/* Close button */
.close-btn {
	position: absolute;
	top: 16px;
	right: 16px;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	background: #f4f3ff;
	border: 1px solid #e0d9ff;
	color: #9e8fbf;
	font-size: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background .2s, color .2s, border-color .2s;
	z-index: 10;
	line-height: 1;
}

.close-btn:hover {
	background: #ede9fe;
	color: #7c3aed;
	border-color: #a78bfa;
}

/* Form header */
.form-header {
	margin-bottom: 16px;
}

.form-eyebrow {
	font-size: 10.5px;
	font-weight: 600;
	color: #7c3aed;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin-bottom: 6px;
	display: flex;
	align-items: center;
	gap: 7px;
}

.form-eyebrow::before {
	content: '';
	display: block;
	width: 14px;
	height: 2px;
	background: #7c3aed;
	border-radius: 2px;
}

.form-title {
	font-family: 'Orbitron', monospace;
	font-size: clamp(15px, 1.8vw, 19px);
	font-weight: 800;
	color: #1a0d35;
	line-height: 1.3;
}

.form-title .col {
	color: #7c3aed;
}

/* Fields */
.field-group {
	display: flex;
	flex-direction: column;
	gap: 11px;
	flex: 1;
}

#popup .field {
	position: relative !important;
	float: none !important;
	width: auto;
}

#popup .field-label {
	display: block !important;
	float: none !important;
	width: auto !important;
	font-size: 11.5px !important;
	font-weight: 600 !important;
	color: #4b3f72 !important;
	margin: 0 0 5px !important;
	letter-spacing: .02em;
	line-height: 1.3;
}

#popup .field input,
#popup .field textarea {
	display: block !important;
	width: 100% !important;
	background: #f8f7ff !important;
	border: 1.5px solid #e5deff !important;
	border-radius: 10px !important;
	padding: 10px 14px 10px 42px !important;
	font-family: 'Inter', sans-serif !important;
	font-size: 13.5px !important;
	color: #1a0d35 !important;
	outline: none !important;
	box-shadow: none;
	transition: border-color .22s, box-shadow .22s, background .22s;
	-webkit-appearance: none;
	appearance: none;
	float: none !important;
	margin: 0 !important;
	height: auto;
	min-height: 0;
	max-width: none;
	line-height: normal;
	vertical-align: top;
}

#popup .field input::placeholder,
#popup .field textarea::placeholder {
	color: #b0a5cc !important;
	font-size: 13px !important;
	opacity: 1;
}

#popup .field input:focus,
#popup .field textarea:focus {
	border-color: #7c3aed !important;
	background: #fff !important;
	box-shadow: 0 0 0 3.5px rgba(124, 58, 237, .1) !important;
}

#popup .field textarea {
	resize: none !important;
	height: 64px !important;
	padding-top: 10px !important;
	line-height: 1.5 !important;
}

#popup .field-icon {
	position: absolute !important;
	left: 13px !important;
	top: 36px !important;
	color: #b0a5cc;
	display: flex !important;
	align-items: center;
	pointer-events: none;
	transition: color .22s;
	z-index: 2;
}

.field:focus-within .field-icon {
	color: #7c3aed;
}

#popup .field textarea~.field-icon {
	top: 43px !important;
}

/* Two-col row */
#popup .field-row {
	display: flex !important;
	gap: 12px;
	flex-wrap: wrap;
}

#popup .field-row .field {
	flex: 1 1 200px;
	min-width: 0;
	/* lets fields shrink below content size on narrow rows */
}

/* CTA */
#popup .cta-btn {
	width: 100% !important;
	padding: 13px 22px !important;
	border: none !important;
	border-radius: 14px !important;
	cursor: pointer;
	font-family: 'Orbitron', monospace !important;
	font-size: 12.5px !important;
	font-weight: 700 !important;
	letter-spacing: .06em;
	color: #fff !important;
	background: linear-gradient(130deg, #6d28d9 0%, #7c3aed 40%, #a855f7 70%, #06b6d4 100%) !important;
	background-size: 200% 100%;
	background-position: 0% 0%;
	box-shadow: 0 6px 22px rgba(124, 58, 237, .4), 0 2px 8px rgba(0, 0, 0, .12), inset 0 1px 0 rgba(255, 255, 255, .15);
	display: flex !important;
	align-items: center;
	justify-content: center;
	gap: 9px;
	transition: background-position .5s ease, box-shadow .3s, transform .15s;
	margin-top: 4px;
	position: relative;
	overflow: hidden;
	flex-shrink: 0;
}

.cta-btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255, 255, 255, .14) 0%, transparent 60%);
	pointer-events: none;
}

.cta-btn:hover {
	background-position: 100% 0%;
	box-shadow: 0 8px 30px rgba(124, 58, 237, .5), 0 3px 10px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .18);
	transform: translateY(-2px);
}

.cta-btn:active {
	transform: translateY(0);
}

/* Trust badges */
.trust-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 18px;
	margin-top: 12px;
	flex-wrap: wrap;
	flex-shrink: 0;
}

.trust-item {
	display: flex;
	align-items: center;
	gap: 5px;
	font-size: 11px;
	font-weight: 500;
	color: #9585be;
}

.trust-item .tick {
	width: 16px;
	height: 16px;
	background: linear-gradient(135deg, #7c3aed, #06b6d4);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.trust-item .tick svg {
	width: 8px;
	height: 8px;
	color: #fff;
}

/* Divider */
.divider {
	width: 1px;
	height: 12px;
	background: #e0d9ff;
}

/* ── FIELD ERROR STATE ── */
.field input.is-error,
.field textarea.is-error {
	border-color: #ef4444 !important;
	background: #fff8f8 !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, .1) !important;
}

.field input.is-valid,
.field textarea.is-valid {
	border-color: #10b981 !important;
	box-shadow: 0 0 0 3px rgba(16, 185, 129, .08) !important;
}

.field-error-msg {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #ef4444;
	font-weight: 500;
	margin-top: 5px;
	height: 14px;
	line-height: 14px;
	opacity: 0;
	visibility: hidden;
	transition: opacity .15s ease;
}

.field-error-msg.visible {
	opacity: 1;
	visibility: visible;
}

.field-error-msg svg {
	flex-shrink: 0;
}

/* ── SUCCESS SCREEN ── */
.success-screen {
	display: none;
	position: absolute;
	inset: 0;
	background: #ffffff;
	z-index: 20;
	border-radius: 0 24px 24px 0;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 40px 36px;
	text-align: center;
	animation: fadeIn .4s ease;
	overflow-y: auto;
}

.success-screen.show {
	display: flex;
}

.success-icon-wrap {
	width: 80px;
	height: 80px;
	border-radius: 50%;
	background: linear-gradient(135deg, #7c3aed, #06b6d4);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 22px;
	box-shadow: 0 0 0 12px rgba(124, 58, 237, .08), 0 8px 28px rgba(124, 58, 237, .35);
	animation: popIcon .5s cubic-bezier(.22, .9, .34, 1.15) .15s both;
	flex-shrink: 0;
}

@keyframes popIcon {
	from {
		transform: scale(.4);
		opacity: 0
	}

	to {
		transform: scale(1);
		opacity: 1
	}
}

.success-icon-wrap svg {
	width: 36px;
	height: 36px;
	color: #fff;
}

.success-title {
	font-family: 'Orbitron', monospace;
	font-size: 20px;
	font-weight: 800;
	color: #1a0d35;
	margin-bottom: 10px;
}

.success-title span {
	background: linear-gradient(90deg, #7c3aed, #06b6d4);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.success-msg {
	font-size: 13.5px;
	color: #6b5f8a;
	line-height: 1.65;
	max-width: 320px;
	margin-bottom: 28px;
}

.success-badges {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 28px;
}

.success-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border-radius: 30px;
	background: #f4f3ff;
	border: 1px solid #ddd6fe;
	font-size: 12px;
	font-weight: 600;
	color: #6d28d9;
}

.success-badge svg {
	width: 13px;
	height: 13px;
	color: #7c3aed;
}

.success-close-btn {
	padding: 12px 32px;
	border-radius: 12px;
	border: none;
	background: linear-gradient(130deg, #7c3aed, #a855f7);
	color: #fff;
	font-family: 'Orbitron', monospace;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .06em;
	cursor: pointer;
	box-shadow: 0 4px 18px rgba(124, 58, 237, .35);
	transition: box-shadow .25s, transform .15s;
}

.success-close-btn:hover {
	box-shadow: 0 6px 24px rgba(124, 58, 237, .5);
	transform: translateY(-1px);
}

/* Progress bar on success */
.success-progress {
	width: 100%;
	max-width: 280px;
	height: 3px;
	background: #ede9fe;
	border-radius: 3px;
	overflow: hidden;
	margin-top: 20px;
	flex-shrink: 0;
}

.success-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #7c3aed, #06b6d4);
	border-radius: 3px;
	width: 0%;
	transition: width 3s linear;
}

.success-progress-label {
	font-size: 10.5px;
	color: #b0a5cc;
	margin-top: 6px;
}

/* Hide scrollbars on the two inner panels (scroll still works) */
.panel-left,
.panel-right {
	scrollbar-width: none;
	/* Firefox */
	-ms-overflow-style: none;
	/* IE / old Edge */
}

.panel-left::-webkit-scrollbar,
.panel-right::-webkit-scrollbar {
	display: none;
	width: 0;
	height: 0;
	/* Chrome, Safari, new Edge */
}

/* ═══════════════════════════════════
   TABLET (≤ 900px) — modal starts hugging viewport width
═══════════════════════════════════ */
@media (max-width: 900px) {
	#popup .modal {
		max-width: 96vw;
	}
}

/* ═══════════════════════════════════
   MOBILE (≤ 680px)
═══════════════════════════════════ */
@media (max-width: 680px) {
	#popup.overlay {
		padding: 0;
		align-items: flex-end !important;
	}

	#popup .modal {
		flex-direction: column;
		border-radius: 20px 20px 0 0;
		max-height: 92vh;
		height: auto;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		min-height: unset;
		max-width: 100%;
		width: 100%;
	}

	.panel-left {
		flex: none;
		width: 100%;
		padding: 26px 22px 22px;
		min-height: unset;
		max-height: none;
		overflow: visible;
	}

	.lp-title {
		font-size: 19px;
	}

	.lp-sub {
		margin-bottom: 20px;
	}

	.perks {
		gap: 12px;
		margin-bottom: 20px;
	}

	.stats-row {
		margin-top: 4px;
	}

	.panel-right {
		width: 100%;
		max-height: none;
		overflow: visible;
	}

	#popup .rp-inner {
		padding: 26px 20px 24px !important;
	}

	.close-btn {
		top: 12px;
		right: 12px;
	}

	#popup .field-row {
		flex-direction: column;
		gap: 13px;
	}

	#popup .field-row .field {
		flex: 1 1 auto;
	}

	.success-screen {
		border-radius: 0 0 20px 20px;
		padding: 32px 22px 28px;
	}

	#nodeCanvas {
		opacity: .35;
	}
}

/* ═══════════════════════════════════
   SMALL MOBILE (≤ 400px)
═══════════════════════════════════ */
@media (max-width: 400px) {
	.lp-title {
		font-size: 17px;
	}

	.stats-row {
		flex-wrap: wrap;
	}

	.stat {
		flex: 1 1 33%;
	}

	.trust-row {
		gap: 10px;
	}

	.divider {
		display: none;
	}

	.success-badges {
		gap: 8px;
	}

	.success-badge {
		font-size: 11px;
		padding: 6px 11px;
	}
}

/* ═══════════════════════════════════
   SHORT VIEWPORTS (landscape phones, small tablets)
═══════════════════════════════════ */
@media (max-height: 640px) and (max-width: 680px) {
	#popup.overlay {
		align-items: center !important;
	}

	#popup .modal {
		max-height: 96vh;
		border-radius: 18px;
	}

	.panel-left {
		display: none;
		/* hide the decorative panel to give the form room to breathe */
	}
}

/* ═══════════════════════════════════
   SHORT DESKTOP VIEWPORTS (laptops with limited height)
   Fixes content getting cut off at the bottom instead of scrolling
═══════════════════════════════════ */
@media (min-width: 681px) and (max-height: 700px) {
	#popup .modal {
		max-height: 94vh;
	}

	.panel-left,
	.panel-right {
		max-height: 94vh;
	}

	.panel-left {
		padding: 26px 28px 22px;
	}

	#popup .rp-inner {
		padding: 22px 36px 22px !important;
	}

	.lp-sub {
		margin-bottom: 16px;
	}

	.perks {
		gap: 10px;
	}

	.stats-row {
		margin-top: 14px;
	}
}