.join-modal {
  inset: 0;
  width: min(74rem, calc(100vw - 3rem));
  height: min(47rem, calc(100dvh - 3rem));
  max-width: none;
  max-height: none;
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 1px solid rgba(31, 43, 37, 0.16);
  border-radius: 2rem;
  background: #fafaf8;
  color: #1f2421;
  box-shadow: 0 2rem 7rem rgba(27, 39, 33, 0.24);
}

.join-modal[open] {
  animation: join-modal-in 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

.join-modal::backdrop {
  background: rgba(20, 27, 24, 0.72);
  backdrop-filter: blur(10px);
}

.join-modal-shell {
  display: grid;
  grid-template-columns: minmax(16rem, 0.72fr) minmax(0, 1.65fr);
  height: 100%;
}

.join-modal-intro {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  padding: clamp(2rem, 4vw, 4rem);
  overflow: hidden;
  border-right: 1px solid rgba(31, 43, 37, 0.1);
  background: #edf2eb;
}

.join-modal-intro::after {
  content: "";
  position: absolute;
  right: -7rem;
  bottom: -8rem;
  width: 19rem;
  height: 19rem;
  border: 1px solid rgba(70, 107, 91, 0.18);
  border-radius: 50%;
  box-shadow:
    0 0 0 3rem rgba(70, 107, 91, 0.05),
    0 0 0 7rem rgba(70, 107, 91, 0.035);
  pointer-events: none;
}

.join-modal-kicker,
.join-page-kicker {
  margin: 0 0 1.35rem;
  color: #436b5c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.join-modal h2 {
  max-width: 9ch;
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 4.6rem);
  font-weight: 500;
  letter-spacing: -0.065em;
  line-height: 0.98;
}

.join-modal-copy {
  position: relative;
  z-index: 1;
  max-width: 27rem;
  margin: 1.5rem 0 0;
  color: #5f6963;
  font-size: 0.98rem;
  line-height: 1.7;
}

.join-modal-meta {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  margin: 2rem 0 0;
  color: #466b5d;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.join-modal-meta::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #5c8977;
  box-shadow: 0 0 0 0.3rem rgba(92, 137, 119, 0.12);
}

.join-modal-close {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  z-index: 2;
  display: grid;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(31, 43, 37, 0.13);
  border-radius: 50%;
  background: rgba(250, 250, 248, 0.92);
  color: #222825;
  cursor: pointer;
  transition: transform 220ms cubic-bezier(0.16, 1, 0.3, 1), background 220ms ease;
}

.join-modal-close:hover {
  background: #ffffff;
  transform: rotate(4deg);
}

.join-modal-close:active {
  transform: scale(0.96);
}

.join-modal-close svg {
  width: 1rem;
  height: 1rem;
}

.join-form-shell {
  position: relative;
  min-width: 0;
  height: 100%;
  overflow: hidden;
  background: #fffdfa;
}

.join-form-shell::before {
  content: "Preparing your application…";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #6b756f;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
}

.join-form-shell.is-loaded::before {
  display: none;
}

.join-form-shell [data-tf-live],
.join-form-shell [data-tf-widget],
.join-form-shell .tf-v1-widget,
.join-form-shell iframe {
  position: relative;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 100% !important;
}

.join-form-error {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: none;
  padding: 2rem;
  place-items: center;
  text-align: center;
  background: #fffdfa;
  color: #5f6963;
}

.join-form-shell.has-error .join-form-error {
  display: grid;
}

.join-form-error a {
  display: inline-block;
  margin-top: 1rem;
  color: #365f50;
  font-weight: 700;
}

.join-page {
  min-height: 100dvh;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background: #f4f4f0;
}

.join-page-shell {
  display: grid;
  grid-template-columns: minmax(17rem, 0.68fr) minmax(0, 1.55fr);
  min-height: calc(100dvh - clamp(2.5rem, 6vw, 5rem));
  max-width: 88rem;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(31, 43, 37, 0.12);
  border-radius: 2rem;
  background: #fafaf8;
  box-shadow: 0 1.5rem 6rem rgba(42, 57, 50, 0.1);
}

.join-page-intro {
  display: flex;
  flex-direction: column;
  padding: clamp(2rem, 5vw, 5rem);
  background: #edf2eb;
}

.join-page-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  width: fit-content;
  color: #1f2421;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-decoration: none;
}

.join-page-logo img {
  width: 2rem;
  height: 1.55rem;
  object-fit: contain;
}

.join-page-message {
  margin: auto 0;
}

.join-page h1 {
  max-width: 9ch;
  margin: 0;
  color: #202522;
  font-size: clamp(3rem, 6vw, 6.5rem);
  font-weight: 500;
  letter-spacing: -0.07em;
  line-height: 0.93;
}

.join-page-copy {
  max-width: 30rem;
  margin: 1.75rem 0 0;
  color: #5f6963;
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.7;
}

.join-page-back {
  color: #466b5d;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.join-page-form {
  min-height: 42rem;
}

@keyframes join-modal-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (max-width: 760px) {
  .join-modal {
    width: 100vw;
    height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .join-modal-shell,
  .join-page-shell {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .join-modal-intro {
    display: block;
    padding: 1.3rem 4.25rem 1.2rem 1.35rem;
    border-right: 0;
    border-bottom: 1px solid rgba(31, 43, 37, 0.1);
  }

  .join-modal-intro::after,
  .join-modal-copy {
    display: none;
  }

  .join-modal-kicker {
    margin-bottom: 0.45rem;
  }

  .join-modal h2 {
    max-width: none;
    font-size: 2rem;
    letter-spacing: -0.055em;
  }

  .join-modal-meta {
    margin-top: 0.65rem;
    font-size: 0.7rem;
  }

  .join-modal-close {
    top: 1rem;
    right: 1rem;
  }

  .join-page {
    padding: 0;
  }

  .join-page-shell {
    min-height: 100dvh;
    border: 0;
    border-radius: 0;
  }

  .join-page-intro {
    padding: 1.25rem 1.25rem 1.5rem;
  }

  .join-page-message {
    margin: 3rem 0 0;
  }

  .join-page h1 {
    font-size: clamp(2.7rem, 14vw, 4.5rem);
  }

  .join-page-copy {
    margin-top: 1rem;
  }

  .join-page-back {
    display: none;
  }

  .join-page-form {
    min-height: 42rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .join-modal[open] {
    animation: none;
  }

  .join-modal-close {
    transition: none;
  }
}
