/* ==========================================================================
   Demo / contact dialog — same card language as the product widgets
   ========================================================================== */
.lead-dialog {
  position: fixed; inset: 0; margin: auto; padding: 16px;
  width: 100%; max-width: 640px; max-height: 100dvh;
  border: 0; background: transparent; color: inherit; overflow: auto;
}
.lead-dialog::backdrop { background: rgba(5, 6, 5, .72); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.lead-dialog[open] { animation: lead-in .32s cubic-bezier(.2, .8, .2, 1); }
.lead-dialog[open]::backdrop { animation: fade-in .25s ease; }
@keyframes lead-in { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes fade-in { from { opacity: 0; } }

.lead-form { max-width: none; padding: 32px; }
.lead__close {
  position: absolute; top: 16px; right: 16px; width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--w-ink-3); cursor: pointer;
  transition: background-color .2s ease, color .2s ease;
}
.lead__close:hover { background: var(--w-raised); color: var(--w-ink); }
.lead__close svg { width: 16px; height: 16px; }

.lead__body { display: flex; flex-direction: column; gap: 20px; }
.lead__title { font-family: var(--f-display); font-weight: 400; font-size: 32px; line-height: 1.1; letter-spacing: -.8px; color: var(--text); margin-top: 4px; }
.lead__intro { font-size: 15px; line-height: 1.6; color: var(--w-ink-2); max-width: 500px; margin-top: -6px; }
.lead__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.lead__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; border: 0; }
.field__label { font-family: var(--f-mono); font-size: 10.5px; line-height: 12px; letter-spacing: 1.2px; color: var(--dim); padding: 0; }
.field__label i { font-style: normal; color: var(--w-ink-3); margin-left: 4px; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; border-radius: 8px;
  font: 15px/1.4 var(--f-sans); color: var(--w-ink);
  background: var(--w-panel); border: 1px solid var(--w-hair); outline: none;
  transition: border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder, .field textarea::placeholder { color: #6A6F67; }
.field input:hover, .field textarea:hover { border-color: rgba(255, 255, 255, .12); }
.field input:focus, .field textarea:focus { border-color: rgba(86, 242, 78, .55); box-shadow: 0 0 0 3px rgba(86, 242, 78, .1); background: #1e1f1e; }
.field__err { display: none; font-size: 12.5px; color: var(--fail); }
.field.is-invalid input { border-color: rgba(240, 82, 74, .7); }
.field.is-invalid .field__err { display: block; }

.field--chips legend { margin-bottom: 10px; }
.field--chips[hidden] { display: none; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 8px;
  font-size: 13.5px; color: var(--w-ink-2); background: var(--w-panel); border: 1px solid var(--w-hair);
  transition: color .2s ease, border-color .2s ease, background-color .2s ease;
}
.chip span::before { content: ""; width: 7px; height: 7px; border-radius: 2px; background: #3a3d39; transition: background-color .2s ease, box-shadow .2s ease; }
.chip:hover span { color: var(--w-ink); }
.chip input:checked + span { color: var(--w-ink); border-color: rgba(86, 242, 78, .4); background: rgba(86, 242, 78, .06); }
.chip input:checked + span::before { background: var(--ok); box-shadow: 0 0 8px rgba(86, 242, 78, .6); }
.chip input:focus-visible + span { outline: 1px solid var(--accent); outline-offset: 2px; }

.lead__foot { margin: 28px -32px -32px; padding: 16px 32px; }
.lead__submit { border: 0; flex: none; }
.lead__submit:disabled { opacity: .6; cursor: default; }
.wcard__msg.is-err { color: #f19a94; }
.wcard__msg a { color: var(--w-ink); text-decoration: underline; text-underline-offset: 3px; }

/* sent: fade the fields so the confirmation reads as the outcome */
.lead-dialog.is-sent .lead__body > :not(.tag):not(.lead__title):not(.lead__intro) { opacity: .35; pointer-events: none; transition: opacity .3s ease; }

@media (max-width: 582px) {
  .lead-dialog { padding: 8px; }
  .lead-form { padding: 22px 18px; }
  .lead__title { font-size: 26px; }
  .lead__grid { grid-template-columns: 1fr; gap: 14px; }
  .lead__foot { margin: 22px -18px -22px; padding: 14px 18px; flex-direction: column; align-items: stretch; }
  .lead__submit { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  .lead-dialog[open], .lead-dialog[open]::backdrop { animation: none; }
}
