/* Pagina Join Us — layout isolato dal sistema hero */

html.page--join,
body.page--join {
  height: auto;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
}

.join-page {
  width: 100%;
  max-width: 580px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vmin, 2.75rem) clamp(1rem, 3vmin, 1.5rem) clamp(2.5rem, 6vmin, 4rem);
}

.join-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.join-logo {
  width: 128px;
  height: 128px;
}

.join-logo .logo--static {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation:
    rotate var(--rhythm, 12s) linear infinite,
    logo-pulse var(--rhythm, 12s) steps(1) infinite;
}

.join-header .vhs {
  width: 100%;
}

.join-header .vhs--title .vhs__track {
  font-size: clamp(0.95rem, 3vmin, 1.15rem);
  letter-spacing: 0.28em;
}

.join-intro {
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: clamp(0.75rem, 2.2vmin, 0.875rem);
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.72);
  max-width: 36rem;
}

.join-intro strong {
  color: rgba(255, 255, 255, 0.92);
  font-weight: 400;
}

/* Titolo accessibile: testo per screen reader, VHS per lo stile */
.join-title {
  margin: 0;
  width: 100%;
}

.join-title__accessible {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.join-form__note {
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.55);
  margin-bottom: 1.25rem;
}

.join-form__note strong {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 400;
}

.join-form__error {
  margin-bottom: 1rem;
  padding: 0.75rem 0.875rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.75rem;
  line-height: 1.5;
  color: rgba(255, 160, 160, 0.95);
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 120, 120, 0.35);
}

.join-form__fieldset {
  border: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0 0 1.5rem;
  padding: 1.25rem 1rem 0.25rem;
}

.join-form__legend {
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  padding: 0 0.35rem;
}

.join-form__tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.625rem;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: rgba(255, 120, 120, 0.85);
  vertical-align: middle;
}

.join-form__tag--optional {
  color: rgba(255, 255, 255, 0.38);
}

.join-form__hint {
  margin-top: 0.35rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.6875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.42);
}

/* Form */
.join-form {
  display: block;
  width: 100%;
}

.join-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

.join-form__field {
  display: block;
  width: 100%;
  margin-bottom: 1rem;
}

.join-form__row .join-form__field {
  margin-bottom: 0;
}

.join-form__label {
  display: block;
  margin-bottom: 0.4rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.join-form__control {
  display: block;
  width: 100%;
  padding: 0.75rem 0.875rem;
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.92);
  background-color: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.join-form__control::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.join-form__control:hover {
  border-color: rgba(255, 255, 255, 0.38);
}

.join-form__control:focus {
  border-color: rgba(255, 255, 255, 0.58);
  background-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.join-form__control:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.45);
  outline-offset: 2px;
}

.join-form__control--select {
  cursor: pointer;
  padding-right: 2.25rem;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.55) 50%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.55) 50%, transparent 50%);
  background-position:
    calc(100% - 1rem) calc(50% + 1px),
    calc(100% - 0.7rem) calc(50% + 1px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}

.join-form__control--select option {
  background: #111;
  color: #fff;
}

.join-form__control--textarea {
  resize: vertical;
  min-height: 6.5rem;
}

.join-form__control--file {
  padding: 0.5rem 0;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  border: none;
  background: transparent;
}

.join-form__control--file::file-selector-button {
  margin-right: 0.75rem;
  padding: 0.55rem 0.85rem;
  font-family: inherit;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 0;
  cursor: pointer;
}

.join-form__control--file::file-selector-button:hover {
  border-color: rgba(255, 255, 255, 0.45);
  background: rgba(255, 255, 255, 0.1);
}

.join-form__actions {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.5rem;
}

.vhs-btn--submit:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.join-form__actions .vhs-btn--submit {
  margin-top: 0;
  width: 100%;
  font: inherit;
}

.join-form__back {
  display: block;
  text-align: center;
  font-family: "Share Tech Mono", "Courier New", monospace;
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  color: rgba(255, 255, 255, 0.45);
}

.join-form__back:hover,
.join-form__back:focus-visible {
  color: rgba(255, 255, 255, 0.85);
}

.join-form__back:focus-visible {
  outline: 1px solid rgba(255, 255, 255, 0.35);
  outline-offset: 4px;
}

@media (max-width: 540px) {
  .join-form__row {
    grid-template-columns: 1fr;
  }

  .join-form__row .join-form__field {
    margin-bottom: 1rem;
  }

  .join-form__row .join-form__field:last-child {
    margin-bottom: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .join-logo .logo--static {
    animation: none;
  }
}
