/* 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;
  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: hidden;
  padding: 42px 34px 36px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

#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(20px,2.4vw,27px);
  font-weight: 900;
  color: #fff;
  line-height: 1.22;
  margin-bottom: 12px;
}
.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: 13px;
  color: rgba(255,255,255,.52);
  line-height: 1.65;
  margin-bottom: 30px;
}

/* Perks */
.perks { display:flex; flex-direction:column; gap:16px; margin-bottom:auto; }
.perk { display:flex; align-items:flex-start; gap:13px; }
.perk-icon {
  width:34px; height:34px;
  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:15px; height:15px; color:#c4b5fd; }
.perk-text strong { display:block; font-size:13px; font-weight:600; color:#e9e3ff; margin-bottom:2px; }
.perk-text span { font-size:11.5px; color:rgba(255,255,255,.38); line-height:1.4; }

/* Stats bar */
.stats-row {
  display: flex;
  gap: 0;
  margin-top: 28px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(124,58,237,.18);
  border-radius: 14px;
  overflow: hidden;
}
.stat {
  flex:1;
  padding: 13px 12px;
  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:16px; 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:10px; 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;
}

/* Light panel subtle top bar */
.rp-topbar {
  height: 4px;
  background: linear-gradient(90deg, #7c3aed, #a855f7, #06b6d4);
}

#popup .rp-inner {
  padding: 38px 46px 38px !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: 22px; }
.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:13px; 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: 11px 14px 11px 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: 84px !important;
  padding-top: 11px !important;
  line-height: 1.55 !important;
}

#popup .field-icon {
  position: absolute !important;
  left: 13px !important;
  top: 37px !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: 44px !important; }

/* Two-col row */
#popup .field-row { display: flex !important; gap: 12px; flex-wrap: wrap; }
#popup .field-row .field { flex: 1 1 200px; }

/* CTA */
#popup .cta-btn {
  width: 100% !important;
  padding: 15px 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: 6px;
  position: relative;
  overflow: hidden;
}
.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: 14px;
  flex-wrap: wrap;
}
.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: none;
  font-size: 11px;
  color: #ef4444;
  margin-top: 5px;
  font-weight: 500;
  align-items: center;
  gap: 4px;
}
.field-error-msg.visible { display: flex; }
.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;
}
.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;
}
@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;
}
.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;
}

/* ══════════════════════════════
   MOBILE
══════════════════════════════ */
@media (max-width: 680px) {
  .overlay { padding: 0; align-items: flex-end; }
  .modal {
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    max-height: 95vh;
    overflow-y: auto;
    min-height: unset;
  }
  .panel-left {
    flex: none;
    padding: 28px 24px 24px;
    min-height: unset;
  }
  .lp-title { font-size: 20px; }
  .stats-row { margin-top: 20px; }
  .perks { gap: 12px; margin-bottom: 0; }
  .rp-inner { padding: 28px 22px 28px; }
  .field-row { flex-direction: column; gap: 13px; }
  #nodeCanvas { opacity: .35; }
}

@media (max-width: 400px) {
  .trust-row { gap: 10px; }
  .divider { display: none; }
}