/* ===== Sócias Club · Diagnóstico — identidade "quiet luxury" (café/creme + bordô) ===== */
:root {
  --cream: #F3ECE2;
  --cream-2: #EDE4D7;
  --paper: #FBF8F2;
  --espresso: #241A14;
  --coffee: #47372C;
  --brown: #7A5A44;
  --brown-soft: #9A7C64;
  --beige: #C9B49A;
  --line: #E3D6C4;
  --line-2: #D8C8B3;
  --wine: #6B2233;
  --wine-hover: #8A2E42;
  --wine-tint: #F2E4E5;
  --shadow: 0 30px 60px -34px rgba(36, 26, 20, 0.45);
  --shadow-sm: 0 14px 30px -22px rgba(36, 26, 20, 0.4);
  --r: 22px;
  --r-sm: 14px;
  --sans: 'Archivo', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  color: var(--espresso);
  background:
    radial-gradient(1200px 700px at 50% -280px, #FBF6EE 0%, rgba(251, 246, 238, 0) 70%),
    var(--cream);
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

/* barra de progresso fixa no topo */
.progress-track {
  position: fixed; top: 0; left: 0; right: 0; height: 4px;
  background: var(--line); z-index: 20;
}
.progress-fill {
  display: block; height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--brown), var(--wine));
  transition: width .5s cubic-bezier(.22,.61,.36,1);
}

.stage {
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 32px) 96px;
  display: flex; flex-direction: column;
  min-height: 100dvh;
  justify-content: center;
}

/* animação de troca de tela */
.screen { animation: rise .45s cubic-bezier(.22,.61,.36,1) both; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- marca / cabeçalho ---------- */
.brand {
  font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
  font-size: 12px; color: var(--brown);
}
.brand b { font-weight: 900; color: var(--wine); }
.eyebrow {
  font-size: 12px; letter-spacing: .22em; text-transform: uppercase;
  color: var(--brown-soft); font-weight: 700;
}

/* ---------- intro ---------- */
.intro-kicker { margin-bottom: 26px; }
.intro-title {
  font-weight: 800; letter-spacing: -0.03em; line-height: 1.05;
  font-size: clamp(34px, 8vw, 58px); margin: 0 0 20px;
}
.intro-title .serif {
  font-family: var(--serif); font-style: italic; font-weight: 400;
  letter-spacing: 0; color: var(--wine);
}
.intro-lede {
  font-size: clamp(16px, 2.4vw, 19px); line-height: 1.6; color: var(--coffee);
  max-width: 46ch; margin: 0 0 30px;
}
.meta-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 34px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: 999px; padding: 9px 15px;
  font-size: 13px; font-weight: 600; color: var(--coffee);
  box-shadow: var(--shadow-sm);
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--wine); }

/* ---------- botões ---------- */
.btn {
  font-family: var(--sans); font-weight: 700; font-size: 16px;
  border: none; border-radius: 999px; padding: 16px 30px;
  cursor: pointer; transition: transform .15s, background .2s, box-shadow .2s, color .2s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-primary { background: var(--wine); color: #FBF3EE; box-shadow: 0 18px 34px -20px rgba(107,34,51,.8); }
.btn-primary:hover { background: var(--wine-hover); transform: translateY(-1px); }
.btn-primary:disabled { background: var(--line-2); color: #A8977F; box-shadow: none; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: transparent; color: var(--coffee); padding: 14px 8px;
  font-weight: 600;
}
.btn-ghost:hover { color: var(--wine); }
.btn-block { width: 100%; }

/* ---------- perguntas ---------- */
.q-head { margin-bottom: 22px; }
.q-count { font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--brown-soft); font-weight: 700; }
.q-title {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.2;
  font-size: clamp(21px, 4.2vw, 27px); margin: 10px 0 4px;
}
.q-hint { font-size: 13.5px; color: var(--brown-soft); font-weight: 500; }

.q-block + .q-block { margin-top: 30px; padding-top: 30px; border-top: 1px solid var(--line); }

.options { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.opt {
  position: relative;
  display: flex; align-items: center; gap: 14px;
  background: var(--paper); border: 1.5px solid var(--line);
  border-radius: var(--r-sm); padding: 15px 17px;
  cursor: pointer; transition: border-color .18s, background .18s, transform .12s;
  text-align: left; font: inherit; color: var(--espresso); width: 100%;
}
.opt:hover { border-color: var(--line-2); transform: translateY(-1px); }
.opt .mark {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--line-2); background: #fff; transition: border-color .18s, background .18s;
  display: grid; place-items: center;
}
.opt.multi .mark { border-radius: 7px; }
.opt .mark::after {
  content: ''; width: 9px; height: 9px; border-radius: 50%;
  background: var(--wine); transform: scale(0); transition: transform .16s;
}
.opt.multi .mark::after { border-radius: 3px; }
.opt .lbl { font-size: 15.5px; line-height: 1.4; font-weight: 500; }
.opt.selected { border-color: var(--wine); background: var(--wine-tint); }
.opt.selected .mark { border-color: var(--wine); }
.opt.selected .mark::after { transform: scale(1); }
.opt.selected .lbl { font-weight: 600; }

/* campo condicional / texto livre */
.qual { margin-top: 10px; }
.field {
  width: 100%; font: inherit; font-size: 15px; color: var(--espresso);
  background: var(--paper); border: 1.5px solid var(--line-2);
  border-radius: var(--r-sm); padding: 14px 16px; resize: vertical;
  transition: border-color .18s;
}
.field:focus { outline: none; border-color: var(--wine); }
.field::placeholder { color: #B4A48C; }
textarea.field { min-height: 108px; line-height: 1.5; }
.qual .field { margin-top: 2px; }
.qual-lbl { font-size: 13px; font-weight: 600; color: var(--brown); margin: 0 0 6px 2px; }

.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 34px;
}
.nav .spacer { flex: 1; }

/* ---------- carregando ---------- */
.loading { text-align: center; }
.loading .spinner {
  width: 46px; height: 46px; margin: 0 auto 24px;
  border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--wine);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-title { font-family: var(--serif); font-style: italic; font-size: clamp(24px, 5vw, 32px); color: var(--wine); margin: 0 0 8px; }
.loading-sub { color: var(--brown-soft); font-size: 15px; }

/* ---------- resultado ---------- */
.result-head { margin-bottom: 26px; }
.result-title {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.12;
  font-size: clamp(26px, 5.4vw, 38px); margin: 10px 0 0;
}
.result-title .serif { font-family: var(--serif); font-style: italic; font-weight: 400; color: var(--wine); }

.path { border-radius: var(--r); padding: clamp(22px, 4vw, 30px); margin-bottom: 16px; }
.path-top { background: var(--espresso); color: #F4ECE2; box-shadow: var(--shadow); }
.path-rank { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; font-weight: 800; }
.path-top .path-rank { color: #E0B9A0; }
.path-name {
  font-weight: 800; letter-spacing: -0.02em; line-height: 1.12;
  font-size: clamp(24px, 5.2vw, 34px); margin: 12px 0 4px;
}
.path-top .path-name { color: #FBF3EC; }
.path-sections { margin-top: 20px; display: flex; flex-direction: column; gap: 16px; }
.sec-lbl { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; font-weight: 800; color: #C79A82; margin-bottom: 5px; }
.sec-txt { font-size: 15px; line-height: 1.55; color: #EAD9C9; }
.sec-txt strong { color: #fff; }

.step {
  margin-top: 4px; background: rgba(201, 138, 110, .16);
  border: 1px solid rgba(201, 138, 110, .3); border-radius: var(--r-sm);
  padding: 16px 18px;
}
.step .sec-lbl { color: #E7B79C; }
.step .sec-txt { color: #F6E9DC; font-weight: 500; }

.path-alt { background: var(--paper); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.path-alt .path-rank { color: var(--brown); }
.path-alt .path-name { font-size: clamp(19px, 4vw, 24px); color: var(--espresso); margin-top: 8px; }
.path-alt .sec-txt { color: var(--coffee); margin-top: 8px; font-size: 14.5px; }

.closing {
  font-family: var(--serif); font-style: italic; font-size: clamp(17px, 2.6vw, 20px);
  line-height: 1.5; color: var(--coffee); text-align: center;
  margin: 30px auto 6px; max-width: 44ch;
}
.result-actions { margin-top: 24px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }

/* tela de identificação (nome + e-mail) */
.lead-field { margin-bottom: 16px; }
.lead-lbl { display: block; font-size: 13px; font-weight: 700; color: var(--brown); margin: 0 0 7px 2px; letter-spacing: .01em; }

.footnote { text-align: center; font-size: 12px; color: var(--brown-soft); margin-top: 40px; }
.demo-tag {
  display: inline-block; margin-top: 14px; font-size: 11.5px; font-weight: 700;
  letter-spacing: .05em; text-transform: uppercase; color: var(--brown);
  background: var(--cream-2); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px;
}

@media (max-width: 520px) {
  .stage { justify-content: flex-start; }
}

/* cabeçalho do PDF (só aparece na impressão) */
.print-head { display: none; }
.print-brand { font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: 12px; color: var(--wine); }
.print-brand b { font-family: var(--serif); font-style: italic; font-weight: 400; text-transform: none; letter-spacing: 0; }
.print-name { font-size: 20px; font-weight: 800; margin-top: 6px; color: var(--espresso); }
.print-date { font-size: 12px; color: var(--brown); margin-top: 2px; }

/* ===== impressão / salvar em PDF ===== */
@media print {
  @page { margin: 15mm; }
  html, body { background: #fff !important; }
  .progress-track, .result-actions, .footnote, .demo-tag { display: none !important; }
  .stage { max-width: none; margin: 0; padding: 0; min-height: 0; display: block; }
  .screen { animation: none; }
  .print-head { display: block !important; border-bottom: 2px solid var(--wine); padding-bottom: 12px; margin-bottom: 18px; }

  .result-head .eyebrow { color: var(--brown); }
  .result-title { color: var(--espresso); }

  .path { break-inside: avoid; page-break-inside: avoid; box-shadow: none !important; }
  .path-top { background: #fff !important; color: var(--espresso) !important; border: 1.5px solid var(--line-2); }
  .path-top .path-rank { color: var(--wine) !important; }
  .path-top .path-name { color: var(--espresso) !important; }
  .path-top .sec-lbl { color: var(--brown) !important; }
  .path-top .sec-txt { color: #3A2C22 !important; }
  .path-top .sec-txt strong { color: #000 !important; }
  .step { background: var(--wine-tint) !important; border-color: #E4C7CC !important; }
  .step .sec-lbl { color: var(--wine) !important; }
  .step .sec-txt { color: #3A2C22 !important; }
  .path-alt { border: 1px solid var(--line-2); }
  .closing { color: var(--coffee) !important; }
}
