/* Public forms: talent + challenge submission */
.form-shell { padding-block: clamp(16px, 4vw, 40px) 120px; }
.form-head { display: grid; gap: 10px; margin-bottom: 18px; }
.form-head h1 { font-size: var(--fs-3xl); font-weight: 900; }
.form-head p { color: var(--ink-2); }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-2); padding: clamp(18px, 4vw, 34px); }

/* ---- stepper: the four logo tiles are the four steps ---- */
.stepper { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 22px; }
.stepper .tiles { position: relative; width: 58px; height: 58px; }
.stepper .tiles svg { width: 100%; height: 100%; overflow: visible; }
.stepper .tiles .st { fill: transparent; stroke: var(--line-strong); stroke-width: 22; stroke-dasharray: 34 26; transition: fill 420ms var(--ease-out), stroke 420ms; transform-box: fill-box; transform-origin: center; }
.stepper .tiles .st.done { fill: var(--logo-tile); stroke: var(--logo-tile); stroke-dasharray: none; }
.stepper .tiles .st.active { stroke: var(--ink); stroke-dasharray: none; animation: stPulse 1.6s ease-in-out infinite; }
.stepper .tiles .sb { fill: none; stroke: var(--logo-red); stroke-width: 50; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 700ms var(--ease-io); }
.stepper.complete .tiles .sb { stroke-dashoffset: 0; }
.stepper.complete .tiles .sb2 { transition-delay: 140ms; }
@keyframes stPulse { 50% { transform: scale(.9); } }
.stepper .labels { display: grid; gap: 4px; min-width: 0; }
.stepper .labels .now { font-weight: 800; font-size: var(--fs-lg); }
.stepper .labels .now small { color: var(--muted); font-weight: 600; font-size: var(--fs-sm); margin-inline-start: 6px; }
.stepper ol { list-style: none; display: flex; gap: 6px; padding: 0; margin: 0; flex-wrap: wrap; }
.stepper ol li { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.stepper ol li + li::before { content: ""; width: 14px; height: 1.5px; background: var(--line-strong); }
.stepper ol li[aria-current="step"] { color: var(--ink); }
.stepper ol li.done { color: var(--ok); }

/* ---- steps ---- */
.step { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 20px; view-transition-name: step; }
.step legend { padding: 0; margin-bottom: 4px; font-size: var(--fs-xl); font-weight: 800; }
.step .sub { color: var(--muted); font-size: var(--fs-sm); margin-top: -12px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .row-2 { grid-template-columns: 1fr; } }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 1px dashed var(--line-strong); background: transparent; border-radius: var(--r-pill); padding: 4px 12px; font-size: var(--fs-xs); font-weight: 700; color: var(--ink-2); cursor: pointer; min-height: 32px; }
.quick button:hover { border-style: solid; background: var(--slate-soft); }
.counter { font-size: var(--fs-xs); color: var(--muted); text-align: left; font-variant-numeric: tabular-nums; }
.recap { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 10px 12px; border-radius: var(--r-md); background: var(--bg-2); font-size: var(--fs-sm); }
.recap b { font-weight: 800; }
.recap button { margin-inline-start: auto; background: none; border: 0; color: var(--accent); font-weight: 700; cursor: pointer; padding: 4px; }

/* ---- nav bar: stays under the thumb on phones ---- */
.form-nav { display: flex; gap: 10px; align-items: center; margin-top: 26px; }
.form-nav .grow { flex: 1; }
.form-nav .secure { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-xs); color: var(--muted); }
.form-nav .secure svg { width: 14px; height: 14px; }
@media (max-width: 620px) {
  .form-nav {
    position: fixed; z-index: 40; inset-inline: 0; bottom: 0; margin: 0;
    padding: 12px max(16px, env(safe-area-inset-right, 0px)) calc(12px + env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
    background: color-mix(in oklab, var(--surface) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    border-top: 1px solid var(--line);
  }
  .form-nav .secure { display: none; }
  .form-nav .btn { flex: 1; }
  .form-nav .btn-ghost { flex: 0 0 auto; }
}

/* ---- upload: the well fills with what you send (inspired by «Plimsoll») ---- */
.drop {
  position: relative; overflow: hidden; isolation: isolate;
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center;
  min-height: 84px; padding: 14px 16px; border-radius: var(--r-md);
  border: 1.5px dashed var(--line-strong); background: var(--surface-2); cursor: pointer;
  transition: border-color var(--t-med), background-color var(--t-med);
}
.drop:hover, .drop.over { border-color: var(--ink); background: var(--slate-soft); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop .well { width: 48px; height: 48px; border-radius: 14px; background: var(--bg-2); display: grid; place-items: center; position: relative; overflow: hidden; }
.drop .well svg { width: 24px; height: 24px; position: relative; z-index: 1; }
.drop .well::after { content: ""; position: absolute; inset: auto 0 0; height: var(--fill, 0%); background: var(--ok); transition: height 120ms linear; }
.drop.has-file .well { color: #fff; }
.drop .t b { display: block; font-size: var(--fs-sm); }
.drop .t span { font-size: var(--fs-xs); color: var(--muted); }
.drop .x { position: relative; z-index: 2; display: none; width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--bg-2); cursor: pointer; place-items: center; }
.drop.has-file .x { display: grid; }
.drop .x svg { width: 16px; height: 16px; }
.drop .liquid { position: absolute; inset: 0; z-index: -1; background: var(--ok-soft); transform: scaleX(var(--p, 0)); transform-origin: right; transition: transform 120ms linear; }
.field.invalid .drop { border-color: var(--accent); background: var(--accent-soft); }

/* ---- success ---- */
.done-view { text-align: center; display: grid; justify-items: center; gap: 14px; padding-block: clamp(20px, 6vw, 48px); }
.done-view .logo { width: 132px; }
.done-view h2 { font-size: var(--fs-3xl); font-weight: 900; }
.done-view p { color: var(--ink-2); max-width: 30em; }
.done-view .receipt { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--r-md); border: 1px dashed var(--line-strong); font-size: var(--fs-sm); }
.done-view .receipt .mono { font-weight: 700; color: var(--ink); }
.done-view .acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 6px; }
.closed-view { text-align: center; padding: 40px 10px; display: grid; gap: 10px; justify-items: center; }

/* confetti made of tiny logo tiles */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 80; overflow: hidden; }
.confetti i { position: absolute; top: -20px; width: 10px; height: 10px; border-radius: 3px 3px 3px 7px; background: var(--c); animation: fall var(--d) var(--ease-io) forwards; }
@keyframes fall { to { transform: translate(var(--x), 110vh) rotate(var(--r)); } }
@media (max-width: 620px) {
  .form-nav.inline { position: static; padding: 0; margin-top: 24px; background: none; border: 0; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .form-nav.inline .btn { width: 100%; }
}
.done-view:focus { outline: none; }

/* a field scrolled to after a failed check must clear the header and the fixed nav bar */
.field { scroll-margin-block: 110px 130px; }
.field.flash .control, .field.flash .ocards, .field.flash .consent { animation: fieldFlash 900ms var(--ease-out); }
@keyframes fieldFlash { 30% { box-shadow: 0 0 0 5px var(--accent-soft); } }
