/* Sign-up pages. The harbour scene from the homepage (wire, clay, light, final) is the whole idea:
   /signup splits it between artists and studios; /artists/join renders it pass by pass as the form fills in. */

.su-layer { position: absolute; inset: 0; }
.su-layer img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------------------------ /signup: pick a side */
.su-pick { position: relative; background: var(--navy); color: #fff; container-type: inline-size; }
.su-head { position: absolute; z-index: 2; left: 0; right: 0; top: 0; pointer-events: none; }
.su-head .wrap { padding-top: clamp(28px, 5svh, 56px); }
.su-head a { pointer-events: auto; color: #fff; font-weight: 700; white-space: nowrap; }
.su-head h1 { font-size: clamp(2.2rem, 4.6vw, 3.8rem); margin: 0 0 .15em; }
.su-head p { margin: 0; color: #fff; }
.su-sides { display: flex; height: calc(100svh - 73px); min-height: 600px; max-height: 940px; }
.su-side { position: relative; flex: 1 1 0; min-width: 0; overflow: hidden; color: #fff; text-decoration: none; transition: flex-grow .6s cubic-bezier(.2, .7, .2, 1); }
.su-side + .su-side { border-left: 3px solid var(--red); }
/* Both sides hold the full-width picture, pinned to the outer edges, so the dividing line slides across one scene. */
.su-side .su-layer { inset: 0 auto 0 0; width: 100cqw; }
.su-side + .su-side .su-layer { inset: 0 0 0 auto; }
.su-side .fin { transition: opacity .5s; }
.su-side::after { content: ""; position: absolute; inset: 56% 0 0; background: linear-gradient(rgb(11 11 46 / 0), rgb(11 11 46 / .88) 34%, var(--navy)); }
.su-b { position: absolute; z-index: 1; left: max(32px, calc((100cqw - 1180px) / 2)); bottom: clamp(28px, 5svh, 56px); width: min(400px, 40cqw); }
.su-side + .su-side .su-b { left: 40px; }
.su-b h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); margin: 0 0 .25em; }
.su-b p { margin: 0 0 1.2em; }
.su-side:focus-visible { outline: 0; }
.su-side:focus-visible .btn { outline: 3px solid #fff; outline-offset: 3px; }
@media (hover: hover) and (min-width: 761px) {
  .su-side:hover { flex-grow: 1.35; }
  .su-sides:has(.su-side:hover) .su-side:not(:hover) .fin { opacity: 0; }
}
@media (min-width: 761px) {
  .su-side:focus-visible { flex-grow: 1.35; }
  .su-sides:has(.su-side:focus-visible) .su-side:not(:focus-visible):not(:hover) .fin { opacity: 0; }
}
@media (max-width: 760px) {
  .su-head { position: static; }
  .su-head .wrap { padding: 24px 0 20px; }
  .su-sides { flex-direction: column; height: auto; min-height: 0; max-height: none; }
  .su-side { flex: none; padding-top: 132px; }
  .su-side + .su-side { border-left: 0; border-top: 3px solid var(--red); }
  .su-side .su-layer, .su-side + .su-side .su-layer { inset: 0 0 auto; width: 100%; height: 230px; }
  /* each side gets its own half of the picture */
  .su-side .su-layer img { width: 200%; max-width: none; inset: 0 auto 0 -16%; object-position: 50% 62%; }
  .su-side + .su-side .su-layer img { inset: 0 0 0 auto; }
  .su-side::after { inset: 90px 0 auto; height: 141px; background: linear-gradient(rgb(11 11 46 / 0), var(--navy) 88%); }
  .su-b, .su-side + .su-side .su-b { display: block; position: relative; left: auto; bottom: auto; width: auto; padding: 24px 20px 28px; }
  .su-b p { margin-bottom: 1em; }
}

/* ------------------------------------------------------------------ /artists/join: form + live preview */
.sj { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: #fff; }
.sj-art { position: sticky; top: 73px; align-self: start; height: calc(100svh - 73px); min-height: 520px; background: var(--navy); overflow: hidden; display: grid; place-items: end center; padding: 32px; }
.sj-art .su-layer img { object-position: 27% 50%; opacity: 0; transition: opacity .9s; }
.sj-art .su-layer img:first-child { opacity: 1; }
.sj[data-pass="1"] .p1, .sj[data-pass="2"] :is(.p1, .p2), .sj[data-pass="3"] :is(.p1, .p2, .p3) { opacity: 1 !important; }
.sj-card { position: relative; width: min(400px, 100%); margin-bottom: 4svh; background: #fff; color: var(--ink); border-radius: 18px; padding: 20px; display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 4px 16px; align-items: center; }
.sj-sun { grid-row: span 2; width: 76px; height: 76px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 1.6rem; }
.sj-name { font-weight: 800; font-size: 1.25rem; line-height: 1.2; align-self: end; overflow-wrap: anywhere; }
.sj-url { align-self: start; color: var(--muted); font-size: .86rem; overflow-wrap: anywhere; }
.sj-has { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sj-has span { border: 1.5px dashed var(--mist); color: var(--muted); border-radius: 999px; padding: .2em .8em; font-size: .82rem; font-weight: 700; transition: background .25s, color .25s; }
.sj-has span.on { background: var(--navy); border: 1.5px solid var(--navy); color: #fff; }

.sj-form { padding: clamp(32px, 6vw, 72px) clamp(20px, 5vw, 72px); max-width: 680px; width: 100%; }
.sj-form h1 { font-size: clamp(2rem, 3.6vw, 3rem); }
.sj-form .form { gap: 22px; margin-top: 28px; }
.sj-form .form label { font-size: 1rem; font-weight: 700; }
.sj-form .form label small { font-weight: 500; font-size: .84rem; }
.sj-form .form input:not([type=checkbox]):not([type=file]) { min-height: 52px; font-size: 1.05rem; }
.sj-form .uname { border-radius: 10px; }
.sj-form .form input[type=file] { padding: 14px; border: 2px dashed var(--mist); background: var(--paper); border-radius: 12px; cursor: pointer; font-weight: 500; width: 100%; }
.sj-form input[type=file]:hover { border-color: var(--navy); }
.sj-form input[type=file]::file-selector-button { font: inherit; font-weight: 700; color: #fff; background: var(--navy); border: 0; border-radius: 999px; padding: .5em 1.1em; margin-right: 14px; cursor: pointer; }
.sj-form .form label.chk { display: block; font-size: .95rem; font-weight: 500; }
.sj-form .form label.chk input { width: 20px; height: 20px; vertical-align: -4px; margin: 0 6px 0 0; accent-color: var(--red); }
.sj-form .form .btn { font-size: 1.1rem; padding: .9em 1.6em; }
.sj-share { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin: 0 0 24px; }
.sj-share a { font-size: clamp(1.15rem, 2.2vw, 1.5rem); font-weight: 800; overflow-wrap: anywhere; }

/* /join: the studio request form, same frame with the finished picture */
.sj-studio .sj-art { position: relative; top: 0; height: auto; align-self: stretch; }
.sj-studio .sj-art .su-layer img { object-position: 92% 50%; }
.sj-studio h2 { font-size: clamp(1.8rem, 3vw, 2.5rem); margin-top: 0; }

@media (max-width: 860px) {
  .sj-studio .sj-art { min-height: 200px; }
  .sj { grid-template-columns: minmax(0, 1fr); }
  .sj-art { position: relative; top: 0; height: auto; min-height: 0; padding: 136px 20px 20px; }
  .sj-art .su-layer img { object-position: 27% 50%; top: -30%; height: 130%; }
  .sj-card { margin: 0; padding: 14px 16px; grid-template-columns: 56px minmax(0, 1fr); gap: 2px 14px; }
  .sj-sun { width: 56px; height: 56px; font-size: 1.2rem; }
  .sj-form { max-width: none; }
  .sj-form .form .btn { width: 100%; }
}

:lang(ja) :is(.su-pick, .sj) :is(h1, h2) { word-break: auto-phrase; }
@media (prefers-reduced-motion: reduce) {
  .su-side, .su-side .fin, .sj-art .su-layer img, .sj-has span { transition: none; }
}
