/* Custom lead modal + inline card — oknaminsk24 */
:root {
  --lf-ink: #152029;
  --lf-muted: #5d6b78;
  --lf-line: #d9e1e8;
  --lf-paper: #eef2f6;
  --lf-steel: #1f3a52;
  --lf-accent: #e07a1f;
  --lf-accent-dark: #c46312;
  --lf-font: "Manrope", system-ui, sans-serif;
}

.lf-overlay {
  position: fixed;
  inset: 0;
  z-index: 12000;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(12, 20, 28, 0.55);
  backdrop-filter: blur(6px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s, visibility 0.22s;
}

.lf-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.lf-modal {
  width: min(920px, 100%);
  max-height: min(92vh, 720px);
  overflow: auto;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(28, 52, 72, 0.1);
  box-shadow: 0 28px 64px rgba(8, 18, 28, 0.28);
  font-family: var(--lf-font);
  transform: translateY(18px) scale(0.98);
  transition: transform 0.28s cubic-bezier(.2, .8, .2, 1);
}

.lf-overlay.is-open .lf-modal {
  transform: none;
}

.lf-visual {
  position: relative;
  min-height: 100%;
  overflow: hidden;
  background: #1a2c3c;
}

.lf-visual picture,
.lf-visual img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lf-visual__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(15, 28, 40, 0.15) 0%, rgba(15, 28, 40, 0.72) 100%);
  pointer-events: none;
}

.lf-visual__copy {
  position: absolute;
  left: 1.25rem;
  right: 1.25rem;
  bottom: 1.25rem;
  color: #fff;
  z-index: 1;
}

.lf-visual__copy strong {
  display: block;
  font-size: clamp(1.25rem, 2.4vw, 1.55rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.lf-visual__copy span {
  display: block;
  font-size: 0.92rem;
  line-height: 1.45;
  opacity: 0.9;
}

.lf-panel {
  padding: 1.35rem 1.35rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.lf-panel__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.lf-kicker {
  margin: 0 0 0.25rem;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lf-accent);
}

.lf-panel h2 {
  margin: 0;
  font-size: clamp(1.2rem, 2.2vw, 1.45rem);
  font-weight: 800;
  color: var(--lf-steel);
  letter-spacing: -0.02em;
}

.lf-panel__lead {
  margin: 0.35rem 0 0;
  color: var(--lf-muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.lf-close {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid var(--lf-line);
  background: var(--lf-paper);
  color: var(--lf-ink);
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  line-height: 0;
}

.lf-close svg {
  width: 16px;
  height: 16px;
  display: block;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  fill: none;
}

.lf-close:hover {
  background: #e4ebf1;
}

.lf-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.lf-chips span {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: rgba(224, 122, 31, 0.1);
  color: var(--lf-accent-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.lf-form {
  display: grid;
  gap: 0.7rem;
}

.lf-field {
  display: grid;
  gap: 0.35rem;
}

.lf-field span {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--lf-steel);
}

.lf-field input,
.lf-field textarea,
.lf-field select {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--lf-line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--lf-ink);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.lf-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.6rem;
  background-color: #f8fafc;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none' stroke='%235d6b78' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 4.5 6 7.5 9 4.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.95rem center;
  background-size: 12px;
  cursor: pointer;
  color-scheme: light;
}

.lf-field select option,
.lf-field select optgroup {
  background: #ffffff;
  color: #152029;
}

.lf-field textarea {
  resize: vertical;
  min-height: 88px;
}

.lf-field input:focus,
.lf-field textarea:focus,
.lf-field select:focus {
  border-color: rgba(224, 122, 31, 0.55);
  background-color: #fff;
  box-shadow: 0 0 0 4px rgba(224, 122, 31, 0.14);
}

/* Custom dropdown (replaces native ugly OS list) */
.lf-select {
  position: relative;
}

.lf-select__btn {
  width: 100%;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  border: 1px solid var(--lf-line);
  border-radius: 14px;
  background: #f8fafc;
  padding: 0.85rem 0.95rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--lf-ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.lf-select__btn span {
  font-size: inherit;
  font-weight: 550;
  color: inherit;
}

.lf-select__btn.is-placeholder span {
  color: #8a97a3;
  font-weight: 500;
}

.lf-select__btn svg {
  width: 12px;
  height: 12px;
  flex: none;
  stroke: #5d6b78;
  stroke-width: 1.8;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.18s;
}

.lf-select.is-open .lf-select__btn {
  border-color: rgba(224, 122, 31, 0.55);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(224, 122, 31, 0.14);
}

.lf-select.is-open .lf-select__btn svg {
  transform: rotate(180deg);
}

.lf-select__list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 0.4rem);
  z-index: 40;
  margin: 0;
  padding: 0.35rem;
  list-style: none;
  border-radius: 14px;
  background: #fff;
  border: 1px solid rgba(28, 52, 72, 0.12);
  box-shadow: 0 16px 36px rgba(12, 24, 36, 0.14);
  max-height: 240px;
  overflow: auto;
  display: none;
}

.lf-select.is-open .lf-select__list {
  display: block;
}

.lf-select__list button {
  width: 100%;
  display: block;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 0.7rem 0.8rem;
  border-radius: 10px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--lf-ink);
  cursor: pointer;
}

.lf-select__list button:hover,
.lf-select__list button.is-active {
  background: rgba(224, 122, 31, 0.12);
  color: var(--lf-accent-dark);
}

.lf-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.7rem;
}

.lf-submit {
  appearance: none;
  border: 0;
  border-radius: 14px;
  padding: 0.95rem 1.1rem;
  background: linear-gradient(135deg, var(--lf-accent), var(--lf-accent-dark));
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(196, 99, 18, 0.28);
  transition: transform 0.15s, filter 0.15s;
}

.lf-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.03);
}

.lf-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.lf-note {
  margin: 0;
  min-height: 1.2em;
  font-size: 0.86rem;
  font-weight: 650;
  color: #1f7a45;
}

.lf-note.is-error {
  color: #b42318;
}

.lf-legal {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.4;
  color: var(--lf-muted);
}

.lf-legal a {
  color: var(--lf-accent-dark);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.lf-legal a:hover {
  color: var(--lf-accent);
}

body.lf-open {
  overflow: hidden;
}

/* Inline card (contacts page) */
.lf-card {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  overflow: hidden;
  border-radius: 24px;
  background: #fff;
  border: 1px solid rgba(28, 52, 72, 0.1);
  box-shadow: 0 18px 40px rgba(16, 32, 48, 0.08);
  font-family: var(--lf-font);
}

.lf-card .lf-visual {
  min-height: 420px;
}

.lf-card .lf-panel {
  padding: 1.5rem 1.5rem 1.35rem;
}

@media (max-width: 820px) {
  .lf-overlay {
    padding: 0.5rem;
    align-items: end;
    place-items: end center;
  }

  .lf-modal,
  .lf-card {
    grid-template-columns: 1fr;
    width: 100%;
    max-height: min(92dvh, 100%);
    border-radius: 18px 18px 14px 14px;
  }

  /* Photo block eats too much height on phones — hide in modal */
  .lf-modal .lf-visual {
    display: none;
  }

  .lf-card .lf-visual {
    min-height: 120px;
    max-height: 140px;
  }

  .lf-visual__copy {
    left: 1rem;
    right: 1rem;
    bottom: 0.85rem;
  }

  .lf-visual__copy strong {
    font-size: 1.05rem;
    margin-bottom: 0.15rem;
  }

  .lf-visual__copy span {
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .lf-panel {
    padding: 0.85rem 0.9rem 0.8rem;
    gap: 0.55rem;
  }

  .lf-panel__lead {
    margin: 0.2rem 0 0;
    font-size: 0.82rem;
    line-height: 1.35;
  }

  .lf-panel h2 {
    font-size: 1.15rem;
  }

  .lf-close {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }

  .lf-chips {
    gap: 0.3rem;
  }

  .lf-chips span {
    padding: 0.28rem 0.55rem;
    font-size: 0.7rem;
  }

  .lf-form {
    gap: 0.5rem;
  }

  .lf-field {
    gap: 0.22rem;
  }

  .lf-field span {
    font-size: 0.72rem;
  }

  .lf-field input,
  .lf-field textarea,
  .lf-field select,
  .lf-select__btn {
    border-radius: 11px;
    padding: 0.62rem 0.75rem;
    font-size: 0.9rem;
  }

  .lf-field textarea {
    min-height: 56px;
  }

  .lf-select__btn {
    padding: 0.62rem 0.75rem;
  }

  .lf-select__list {
    max-height: 180px;
  }

  .lf-select__list button {
    padding: 0.55rem 0.65rem;
    font-size: 0.86rem;
  }

  /* Name + phone stay side-by-side to save height */
  .lf-row {
    grid-template-columns: 1fr 1fr;
    gap: 0.45rem;
  }

  .lf-submit {
    border-radius: 12px;
    padding: 0.72rem 0.9rem;
    font-size: 0.92rem;
    box-shadow: 0 8px 16px rgba(196, 99, 18, 0.24);
  }

  .lf-legal {
    font-size: 0.68rem;
    line-height: 1.35;
  }

  .lf-card .lf-panel {
    padding: 0.95rem 0.95rem 0.85rem;
  }
}

@media (max-width: 560px) {
  .lf-overlay {
    padding: 0;
    align-items: end;
  }

  .lf-modal {
    max-height: 100dvh;
    border-radius: 16px 16px 0 0;
  }

  .lf-chips {
    display: none;
  }

  .lf-panel__lead {
    display: none;
  }

  .lf-kicker {
    margin-bottom: 0.1rem;
    font-size: 0.68rem;
  }

  .lf-field textarea {
    min-height: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lf-overlay,
  .lf-modal {
    transition: none;
  }
}

.lf-select select { position: absolute !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
