/* =========================================================
   RSTECH — página "Começar um projeto" (briefing em etapas)
   Reaproveita tokens, botões e campos de styles.css
   ========================================================= */

.page-projeto { min-height: 100svh; }
/* garante que etapas e botões ocultos não sejam reexibidos pelo display do layout */
.page-projeto [hidden] { display: none !important; }
.back-link { min-height: 44px; font-size: .9375rem; color: rgba(245, 245, 247, .82); }
.chev-back { transition: transform .3s var(--ease); }
.back-link:hover .chev-back { transform: translateX(-3px); }

.briefing-main {
  position: relative; isolation: isolate; overflow: hidden;
  padding: calc(var(--header-h) + clamp(40px, 6vw, 80px)) 0 clamp(64px, 8vw, 112px);
}
.briefing-main .ambient span {
  width: 70vw; height: 70vw; max-width: 1000px; max-height: 1000px;
  left: -20%; top: -40%;
  background: radial-gradient(closest-side, rgba(112, 0, 255, .38), rgba(112, 0, 255, 0));
}

.briefing-grid {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(32px, 6vw, 96px); align-items: start;
}

/* ---------- Lateral ---------- */
.briefing-aside { position: sticky; top: calc(var(--header-h) + 32px); }
.briefing-aside h1 { font-size: clamp(2.25rem, 4.2vw, 3.5rem); }
.briefing-aside .section-text { margin-top: 20px; font-size: 1.0625rem; }

.progress { margin-top: 40px; display: grid; gap: 2px; counter-reset: s; }
.progress li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 0; color: var(--muted); font-size: .9875rem;
  border-top: 1px solid var(--line);
  transition: color .3s;
}
.progress li span {
  font: 500 .75rem/1 var(--mono); width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--line-2);
  transition: background-color .3s, border-color .3s, color .3s;
}
.progress li.is-done { color: var(--white); }
.progress li.is-done span { border-color: rgba(168, 85, 247, .6); color: var(--violet); }
.progress li.is-current { color: var(--white); }
.progress li.is-current span { background: var(--yellow); border-color: var(--yellow); color: var(--bg); }
.save-note { margin-top: 20px; font-size: .8125rem; color: var(--muted); }

/* ---------- Cartão do formulário ---------- */
.briefing {
  position: relative;
  background: var(--graphite); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 48px);
  display: grid; gap: 24px;
}
.briefing-bar { position: absolute; top: 0; left: 0; right: 0; height: 3px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; background: var(--line); }
.briefing-bar span { display: block; height: 100%; width: 20%; background: linear-gradient(90deg, var(--purple), var(--violet)); transition: width .5s var(--ease); }
.step-count { font: 500 .75rem/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--violet); }

.bstep { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 22px; }
.step-title { font-size: clamp(1.5rem, 2.4vw, 2rem); font-weight: 500; letter-spacing: -.03em; line-height: 1.15; padding: 0; margin-bottom: 4px; }
.step-help { color: var(--muted); margin-top: -12px; }
.field-label { font-weight: 500; font-size: .9375rem; }

input[type="tel"], input[type="email"] {
  width: 100%; font: 400 1rem/1.5 var(--font); color: var(--white);
  background: #0E0C14; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  padding: 13px 16px; transition: border-color .25s, box-shadow .25s;
}
input[type="tel"]:hover, input[type="email"]:hover { border-color: rgba(245, 245, 247, .3); }
input[type="tel"]:focus-visible, input[type="email"]:focus-visible { outline: none; border-color: var(--violet); box-shadow: 0 0 0 4px rgba(168, 85, 247, .2); }
::placeholder { color: rgba(167, 163, 181, .7); }

/* opções grandes (etapa 1) */
.options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.option { position: relative; cursor: pointer; }
.option input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.option span {
  display: grid; gap: 4px; height: 100%;
  padding: 18px 18px 18px 50px; border-radius: var(--r-md);
  border: 1px solid var(--line-2); background: rgba(245, 245, 247, .02);
  position: relative;
  transition: border-color .25s, background-color .25s, box-shadow .25s;
}
.option span::before {
  content: ""; position: absolute; left: 18px; top: 20px;
  width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--line-2);
  transition: background-color .2s, border-color .2s;
}
.option span::after {
  content: ""; position: absolute; left: 24px; top: 23px; width: 6px; height: 10px;
  border: solid var(--bg); border-width: 0 2px 2px 0; transform: rotate(45deg) scale(0);
  transition: transform .2s var(--ease);
}
.option b { font-weight: 500; font-size: 1.0625rem; }
.option small { color: var(--muted); font-size: .875rem; }
.option:hover span { border-color: rgba(168, 85, 247, .5); }
.option input:checked + span { border-color: var(--violet); background: rgba(112, 0, 255, .12); box-shadow: 0 10px 30px -18px rgba(112, 0, 255, .9); }
.option input:checked + span::before { background: var(--yellow); border-color: var(--yellow); }
.option input:checked + span::after { transform: rotate(45deg) scale(1); }
.option input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }

/* etiquetas (checkbox/radio em pílula) */
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { position: relative; cursor: pointer; }
.tag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tag span {
  display: inline-flex; align-items: center; min-height: 42px; padding: 8px 16px;
  border-radius: 999px; border: 1px solid var(--line-2); font-size: .9375rem;
  transition: border-color .25s, background-color .25s, color .25s;
}
.tag:hover span { border-color: rgba(168, 85, 247, .5); }
.tag input:checked + span { background: linear-gradient(135deg, var(--purple), #8B2CF5); border-color: transparent; color: #fff; }
.tag input:focus-visible + span { outline: 2px solid var(--yellow); outline-offset: 2px; }

.field-error { color: #FFB4B4; font-size: .9375rem; }
.field-error:empty { display: none; }

/* resumo */
.summary { border: 1px solid var(--line-2); border-radius: var(--r-md); overflow: hidden; }
.summary-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 10px 10px 18px; border-bottom: 1px solid var(--line); background: rgba(245, 245, 247, .02); }
.summary-head h2 { font-size: 1rem; font-weight: 500; letter-spacing: -.01em; }
.copy-btn { min-height: 40px; background: none; border: 0; cursor: pointer; font: 500 .875rem var(--font); color: var(--violet); padding: 0 8px; }
.copy-btn:hover { color: var(--white); }
#resumo {
  margin: 0; padding: 18px; max-height: 280px; overflow: auto;
  font: 400 .875rem/1.6 var(--mono); color: #D4D0DE; white-space: pre-wrap; word-break: break-word;
}

.briefing-nav { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; border-top: 1px solid var(--line); padding-top: 24px; }
.briefing-nav #avancar, .briefing-nav #enviar { margin-left: auto; }

/* transição entre etapas */
@media (prefers-reduced-motion: no-preference) {
  .bstep.is-entering { animation: step-in .45s var(--ease) both; }
}
@keyframes step-in { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }

@media (max-width: 939px) {
  .briefing-grid { grid-template-columns: 1fr; }
  .briefing-aside { position: static; }
  .progress, .save-note { display: none; }
}
@media (max-width: 539px) {
  .options { grid-template-columns: 1fr; }
  .briefing-nav .btn { flex: 1; }
  .back-link { font-size: 0; gap: 0; }           /* só a seta no celular */
  .back-link .chev-back { width: 20px; height: 20px; }
}
