/* ==========================================================================
   Join forms page. Builds on ../styles.css (tokens, .btn, .card, .field, .chip).
   ========================================================================== */

.join-page { min-height: 100vh; }

.jp-header {
  background: var(--header-bg);
  border-bottom: 1px solid var(--line);
}
.jp-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 64px; }
.jp-logo { width: 84px; height: auto; display: block; }

.jp-main { display: grid; gap: 1.2rem; padding-block: 1.5rem 4rem; max-width: 760px; }
.jp-tabs { justify-content: center; }
.jp-tabs .chip { text-decoration: none; }

.jp-card { display: grid; gap: 1rem; }
.jp-card > .dots { justify-self: start; }
.jp-card h1 { margin: 0; font-family: var(--font-head); font-size: clamp(1.6rem, 5vw, 2.1rem); color: var(--heading); line-height: 1.3; }
.jp-intro { margin: 0; color: var(--muted); }

#jp-form { display: grid; gap: 1.2rem; }
#jp-form[hidden] { display: none; }
#jp-fields { display: grid; gap: 1.2rem; }
.req { color: var(--burgundy); }

.field input[type="email"],
.field input[type="url"],
.field textarea {
  width: 100%;
  min-height: 50px;
  padding: .55rem .95rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--field-bg);
  color: inherit;
  font: inherit;
  font-size: 16px;
  line-height: 1.6;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 110px; }
.field input[type="email"]:focus, .field input[type="url"]:focus, .field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px var(--tint-gold); }
.field input[type="file"] { font: inherit; font-size: .95rem; max-width: 100%; }

/* Choice groups */
.jp-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.jp-group legend { padding: 0; margin-bottom: .5rem; font-weight: 700; font-size: .95rem; }
.jp-options { display: flex; flex-wrap: wrap; gap: .5rem; }
.jp-option {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 44px;
  padding: .35rem .9rem;
  border: 1.5px solid var(--line-strong);
  border-radius: 999px;
  background: var(--field-bg);
  cursor: pointer;
  font-size: .95rem;
  line-height: 1.4;
  transition: border-color .2s, background .2s;
}
.jp-option:hover { border-color: var(--gold); }
.jp-option input { width: 18px; height: 18px; margin: 0; accent-color: var(--burgundy); flex: none; }
.jp-option:has(input:checked) { border-color: var(--burgundy); background: var(--tint-burgundy); font-weight: 700; }
.jp-option:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.jp-group[aria-invalid="true"] .jp-option { border-color: var(--error); }

.jp-success { display: grid; justify-items: center; gap: .9rem; padding-block: 1.5rem .5rem; text-align: center; }
.jp-success[hidden] { display: none; }
.jp-success:focus { outline: none; }
.jp-success h2 { margin: 0; font-family: var(--font-head); font-size: 1.7rem; color: var(--heading); }
.jp-success p { margin: 0; max-width: 42ch; }

/* The shared .hp trap sits 9999px off to the left, which an RTL page can
   scroll to; hide it in place instead. */
.join-page .hp { left: 0; top: 0; opacity: 0; pointer-events: none; clip-path: inset(50%); }

/* CV picker with an Arabic button (the browser's own says "Choose file") */
.jp-file { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .8rem; }
.jp-file-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.jp-file label { pointer-events: none; }
.jp-file-input:focus-visible + label { outline: 2px solid var(--gold); outline-offset: 2px; }
.jp-file-name { color: var(--muted); font-size: .92rem; overflow-wrap: anywhere; min-width: 0; }
