/* Sign-up wizard: questions on a light page, the live preview on Koko plum. */
.signup { background: #fbf9fd; }
.wizard { display: grid; grid-template-rows: auto 1fr; min-height: 100vh; }

.wizard-top {
    position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 1.5rem;
    padding: 1rem clamp(1.25rem, 4vw, 3rem); background: rgb(251 249 253 / 0.92); backdrop-filter: blur(8px);
}
.wizard-top .logo { color: var(--ink); }
.progress { flex: 1; max-width: 22rem; height: 4px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--purple); transition: width 0.35s ease; }
.step-count { color: var(--muted); font-size: 0.85rem; }

.wizard-body { display: grid; grid-template-columns: minmax(0, 1fr) var(--preview-width); }
.questions { display: flex; flex-direction: column; justify-content: center; padding: 3rem clamp(1.25rem, 6vw, 6rem) 7rem; }
.wizard.is-wide .wizard-body { grid-template-columns: 1fr; }
.wizard.is-wide .wizard-preview { display: none; }

.step { max-width: 36rem; animation: rise 0.35s ease both; }
.step--wide { max-width: 74rem; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.step-num { display: inline-flex; align-items: center; gap: 0.4rem; margin: 0 0 0.75rem; color: var(--purple); font-size: 0.9rem; font-weight: 600; }
.step-num::after { content: "→"; }
.step h1 { font: 500 clamp(1.9rem, 3.4vw, 2.6rem)/1.15 var(--serif); letter-spacing: -0.02em; }
.step h1 label { cursor: text; }
.hint { margin: 0.75rem 0 2rem; color: var(--muted); font-size: 1.02rem; }

.answer {
    width: 100%; padding: 0.4rem 0 0.6rem; border: 0; border-bottom: 2px solid #cfc5dd; border-radius: 0;
    background: none; color: var(--ink); font: 500 1.6rem/1.3 var(--sans); outline: none; transition: border-color 0.15s;
}
.answer::placeholder { color: #b9afc6; }
.answer:focus { border-color: var(--purple); }
.answer--small { font-size: 1.15rem; }
.field { display: grid; gap: 0.35rem; margin: 0 0 1.4rem; padding: 0; border: 0; }
.field > span, .field legend { color: var(--muted); font-size: 0.88rem; font-weight: 500; }
.field em { font-style: normal; color: #9a90a6; font-weight: 400; }
.field legend { margin-bottom: 0.6rem; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }

.step-actions { display: flex; align-items: center; gap: 1.25rem; margin-top: 2rem; }
.enter-hint { color: #9a90a6; font-size: 0.85rem; }
.link-button { padding: 0; border: 0; background: none; color: var(--purple-dark); font: 500 0.95rem var(--sans); cursor: pointer; text-decoration: underline; text-underline-offset: 0.2em; }
.error { margin: 0.5rem 0 0; color: #b42318; font-size: 0.92rem; }
.form-alert { max-width: 36rem; margin-bottom: 2rem; padding: 0.85rem 1.1rem; border-radius: 12px; background: #fdecea; color: #8a1c13; font-size: 0.95rem; }

/* Choices */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip input, .design-choice input, .page-choice input { position: absolute; opacity: 0; pointer-events: none; }
.chip span {
    display: inline-block; padding: 0.5rem 1rem; border-radius: 999px; background: #fff; cursor: pointer;
    box-shadow: inset 0 0 0 1.5px #ddd4e7; font-size: 0.92rem; transition: box-shadow 0.15s, background 0.15s;
}
.chip input:checked + span { background: var(--purple); color: #fff; box-shadow: none; }
.chip input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }

.address { display: flex; align-items: baseline; gap: 0.2rem; border-bottom: 2px solid #cfc5dd; }
.address:focus-within { border-color: var(--purple); }
.address .answer { flex: 1; min-width: 0; border: 0; }
.address-suffix { color: var(--muted); font-size: 1.15rem; white-space: nowrap; }
.address-status { min-height: 1.5em; margin: 0.6rem 0 0; font-size: 0.92rem; }
.address-status.is-good { color: #1f7a4d; }
.address-status.is-bad { color: #b42318; }
.more { margin-top: 1.5rem; }
.more summary { color: var(--purple-dark); font-weight: 500; cursor: pointer; }
.more[open] summary { margin-bottom: 1.25rem; }
.check { display: flex; align-items: flex-start; gap: 0.7rem; margin-top: 0.5rem; font-size: 0.95rem; cursor: pointer; }
.check input { width: 1.15rem; height: 1.15rem; margin-top: 0.2rem; accent-color: var(--purple); }

.dropzone {
    position: relative; display: grid; place-items: center; gap: 1rem; min-height: 11rem; padding: 1.5rem;
    border: 2px dashed #cfc5dd; border-radius: 18px; background: #fff; color: var(--muted); text-align: center; cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.dropzone:hover, .dropzone:focus-within { border-color: var(--purple); background: #f8f5fc; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone img { max-height: 8rem; width: auto; }
.dropzone--file { min-height: 6rem; margin-top: 0.5rem; }

.colours { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.colour { display: grid; justify-items: center; gap: 0.5rem; color: var(--muted); font-size: 0.9rem; cursor: pointer; }
.colour input { width: 5rem; height: 5rem; padding: 0; border: 0; border-radius: 50%; background: none; cursor: pointer; }
.colour input::-webkit-color-swatch-wrapper { padding: 0; }
.colour input::-webkit-color-swatch { border: 4px solid #fff; border-radius: 50%; box-shadow: 0 6px 18px rgb(26 15 30 / 0.18); }
.colour input::-moz-color-swatch { border: 4px solid #fff; border-radius: 50%; }

/* A compact list beside the big preview: thumbnail, then name and description. */
.design-choices { display: grid; gap: 0.5rem; }
.design-choice { display: grid; grid-template-columns: 8.5rem 1fr; align-items: center; gap: 1rem; cursor: pointer; }
.design-frame { display: block; padding: 0.3rem; border-radius: 12px; box-shadow: inset 0 0 0 2px transparent; transition: box-shadow 0.15s; }
.design-choice:hover .design-frame { box-shadow: inset 0 0 0 2px var(--lavender); }
.design-choice input:checked + .design-frame { box-shadow: inset 0 0 0 3px var(--purple); }
.design-choice input:focus-visible + .design-frame { outline: 2px solid var(--purple); outline-offset: 2px; }
.design-frame .browser { display: block; }
.scratch {
    display: grid; place-items: center; align-content: center; gap: 0.3rem; aspect-ratio: 16 / 10.8; border-radius: 12px;
    background: #fff; color: var(--muted); font-size: 0.85rem; box-shadow: inset 0 0 0 1px var(--line);
}
.scratch b { color: var(--purple); font: 400 2.5rem/1 var(--sans); }
.design-frame .browser { border-radius: 8px; }
.design-frame .scratch { aspect-ratio: 16 / 10; border-radius: 8px; padding-inline: 0.5rem; font-size: 0.7rem; gap: 0; text-align: center; }
.design-frame .scratch b { font-size: 1.6rem; }
.design-text { display: grid; padding-inline: 0.4rem; color: var(--muted); font-size: 0.86rem; }
.design-text b { color: var(--ink); font-size: 1rem; }

.page-choices { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.page-choice span {
    display: grid; gap: 0.1rem; height: 100%; padding: 0.9rem 1rem 0.9rem 2.9rem; border-radius: 14px; background: #fff;
    box-shadow: inset 0 0 0 1.5px #e3dbec; color: var(--muted); font-size: 0.85rem; cursor: pointer; position: relative;
    transition: box-shadow 0.15s, background 0.15s;
}
.page-choice span::before {
    content: ""; position: absolute; left: 1rem; top: 1rem; width: 1.1rem; height: 1.1rem; border-radius: 5px;
    box-shadow: inset 0 0 0 1.5px #cfc5dd; background: #fff;
}
.page-choice b { color: var(--ink); font-size: 0.98rem; }
.page-choice input:checked + span { background: #f4f0fa; box-shadow: inset 0 0 0 2px var(--purple); }
.page-choice input:checked + span::before { background: var(--purple) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 8 3 3 5-6' fill='none' stroke='white' stroke-width='2'/%3E%3C/svg%3E") center / 80% no-repeat; box-shadow: none; }
.page-choice input:focus-visible + span { outline: 2px solid var(--purple); outline-offset: 2px; }

.password { display: flex; align-items: center; gap: 1rem; border-bottom: 2px solid #cfc5dd; }
.password:focus-within { border-color: var(--purple); }
.password .answer { border: 0; }

/* Live preview */
/* The preview fills the right of the screen; the questions and their top bar use the left. */
.wizard { --preview-width: 48.7%; }
.wizard:not(.is-wide) .wizard-top { margin-right: var(--preview-width); }
.wizard-preview {
    position: fixed; top: 0; right: 0; bottom: 0; width: var(--preview-width);
    display: flex; flex-direction: column; justify-content: center; gap: 1rem;
    padding: 3rem clamp(1.5rem, 4vw, 4rem);
    background: radial-gradient(40rem 30rem at 70% 30%, rgb(123 107 170 / 0.35), transparent 65%), var(--plum);
}
.preview-label {
    display: flex; flex-wrap: wrap; gap: 0.3rem 1rem; align-items: baseline; margin: 0;
    color: var(--gold); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase;
}
.preview-tip { margin-left: auto; color: rgb(244 240 248 / 0.55); font-weight: 400; letter-spacing: 0.04em; text-transform: none; }
.mock-logo { width: 3.4cqw; height: 3.4cqw; object-fit: contain; flex: none; }

/* Bottom right of the questions, clear of the content. */
.wizard-nav { position: fixed; right: calc(var(--preview-width) + 1.25rem); bottom: 1.25rem; z-index: 20; display: flex; gap: 0.35rem; }
.wizard.is-wide .wizard-nav { right: 1.25rem; }
.nav-button {
    width: 2.6rem; height: 2.6rem; border: 0; border-radius: 10px; background: var(--purple); color: #fff;
    font-size: 1.1rem; cursor: pointer;
}
.nav-button:disabled { opacity: 0.35; cursor: default; }

/* Done */
.done { display: grid; min-height: 100vh; place-items: center; padding: 2rem 1.25rem; background: var(--plum); color: #f4f0f8; }
.done-card { max-width: 38rem; text-align: center; }
.done-card .logo { color: #f4f0f8; }
.done-card h1 { margin: 2.5rem 0 1rem; font: 500 clamp(2.2rem, 4.5vw, 3.2rem)/1.08 var(--serif); }
.done-card > p { color: rgb(244 240 248 / 0.75); font-size: 1.08rem; }
.done-address { display: inline-block; margin: 0.5rem 0 2rem; padding: 0.5rem 1.1rem; border-radius: 999px; background: rgb(255 255 255 / 0.08); color: #fff; font-weight: 500; }
.done-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; }
.button--ghost { background: transparent; box-shadow: inset 0 0 0 1.5px rgb(201 189 224 / 0.5); color: #f4f0f8; }
.button--ghost:hover { background: rgb(201 189 224 / 0.12); }
.done-next { display: grid; gap: 0.75rem; margin: 3rem 0 0; padding: 0; list-style: none; text-align: left; }
.done-next li { padding: 1rem 1.25rem; border-radius: 14px; background: var(--plum-raised); color: rgb(244 240 248 / 0.8); font-size: 0.95rem; }
.done-next b { color: #fff; }

/* Terms placeholder */
.terms { max-width: 40rem; margin: 0 auto; padding: 4rem 1.25rem; }
.terms h1 { margin: 2rem 0 1rem; font: 500 2.4rem var(--serif); }
.terms p { color: var(--muted); }

@media (max-width: 900px) {
    .wizard { --preview-width: 0px; }
    .wizard-body { grid-template-columns: 1fr; }
    .wizard-preview { display: none; }
    .questions { justify-content: flex-start; padding-top: 2rem; }
    .field-row, .page-choices { grid-template-columns: 1fr; }
    /* On phones the arrows sit under the question instead of floating over it. */
    .questions { padding-bottom: 1rem; }
    .wizard-nav, .wizard.is-wide .wizard-nav { position: static; padding: 0 1.25rem 2rem; }
}
