.lead-modal[hidden] {
  display: none;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: var(--section-padding-x);
}

.lead-modal__backdrop {
  position: absolute;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lead-fade 0.25s var(--ease-default);
}

.lead-modal__panel {
  position: relative;
  width: 100%;
  max-width: 420px;
  background-color: #161616;
  border-radius: clamp(16px, 2vw, 24px);
  padding: clamp(1.75rem, 4vw, 2.5rem);
  animation: lead-rise 0.35s var(--ease-default);
}

.lead-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gray);
  font-size: 1.5rem;
  line-height: 1;
  transition: color var(--duration-default) var(--ease-default),
    background-color var(--duration-default) var(--ease-default);
}

.lead-modal__close:hover {
  color: var(--white);
  background-color: rgba(217, 217, 217, 0.1);
}

.lead-modal__title {
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
}

.lead-modal__subtitle {
  margin-top: 0.5rem;
  color: var(--gray);
  font-size: 0.95rem;
  line-height: 1.5;
}

.lead-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.75rem;
}

.lead-form__field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.lead-form__label {
  color: var(--gray);
  font-size: 0.85rem;
  font-weight: 600;
}

.lead-form__input {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid rgba(217, 217, 217, 0.14);
  border-radius: 10px;
  background-color: rgba(217, 217, 217, 0.05);
  color: var(--white);
  font-size: 0.95rem;
  transition: border-color var(--duration-default) var(--ease-default);
}

.lead-form__input::placeholder {
  color: rgba(217, 217, 217, 0.35);
}

.lead-form__input:focus {
  outline: none;
  border-color: var(--light-green);
}

.lead-form__submit {
  margin-top: 0.5rem;
  width: 100%;
}

.lead-form__error {
  color: #ff8f6b;
  font-size: 0.85rem;
  min-height: 1.2em;
}

@keyframes lead-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes lead-rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .lead-modal__backdrop,
  .lead-modal__panel {
    animation: none;
  }
}
