/* ==========================================================================
   Criador de Objetivos — ferramenta SMART (design system Mr.Coach / main.css)
   Página isolada, autossuficiente (sem Bootstrap / font-awesome / jQuery).
   ========================================================================== */

.co-page {
  background: var(--paper-warm);
  color: var(--ink);
}

/* ---------- Barra superior simples (só o logo) ---------- */
.co-top {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, .85);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.co-top-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.co-top .logo img {
  height: 34px;
  width: auto;
}

.co-top-tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 500;
}

/* ---------- Container ---------- */
.co-main {
  max-width: 1120px;
  padding-block: clamp(28px, 5vw, 64px);
}

.co-step {
  animation: coFade .6s ease both;
}

.is-hidden {
  display: none !important;
}

@keyframes coFade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Botão secundário (fantasma) — complementa o .btn do main.css */
.btn-ghost {
  background: transparent;
  color: var(--teal);
  border: 1px solid var(--line-strong);
  box-shadow: none;
}

.btn-ghost:hover {
  background: rgba(0, 96, 87, .06);
  border-color: var(--teal);
}

/* ==========================================================================
   ETAPA 1 — Intro
   ========================================================================== */
.co-intro {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(32px, 5vw, 72px);
  align-items: center;
}

.co-intro-title {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(40px, 6vw, 68px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  color: var(--teal-deep);
  margin: 14px 0 0;
}

.co-intro-title em {
  font-style: italic;
  color: var(--teal);
}

.co-lead {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: var(--muted);
  margin: 18px 0 0;
  max-width: 50ch;
}

.co-lead strong {
  color: var(--teal-deep);
}

.co-tips {
  margin-top: 30px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-sm);
}

.co-tips h3 {
  margin: 0 0 14px;
  font-family: var(--f-body);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  font-weight: 600;
}

.co-tips ol {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: var(--teal-deep);
  font-size: 15px;
  line-height: 1.5;
}

.co-intro-actions {
  margin-top: 32px;
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.co-intro-note {
  font-size: 13px;
  color: var(--muted);
}

.co-intro-art {
  display: flex;
  justify-content: center;
}

.co-intro-art svg {
  width: 100%;
  max-width: 340px;
  height: auto;
}

/* ==========================================================================
   ETAPA 2 — Construção (painel + preview)
   ========================================================================== */
.co-layout {
  display: grid;
  grid-template-columns: 1fr 0.85fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.co-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3vw, 38px);
  min-height: 460px;
}

.co-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.co-panel h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(26px, 3vw, 36px);
  line-height: 1.1;
  color: var(--teal-deep);
  margin: 0 0 6px;
}

.co-sub {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 24px;
}

/* Progresso */
.co-progress {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.co-progress-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.co-progress-fill {
  height: 100%;
  width: 20%;
  border-radius: 999px;
  background: var(--teal);
  transition: width .5s cubic-bezier(.16, 1, .3, 1);
}

.co-progress-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--muted);
  white-space: nowrap;
}

/* Campos */
.co-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}

.co-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.co-input,
.co-textarea {
  width: 100%;
  font-family: inherit;
  font-size: 15px;
  color: var(--teal-deep);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .2s, box-shadow .2s;
}

.co-textarea {
  resize: vertical;
  min-height: 60px;
  line-height: 1.5;
}

.co-textarea-lg {
  font-size: 17px;
  min-height: 92px;
}

.co-input::placeholder,
.co-textarea::placeholder {
  color: var(--muted-soft);
}

.co-input:focus,
.co-textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(0, 96, 87, .12);
}

/* Dica e feedback */
.co-hint {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  margin: 10px 0 0;
}

.co-hint strong {
  color: var(--teal);
}

.co-feedback {
  margin-top: 12px;
}

.co-feedback:empty {
  margin-top: 0;
}

.co-flag {
  font-size: 13.5px;
  line-height: 1.5;
  border-radius: 12px;
  padding: 12px 14px;
}

.co-flag-warn {
  background: rgba(213, 165, 0, .10);
  border: 1px solid rgba(213, 165, 0, .35);
  color: #6b5400;
}

.co-flag-ok {
  background: rgba(0, 96, 87, .08);
  border: 1px solid rgba(0, 96, 87, .22);
  color: var(--teal-deep);
}

/* Toggle Sim/Não */
.co-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.co-toggle-opt {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--teal-deep);
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  padding: 13px 14px;
  text-align: center;
  transition: all .18s;
}

.co-toggle-opt:hover {
  border-color: var(--teal);
}

.co-toggle-opt.is-active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 2px 8px rgba(0, 96, 87, .25);
}

.co-coach {
  margin: 12px 0 0;
  font-size: 13.5px;
  line-height: 1.55;
  color: #6b5400;
  background: rgba(213, 165, 0, .10);
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  padding: 12px 14px;
}

.co-coach strong {
  color: var(--teal-deep);
}

/* Revisão dentro do passo final */
.co-review {
  margin-top: 24px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.co-review-frase {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(19px, 2.4vw, 24px);
  line-height: 1.4;
  color: var(--teal-deep);
  margin: 8px 0 0;
}

/* Rodapé de ações */
.co-panel-foot {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
}

.co-panel-foot:has(.btn:only-child) {
  justify-content: flex-end;
}

/* ==========================================================================
   PREVIEW AO VIVO (direita)
   ========================================================================== */
.co-preview-wrap {
  position: sticky;
  top: 92px;
}

.co-preview-card {
  background: var(--teal-deep);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3vw, 32px);
  color: #fff;
}

.co-preview-card .co-kicker {
  color: var(--gold-soft);
}

.co-preview-frase {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(22px, 2.8vw, 28px);
  line-height: 1.32;
  color: #fff;
  margin: 6px 0 0;
  min-height: 2.6em;
}

.co-preview-frase .co-ph {
  color: var(--gold-soft);
  font-style: italic;
}

/* Checklist SMART */
.co-checklist {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.co-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  line-height: 1.35;
  color: rgba(255, 255, 255, .58);
  transition: color .3s;
}

.co-check strong {
  font-weight: 600;
  color: rgba(255, 255, 255, .82);
  transition: color .3s;
}

.co-check-dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .3);
  position: relative;
  transition: all .3s;
}

.co-check.is-done {
  color: rgba(255, 255, 255, .9);
}

.co-check.is-done strong {
  color: #fff;
}

.co-check.is-done .co-check-dot {
  background: var(--gold);
  border-color: var(--gold);
}

.co-check.is-done .co-check-dot::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2.5px;
  width: 4px;
  height: 9px;
  border: solid var(--teal-deep);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* ==========================================================================
   ETAPA 3 — Formulário / sucesso / oferta
   ========================================================================== */
.co-final {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  align-items: start;
}

.co-final-copy h2 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: clamp(28px, 3.4vw, 40px);
  color: var(--teal-deep);
  margin: 0 0 16px;
  line-height: 1.08;
}

.co-final-copy p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 14px;
  max-width: 50ch;
}

.co-final-preview {
  margin-top: 22px;
  background: var(--paper-warm);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-md);
  padding: 18px 20px;
}

.co-form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(24px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.co-copy-field .co-label {
  color: var(--teal);
}

.co-err {
  color: #c0392b;
  font-size: 12.5px;
  min-height: 1em;
  margin: 4px 0 0;
}

.co-alert {
  border-radius: var(--r-md);
  padding: 18px 20px;
  font-size: 15px;
  line-height: 1.55;
}

.co-alert-success {
  background: rgba(0, 96, 87, .08);
  border: 1px solid rgba(0, 96, 87, .25);
  color: var(--teal-deep);
}

.co-offer {
  margin-top: 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 4px solid var(--gold);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 24px 26px;
}

.co-offer h3 {
  font-family: var(--f-display);
  font-weight: 400;
  font-size: 24px;
  color: var(--teal-deep);
  margin: 0 0 10px;
}

.co-offer p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 18px;
}

/* ==========================================================================
   RESPONSIVO
   ========================================================================== */
@media (max-width: 900px) {
  .co-intro,
  .co-layout,
  .co-final {
    grid-template-columns: 1fr;
  }

  .co-intro-art {
    order: -1;
    max-width: 260px;
    margin: 0 auto;
  }

  .co-preview-wrap {
    position: static;
    order: -1;
    margin-bottom: 22px;
  }

  .co-preview-frase {
    min-height: 0;
  }
}

@media (max-width: 480px) {
  .co-toggle {
    grid-template-columns: 1fr;
  }

  .co-panel-foot {
    flex-direction: column-reverse;
  }

  .co-panel-foot .btn {
    width: 100%;
  }
}
