/* ═══════════════════════════════════════════════════════════════════════
   SENSORIUM AGENCY — join-pipeline.css
   Join Our Pipeline enrollment wizard. Requires base.css.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── PAGE BODY ───────────────────────────────────────────────────────── */
.join-page {
  background: var(--clr-surface);
  min-height: 100vh;
}

/* ── ENROLLMENT WRAPPER ──────────────────────────────────────────────── */
.enrollment-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.enrollment-container {
  flex: 1;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

/* ── LEFT SIDEBAR ────────────────────────────────────────────────────── */
.enrollment-sidebar {
  background: var(--clr-navy);
  padding: 2.5rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand img { filter: brightness(1.3); }

/* Step navigation */
.step-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.step-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .9rem 0;
  border-bottom: 1px solid rgba(255,255,255,.07);
  cursor: default;
  position: relative;
  opacity: .45;
  transition: opacity var(--transition);
}

.step-item.active   { opacity: 1; }
.step-item.complete { opacity: .75; }

.step-num {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: .85rem;
  font-weight: 600;
  color: rgba(255,255,255,.55);
  transition: all var(--transition);
}

.step-item.active .step-num {
  background: var(--clr-coral);
  border-color: var(--clr-coral);
  color: var(--clr-white);
  box-shadow: 0 0 16px rgba(244,125,85,.4);
}

.step-item.complete .step-num {
  background: var(--clr-emerald);
  border-color: var(--clr-emerald);
  color: var(--clr-white);
}

.step-item.complete .step-num::before {
  content: '✓';
}

.step-info small {
  display: block;
  font-size: .68rem;
  color: rgba(255,255,255,.4);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.step-info span {
  font-size: .88rem;
  font-weight: 500;
  color: rgba(255,255,255,.75);
}

.step-item.active .step-info span { color: var(--clr-white); font-weight: 600; }

/* Sidebar progress */
.sidebar-progress { margin-top: auto; }

.progress-track {
  background: rgba(255,255,255,.1);
  border-radius: var(--radius-pill);
  height: 4px;
  overflow: hidden;
  margin-bottom: .4rem;
}

.progress-fill {
  height: 100%;
  background: var(--clr-coral);
  border-radius: var(--radius-pill);
  transition: width .4s ease;
}

.progress-label {
  font-size: var(--fs-xs);
  color: rgba(255,255,255,.45);
}

/* Trust note */
.sidebar-trust {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: 1rem;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-md);
}

.sidebar-trust > i { color: var(--clr-emerald); font-size: .9rem; flex-shrink: 0; margin-top: .15rem; }
.sidebar-trust p   { font-size: var(--fs-xs); color: rgba(255,255,255,.55); line-height: 1.55; }


/* ── FORM AREA (right) ───────────────────────────────────────────────── */
.enrollment-form-area {
  padding: 0;
  display: flex;
  flex-direction: column;
  background: var(--clr-white);
}

/* Topbar (mobile + desktop) */
.enrollment-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2.5rem;
  border-bottom: 1px solid var(--clr-border);
  background: var(--clr-surface);
}

.enrollment-back-link {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  transition: color var(--transition);
}
.enrollment-back-link:hover { color: var(--clr-navy); }

.enrollment-step-indicator {
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--clr-text-muted);
  text-transform: uppercase;
  letter-spacing: .07em;
}

/* Mobile progress bar (hidden on desktop) */
.mobile-progress {
  height: 3px;
  background: var(--clr-border);
  display: none;
}

.mobile-progress .progress-fill {
  background: var(--clr-coral);
  border-radius: 0;
}


/* ── FORM STEPS ──────────────────────────────────────────────────────── */
.form-step {
  flex: 1;
  padding: 3rem 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-step[hidden] { display: none; }

.step-header { margin-bottom: .5rem; }

.step-header h1,
.step-header h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  color: var(--clr-navy);
  margin-bottom: .4rem;
}

.step-header p {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.6;
}

.step-header p strong { color: var(--clr-navy); }


/* ── FORM ELEMENTS ───────────────────────────────────────────────────── */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.form-field {
  position: relative;
  display: flex;
  flex-direction: column;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 1.15rem .95rem .45rem;
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  font-size: var(--fs-base);
  font-family: var(--font-body);
  color: var(--clr-text);
  background: var(--clr-surface);
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  appearance: none;
  -webkit-appearance: none;
}

.form-field textarea { resize: vertical; min-height: 100px; padding-top: 1.3rem; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  border-color: var(--clr-navy);
  box-shadow: 0 0 0 3px rgba(21,60,95,.1);
  background: var(--clr-white);
}

/* Floating label */
.form-field label {
  position: absolute;
  top: .8rem;
  left: .95rem;
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  pointer-events: none;
  transition: top .18s, font-size .18s, color .18s;
}

.form-field input:not(:placeholder-shown) ~ label,
.form-field input:focus ~ label,
.form-field textarea:not(:placeholder-shown) ~ label,
.form-field textarea:focus ~ label,
.form-field select:valid ~ label,
.form-field select:focus ~ label {
  top: .28rem;
  font-size: .68rem;
  color: var(--clr-navy);
  font-weight: 600;
}

.req { color: var(--clr-coral); }

.field-hint {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-top: .3rem;
  padding-left: .1rem;
}

/* Character count */
.char-count {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  text-align: right;
  margin-top: .25rem;
}


/* ── UPLOAD BOXES ────────────────────────────────────────────────────── */
.upload-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.upload-box { position: relative; }

.upload-label {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: 2rem 1.5rem;
  border: 2px dashed var(--clr-border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  text-align: center;
  background: var(--clr-surface);
  transition: border-color var(--transition), background var(--transition);
  min-height: 160px;
}

.upload-label:hover { border-color: var(--clr-navy); background: var(--clr-white); }
.upload-label.has-file { border-color: var(--clr-emerald); background: rgba(16,185,129,.04); }

.upload-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(21,60,95,.08);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--clr-navy);
  transition: background var(--transition), color var(--transition);
}
.upload-label:hover .upload-icon  { background: var(--clr-navy); color: var(--clr-white); }
.upload-label.has-file .upload-icon { background: var(--clr-emerald); color: var(--clr-white); }

.upload-title {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--clr-navy);
}

.upload-sub {
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
}

.upload-box input[type="file"] {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0; pointer-events: none;
}


/* ── UPLOAD PROGRESS ─────────────────────────────────────────────────── */
.upload-progress-wrap { margin-top: .5rem; }

.upload-progress-header {
  display: flex;
  justify-content: space-between;
  font-size: var(--fs-xs);
  color: var(--clr-text-muted);
  margin-bottom: .35rem;
}

.upload-progress-track {
  background: var(--clr-border);
  border-radius: var(--radius-pill);
  height: 6px;
  overflow: hidden;
}

.upload-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--clr-navy), var(--clr-coral));
  border-radius: var(--radius-pill);
  transition: width .3s ease;
}


/* ── FORM ERROR ──────────────────────────────────────────────────────── */
.form-error-msg {
  background: rgba(239,68,68,.07);
  border: 1px solid rgba(239,68,68,.2);
  border-radius: var(--radius-md);
  padding: .85rem 1rem;
  font-size: var(--fs-sm);
  color: var(--clr-red);
}


/* ── STEP NAVIGATION BUTTONS ─────────────────────────────────────────── */
.step-nav-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 1.5rem;
  border-top: 1px solid var(--clr-border);
  gap: 1rem;
}

.btn-next,
.btn-prev {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: var(--fs-base);
  font-weight: 600;
  font-family: var(--font-body);
  padding: .85rem 2rem;
  border-radius: var(--radius-pill);
  transition: background var(--transition), color var(--transition), box-shadow var(--transition);
  border: none;
  cursor: pointer;
}

.btn-next {
  background: var(--clr-coral);
  color: var(--clr-white);
  margin-left: auto;
}
.btn-next:hover { background: var(--clr-coral-dark); box-shadow: 0 6px 20px rgba(244,125,85,.3); }

.btn-prev {
  background: transparent;
  color: var(--clr-text-muted);
  border: 1px solid var(--clr-border);
}
.btn-prev:hover { background: var(--clr-surface); color: var(--clr-navy); border-color: var(--clr-navy); }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--clr-navy);
  color: var(--clr-white);
  padding: .9rem 2.25rem;
  border-radius: var(--radius-pill);
  font-size: var(--fs-base);
  font-weight: 600;
  font-family: var(--font-body);
  border: none;
  cursor: pointer;
  transition: background var(--transition), box-shadow var(--transition);
  margin-left: auto;
}
.btn-submit:hover { background: var(--clr-navy-deep); box-shadow: 0 6px 20px rgba(13,40,64,.3); }
.btn-submit.loading { opacity: .7; pointer-events: none; }
.btn-spinner.hidden { display: none; }
.btn-label.hidden   { display: none; }


/* ── SUCCESS MODAL ───────────────────────────────────────────────────── */
.join-modal {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.join-modal[hidden] { display: none; }

.join-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(13,40,64,.75);
  backdrop-filter: blur(6px);
}

.join-modal-box {
  position: relative;
  z-index: 1;
  background: var(--clr-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 520px;
  padding: 3rem 2.5rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
}

.join-modal-icon {
  font-size: 3.5rem;
  color: var(--clr-emerald);
  margin-bottom: 1rem;
}

.join-modal-box h2 {
  font-size: 1.6rem;
  color: var(--clr-navy);
  margin-bottom: .75rem;
}

.join-modal-box p {
  font-size: var(--fs-sm);
  color: var(--clr-text-muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.join-modal-ref {
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-md);
  padding: .85rem 1.25rem;
  margin-bottom: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.join-modal-ref span { font-size: var(--fs-sm); color: var(--clr-text-muted); }
.join-modal-ref strong { font-family: var(--font-display); color: var(--clr-coral); font-size: 1.1rem; }

.join-modal-actions {
  display: flex;
  gap: .85rem;
  justify-content: center;
  flex-wrap: wrap;
}


/* ── RESPONSIVE ──────────────────────────────────────────────────────── */
@media (max-width: 992px) {
  .enrollment-container { grid-template-columns: 1fr; }
  .enrollment-sidebar {
    position: static;
    height: auto;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
  }
  .sidebar-brand { display: none; }
  .step-nav { flex: 1; min-width: 0; }
  .step-list { flex-direction: row; flex-wrap: wrap; gap: .5rem; }
  .step-item { padding: .4rem .65rem; border-bottom: none; gap: .4rem; opacity: .5; }
  .step-item.active { opacity: 1; }
  .step-info small { display: none; }
  .step-info span { font-size: var(--fs-xs); }
  .sidebar-progress { display: none; }
  .sidebar-trust { display: none; }
  .mobile-progress { display: block; }
  .enrollment-topbar { padding: .85rem 1.5rem; }
  .form-step { padding: 2rem 1.5rem; }
}

@media (max-width: 575px) {
  .form-row   { grid-template-columns: 1fr; }
  .upload-row { grid-template-columns: 1fr; }
  .step-nav-btns { flex-direction: column; }
  .btn-next,
  .btn-submit { width: 100%; justify-content: center; }
  .btn-prev { width: 100%; justify-content: center; }
  .join-modal-box { padding: 2rem 1.5rem; }
}