/**
 * Join the Network — registration page.
 */

body.mp-join-page .entry-hero-container-inner,
body.mp-join-page .hero-section,
body.mp-join-page .entry-header {
  display: none;
}

.mp-join {
  background: var(--mp-cream);
}

/* Hero */
.mp-join-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(40px, 6vw, 72px) 0 clamp(48px, 7vw, 80px);
}

.mp-join-hero__blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.mp-join-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  opacity: 0.5;
}

.mp-join-blob--1 {
  top: -10%;
  left: -8%;
  width: min(48vw, 400px);
  height: min(48vw, 400px);
  background: radial-gradient(circle, rgba(47, 120, 189, 0.4) 0%, transparent 70%);
}

.mp-join-blob--2 {
  top: 20%;
  right: -6%;
  width: min(40vw, 340px);
  height: min(40vw, 340px);
  background: radial-gradient(circle, rgba(23, 37, 79, 0.2) 0%, transparent 72%);
}

.mp-join-blob--3 {
  bottom: -18%;
  left: 38%;
  width: min(34vw, 280px);
  height: min(34vw, 280px);
  background: radial-gradient(circle, rgba(47, 120, 189, 0.24) 0%, transparent 70%);
}

.mp-join-hero__inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 520px);
  gap: clamp(28px, 5vw, 56px);
  align-items: start;
}

.mp-join-hero__copy h1 {
  margin: 0;
  max-width: 14ch;
  color: var(--mp-navy);
  font-size: clamp(32px, 4.2vw, 50px);
  line-height: 1.02;
  letter-spacing: -0.045em;
  font-weight: 600;
}

.mp-join-hero__copy > p {
  margin: 16px 0 0;
  max-width: 46ch;
  color: var(--mp-muted);
  font-size: 17px;
  line-height: 1.6;
}

.mp-join-benefits {
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mp-join-benefits li {
  position: relative;
  padding-left: 22px;
  color: var(--mp-navy);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.mp-join-benefits li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mp-blue);
}

.mp-join-hero__signin {
  margin: 24px 0 0;
  color: var(--mp-muted);
  font-size: 14px;
  font-weight: 600;
}

.mp-join-hero__signin a {
  color: var(--mp-blue);
  text-decoration: none;
}

.mp-join-hero__signin a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Form card */
.mp-join-card {
  padding: clamp(22px, 3vw, 28px);
  border: 1px solid var(--mp-border-light);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
}

.mp-join-card__title {
  margin: 0;
  color: var(--mp-navy);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 600;
}

.mp-join-card__desc {
  margin: 8px 0 0;
  color: var(--mp-muted);
  font-size: 14px;
  line-height: 1.5;
}

.mp-join-form {
  margin-top: 22px;
}

.mp-join-form__section {
  margin: 0 0 22px;
  padding: 0;
  border: 0;
  min-width: 0;
}

.mp-join-form__legend {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--mp-border-light);
  color: var(--mp-navy);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mp-join-form__name-grid {
  display: grid;
  grid-template-columns: 108px 1fr 1fr;
  gap: 12px;
}

.mp-join-field--credentials {
  grid-column: 2 / -1;
}

.mp-join-form__grid {
  display: grid;
  gap: 12px;
}

.mp-join-field--full {
  grid-column: 1 / -1;
}

.mp-join-label {
  display: block;
  margin-bottom: 6px;
  color: var(--mp-navy);
  font-size: 13px;
  font-weight: 600;
}

.mp-join-required {
  color: var(--mp-blue);
}

.mp-join-input {
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--mp-border);
  border-radius: 10px;
  background: var(--mp-white);
  color: var(--mp-navy);
  font-family: inherit;
  font-size: 15px;
  transition:
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.mp-join-input:focus {
  outline: none;
  border-color: var(--mp-blue);
  box-shadow: 0 0 0 3px rgba(47, 120, 189, 0.14);
}

.mp-join-input.is-error {
  border-color: #c0392b;
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.12);
}

.mp-join-select-wrap {
  position: relative;
}

.mp-join-input--select {
  appearance: none;
  padding-right: 36px;
  cursor: pointer;
}

.mp-join-select-wrap::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--mp-muted);
  border-bottom: 2px solid var(--mp-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.mp-join-hint {
  margin: 6px 0 0;
  color: var(--mp-muted);
  font-size: 12px;
  line-height: 1.45;
}

/* Profession cards */
.mp-join-profession-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mp-join-profession {
  display: block;
  cursor: pointer;
}

.mp-join-profession__input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mp-join-profession__card {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 12px 40px 12px 14px;
  border: 1px solid var(--mp-border-light);
  border-radius: 12px;
  background: var(--mp-white);
  transition:
    border-color 0.16s ease,
    background 0.16s ease,
    transform 0.16s ease;
}

.mp-join-profession__label {
  color: var(--mp-navy);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.mp-join-profession__check {
  position: absolute;
  right: 12px;
  top: 50%;
  width: 18px;
  height: 18px;
  border: 2px solid var(--mp-border);
  border-radius: 50%;
  transform: translateY(-50%);
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.mp-join-profession__check::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 1px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(45deg) scale(0);
  transition: transform 0.14s ease;
}

.mp-join-profession__input:focus-visible + .mp-join-profession__card {
  outline: 2px solid var(--mp-blue);
  outline-offset: 2px;
}

.mp-join-profession__input:checked + .mp-join-profession__card {
  border-color: var(--mp-blue);
  background: rgba(47, 120, 189, 0.06);
}

.mp-join-profession__input:checked + .mp-join-profession__card .mp-join-profession__check {
  border-color: var(--mp-blue);
  background: var(--mp-blue);
}

.mp-join-profession__input:checked + .mp-join-profession__card .mp-join-profession__check::after {
  transform: rotate(45deg) scale(1);
}

.mp-join-profession:hover .mp-join-profession__card {
  border-color: var(--mp-border);
}

/* Password */
.mp-join-password {
  position: relative;
}

.mp-join-input--password {
  padding-right: 72px;
}

.mp-join-password__toggle {
  position: absolute;
  right: 6px;
  top: 50%;
  min-height: 32px;
  padding: 0 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--mp-blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transform: translateY(-50%);
}

.mp-join-password__toggle:hover {
  background: rgba(47, 120, 189, 0.08);
}

.mp-join-password__meter {
  height: 4px;
  margin-top: 10px;
  border-radius: 999px;
  background: var(--mp-light);
  overflow: hidden;
}

.mp-join-password__meter-bar {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: #c0392b;
  transition:
    width 0.22s ease,
    background 0.22s ease;
}

.mp-join-password__meter-bar.is-fair {
  background: #d68910;
}

.mp-join-password__meter-bar.is-good {
  background: var(--mp-blue);
}

.mp-join-password__meter-bar.is-strong {
  background: #1e7e34;
}

.mp-join-password__strength {
  margin: 8px 0 0;
  color: var(--mp-muted);
  font-size: 12px;
  font-weight: 600;
}

.mp-join-password__rules {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
}

.mp-join-password__rule {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--mp-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.mp-join-password__rule-icon {
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--mp-border);
  border-radius: 50%;
  background: var(--mp-white);
  transition:
    border-color 0.16s ease,
    background 0.16s ease;
}

.mp-join-password__rule.is-passed {
  color: var(--mp-navy);
}

.mp-join-password__rule.is-passed .mp-join-password__rule-icon {
  border-color: #1e7e34;
  background: #1e7e34;
  box-shadow: inset 0 0 0 2px #fff;
}

.mp-join-form__message {
  margin-bottom: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.08);
  color: #922b21;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.mp-join-form__submit {
  width: 100%;
  min-height: 48px;
  font-size: 15px;
}

.mp-join-form__submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.mp-join-success {
  padding: 28px 8px;
  text-align: center;
}

.mp-join-success__icon {
  color: var(--mp-blue);
}

.mp-join-success__title {
  margin: 12px 0 0;
  color: var(--mp-navy);
  font-size: 22px;
  font-weight: 600;
}

.mp-join-success__desc {
  margin: 8px 0 0;
  color: var(--mp-muted);
  font-size: 15px;
}

.mp-join-card.is-success .mp-join-form,
.mp-join-embed.is-success .mp-join-form {
  display: none;
}

.mp-join-card.is-success .mp-join-card__head {
  display: none;
}

/* Embed shortcode — form only, no card chrome */
.mp-join-embed .mp-join-form {
  margin-top: 0;
}

.mp-join-embed__signed-in {
  margin: 0;
  color: var(--mp-muted);
  font-size: 15px;
  line-height: 1.5;
}

.mp-join-embed__signed-in a {
  color: var(--mp-blue);
  font-weight: 500;
}

/* Steps */
.mp-join-steps {
  padding: 0 0 var(--mp-space-section);
}

.mp-join-steps__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.mp-join-step {
  padding: 20px;
  border: 1px solid var(--mp-border-light);
  border-radius: 14px;
  background: var(--mp-white);
}

.mp-join-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--mp-light);
  color: var(--mp-blue);
  font-size: 13px;
  font-weight: 700;
}

.mp-join-step h2 {
  margin: 12px 0 0;
  color: var(--mp-navy);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

.mp-join-step p {
  margin: 8px 0 0;
  color: var(--mp-muted);
  font-size: 14px;
  line-height: 1.5;
}

@media (max-width: 980px) {
  .mp-join-hero__inner {
    grid-template-columns: 1fr;
  }

  .mp-join-hero__copy h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  .mp-join-form__name-grid {
    grid-template-columns: 1fr 1fr;
  }

  .mp-join-field--salutation,
  .mp-join-field--credentials {
    grid-column: 1 / -1;
  }

  .mp-join-profession-grid {
    grid-template-columns: 1fr;
  }

  .mp-join-password__rules {
    grid-template-columns: 1fr;
  }

  .mp-join-steps__grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mp-join-blob {
    animation: none;
  }
}
