/* ============================================================
   G7 Elevadores — Diagnóstico Interativo (/diagnostico/avaliar/)
   Mesmo design system da LP.
   ============================================================ */

:root {
  --bg: #081722;
  --panel: #0f2a40;
  --cyan: #56c8e8;
  --cyan-soft: #7fdcf5;
  --cyan-strong: #2ea7cf;
  --orange: #f19b4c;
  --orange-strong: #e07f24;
  --red: #e5695f;
  --green: #7ddfa8;
  --text: #eaf2f8;
  --text-soft: #b9cad8;
  --text-muted: #8ea6b8;
  --radius: 1.2rem;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 4px; }

body {
  font-family: 'Inter', 'Inter Fallback', system-ui, -apple-system, sans-serif;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }

.wrap {
  width: 100%;
  max-width: 720px;
  margin-inline: auto;
  padding-inline: 1.2rem;
}

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 23, 34, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.7rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}

.logo span:last-child, .logo > span:not(.logo-chip) { color: var(--cyan); }

.logo-chip {
  display: inline-grid;
  place-items: center;
  background: #fff;
  border-radius: 0.5rem;
  padding: 0.26rem 0.4rem;
}

.logo-chip img { width: 28px; height: 23px; }

.header-tag {
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
}

.progress {
  height: 3px;
  background: rgba(255, 255, 255, 0.07);
}

.progress-bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--cyan), var(--cyan-strong));
  transition: width 0.4s ease;
}

/* ---------- Main ---------- */
main { flex: 1; padding-block: 2rem 3rem; }

.step-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.8rem;
}

.step-eyebrow::before {
  content: "";
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

h1, h2 {
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  color: #fff;
  text-wrap: balance;
}

h1 { font-size: clamp(1.5rem, 5vw, 2.2rem); }
h2 { font-size: clamp(1.25rem, 4vw, 1.7rem); }

.grad {
  background: linear-gradient(95deg, #8ae2f8, #2ea7cf);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lead-text {
  margin-top: 1rem;
  color: var(--text-soft);
  max-width: 52ch;
}

.lead-text strong { color: #fff; font-weight: 600; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 0;
  border-radius: 0.8rem;
  padding: 1.05rem 2rem;
  cursor: pointer;
  transition: transform 0.25s, filter 0.25s;
}

.btn:hover { filter: brightness(1.08); transform: translateY(-2px); }
.btn:disabled { opacity: 0.6; cursor: default; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, #6fd6f2, #2ea7cf);
  color: #06222f;
  box-shadow: 0 10px 30px rgba(86, 200, 232, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--orange), var(--orange-strong));
  color: #221204;
  box-shadow: 0 10px 30px rgba(241, 155, 76, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-soft);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.btn-block { width: 100%; }

.step-nav {
  display: flex;
  gap: 0.8rem;
  margin-top: 2rem;
}

.step-nav .btn-primary, .step-nav .btn-secondary { flex: 1; }

/* ---------- Cards / intro ---------- */
.panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  padding: clamp(1.6rem, 5vw, 2.5rem);
  border: 1px solid transparent;
  background:
    linear-gradient(180deg, var(--panel), #0a1e2f) padding-box,
    linear-gradient(160deg, rgba(86, 200, 232, 0.45), rgba(255, 255, 255, 0.06) 45%, rgba(241, 155, 76, 0.4)) border-box;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
}

.intro-list {
  list-style: none;
  display: grid;
  gap: 0.7rem;
  margin-top: 1.4rem;
  color: var(--text-soft);
  font-size: 0.95rem;
}

.intro-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}

.intro-list svg { flex: none; margin-top: 0.25rem; }

.intro-note {
  margin-top: 1.4rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Perguntas ---------- */
.section-count {
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  margin-bottom: 0.4rem;
}

.question {
  margin-top: 1.6rem;
  padding: 1.2rem 1.1rem;
  border-radius: 0.9rem;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: border-color 0.25s;
}

.question.missing { border-color: var(--red); }

.question-text {
  font-weight: 600;
  color: #fff;
  font-size: 0.98rem;
  line-height: 1.45;
}

.question-text .q-num { color: var(--cyan); margin-right: 0.35rem; }

.opts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.opt {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-soft);
  border-radius: 0.65rem;
  padding: 0.7rem 0.4rem;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.opt:hover { border-color: rgba(255, 255, 255, 0.3); }

.opt.sel-sim { background: rgba(125, 223, 168, 0.14); border-color: var(--green); color: var(--green); }
.opt.sel-nao { background: rgba(229, 105, 95, 0.14); border-color: var(--red); color: #f0938b; }
.opt.sel-naosei { background: rgba(241, 155, 76, 0.14); border-color: var(--orange); color: var(--orange); }

/* ---------- Fotos ---------- */
.photo-block {
  margin-top: 1.8rem;
  padding-top: 1.4rem;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

.photo-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.88rem;
  color: var(--text-soft);
}

.photo-label svg { flex: none; margin-top: 0.15rem; }
.photo-label em { color: var(--text-muted); font-style: normal; }

.photo-add {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  padding: 0.6rem 1.1rem;
  border-radius: 0.65rem;
  border: 1px dashed rgba(86, 200, 232, 0.5);
  background: rgba(86, 200, 232, 0.06);
  color: var(--cyan-soft);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.photo-add input { display: none; }

.photo-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.photo-thumb {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 0.6rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.photo-thumb img { width: 100%; height: 100%; object-fit: cover; }

.photo-del {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(8, 23, 34, 0.85);
  color: #fff;
  font-size: 0.8rem;
  line-height: 1;
  cursor: pointer;
}

/* ---------- Formulário de lead ---------- */
.form-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.6rem;
}

@media (min-width: 560px) {
  .form-grid { grid-template-columns: 1fr 1fr; }
}

.form-field label {
  display: block;
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.35rem;
}

.form-field input {
  width: 100%;
  font: inherit;
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 0.6rem;
  padding: 0.8rem 0.95rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-field input::placeholder { color: rgba(234, 242, 248, 0.35); }

.form-field input:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(86, 200, 232, 0.2);
}

.form-field input.invalid {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(229, 105, 95, 0.2);
}

.consent {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-top: 1.2rem;
  font-size: 0.82rem;
  color: var(--text-muted);
  cursor: pointer;
}

.consent input {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--cyan);
  flex: none;
}

.consent.invalid { color: var(--red); }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-note {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---------- Resultado ---------- */
.result-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  margin-block: 1.2rem 0.6rem;
}

.prio-alta { background: rgba(229, 105, 95, 0.15); border: 1px solid var(--red); color: #f0938b; }
.prio-media { background: rgba(241, 155, 76, 0.15); border: 1px solid var(--orange); color: var(--orange); }
.prio-baixa { background: rgba(125, 223, 168, 0.15); border: 1px solid var(--green); color: var(--green); }

.result-summary { color: var(--text-soft); max-width: 54ch; }
.result-summary strong { color: #fff; }

.attn-group { margin-top: 1.8rem; }

.attn-title {
  font-family: 'Sora', 'Sora Fallback', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.6rem;
}

.attn-list { list-style: none; display: grid; gap: 0.55rem; }

.attn-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-size: 0.9rem;
  color: var(--text-soft);
  padding: 0.65rem 0.8rem;
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.035);
  border-left: 3px solid var(--orange);
}

.attn-list li.risco { border-left-color: var(--red); }

.attn-sec { color: var(--text-muted); font-size: 0.78rem; display: block; }

.result-actions {
  display: grid;
  gap: 0.8rem;
  margin-top: 2rem;
}

@media (min-width: 560px) {
  .result-actions { grid-template-columns: 1fr 1fr; }
}

.result-note { margin-top: 1.2rem; font-size: 0.8rem; color: var(--text-muted); text-align: center; }

.btn-whats {
  background: linear-gradient(135deg, #35d06a, #1faa52);
  color: #06220f;
  box-shadow: 0 10px 30px rgba(53, 208, 106, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.restart {
  display: block;
  margin: 1.6rem auto 0;
  background: none;
  border: 0;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

/* ---------- Footer ---------- */
.app-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: #060f18;
  padding-block: 1.4rem;
  text-align: center;
}

.app-footer p { font-size: 0.78rem; color: var(--text-muted); }
.app-footer a { color: var(--cyan); text-decoration: none; }
.disclaimer { margin-top: 0.4rem; font-size: 0.72rem; color: #64798a; }

/* ---------- Transição entre etapas ---------- */
.screen { animation: fade-up 0.35s ease both; }

@keyframes fade-up {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .screen { animation: none; }
  .btn { transition: none; }
  .progress-bar { transition: none; }
}
