/* Public lead form on home — SBORKA tokens */

.contact-section {
  border-top: 1px solid var(--sb-line);
  padding-top: 110px;
  padding-bottom: 110px;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.contact-copy h2 {
  font-size: clamp(36px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.05em;
  margin: 18px 0 20px;
  max-width: 14ch;
}

.contact-copy p {
  color: var(--sb-muted);
  font-size: 17px;
  line-height: 1.6;
  max-width: 42ch;
  margin: 0 0 28px;
}

.contact-trust {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 12px;
}

.contact-trust li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: #c7cbea;
  font-size: 14px;
  line-height: 1.45;
}

.contact-trust li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--sb-cyan);
  flex-shrink: 0;
}

.lead-card {
  padding: clamp(22px, 3vw, 32px);
  border-radius: 28px;
  border: 1px solid #3a3f7a;
  background: linear-gradient(160deg, #12164a, #0a0d32);
  box-shadow:
    0 0 0 1px rgba(75, 220, 245, 0.08),
    0 28px 80px rgba(0, 0, 0, 0.35);
}

.lead-form {
  display: grid;
  gap: 16px;
}

.lead-field {
  display: grid;
  gap: 8px;
}

.lead-field label {
  font-size: 13px;
  font-weight: 700;
  color: #d7dcf5;
}

.lead-field .req {
  color: var(--sb-cyan);
}

.lead-field input,
.lead-field select,
.lead-field textarea {
  min-height: 48px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #343963;
  background: #0b0e2c;
  color: var(--sb-white);
}

.lead-field textarea {
  min-height: 120px;
  resize: vertical;
}

.lead-field input:focus-visible,
.lead-field select:focus-visible,
.lead-field textarea:focus-visible,
.lead-submit:focus-visible,
.lead-consent input:focus-visible {
  outline: 3px solid var(--sb-cyan);
  outline-offset: 2px;
}

.lead-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.lead-error {
  min-height: 1.2em;
  color: #ff8d8d;
  font-size: 12px;
  font-weight: 600;
}

.lead-consent {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  color: #b7bddb;
  font-size: 13px;
  line-height: 1.45;
}

.lead-consent input {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--sb-cyan);
}

.lead-consent a {
  color: var(--sb-cyan);
  font-weight: 700;
}

.lead-hp {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.lead-submit {
  min-height: 56px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--sb-cyan);
  color: #09102e;
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
}

.lead-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

.lead-status {
  min-height: 1.4em;
  font-size: 14px;
  font-weight: 700;
}

.lead-status.is-error {
  color: #ff8d8d;
}

/* A closed <dialog> is hidden by the browser. Any author `display` wins over
   that rule, so the popup stayed on screen and «Понятно» could not dismiss it. */
.lead-modal:not([open]) {
  display: none;
}

.lead-modal {
  position: fixed;
  inset: 0;
  flex-direction: column;
  width: min(440px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100dvh - 24px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid #3a3f7a;
  border-radius: 28px;
  background: linear-gradient(160deg, #12164a, #0a0d32);
  color: var(--sb-white);
  box-shadow:
    0 0 0 1px rgba(75, 220, 245, 0.14),
    0 28px 80px rgba(0, 0, 0, 0.5);
}

.lead-modal[open] {
  display: flex;
}

.lead-modal-body {
  min-height: 0;
  overflow: auto;
  padding: 28px 28px 24px;
}

.lead-modal::backdrop {
  background: rgba(5, 6, 37, 0.72);
}

.lead-modal h2 {
  margin: 4px 0 12px;
  padding-right: 52px;
  font-size: clamp(22px, 4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.04em;
}

.lead-modal p {
  margin: 0 0 24px;
  color: var(--sb-muted);
  font-size: 16px;
  line-height: 1.5;
}

.lead-modal-x,
.lead-modal-ok {
  font: inherit;
  cursor: pointer;
}

.lead-modal-x {
  position: absolute;
  z-index: 1;
  top: 14px;
  right: 14px;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid #343963;
  background: #12164a;
  color: var(--sb-white);
  font-size: 24px;
  line-height: 1;
}

.lead-modal-ok {
  min-height: 48px;
  width: 100%;
  border: 0;
  border-radius: 999px;
  background: var(--sb-cyan);
  color: #09102e;
  font-size: 16px;
  font-weight: 800;
}

.lead-modal-x:focus-visible,
.lead-modal-ok:focus-visible {
  outline: 3px solid var(--sb-cyan);
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .lead-modal {
    width: min(440px, calc(100vw - 24px));
  }

  .lead-modal-body {
    padding: 20px 16px 18px;
  }

  .lead-modal h2 {
    padding-right: 46px;
  }

  .lead-modal-x {
    top: 10px;
    right: 8px;
  }
}

@media (max-width: 900px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .lead-row {
    grid-template-columns: 1fr;
  }

  .contact-section {
    padding-top: 78px;
    padding-bottom: 78px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-card,
  .lead-modal {
    box-shadow: 0 0 0 1px rgba(75, 220, 245, 0.14);
  }
}
