@font-face {
  font-family: SuisseBPIntl;
  src: url('../assets/etkin-ui/fonts/SuisseBPIntl-Regular.woff2') format('woff2');
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: Sometype;
  src: url('../assets/etkin-ui/fonts/Sometype-Mono.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Departure Mono';
  src: url('../assets/etkin-ui/fonts/DepartureMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --join-bg: #111212;
  --join-ink: #f3f1eb;
  --join-muted: rgba(243, 241, 235, .58);
  --join-line: rgba(243, 241, 235, .18);
  --join-accent: #cc5044;
}

* {
  box-sizing: border-box;
}

html,
body.join-page {
  min-height: 100%;
  background: var(--join-bg);
}

body.join-page {
  margin: 0;
  overflow: hidden;
  font-family: SuisseBPIntl, Arial, sans-serif;
}

body.join-page .join-grid-lines {
  position: fixed;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .34;
}

.join-community-brand {
  display: block;
  width: clamp(2.5rem, 3.2vw, 3rem);
  margin: 0 0 clamp(1.5rem, 3vh, 2.25rem);
}

.join-community-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.join-community-brand:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: .35rem;
}

.join-card-drop {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
}

.join-card-drop__stage,
.join-card-drop__stage > div,
.join-card-drop__stage canvas {
  width: 100%;
  height: 100%;
}

.join-card-drop__stage {
  position: absolute;
  inset: 0;
  touch-action: none;
}

.join-card-drop__stage canvas {
  display: block;
}

.join-application {
  position: fixed;
  inset: 0;
  z-index: 3;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  min-width: 0;
  pointer-events: none;
}

.join-form {
  grid-column: 2 / 4;
  width: 100%;
  min-width: 0;
  height: 100vh;
  height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  color: var(--join-ink);
  border: 0;
  border-inline: 1px solid var(--join-line);
  background:
    linear-gradient(180deg, rgba(17, 18, 18, .92), rgba(17, 18, 18, .78));
  scrollbar-color: var(--join-accent) transparent;
  scrollbar-width: thin;
  pointer-events: auto;
}

.join-form::-webkit-scrollbar {
  width: 3px;
}

.join-form::-webkit-scrollbar-track {
  background: transparent;
}

.join-form::-webkit-scrollbar-thumb {
  background: var(--join-accent);
}

.join-form__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  padding: clamp(4.5rem, 8vh, 6.5rem) clamp(1.25rem, 2.2vw, 2.75rem) clamp(2rem, 5vh, 4rem);
  opacity: 0;
  transform: translateY(1rem);
  animation: join-form-enter 850ms cubic-bezier(.4, 0, 0, 1) 180ms forwards;
}

.join-form[data-step="2"] .join-form__content,
.join-form[data-step="3"] .join-form__content {
  justify-content: flex-start;
}

.join-form__step {
  display: flex;
  min-width: 0;
  flex-direction: column;
}

.join-form__step[hidden] {
  display: none;
}

@keyframes join-form-enter {
  to {
    opacity: 1;
    transform: none;
  }
}

.join-form__header {
  padding-bottom: clamp(1.25rem, 2.4vh, 2rem);
}

.join-form__eyebrow {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0 0 clamp(1rem, 2vh, 1.5rem);
  color: var(--join-muted);
  font-family: Sometype, monospace;
  font-size: .625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.join-form__eyebrow span:last-child {
  color: var(--join-accent);
  font-variant-numeric: tabular-nums;
}

.join-form [data-join-step-heading] {
  max-width: 8ch;
  margin: 0;
  font-family: DepartureMono, Sometype, monospace;
  font-size: clamp(2.3rem, 3.15vw, 4rem);
  font-weight: 400;
  line-height: .94;
  letter-spacing: -.065em;
}

.join-form [data-join-step-heading]:focus {
  outline: 0;
}

.join-form__intro {
  max-width: 34rem;
  margin: 1rem 0 0;
  color: var(--join-muted);
  font-size: clamp(.8125rem, .75rem + .16vw, .9375rem);
  line-height: 1.45;
}

.join-form__privacy-lead {
  max-width: 34rem;
  margin: .7rem 0 0;
  color: rgba(243, 241, 235, .52);
  font-family: Sometype, monospace;
  font-size: .5625rem;
  line-height: 1.5;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.join-form__privacy-lead a,
.join-privacy__summary a {
  color: var(--join-ink);
  text-decoration-color: var(--join-accent);
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.join-form__privacy-lead a:hover,
.join-form__privacy-lead a:focus-visible,
.join-privacy__summary a:hover,
.join-privacy__summary a:focus-visible {
  color: var(--join-accent);
  outline: 0;
}

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

.join-form__section legend {
  display: flex;
  width: 100%;
  align-items: center;
  gap: .75rem;
  padding: .75rem 0;
  border-top: 1px solid var(--join-line);
  color: var(--join-muted);
  font-family: Sometype, monospace;
  font-size: .625rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.join-form__section-number {
  display: inline-grid;
  width: 1.5rem;
  height: 1.5rem;
  place-items: center;
  color: #111212;
  border-radius: 50%;
  background: var(--join-accent);
  font-variant-numeric: tabular-nums;
}

.join-form__fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--join-line);
  border-left: 1px solid var(--join-line);
}

.join-field {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 4.625rem;
  flex-direction: column;
  justify-content: center;
  padding: .72rem .85rem .64rem;
  border-right: 1px solid var(--join-line);
  border-bottom: 1px solid var(--join-line);
  background: rgba(255, 255, 255, .012);
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

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

.join-field:focus-within {
  z-index: 1;
  background: rgba(204, 80, 68, .09);
  box-shadow: inset 0 -2px 0 var(--join-accent);
}

.join-field > label,
.join-field__label {
  color: var(--join-muted);
  font-family: Sometype, monospace;
  font-size: .5625rem;
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.join-field > label span,
.join-field__label > span,
.join-form__required span {
  color: var(--join-accent);
}

.join-field input,
.join-field select,
.join-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 2rem;
  margin: .16rem 0 0;
  padding: 0;
  color: var(--join-ink);
  border: 0;
  border-radius: 0;
  outline: 0;
  background: transparent;
  font: 400 clamp(.85rem, .77rem + .16vw, .975rem)/1.35 SuisseBPIntl, Arial, sans-serif;
}

.join-field select {
  cursor: pointer;
}

.join-field textarea {
  min-height: 5.6rem;
  padding-top: .38rem;
  resize: vertical;
}

.join-field--textarea {
  min-height: 8.25rem;
  justify-content: flex-start;
}

.join-field option {
  color: var(--join-ink);
  background: #171818;
}

.join-field input::placeholder,
.join-field textarea::placeholder {
  color: rgba(243, 241, 235, .28);
}

.join-field input:-webkit-autofill,
.join-field input:-webkit-autofill:hover,
.join-field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--join-ink);
  box-shadow: 0 0 0 1000px #171818 inset;
  caret-color: var(--join-ink);
}

.join-field__help {
  overflow: hidden;
  max-height: 0;
  color: var(--join-muted);
  font-family: Sometype, monospace;
  font-size: .5rem;
  line-height: 1.2;
  opacity: 0;
  transition: max-height 180ms ease, margin-top 180ms ease, opacity 180ms ease;
}

.join-field:focus-within .join-field__help {
  max-height: 1rem;
  margin-top: .1rem;
  opacity: 1;
}

.join-form__sensitive-note {
  margin: .7rem 0 0;
  color: rgba(243, 241, 235, .48);
  font-family: Sometype, monospace;
  font-size: .5rem;
  line-height: 1.45;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.join-privacy {
  margin-top: .85rem;
  padding: 1rem;
  border: 1px solid var(--join-line);
  background: rgba(255, 255, 255, .012);
}

.join-privacy__title {
  margin: 0 0 .5rem;
  color: var(--join-ink);
  font: 500 .625rem/1.25 Sometype, monospace;
  letter-spacing: .09em;
  text-transform: uppercase;
}

.join-privacy__summary,
.join-privacy__help {
  margin: 0;
  color: var(--join-muted);
  font-size: .75rem;
  line-height: 1.45;
}

.join-privacy__check {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: .75rem;
  align-items: center;
  margin-top: .875rem;
  color: var(--join-ink);
  font-size: .75rem;
  line-height: 1.45;
  cursor: pointer;
}

.join-privacy__check input {
  width: 1.125rem;
  height: 1.125rem;
  margin: 0;
  place-self: center;
  accent-color: var(--join-accent);
}

.join-privacy__check > span > span {
  color: var(--join-accent);
}

.join-privacy__check:focus-within {
  outline: 2px solid var(--join-accent);
  outline-offset: .35rem;
}

.join-privacy__help {
  margin: .625rem 0 0 2rem;
  font-size: .625rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.join-form__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: clamp(1rem, 2.2vh, 1.5rem);
}

.join-form__footer-notes {
  min-width: 0;
}

.join-form__required,
.join-form__status,
.join-form__draft-note {
  margin: 0;
  font-family: Sometype, monospace;
  font-size: .5625rem;
  line-height: 1.35;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.join-form__required {
  color: var(--join-muted);
}

.join-form__draft-note {
  margin-top: .28rem;
  color: rgba(243, 241, 235, .4);
  font-size: .5rem;
  letter-spacing: .04em;
}

.join-form__actions {
  display: flex;
  flex: 0 0 auto;
  align-items: stretch;
  gap: .625rem;
}

.join-form__back,
.join-form__save,
.join-form__submit {
  display: inline-flex;
  min-height: 2.875rem;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  color: var(--join-ink);
  border-radius: 0;
  background: transparent;
  font-family: Sometype, monospace;
  font-size: .625rem;
  font-weight: 500;
  letter-spacing: .06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, transform 180ms ease;
}

.join-form__back,
.join-form__save {
  color: var(--join-muted);
  border: 1px solid var(--join-line);
}

.join-form__submit {
  min-width: 11.75rem;
  justify-content: space-between;
  gap: 2rem;
  border: 1px solid var(--join-accent);
}

.join-form__back:hover,
.join-form__back:focus-visible,
.join-form__save:hover,
.join-form__save:focus-visible {
  color: var(--join-accent);
  border-color: var(--join-accent);
  outline: 0;
}

.join-form__submit:hover,
.join-form__submit:focus-visible {
  color: #111212;
  outline: 0;
  background: var(--join-accent);
}

.join-form__back:active,
.join-form__save:active,
.join-form__submit:active {
  transform: translateY(1px);
}

.join-form__back:disabled,
.join-form__save:disabled,
.join-form__submit:disabled {
  cursor: wait;
  opacity: .55;
  transform: none;
}

.join-form[data-state="complete"] .join-form__back:disabled,
.join-form[data-state="complete"] .join-form__save:disabled,
.join-form[data-state="complete"] .join-form__submit:disabled {
  cursor: default;
}

.join-form__status {
  min-height: .8rem;
  margin-top: .65rem;
  color: var(--join-accent);
}

.join-form__status:focus {
  outline: 0;
}

.join-form__status[data-state="success"] {
  color: var(--join-ink);
}

.join-form[data-state="complete"] .join-form__submit {
  color: #111212;
  background: var(--join-accent);
}

.join-form[data-draft-state="saved"] .join-form__save {
  color: #111212;
  border-color: var(--join-accent);
  background: var(--join-accent);
}

@media (max-width: 999px) {
  .join-application {
    grid-template-columns: 8.333333vw 41.666667vw 41.666667vw 8.333333vw;
  }

  .join-form {
    grid-column: 2 / 4;
  }
}

@media (max-width: 620px) {
  .join-form__content {
    justify-content: flex-start;
    padding: 4.75rem 1rem 2rem;
  }

  .join-form [data-join-step-heading] {
    font-size: clamp(2rem, 10vw, 3rem);
  }

  .join-form__fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .join-field--wide {
    grid-column: auto;
  }

  .join-form__footer {
    align-items: stretch;
    flex-direction: column;
  }

  .join-form__actions {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0, .72fr) minmax(0, 1.28fr);
  }

  .join-form__actions--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .join-form__actions--three .join-form__submit {
    grid-column: 1 / -1;
  }

  .join-form__back,
  .join-form__save,
  .join-form__submit {
    width: 100%;
    min-width: 0;
  }
}

@media (max-height: 700px) {
  .join-form__content {
    justify-content: flex-start;
    padding-top: 3.5rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .join-form__content {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .join-field,
  .join-field__help,
  .join-form__back,
  .join-form__save,
  .join-form__submit {
    transition: none;
  }
}
