/* ── RESET & BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --purple: #492afc;
  --purple-light: #e6e7ff;
  --purple-dark: #3318d4;
  --dark: #0c0719;
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-400: #9ca3af;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08), 0 4px 16px rgba(0,0,0,.06);
  --shadow-md: 0 4px 24px rgba(73,42,252,.12);

  /* Block colors */
  --c-financeiro: #059669;
  --c-operacional: #d97706;
  --c-clientes: #dc2626;
  --c-dados: #2563eb;
  --c-tecnologia: #492afc;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--gray-900);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ── NAV ──────────────────────────────────────────────────── */
.nav {
  padding: 24px 32px;
  display: flex;
  align-items: center;
}

.nav-logo {
  height: 36px;
  width: auto;
}

/* ── LANDING ──────────────────────────────────────────────── */
#landing {
  min-height: 100vh;
  background: var(--white);
}

.hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 48px 24px 80px;
  text-align: center;
}

.badge {
  display: inline-block;
  background: var(--purple-light);
  color: var(--purple);
  font-size: 13px;
  font-weight: 600;
  padding: 4px 14px;
  border-radius: 999px;
  margin-bottom: 24px;
  letter-spacing: .02em;
}

.hero h1 {
  font-size: clamp(28px, 5vw, 44px);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}

.hero-sub {
  font-size: 18px;
  color: var(--gray-600);
  margin-bottom: 36px;
  line-height: 1.7;
}

.benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: left;
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 36px;
}

.benefits li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 15px;
  color: var(--gray-700);
}

.benefit-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  margin-top: 1px;
}

.trust-note {
  margin-top: 16px;
  font-size: 13px;
  color: var(--gray-400);
}

/* ── BUTTONS ──────────────────────────────────────────────── */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--purple);
  color: white;
  border: none;
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  padding: 12px 24px;
  cursor: pointer;
  transition: background .15s, transform .1s;
  text-decoration: none;
}

.btn-primary:hover { background: var(--purple-dark); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }

.btn-large {
  font-size: 17px;
  padding: 16px 32px;
  border-radius: var(--radius);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  color: var(--gray-700);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  padding: 11px 22px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}

.btn-secondary:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-light); }

.btn-ghost {
  background: none;
  border: none;
  color: var(--gray-400);
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
  text-decoration: underline;
}

.btn-ghost:hover { color: var(--gray-600); }

/* ── FORM SECTION ─────────────────────────────────────────── */
#form-section {
  min-height: 100vh;
  background: var(--gray-50);
}

.form-header {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  padding: 20px 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.progress-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 16px;
}

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

.progress-fill {
  height: 100%;
  background: var(--purple);
  border-radius: 999px;
  transition: width .4s ease;
  width: 11%;
}

.progress-label {
  font-size: 13px;
  color: var(--gray-600);
  font-weight: 500;
  white-space: nowrap;
}

.form-body {
  max-width: 640px;
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.step-title {
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.step-subtitle {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 32px;
}

/* ── QUESTION CARDS ───────────────────────────────────────── */
.question-block {
  margin-bottom: 32px;
}

.question-text {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-900);
  margin-bottom: 14px;
  line-height: 1.5;
}

.options-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.option-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  user-select: none;
}

.option-card:hover {
  border-color: var(--purple);
  background: var(--purple-light);
}

.option-card.selected {
  border-color: var(--purple);
  background: var(--purple-light);
}

.option-card input[type="radio"] {
  accent-color: var(--purple);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.option-label {
  font-size: 15px;
  color: var(--gray-700);
  line-height: 1.4;
}

/* Scale (1-5) */
.scale-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.scale-card {
  flex: 1;
  min-width: 52px;
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: var(--white);
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 20px;
  font-weight: 700;
  color: var(--gray-700);
  transition: border-color .15s, background .15s;
  user-select: none;
}

.scale-card:hover, .scale-card.selected {
  border-color: var(--purple);
  background: var(--purple-light);
  color: var(--purple);
}

/* Text inputs (step 9) */
.input-group {
  margin-bottom: 20px;
}

.input-label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-700);
  margin-bottom: 8px;
}

.input-field {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 15px;
  color: var(--gray-900);
  background: var(--white);
  transition: border-color .15s;
  outline: none;
}

.input-field:focus { border-color: var(--purple); }

/* Nav buttons */
.form-nav {
  display: flex;
  gap: 12px;
  margin-top: 40px;
}

.error-msg {
  color: #dc2626;
  font-size: 14px;
  margin-top: 12px;
  min-height: 20px;
}

/* ── REPORT SECTION ───────────────────────────────────────── */
#report-section {
  background: var(--gray-50);
  padding: 40px 24px 80px;
}

.report-wrap {
  max-width: 760px;
  margin: 0 auto;
}

.report-header {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 24px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 24px;
}

.report-logo { height: 32px; width: auto; }

.report-meta {
  font-size: 14px;
  color: var(--gray-600);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.meta-sep { color: var(--gray-400); }

/* Score section */
.score-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  display: flex;
  align-items: center;
  gap: 32px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.score-circle {
  flex-shrink: 0;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--purple-light);
  border: 3px solid var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
}

.score-number {
  font-size: 42px;
  font-weight: 800;
  color: var(--purple);
  line-height: 1;
}

.score-max {
  font-size: 16px;
  color: var(--purple);
  font-weight: 600;
}

.score-info { flex: 1; }

.level-badge {
  display: inline-flex;
  flex-direction: column;
  border: 2px solid;
  border-radius: var(--radius-sm);
  padding: 8px 16px;
  margin-bottom: 12px;
}

.level-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--gray-600);
}

.level-name {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
}

.level-desc {
  font-size: 15px;
  color: var(--gray-600);
  line-height: 1.65;
}

/* Profile context */
.profile-context {
  background: var(--dark);
  color: var(--white);
  border-radius: var(--radius);
  padding: 20px 28px;
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 24px;
}

.profile-context strong { color: var(--purple-light); }

/* Radar */
.radar-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}

.section-sub {
  font-size: 14px;
  color: var(--gray-600);
  margin-bottom: 24px;
}

.radar-container {
  max-width: 380px;
  margin: 0 auto 24px;
}

.radar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: center;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--gray-700);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Block cards */
.blocks-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.blocks-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.block-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px;
  border-left-width: 4px;
}

.block-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.block-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.block-score-bar-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.block-score-bar {
  flex: 1;
  height: 6px;
  background: var(--gray-200);
  border-radius: 999px;
  overflow: hidden;
}

.block-score-fill {
  height: 100%;
  border-radius: 999px;
}

.block-score-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--gray-600);
  white-space: nowrap;
}

.block-diagnosis {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
}

/* Priorities */
.priorities-section {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 32px;
  margin-bottom: 24px;
}

.priorities-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 24px;
}

.priority-card {
  border: 1.5px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 20px;
}

.priority-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.priority-number {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.priority-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gray-900);
}

.priority-rec {
  font-size: 14px;
  color: var(--gray-600);
  line-height: 1.65;
  font-style: italic;
}

/* CTA */
.cta-section {
  margin-bottom: 24px;
}

.cta-box {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}

.cta-box h3 {
  font-size: 22px;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.4;
}

.cta-box p {
  font-size: 15px;
  color: var(--purple-light);
  margin-bottom: 28px;
  line-height: 1.7;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.btn-cta {
  font-size: 17px;
  padding: 18px 36px;
  border-radius: var(--radius);
}

.cta-note {
  font-size: 13px;
  color: var(--gray-400);
  margin-top: 16px;
  margin-bottom: 0 !important;
}

.cta-whatsapp {
  margin-top: 12px !important;
  font-size: 14px;
  color: var(--gray-400);
  margin-bottom: 0 !important;
}

.cta-whatsapp a {
  color: var(--purple-light);
  text-decoration: underline;
}

/* Report actions */
.report-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: center;
  margin-top: 8px;
}

/* Loading overlay */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,.85);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 100;
  font-size: 16px;
  color: var(--gray-700);
  font-weight: 500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--purple-light);
  border-top-color: var(--purple);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── PONTOS FORTES / GAPS ─────────────────────────────────── */
.sg-section { margin-bottom: 24px; }

.sg-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 600px) { .sg-grid { grid-template-columns: 1fr; } }

.sg-card {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 24px;
}

.sg-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.sg-title-green  { color: #22c55e; }
.sg-title-red    { color: #f87171; }
.sg-title-purple { color: var(--purple-light); }

.sg-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.sg-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #d1d5db;
  line-height: 1.5;
}

.sg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 5px;
}

.sg-dot-green  { background: #22c55e; }
.sg-dot-red    { background: #f87171; }

/* ── PRÓXIMOS PASSOS ──────────────────────────────────────── */
.nextsteps-section { margin-bottom: 24px; }

.nextsteps-card {
  background: var(--dark);
  border-radius: var(--radius);
  padding: 32px;
}

.nextsteps-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.nextstep-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.nextstep-num {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--purple);
  color: white;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nextstep-content { flex: 1; }

.nextstep-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--purple-light);
  margin-bottom: 6px;
}

.nextstep-action {
  color: var(--purple-light);
  font-weight: 600;
}

.nextstep-desc {
  font-size: 14px;
  color: #9ca3af;
  line-height: 1.65;
}

/* ── PRINT ────────────────────────────────────────────────── */
@media print {
  body { background: white; }
  #landing, #form-section { display: none !important; }
  #report-section { display: block !important; padding: 0; background: white; }
  .no-print { display: none !important; }
  .report-wrap { max-width: 100%; }
  .report-header, .score-section, .radar-section,
  .blocks-section, .priorities-section {
    box-shadow: none;
    border: 1px solid #e5e7eb;
    page-break-inside: avoid;
    margin-bottom: 16px;
  }
  .profile-context { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cta-section { display: none; }
}

/* ── RESPONSIVE ───────────────────────────────────────────── */
@media (max-width: 600px) {
  .form-header { padding: 16px; gap: 16px; flex-direction: column; align-items: flex-start; }
  .report-header { flex-direction: column; }
  .score-section { flex-direction: column; align-items: flex-start; }
  .cta-box { padding: 28px 20px; }
  .form-nav { flex-direction: column-reverse; }
  .form-nav .btn-primary, .form-nav .btn-secondary { width: 100%; justify-content: center; }
}
