/* designer.gr · Επικοινωνία: το wizard της φόρμας brief (contact.js).
   Without JS only the first block applies and form#brief stays a plain form; everything else is scoped under #brief.on. */

/* plain form (no JS): the step blocks are ordinary fields */
#brief [hidden], #brief[hidden] { display: none !important; }
.wz-steps { display: grid; gap: 16px; min-width: 0; }
.wz-step { display: grid; gap: 6px; min-width: 0; }
#brief legend { padding: 0; }
#brief:not(.on) .wz-sub { color: var(--ink-3); font-size: 13.5px; }
#brief:not(.on) .wz-step[data-step="3"] { gap: 16px; }

/* ---------- the wizard card ---------- */
#brief.on { gap: 20px; min-height: min(560px, 76svh); grid-template-rows: auto 1fr auto auto; padding: clamp(20px, 3vw, 36px); border-radius: 26px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); min-width: 0; }
#brief.on .req { display: none; }
.wz-head { display: grid; gap: 10px; }
.wz-prog { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.wz-prog li { position: relative; height: 5px; border-radius: 3px; background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.wz-prog li::after { content: ""; position: absolute; inset: 0; background: var(--ink); transform: scaleX(0); transform-origin: left; transition: transform .45s var(--ease); }
.wz-prog li.on::after { transform: scaleX(1); }
.wz-prog li.on:last-child::after { background: var(--accent); }
.wz-count { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 13.5px; color: var(--ink-3); }
.wz-count b { color: var(--ink); font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
.wz-saved { color: #12804f; font-weight: 600; }
.wz-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 14px; padding: 12px 16px; border-radius: 14px; background: var(--accent-soft); font-size: 14.5px; }
.wz-link { border: 0; background: none; padding: 4px 0; font-weight: 700; font-size: 14.5px; color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; cursor: pointer; }
.wz-link:hover { color: var(--accent); }

/* one question per screen */
#brief.on .wz-steps { align-content: start; }
#brief.on .wz-step { gap: 14px; align-content: start; }
@media (prefers-reduced-motion: no-preference) { #brief.on .wz-step:not([hidden]) { animation: wz-in .45s var(--ease) both; } }
@keyframes wz-in { from { opacity: 0; transform: translateY(10px); } }
#brief.on .wz-q { display: block; padding: 0; margin: 0 0 2px; font-weight: 800; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.08; letter-spacing: -.035em; color: var(--ink); }
#brief.on legend.wz-q { margin-bottom: 14px; }
#brief.on fieldset.wz-step > .wz-sub { margin: -6px 0 6px; }
#brief.on .wz-sub { color: var(--ink-3); font-size: 14.5px; }
#brief.on [data-step="1"] input, #brief.on [data-step="2"] textarea {
  width: 100%; border: 0; border-bottom: 2px solid rgba(15, 18, 34, .16); border-radius: 0; background: transparent; box-shadow: none; padding: 10px 2px; min-height: 56px;
  font-size: clamp(20px, 2.2vw, 26px); font-weight: 600; letter-spacing: -.015em; transition: border-color .2s; }
#brief.on [data-step="2"] textarea { min-height: 120px; line-height: 1.4; resize: vertical; }
#brief.on [data-step="1"] input:focus-visible, #brief.on [data-step="2"] textarea:focus-visible { outline: none; box-shadow: none; border-bottom-color: var(--accent); }
#brief.on [data-step="1"] input[aria-invalid="true"], #brief.on [data-step="2"] textarea[aria-invalid="true"] { border-bottom-color: #c0392b; box-shadow: none; }
#brief.on .field input[aria-invalid="true"] { box-shadow: inset 0 0 0 2px #c0392b; }
#brief.on .field input { min-height: 50px; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(15, 18, 34, .14); }
#brief.on .field input:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
#brief.on .field input::placeholder, #brief.on .wz-step textarea::placeholder { color: #b3b7c6; }
.wz-mini { display: grid; gap: 0; }
.wz-mini legend { font-weight: 600; font-size: 14.5px; margin-bottom: 8px; }

/* chips: services (big), channel and time (smaller); the dot marks what was picked before */
#brief.on .checks { gap: 8px; }
#brief.on .checks span { gap: 8px; min-height: 48px; padding: 0 18px; font-size: 16px; box-shadow: inset 0 0 0 1px rgba(15, 18, 34, .14); transition: background .2s, color .2s, box-shadow .2s; }
#brief.on .wz-mini .checks span { min-height: 44px; padding: 0 15px; font-size: 15px; }
#brief.on .checks input:hover + span { box-shadow: inset 0 0 0 1.5px var(--ink); }
#brief.on .checks input:checked + span { box-shadow: none; }
#brief.on .checks input:checked + span::before { content: ""; width: 9px; height: 5px; border: solid var(--accent); border-width: 0 0 2px 2px; transform: translateY(-2px) rotate(-45deg); }
#brief.on .checks .from span::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
#brief.on .unsure span { background: transparent; box-shadow: none; border: 1.5px dashed rgba(15, 18, 34, .28); color: var(--ink-2); }
#brief.on .unsure input:checked + span { background: var(--ink); border: 1.5px solid var(--ink); color: #fff; }

/* the summary («Αυτό που ζητάς») */
.wz-sum { display: grid; gap: 12px; padding: 20px; border-radius: 18px; background: var(--paper); }
.wz-sent { font-size: clamp(19px, 1.8vw, 23px); line-height: 1.5; font-weight: 500; color: var(--ink-2); }
.wz-meta { font-size: 15px; color: var(--ink-2); }
.wz-part { font-weight: 700; color: var(--ink); cursor: pointer; text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; text-underline-offset: 4px; border-radius: 4px; overflow-wrap: anywhere; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.wz-part:hover { background: var(--accent-soft); }
.wz-part.empty { color: var(--ink-3); font-weight: 600; text-decoration-style: dashed; text-decoration-color: var(--ink-3); }
.wz-fix { font-size: 13px; color: var(--ink-3); }

/* errors and the bottom bar */
.wz-err { color: #c0392b; font-weight: 600; }
.wz-err:empty { display: none !important; }
#brief.on .send { gap: 10px 16px; }
#brief.on .send .btn { min-width: 168px; }
#brief.on .send .btn[disabled] { opacity: .6; cursor: progress; transform: none; }
.wz-hint { color: var(--ink-3); font-size: 13.5px; }
.wz-back { margin-left: auto; border: 0; background: none; padding: 10px 4px; min-height: 44px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.wz-back:hover { color: var(--ink); }
#brief.on .status { flex-basis: 100%; }
#brief.on .status:empty, #brief.on .status[data-state="ok"] { display: none; }

/* ---------- after sending ---------- */
.wz-done { display: grid; gap: 22px; align-content: start; padding: clamp(24px, 3.4vw, 40px); border-radius: 26px; background: #fff; box-shadow: inset 0 0 0 1px var(--line), var(--shadow); min-width: 0; }
.wz-done:focus { outline: none; }
.wz-tick { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--ink); }
.wz-tick svg { width: 26px; height: 26px; fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
@media (prefers-reduced-motion: no-preference) {
  .wz-done { animation: wz-in .5s var(--ease) both; }
  .wz-tick svg path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: wz-draw .6s .15s var(--ease) forwards; }
}
@keyframes wz-draw { to { stroke-dashoffset: 0; } }
.wz-done h2 { font-weight: 800; font-size: clamp(32px, 3.8vw, 48px); line-height: 1.04; letter-spacing: -.04em; }
.wz-tl { display: grid; }
.wz-tl li { position: relative; display: grid; grid-template-columns: 34px 1fr; gap: 14px; padding-bottom: 20px; }
.wz-tl li:last-child { padding-bottom: 0; }
.wz-tl li:not(:last-child)::before { content: ""; position: absolute; left: 16px; top: 38px; bottom: 4px; width: 2px; border-radius: 1px; background: var(--line); }
.wz-tl b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--paper); font-weight: 800; font-size: 14px; }
.wz-tl li:first-child b { background: var(--accent); color: #fff; }
.wz-tl strong { display: block; font-weight: 700; padding-top: 5px; }
.wz-tl span { color: var(--ink-2); }
.wz-mock { font-size: 13px; color: var(--ink-3); }
.wz-done .wz-link { padding: 0; }

@media (max-width: 900px) {
  #brief.on, .wz-done { border-radius: 22px; }
  #brief.on { min-height: 0; }
}
@media (max-width: 560px), (pointer: coarse) { .wz-hint { display: none; } }
@media (max-width: 560px) { #brief.on .send .btn { flex: 1 1 auto; } }

/* ---------- phones: a short intro, so that step 1 of the wizard is on the first screen; email and phone go under the form ---------- */
@media (max-width: 900px) {
  .contact-page .contact { min-height: 0; padding-top: 88px; row-gap: 0; }
  .contact-page .ct-copy { display: contents; }
  .contact-page .ct-copy h1 { font-size: clamp(26px, 7vw, 34px); line-height: 1.06; letter-spacing: -.035em; }
  .contact-page .ct-copy > p:not(.direct) { margin: 8px 0 18px; font-size: 15px; }
  .contact-page #brief, .contact-page .wz-done { order: 1; }
  .contact-page .direct { order: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 0 22px; margin-top: 14px; font-size: 16px; }
}
