/* The join form — Zukman's brand: navy + teal (from zukman.com). Light card on a dark stage. */

:root {
  --navy-900: #0e1a33;
  --navy-800: #14223f;
  --navy-700: #1c3259;
  --teal: #20d4a5;
  --teal-600: #18b88e;
  --teal-050: #e8faf4;
  --ink: #142033;
  --ink-2: #4a5b70;
  --ink-3: #7d8da0;
  --line: #e1e8f0;
  --field: #f6f9fc;
  --alert: #d64545;
  --alert-050: #fdeeee;
  --radius: 22px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Heebo', system-ui, sans-serif;
  color: var(--ink);
  background: var(--navy-800);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 40px;
}

/* ---------------------------------------------------------------- the stage */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(1200px 700px at 85% -10%, #24467a 0%, transparent 60%),
              linear-gradient(160deg, var(--navy-700) 0%, var(--navy-800) 45%, var(--navy-900) 100%); }
.bg-img { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0; transition: opacity .6s ease; }
.bg-img.on { opacity: 1; }
.bg-img.on ~ .bg-glow { background: linear-gradient(180deg, rgba(14,26,51,.55), rgba(14,26,51,.75)); }
.bg-img.on ~ .bg-grid, .bg-img.on ~ .bg-mark { display: none; }
.bg-glow { position: absolute; inset: 0;
  background: radial-gradient(600px 400px at 10% 110%, rgba(32,212,165,.22), transparent 70%),
              radial-gradient(500px 300px at 95% 30%, rgba(32,212,165,.10), transparent 70%); }
.bg-grid { position: absolute; inset: 0; opacity: .07;
  background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 75%); }
.bg-mark { position: absolute; width: 760px; max-width: 120vw; left: -160px; bottom: -180px; opacity: .05; transform: rotate(-8deg); }

/* ---------------------------------------------------------------- brand */
.brand { display: flex; align-items: center; gap: 14px; direction: ltr; margin: 6px 0 22px; color: #fff; }
.brand-mark { width: 46px; height: auto; filter: drop-shadow(0 6px 18px rgba(32,212,165,.35)); }
.brand-name { font-family: 'Bricolage Grotesque', 'Heebo', sans-serif; font-weight: 800; font-size: 26px; letter-spacing: .14em; line-height: 1; }
.brand-name span { color: var(--teal); }
.brand-tag { font-size: 9.5px; letter-spacing: .32em; color: var(--teal); margin-top: 6px; font-weight: 500; }

/* ---------------------------------------------------------------- card */
.card {
  width: min(640px, 100%);
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(5, 12, 28, .45), 0 2px 0 rgba(255,255,255,.6) inset;
  padding: 34px 34px 30px;
  position: relative;
  overflow: hidden;
}
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg, var(--teal), #5ce6c4, var(--teal-600)); }
@media (max-width: 560px) { .card { padding: 26px 18px 22px; border-radius: 18px; } body { padding-top: 18px; } }

.foot { margin-top: 18px; color: rgba(255,255,255,.72); font-size: 13px; text-align: center; }

h1 { font-size: 27px; font-weight: 800; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 700; margin: 0 0 4px; }
.sub { color: var(--ink-2); margin: 0 0 22px; line-height: 1.6; font-size: 15.5px; }
.small { font-size: 13px; color: var(--ink-3); }

/* ---------------------------------------------------------------- stepper */
.steps { display: flex; gap: 6px; margin: 0 0 26px; }
.steps .st { flex: 1; }
.steps .bar { height: 5px; border-radius: 3px; background: var(--line); overflow: hidden; }
.steps .bar i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .35s ease; }
.steps .st.done .bar i, .steps .st.now .bar i { width: 100%; }
.steps .st.now .bar i { background: linear-gradient(90deg, var(--teal), #5ce6c4); }
.steps .lb { font-size: 12px; color: var(--ink-3); margin-top: 7px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.steps .st.now .lb { color: var(--ink); font-weight: 600; }
.steps-cap { display: none; }
@media (max-width: 560px) {
  .steps .lb { display: none; } .steps { margin-bottom: 8px; }
  .steps-cap { display: block; font-size: 13px; color: var(--ink-3); margin-bottom: 22px; }
  .steps-cap b { color: var(--ink); }
  .sum dl { grid-template-columns: 92px 1fr; }
}

/* ---------------------------------------------------------------- fields */
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
label.f { display: block; }
label.f > span { display: block; font-size: 13.5px; font-weight: 600; color: var(--ink-2); margin-bottom: 6px; }
label.f > span i { color: var(--alert); font-style: normal; }
input[type=text], input[type=email], input[type=tel], input[type=date], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  background: var(--field); border: 1.5px solid var(--line); border-radius: 12px;
  padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
  min-height: 48px;
}
input:focus, select:focus { border-color: var(--teal); background: #fff; box-shadow: 0 0 0 4px rgba(32,212,165,.16); }
input.ltr { direction: ltr; text-align: right; }
.f.bad input, .f.bad select { border-color: var(--alert); background: var(--alert-050); }
.f .err { display: none; color: var(--alert); font-size: 12.5px; margin-top: 5px; }
.f.bad .err { display: block; }

/* code boxes */
.code { display: flex; gap: 10px; justify-content: center; direction: ltr; margin: 8px 0 6px; }
.code input { width: 52px; height: 62px; text-align: center; font-size: 26px; font-weight: 700; padding: 0; border-radius: 14px; }
@media (max-width: 420px) { .code { gap: 7px; } .code input { width: 44px; height: 56px; font-size: 22px; } }

/* ---------------------------------------------------------------- buttons */
.actions { display: flex; gap: 12px; margin-top: 28px; align-items: center; }
.actions .grow { flex: 1; }
button { font: inherit; cursor: pointer; }
.btn {
  border: 0; border-radius: 14px; padding: 14px 26px; font-size: 16.5px; font-weight: 700;
  background: var(--teal); color: #07261d; min-height: 52px;
  box-shadow: 0 8px 22px rgba(32,212,165,.35); transition: transform .12s, box-shadow .12s, background .12s;
}
.btn:hover { background: #2ee0b2; transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; box-shadow: none; }
.btn.wide { width: 100%; }
.ghost { background: none; border: 0; color: var(--ink-2); font-weight: 600; padding: 12px 10px; font-size: 15px; }
.ghost:hover { color: var(--ink); }

/* ---------------------------------------------------------------- notice / boxes */
.note { background: var(--field); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; font-size: 14px; color: var(--ink-2); line-height: 1.7; }
.note b { color: var(--ink); }
.note.teal { background: var(--teal-050); border-color: #bdeedd; }
.alert { background: var(--alert-050); color: #9a2b2b; border-radius: 12px; padding: 12px 14px; font-size: 14px; margin-top: 16px; display: none; }
.alert.on { display: block; }
.check { display: flex; gap: 12px; align-items: flex-start; margin-top: 16px; font-size: 14.5px; line-height: 1.6; cursor: pointer; }
.check input { width: 22px; height: 22px; accent-color: var(--teal-600); flex: none; margin-top: 2px; }

/* welcome */
.hello { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; }
.hello .wave { width: 58px; height: 58px; border-radius: 18px; background: var(--teal-050); display: grid; place-items: center; font-size: 30px; flex: none; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.facts span { background: var(--field); border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; font-size: 13.5px; color: var(--ink-2); }
.facts b { color: var(--ink); }

/* ---------------------------------------------------------------- uploads */
.files { display: grid; gap: 12px; }
.up { border: 1.5px dashed #c9d5e2; border-radius: 16px; padding: 16px; display: flex; align-items: center; gap: 14px;
  background: var(--field); cursor: pointer; transition: border-color .15s, background .15s; position: relative; }
.up:hover { border-color: var(--teal); background: #fff; }
.up input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.up .ic { width: 48px; height: 48px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: grid; place-items: center; font-size: 22px; flex: none; overflow: hidden; }
.up .ic img { width: 100%; height: 100%; object-fit: cover; }
.up .tx { flex: 1; min-width: 0; }
.up .tx b { display: block; font-size: 15px; }
.up .tx small { color: var(--ink-3); font-size: 12.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up.has { border-style: solid; border-color: var(--teal); background: var(--teal-050); }
.up.bad { border-color: var(--alert); background: var(--alert-050); }
.up .rm { position: relative; z-index: 2; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; font-size: 13px; color: var(--ink-2); }
.tag { font-size: 11.5px; font-weight: 600; border-radius: 999px; padding: 2px 9px; margin-inline-start: 6px; vertical-align: 2px; }
.tag.req { background: #fff1e6; color: #a24b00; }
.tag.opt { background: #eef2f7; color: var(--ink-3); }

/* ---------------------------------------------------------------- documents + signature */
.docs { display: grid; gap: 10px; }
.doc { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.doc .ic { font-size: 22px; }
.doc .tx { flex: 1; }
.doc .tx b { display: block; font-size: 15px; }
.doc a { color: var(--teal-600); font-weight: 700; text-decoration: none; font-size: 14px; white-space: nowrap; }
.doc input { width: 22px; height: 22px; accent-color: var(--teal-600); }
.sig-wrap { margin-top: 18px; }
.sig { position: relative; border: 1.5px solid var(--line); border-radius: 16px; background: #fbfdff; height: 170px; touch-action: none; }
.sig canvas { width: 100%; height: 100%; display: block; border-radius: 16px; cursor: crosshair; }
.sig .ph { position: absolute; inset: 0; display: grid; place-items: center; color: #b3c0cf; pointer-events: none; font-size: 15px; }
.sig .line { position: absolute; left: 22px; right: 22px; bottom: 38px; border-bottom: 1.5px dashed #d3dce7; pointer-events: none; }
.sig-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; }

/* ---------------------------------------------------------------- summary */
.sum { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.sum h3 { margin: 0; font-size: 13px; color: var(--ink-3); font-weight: 600; background: var(--field); padding: 10px 16px; display: flex; justify-content: space-between; }
.sum h3 button { font-size: 13px; color: var(--teal-600); font-weight: 700; background: none; border: 0; padding: 0; }
.sum dl { margin: 0; padding: 6px 16px 12px; display: grid; grid-template-columns: 130px 1fr; gap: 6px 12px; font-size: 14.5px; }
.sum dt { color: var(--ink-3); }
.sum dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.sum + .sum { margin-top: 12px; }

.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin-top: 18px; display: none; }
.progress.on { display: block; }
.progress i { display: block; height: 100%; width: 0; background: var(--teal); transition: width .2s; }

/* ---------------------------------------------------------------- end + states */
.center { text-align: center; padding: 10px 0 4px; }
.done-ic { width: 92px; height: 92px; border-radius: 50%; margin: 6px auto 18px; background: var(--teal-050); display: grid; place-items: center; }
.done-ic svg { width: 48px; height: 48px; stroke: var(--teal-600); stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round;
  stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw .7s .15s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.state-ic { font-size: 46px; margin-bottom: 10px; }

.loading { display: grid; place-items: center; min-height: 160px; }
.spin { width: 34px; height: 34px; border: 3.5px solid var(--line); border-top-color: var(--teal); border-radius: 50%; animation: sp .8s linear infinite; }
@keyframes sp { to { transform: rotate(360deg); } }

.fade { animation: fade .35s ease both; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .fade, .done-ic svg, .spin { animation: none; } .done-ic svg { stroke-dashoffset: 0; } }

.ltr-r { text-align: right; }
.sig-hint { margin: 14px 0 8px; }
.files { grid-template-columns: minmax(0, 1fr); }
.up { min-width: 0; }
.up .tx small { white-space: normal; overflow-wrap: anywhere; }
