/* Etapa 5: tres columnas. Izquierda: creadores fundadores. Centro: la marca como caja 3D (canvas). Derecha: formulario.
   --join y --j1..--j7 (escalonado) los calcula overlay.js desde el scroll. */

.layer--join {
  display: block;
  opacity: var(--join);
  will-change: opacity;
}
.layer--join.is-live { pointer-events: auto; }

.join {
  position: absolute;
  inset: 72px 0 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.12fr) minmax(0, 1fr);
}
.join::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-hairline);
  transform: scaleX(var(--join));
}

.join__col {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
}
.join__col--left::after,
.join__col--right::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--c-hairline);
  transform: scaleY(var(--join));
  transform-origin: top;
}
.join__col--left::after { right: 0; }
.join__col--right::before { left: 0; }

/* Izquierda y formulario centrados sobre el mismo eje horizontal */
.join__col--left { justify-content: center; }

.join__item { opacity: 0; transform: translate3d(0, 18px, 0); will-change: opacity, transform; }
.join__col--left > .join__item:nth-child(1) { opacity: var(--j1); transform: translate3d(0, calc((1 - var(--j1)) * 18px), 0); }
.join__col--left > .join__item:nth-child(2) { opacity: var(--j2); transform: translate3d(0, calc((1 - var(--j2)) * 18px), 0); }
.join__col--left > .join__item:nth-child(3) { opacity: var(--j3); transform: translate3d(0, calc((1 - var(--j3)) * 18px), 0); }
.perks > .join__item:nth-child(1) { opacity: var(--j4); transform: translate3d(0, calc((1 - var(--j4)) * 18px), 0); }
.perks > .join__item:nth-child(2) { opacity: var(--j5); transform: translate3d(0, calc((1 - var(--j5)) * 18px), 0); }
.perks > .join__item:nth-child(3) { opacity: var(--j6); transform: translate3d(0, calc((1 - var(--j6)) * 18px), 0); }
.join__col--right > .join__item { opacity: var(--j3); transform: translate3d(0, calc((1 - var(--j3)) * 22px), 0); }

.join__title {
  margin-top: 16px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 3.5vw, 3.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.join__intro {
  max-width: 30em;
  margin-top: 16px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--c-fg-soft);
}

.perks {
  display: grid;
  gap: 14px;
  margin-top: 28px;
}
.perk {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--c-hairline);
}
.perk__index {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 22px;
  color: var(--neon);
}
.perk__title { font-size: 15px; font-weight: 600; line-height: 22px; letter-spacing: 0; }
.perk__text { margin-top: 3px; font-size: 14px; line-height: 1.5; color: var(--c-fg-muted); }

.join__col--center { justify-content: flex-end; align-items: center; padding-bottom: 44px; }
.join__caption {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--c-fg-faint);
  opacity: var(--j7);
}

/* — Formulario: tarjeta de vidrio líquido (clase .liquid), radios de 4px — */
.form-card {
  padding: 28px;
  border-radius: var(--r-card);
}

.form { display: grid; gap: 14px; }
.form[hidden] { display: none; }
.form__title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.form__lead { margin-top: -6px; margin-bottom: 4px; font-size: 14px; color: var(--c-fg-muted); }

.field { display: grid; gap: 6px; }
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--c-fg-soft);
}
.field__optional { font-size: 12px; font-weight: 400; color: var(--c-fg-faint); }

.field__input {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--c-field-border);
  border-radius: var(--r-field);
  background: var(--c-field);
  font-size: 15px;
  color: var(--c-fg);
  outline: none;
  transition: border-color 220ms var(--ease-in-out), box-shadow 220ms var(--ease-in-out), background-color 220ms var(--ease-in-out);
}
.field__input::placeholder { color: var(--c-fg-faint); }
/* autocompletado del navegador: Chrome y Safari pintan el campo de celeste o amarillo y no se puede pisar ese fondo;
   se tapa con sombras internas (fondo sólido + el tono del campo) y se recupera el color del texto */
.field__input:-webkit-autofill {
  box-shadow: inset 0 0 0 1000px var(--c-field), inset 0 0 0 1000px var(--c-bg);
  -webkit-text-fill-color: var(--c-fg);
  caret-color: var(--c-fg);
}
.field__input:-webkit-autofill:focus {
  box-shadow: inset 0 0 0 1000px var(--c-field), inset 0 0 0 1000px var(--c-bg), 0 0 0 3px var(--neon-faint);
}
.field__input:hover { border-color: var(--c-liquid-border); }
.field__input:focus { border-color: var(--neon-soft); box-shadow: 0 0 0 3px var(--neon-faint); }

.select { position: relative; }
.field__select { appearance: none; -webkit-appearance: none; padding-right: 40px; cursor: pointer; }
.field__select:invalid { color: var(--c-fg-faint); }
.field__select option { background: var(--c-glass-strong); color: var(--c-fg); }
.select__chevron {
  position: absolute;
  top: 50%;
  right: 14px;
  width: 16px;
  height: 16px;
  transform: translateY(-50%);
  color: var(--c-fg-muted);
  pointer-events: none;
}

.field__error { display: none; font-size: 12.5px; color: var(--c-danger); }
.field.is-invalid .field__input { border-color: var(--c-danger); }
.field.is-invalid .field__error { display: block; }

.form__submit { margin-top: 6px; height: 48px; }
.form__legal { font-size: 12.5px; text-align: center; color: var(--c-fg-faint); }
.form__status { font-size: 13px; line-height: 1.45; text-align: center; color: var(--c-danger); }
/* campo trampa para bots: invisible y fuera del lector de pantalla, pero sin display:none (algunos bots lo saltean) */
.form__trap { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

.form-success { display: grid; justify-items: start; gap: 12px; }
.form-success[hidden] { display: none; }
.form-success__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid var(--neon-soft);
  border-radius: var(--r-button);
  color: var(--neon);
  box-shadow: 0 0 24px var(--neon-faint);
}
.form-success__icon svg { width: 22px; height: 22px; }
.form-success__title { font-family: var(--font-display); font-weight: 600; font-size: 26px; letter-spacing: -0.02em; }
.form-success__text { font-size: 15px; line-height: 1.55; color: var(--c-fg-soft); }

@media (max-width: 1180px) {
  .join { grid-template-columns: minmax(0, 1fr) minmax(0, 0.7fr) minmax(0, 1fr); }
  .join__col { padding: 28px 28px 32px; }
}

@media (max-width: 880px) {
  .layer--join { overflow: hidden; }
  .join {
    position: relative;
    inset: auto;
    display: flex;
    flex-direction: column;
    padding: 64px 0 calc(40px + env(safe-area-inset-bottom));
    transform: translate3d(0, calc(var(--join-shift, 0) * -1px), 0);
  }
  /* el contenido pasa por debajo de la navegación: fondo para que no se mezcle */
  html.is-join .nav { background: linear-gradient(180deg, var(--c-bg) 62%, transparent); }
  /* 16 px: iOS no hace zoom al tocar el campo */
  .field__input { font-size: 16px; }
  .join__col { padding: 20px 22px; }
  .join__col--left::after, .join__col--right::before { display: none; }
  .join__col--center { order: -1; min-height: 44vh; padding-bottom: 12px; }
  .join__col--left { padding-bottom: 20px; }
}
