/* ══════════════════════════════════════════════════════════════════════════
   start.css — folha COMPARTILHADA pelos assistentes de criação de campanha
   (start-yourself.html · start-business.html · start-nonprofit.html).

   Só existe aqui o que é exclusivo do wizard. Tudo mais vem de
   tokens.css + base.css + components.css:
     .btn / .field / .input / .textarea / .select / .field-hint / .field-error
     .progress / .badge / .chip / .sec-head / .eyebrow / .reveal / .sr-only

   Nenhum valor de cor, raio, sombra, duração ou tamanho fora dos tokens.
   ══════════════════════════════════════════════════════════════════════════ */

/* ══ 01 · CABEÇALHO DA PÁGINA ═════════════════════════════════════════════
   Faixa escura da marca. É a única superfície com o gradiente cheio na
   página — o resto é branco sobre wash, para o formulário respirar.       */
.wiz-hero {
  position: relative;
  overflow: hidden;
  background: var(--grad-brand);
  color: var(--glow-50);
  padding-block: clamp(3rem, 6vw, 5rem);
}
.wiz-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 62% 120% at 88% 8%,
      color-mix(in srgb, var(--lime-500) 40%, transparent) 0%, transparent 68%),
    radial-gradient(ellipse 50% 100% at 4% 100%,
      color-mix(in srgb, var(--forest) 60%, transparent) 0%, transparent 70%);
  pointer-events: none;
}
.wiz-hero > * { position: relative; }

.wiz-hero-row {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.wiz-hero-icon {
  flex: 0 0 auto;
  width: 62px; height: 62px;
  display: grid; place-items: center;
  border-radius: var(--r-lg);
  color: var(--white);
  background: color-mix(in srgb, var(--white) 16%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--white) 34%, transparent);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.wiz-hero .eyebrow { color: var(--lime-300); }
.wiz-hero .eyebrow::before { background: var(--glow-200); }
.wiz-hero h1 { color: var(--white); font-weight: 800; margin-top: var(--sp-2); }
.wiz-hero-sub {
  margin-top: var(--sp-3);
  max-width: 54ch;
  color: color-mix(in srgb, var(--glow-50) 82%, transparent);
  font-size: var(--fs-lg);
}

@media (max-width: 560px) {
  .wiz-hero-row { gap: var(--sp-4); align-items: flex-start; }
  .wiz-hero-icon { width: 50px; height: 50px; border-radius: var(--r-md); }
}

/* ══ ÁREA DO WIZARD ═══════════════════════════════════════════════════════ */
.wiz-wrap { max-width: 760px; margin-inline: auto; }

/* ══ 02 · BARRA DE PROGRESSO ══════════════════════════════════════════════ */
.wiz-rail {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: var(--sp-6) var(--sp-6) var(--sp-5);
  margin-bottom: var(--sp-6);
}

.wiz-dots {
  display: flex;
  align-items: flex-start;
  margin-bottom: var(--sp-5);
}
.wiz-dot {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex; flex-direction: column; align-items: center;
  gap: var(--sp-2);
  text-align: center;
}
/* traço de ligação — nasce no dot anterior */
.wiz-dot::before {
  content: "";
  position: absolute;
  top: 16px; right: 50%;
  width: 100%; height: 2px;
  background: var(--line);
  transition: background var(--d) var(--ease);
}
.wiz-dot:first-child::before { display: none; }
.wiz-dot.is-done::before,
.wiz-dot.is-active::before { background: var(--green-500); }

.wiz-dot-n {
  position: relative;
  z-index: 1;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white);
  border: 2px solid var(--line);
  color: var(--subtle);
  font-family: var(--f-display);
  font-size: var(--fs-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: background var(--d) var(--ease), border-color var(--d) var(--ease),
              color var(--d) var(--ease), box-shadow var(--d) var(--ease);
}
.wiz-dot.is-done .wiz-dot-n {
  background: var(--green-800); border-color: var(--green-800); color: var(--white);
}
.wiz-dot.is-active .wiz-dot-n {
  border-color: var(--green-800); color: var(--green-800); box-shadow: var(--sh-ring);
}
.wiz-dot-n svg { width: 15px; height: 15px; }

.wiz-dot-l {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--subtle);
  line-height: 1.3;
  transition: color var(--d) var(--ease);
}
.wiz-dot.is-done .wiz-dot-l { color: var(--ink-3); }
.wiz-dot.is-active .wiz-dot-l { color: var(--green-800); }

/* Abaixo de 620px o rótulo de cada passo não cabe: some e vira uma linha só */
.wiz-now {
  display: none;
  font-size: var(--fs-sm);
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: var(--sp-4);
}
@media (max-width: 620px) {
  .wiz-dot-l { display: none; }
  .wiz-now { display: block; }
  .wiz-rail { padding: var(--sp-5) var(--sp-5) var(--sp-4); }
}

/* ══ 03–07 · CARTÃO DE PASSO ══════════════════════════════════════════════ */
.wiz-step {
  display: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
  padding: var(--sp-10);
}
.wiz-step.is-active { display: block; }
@media (max-width: 620px) { .wiz-step { padding: var(--sp-6) var(--sp-5); } }

/* Entrada do passo. Guard próprio, como manda a regra. */
@keyframes wiz-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.wiz-step.is-active { animation: wiz-in var(--d-slow) var(--ease) both; }
@media (prefers-reduced-motion: reduce) { .wiz-step.is-active { animation: none; } }

/* Sem JS o formulário não navega — então mostra tudo, na ordem, legível. */
.no-js .wiz-step { display: block; animation: none; }
.no-js .wiz-step + .wiz-step { margin-top: var(--sp-6); }
.no-js .wiz-nav { display: none; }

.wiz-head { margin-bottom: var(--sp-8); }
.wiz-head h2 { font-size: var(--fs-h3); }
.wiz-lead {
  margin-top: var(--sp-2);
  color: var(--muted);
  font-size: var(--fs-sm);
  max-width: var(--measure);
}

/* Pilha de campos — o espaço vem do gap, nunca de margem solta */
.wiz-form { display: flex; flex-direction: column; gap: var(--sp-6); }
.wiz-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
@media (max-width: 560px) { .wiz-row { grid-template-columns: 1fr; } }

/* Rótulo de um grupo que não é um único controle (ex.: o editor de história) */
.field-label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }

.req { color: var(--green-800); font-weight: 700; }
.opt-tag { font-weight: 400; color: var(--muted); }

fieldset.wiz-set { border: 0; padding: 0; margin: 0; }
fieldset.wiz-set > legend {
  padding: 0;
  font-size: var(--fs-sm); font-weight: 700; color: var(--ink);
  margin-bottom: var(--sp-3);
}

/* ══ CARTÕES DE OPÇÃO — radio de verdade por baixo ════════════════════════ */
.opt-grid {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 148px), 1fr));
}
.opt-grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 118px), 1fr)); }

.opt {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-5) var(--sp-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  color: var(--ink-3);
  cursor: pointer;
  transition: border-color var(--d-fast) var(--ease), background var(--d-fast) var(--ease),
              color var(--d-fast) var(--ease), transform var(--d-fast) var(--ease);
}
.opt input {
  position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0;
  pointer-events: none;
}
.opt:hover { border-color: var(--green-400); background: var(--glow-50); color: var(--forest); }
/* .is-sel é espelhado por JS — mantém o estado em navegador sem :has() */
.opt.is-sel,
.opt:has(input:checked) {
  border-color: var(--green-800);
  background: var(--glow-50);
  color: var(--forest);
}
.opt:has(input:focus-visible) {
  outline: 2.5px solid var(--green-800);
  outline-offset: 3px;
}
.opt-ico {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--wash);
  color: var(--green-800);
  transition: background var(--d-fast) var(--ease);
}
.opt.is-sel .opt-ico,
.opt:has(input:checked) .opt-ico { background: var(--glow-200); }
.opt-label { font-size: var(--fs-xs); font-weight: 700; line-height: 1.3; }

/* ══ 04 · EDITOR DE HISTÓRIA EM BLOCOS ════════════════════════════════════ */
.editor-bar { display: flex; flex-wrap: wrap; gap: var(--sp-2); margin-bottom: var(--sp-3); }
.editor-body { display: flex; flex-direction: column; gap: var(--sp-3); }

.eb {
  border: 1.5px solid var(--line);
  border-radius: var(--r-md);
  background: var(--white);
  overflow: hidden;
  transition: border-color var(--d-fast) var(--ease), box-shadow var(--d-fast) var(--ease);
}
.eb:focus-within { border-color: var(--green-500); box-shadow: var(--sh-ring); }

.eb-bar {
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-2) var(--sp-2) var(--sp-4);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
}
.eb-kind {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-eyebrow); font-weight: 700;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase;
  color: var(--muted);
}
.eb-acts { display: flex; gap: var(--sp-1); }
.eb-btn {
  width: 30px; height: 30px;
  display: grid; place-items: center;
  border-radius: var(--r-xs);
  color: var(--muted);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.eb-btn:hover { background: var(--glow-50); color: var(--forest); }
.eb-btn--danger:hover { background: var(--danger-bg); color: var(--danger); }

.eb textarea {
  width: 100%;
  border: 0; outline: none; resize: vertical;
  min-height: 110px;
  padding: var(--sp-4);
  background: transparent;
  color: var(--ink);
  font-family: var(--f-body);
  font-size: var(--fs-sm);
  line-height: var(--lh-body);
}
.eb-img { padding: var(--sp-4); display: flex; flex-direction: column; gap: var(--sp-3); }
.eb-prev {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--wash);
}
.eb-prev.is-on { display: block; }
.eb-cap { font-style: italic; }

.editor-empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-4);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  color: var(--muted);
  font-size: var(--fs-sm);
}

/* ══ 05 · META ════════════════════════════════════════════════════════════
   O único peso da seção: o valor. Nada mais compete com ele.              */
.goal-box {
  background: var(--glow-50);
  border: 1px solid var(--lime-300);
  border-radius: var(--r-lg);
  padding: var(--sp-8) var(--sp-6);
  text-align: center;
}
.goal-amount {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: var(--fs-h1);
  letter-spacing: var(--tr-head);
  line-height: 1;
  color: var(--forest);
  /* sem tabular-nums: é um valor único e centrado — a vírgula fica melhor
     proporcional. Tabular só onde há coluna de números. */
}
.goal-cap {
  margin-top: var(--sp-2);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--tr-eyebrow);
  text-transform: uppercase;
  color: var(--green-800);
}
.goal-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%;
  margin-top: var(--sp-6);
  height: 24px;
  background: transparent;
  accent-color: var(--green-800);
  cursor: pointer;
}
.goal-slider::-webkit-slider-runnable-track {
  height: 7px; border-radius: var(--r-pill); background: var(--white);
  border: 1px solid var(--lime-300);
}
.goal-slider::-moz-range-track {
  height: 7px; border-radius: var(--r-pill); background: var(--white);
  border: 1px solid var(--lime-300);
}
.goal-slider::-moz-range-progress { height: 7px; border-radius: var(--r-pill); background: var(--grad-bar); }
.goal-slider::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%;
  background: var(--green-800);
  border: 3px solid var(--white);
  box-shadow: var(--sh-md);
}
.goal-slider::-moz-range-thumb {
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--green-800);
  border: 3px solid var(--white);
  box-shadow: var(--sh-md);
}
.goal-ends {
  display: flex; justify-content: space-between;
  font-size: var(--fs-xs); color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ══ 06 · MÍDIA ═══════════════════════════════════════════════════════════ */
.drop {
  display: flex; flex-direction: column; align-items: center; gap: var(--sp-2);
  text-align: center;
  padding: var(--sp-10) var(--sp-5);
  border: 1.5px dashed var(--line);
  border-radius: var(--r-md);
  background: var(--wash);
  cursor: pointer;
  transition: border-color var(--d-fast) var(--ease), background var(--d-fast) var(--ease);
}
.drop:hover { border-color: var(--green-400); background: var(--glow-50); }
.drop:focus-within { border-color: var(--green-500); box-shadow: var(--sh-ring); }
.drop--sm { padding: var(--sp-6) var(--sp-5); }
.drop-ico {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--white);
  color: var(--green-800);
  border: 1px solid var(--line);
}
.drop-label { font-size: var(--fs-sm); font-weight: 700; color: var(--ink); }
.drop-hint { font-size: var(--fs-xs); color: var(--muted); }

.cover-prev {
  display: none;
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--r-md);
  border: 1px solid var(--line);
  background: var(--wash);
}
.cover-prev.is-on { display: block; }

.prev-grid {
  display: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 92px), 1fr));
  gap: var(--sp-2);
}
.prev-grid.is-on { display: grid; }
.prev-grid img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--r-sm);
  background: var(--wash);
  border: 1px solid var(--line);
}

/* ══ 07 · REVISÃO ═════════════════════════════════════════════════════════ */
.review {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  overflow: hidden;
}
.review-row {
  display: grid;
  grid-template-columns: minmax(120px, 34%) 1fr;
  gap: var(--sp-4);
  padding: var(--sp-4) var(--sp-5);
  align-items: baseline;
}
.review-row + .review-row { border-top: 1px solid var(--line-2); }
.review-row:nth-child(odd) { background: var(--wash); }
.review-k { font-size: var(--fs-xs); font-weight: 700; color: var(--muted); }
.review-v {
  font-size: var(--fs-sm); color: var(--ink); text-align: right;
  overflow-wrap: anywhere;
}
@media (max-width: 480px) {
  .review-row { grid-template-columns: 1fr; gap: var(--sp-1); }
  .review-v { text-align: left; }
}

.notice {
  margin-top: var(--sp-6);
  padding: var(--sp-4) var(--sp-5);
  border-radius: var(--r-md);
  background: var(--warn-bg);
  border: 1px solid color-mix(in srgb, var(--warn) 28%, transparent);
  color: var(--warn);
  font-size: var(--fs-xs);
  line-height: var(--lh-body);
}
.notice a { color: var(--warn); text-decoration: underline; font-weight: 700; }
.notice strong { color: var(--warn); }

.wiz-error {
  margin-top: var(--sp-4);
  padding: var(--sp-3) var(--sp-4);
  border-radius: var(--r-sm);
  background: var(--danger-bg);
  border: 1px solid color-mix(in srgb, var(--danger) 30%, transparent);
  color: var(--danger);
  font-size: var(--fs-xs);
  font-weight: 600;
}
.wiz-error[hidden] { display: none; }

/* ══ NAVEGAÇÃO DO PASSO ═══════════════════════════════════════════════════ */
.wiz-nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--line-2);
}
.wiz-nav--end { justify-content: flex-end; }
@media (max-width: 420px) {
  .wiz-nav { flex-direction: column-reverse; align-items: stretch; }
  .wiz-nav .btn { width: 100%; }
}

/* ══ 08 · SUCESSO ═════════════════════════════════════════════════════════ */
.success { text-align: center; display: flex; flex-direction: column; align-items: center; }
.success-orb {
  width: 96px; height: 96px;
  border-radius: 50%;
  background: var(--grad-orb);
  display: grid; place-items: center;
  box-shadow: var(--sh-md);
  margin-bottom: var(--sp-6);
}
/* O centro do orbe é quase branco — o glifo tem de ser escuro para existir */
.success-orb svg { color: var(--forest); }
.success h2 { font-size: var(--fs-h2); }
.success p {
  margin-top: var(--sp-4);
  max-width: 52ch;
  color: var(--ink-2);
  font-size: var(--fs-sm);
}
.success-acts {
  display: flex; flex-wrap: wrap; gap: var(--sp-3); justify-content: center;
  margin-top: var(--sp-8);
}

/* O cartão de sucesso não existe até haver uma submissão — inclusive no modo
   sem JS, onde todos os outros passos ficam visíveis de uma vez. */
.no-js .wiz-step--done { display: none; }

/* ══ AJUDA DE PÉ DE PÁGINA DO WIZARD ══════════════════════════════════════ */
.wiz-foot {
  margin-top: var(--sp-6);
  text-align: center;
  font-size: var(--fs-xs);
  color: var(--muted);
}
.wiz-foot a { font-weight: 700; }


/* ══════════════════════════════════════════════════════════════════════════
   COMPLEMENTOS — peças que faltavam para o wizard "para si mesmo".
   Tudo aqui é ADITIVO: nada acima foi alterado, só estendido.
   ══════════════════════════════════════════════════════════════════════════ */

/* O atributo hidden precisa vencer os display: flex/grid declarados acima */
[hidden] { display: none !important; }

/* Erro de campo vazio não pode abrir buraco no gap da pilha */
.field-error:empty { display: none; }

/* Sem JS todos os passos aparecem — menos a tela de sucesso, que mentiria */
.no-js #stepDone { display: none; }

/* Botão de bloco indisponível (primeiro não sobe, último não desce) */
.eb-btn:disabled { opacity: .32; cursor: not-allowed; }
.eb-btn:disabled:hover { background: none; color: var(--muted); }

/* ── Arrastar-e-soltar ──────────────────────────────────────────────────── */
.drop.is-over {
  border-style: solid;
  border-color: var(--green-500);
  background: var(--glow-50);
}
/* Preenchimento do trilho no WebKit — o Firefox já usa ::-moz-range-progress.
   --fill é escrito pelo JS a cada input do slider.                          */
.goal-slider::-webkit-slider-runnable-track {
  background: var(--grad-bar) no-repeat left center / var(--fill, 10%) 100%,
              var(--white);
}

/* ── Upload: progresso e estado ─────────────────────────────────────────── */
.up-prog { margin-top: var(--sp-1); }
.up-stat { font-size: var(--fs-xs); color: var(--muted); }
.up-stat:empty { display: none; }
.up-stat.is-ok  { color: var(--green-800); font-weight: 700; }
.up-stat.is-bad { color: var(--danger);    font-weight: 700; }

/* ── Miniaturas removíveis ──────────────────────────────────────────────── */
.prev-cell { position: relative; }
.cover-wrap { position: relative; }
.prev-x {
  position: absolute; top: var(--sp-1); right: var(--sp-1);
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--white); color: var(--ink-3);
  box-shadow: var(--sh-sm);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease);
}
.prev-x:hover { background: var(--danger-bg); color: var(--danger); }
.cover-wrap .prev-x { width: 34px; height: 34px; top: var(--sp-2); right: var(--sp-2); }

/* ── Foco visível nos cartões de opção sem depender de :has() ───────────── */
.opt.is-focus { outline: 2.5px solid var(--green-800); outline-offset: 3px; }

/* ── 07 · PRÉVIA DO CARD REAL ───────────────────────────────────────────────
   O destaque da revisão é o card de campanha renderizado por cards.js.
   A tabela .review vira apoio: só o que o card não mostra.                  */
.rev-preview {
  display: grid; justify-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-8);
}
.rev-cap {
  font-size: var(--fs-eyebrow); font-weight: 700;
  letter-spacing: var(--tr-eyebrow); text-transform: uppercase;
  color: var(--muted);
}
.rev-card { width: min(320px, 100%); }
/* Não é um card navegável — não deve levantar no hover */
.rev-card .ccard:hover {
  transform: none; box-shadow: var(--sh-sm); border-color: var(--line);
}
.rev-card .ccard:hover .ccard-media img { transform: none; }

/* ── 08 · ESTRELA DA MARCA NA TELA DE SUCESSO ───────────────────────────── */
@keyframes done-pop {
  0%   { opacity: 0; transform: scale(.82); }
  62%  { opacity: 1; transform: scale(1.05); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes done-ring {
  0%   { transform: scale(.74); opacity: .5; }
  100% { transform: scale(1.6);  opacity: 0; }
}
.success-orb { position: relative; animation: done-pop var(--d-slow) var(--ease) both; }
.success-orb::after {
  content: "";
  position: absolute; inset: -6px;
  border-radius: 50%;
  border: 2px solid var(--lime-500);
  animation: done-ring var(--d-xslow) var(--ease) 220ms both;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
  .success-orb { animation: none; }
  .success-orb::after { animation: none; opacity: 0; }
}
