/* ─────────────── LEAD POPUP (Bezpłatna konsultacja / Audyt) ─────────────── */

.lead-pop {
  position: fixed; inset: 0; z-index: 9999;
  display: grid; place-items: center;
  background:
    radial-gradient(ellipse 65% 70% at 18% 12%, oklch(50% 0.11 45 / 0.20), transparent 58%),
    oklch(9% 0.012 55 / 0.76);
  backdrop-filter: blur(10px) saturate(1.05);
  -webkit-backdrop-filter: blur(10px) saturate(1.05);
  padding: 24px;
  animation: lp-fade .25s ease;
}
@keyframes lp-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes lp-rise { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

.lead-pop-card {
  position: relative;
  width: min(960px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  --lp-bg: oklch(10.5% 0.012 55);
  --lp-panel: oklch(14% 0.018 55);
  --lp-panel-warm: oklch(16.5% 0.026 48);
  --lp-border: oklch(30% 0.028 55);
  --lp-border-strong: oklch(47% 0.09 48);
  --lp-text: oklch(92% 0.012 70);
  --lp-muted: oklch(73% 0.018 72);
  --lp-soft: oklch(72% 0.17 45 / 0.12);
  --lp-focus: oklch(72% 0.17 45 / 0.22);
  --lp-danger: oklch(67% 0.17 28);
  background: linear-gradient(135deg, var(--lp-panel-warm), var(--lp-bg) 48%, oklch(8.5% 0.01 55));
  color: var(--text);
  border: 1px solid color-mix(in oklab, var(--lp-border) 72%, var(--accent));
  border-radius: 16px;
  box-shadow: 0 34px 100px -26px oklch(4% 0.01 55 / 0.82);
  animation: lp-rise .3s cubic-bezier(.2,.7,.2,1.05);
}

.lead-pop-close {
  position: absolute; top: 14px; right: 14px; z-index: 2;
  width: 36px; height: 36px;
  display: grid; place-items: center;
  background: oklch(8% 0.01 55 / 0.72);
  border: 1px solid var(--lp-border);
  border-radius: 999px;
  color: var(--lp-muted);
  cursor: pointer;
  transition: all .2s;
}
.lead-pop-close:hover { color: var(--lp-text); border-color: var(--accent); background: oklch(13% 0.02 55); }

.lead-pop-grid {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 0;
  min-height: 480px;
}

/* Side panel — variant differentiated by accent strip */
.lead-pop-side {
  padding: 44px 40px 36px;
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, oklch(72% 0.17 45 / 0.13), transparent 56%),
    linear-gradient(160deg, var(--lp-panel-warm), oklch(13% 0.018 55));
  border-right: 1px solid var(--lp-border);
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.lead-pop-side::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--accent), color-mix(in oklab, var(--accent) 65%, white), transparent);
}
.lead-pop-consult .lead-pop-side::before { background: var(--accent); }
.lead-pop-audit   .lead-pop-side::before { background: linear-gradient(90deg, var(--accent) 0%, var(--text) 100%); }

[data-theme="dark"] .lead-pop-side {
  background:
    radial-gradient(ellipse 80% 90% at 0% 0%, oklch(72% 0.17 45 / 0.13), transparent 56%),
    linear-gradient(160deg, var(--lp-panel-warm), oklch(13% 0.018 55));
}

.lead-pop-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 12px; letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.lead-pop-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px oklch(72% 0.17 45 / 0.18);
}

.lead-pop-h {
  font-family: var(--font-display, "Fraunces", serif);
  font-weight: 500;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
  text-wrap: pretty;
  color: var(--lp-text);
}

.lead-pop-sub {
  font-size: 15px;
  line-height: 1.55;
  color: var(--lp-muted);
  margin: 0 0 22px;
  text-wrap: pretty;
}

.lead-pop-bullets {
  list-style: none; padding: 0; margin: 0 0 24px;
  display: flex; flex-direction: column; gap: 10px;
}
.lead-pop-bullets li {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  color: var(--lp-text);
}
.lead-pop-bullet-mark {
  flex-shrink: 0;
  width: 20px; height: 20px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: oklch(72% 0.17 45 / 0.16);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  margin-top: 1px;
}

.lead-pop-promise {
  margin-top: auto;
  display: flex; gap: 12px; align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--lp-border);
  border-radius: 12px;
  background: oklch(7.5% 0.01 55 / 0.72);
  box-shadow: inset 0 1px 0 oklch(100% 0 0 / 0.035);
}
.lead-pop-promise-icon {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: oklch(72% 0.17 45 / 0.12);
  color: var(--accent);
  flex-shrink: 0;
}
.lead-pop-promise-h { font-size: 13px; font-weight: 600; color: var(--lp-text); }
.lead-pop-promise-s { font-size: 11px; color: var(--lp-muted); margin-top: 2px; }

/* Form side */
.lead-pop-form {
  padding: 44px 40px 36px;
  display: flex; flex-direction: column; gap: 16px;
  background:
    linear-gradient(180deg, oklch(9% 0.01 55 / 0.88), oklch(7.5% 0.008 55 / 0.96)),
    var(--lp-bg);
}
.lead-pop-row {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
.lead-pop-field {
  display: flex; flex-direction: column; gap: 6px;
}
.lead-pop-field label {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lp-muted);
}
.lead-pop-field input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  background: oklch(8.5% 0.01 55);
  border: 1px solid var(--lp-border);
  border-radius: 10px;
  color: var(--lp-text);
  font-family: inherit;
  font-size: 15px;
  transition: border-color .15s, box-shadow .15s;
}
.lead-pop-field input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--lp-focus);
  background: oklch(10% 0.012 55);
}
.lead-pop-field input[aria-invalid="true"] {
  border-color: var(--lp-danger);
}
.lead-pop-err { color: var(--lp-danger); font-size: 11px; }
.lead-pop-err-block { margin-top: -10px; }

/* Checkbox */
.lead-pop-check {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  font-size: 12px;
  line-height: 1.5;
  color: var(--lp-muted);
  user-select: none;
}
.lead-pop-check input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.lead-pop-check-box {
  width: 18px; height: 18px;
  border: 1px solid var(--lp-border);
  border-radius: 4px;
  background: oklch(8.5% 0.01 55);
  position: relative;
  transition: all .15s;
  margin-top: 1px;
}
.lead-pop-check input:checked + .lead-pop-check-box {
  background: var(--accent);
  border-color: var(--accent);
}
.lead-pop-check input:checked + .lead-pop-check-box::after {
  content: "";
  position: absolute;
  left: 4px; top: 1px;
  width: 5px; height: 9px;
  border: solid #0A0A0B;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.lead-pop-check input:focus-visible + .lead-pop-check-box {
  box-shadow: 0 0 0 3px var(--lp-focus);
}
.lead-pop-check.is-err .lead-pop-check-box { border-color: var(--lp-danger); }
.lead-pop-req { color: var(--accent); font-weight: 600; }
.lead-pop-opt { color: var(--lp-muted); opacity: 0.9; }

/* Banner err */
.lead-pop-banner-err {
  padding: 10px 12px;
  border: 1px solid var(--lp-danger);
  background: oklch(67% 0.17 28 / 0.10);
  color: var(--lp-danger);
  border-radius: 8px;
  font-size: 12px;
  line-height: 1.5;
}
.lead-pop-banner-err a { color: inherit; text-decoration: underline; }

/* Actions */
.lead-pop-actions {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-top: 6px;
}
.lead-pop-submit { min-height: 48px; }
.lead-pop-submit[disabled] { opacity: 0.7; pointer-events: none; }
.lead-pop-meta { font-size: 11px; color: var(--lp-muted); }

/* Success state */
.lead-pop-success {
  padding: 56px 40px 44px;
  display: flex; flex-direction: column; align-items: flex-start;
  text-align: left;
  max-width: 520px;
  margin: 0 auto;
  color: var(--lp-text);
}
.lead-pop-success-icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 999px;
  background: oklch(73% 0.13 145 / 0.16);
  color: oklch(76% 0.13 145);
  margin-bottom: 18px;
}
.lead-pop-success-actions {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px;
}
.lead-pop-success-meta { font-size: 11px; color: var(--lp-muted); margin-top: 18px; }

/* ─────────────── Tweaks integration: variant force toggle ─────────────── */
.tweaks-variant-row {
  display: flex; flex-direction: column; gap: 6px; margin-top: 10px;
}

/* ─────────────── Mobile: bottom sheet ─────────────── */
@media (max-width: 720px) {
  .lead-pop { padding: 0; align-items: flex-end; }
  .lead-pop-card {
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    border-left: none; border-right: none; border-bottom: none;
    animation: lp-slide-up .3s cubic-bezier(.2,.7,.2,1.05);
  }
  @keyframes lp-slide-up {
    from { transform: translateY(100%); }
    to   { transform: none; }
  }
  .lead-pop-grid { grid-template-columns: 1fr; min-height: 0; }
  .lead-pop-side {
    padding: 36px 22px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }
  .lead-pop-form { padding: 24px 22px 28px; }
  .lead-pop-row { grid-template-columns: 1fr; }
  .lead-pop-promise { margin-top: 18px; }
  .lead-pop-success { padding: 40px 22px 28px; }
}
