:root {
  --navy: #0B1F3A;
  --night: #06111F;
  --gold: #C9A54C;
  --gold-2: #E6C77A;
  --emerald: #1E9E6A;
  --emerald-2: #39C48A;
  --gray: #8A94A6;
  --text: #F5F3EE;
  --muted: #A9B3C4;
  --glass: rgba(255, 255, 255, .06);
  --glass-2: rgba(255, 255, 255, .1);
  --line: rgba(255, 255, 255, .14);
  --radius: 22px;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--night);
  -webkit-font-smoothing: antialiased;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ---------- Fundo ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 90% at 20% 0%, #10294B 0%, var(--navy) 38%, var(--night) 100%); }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .55; }
.g1 { width: 520px; height: 520px; right: -140px; top: -120px; background: rgba(201, 165, 76, .38); }
.g2 { width: 560px; height: 560px; left: -180px; bottom: -200px; background: rgba(30, 158, 106, .32); }
.grid { position: absolute; inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(80% 70% at 50% 40%, #000 30%, transparent 100%); }

/* ---------- Topo ---------- */
.top { display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 22px clamp(16px, 5vw, 56px); border-bottom: 1px solid rgba(255,255,255,.08); }
.brand { display: flex; align-items: center; gap: 10px; color: var(--gold); min-height: 36px; }
.brand img { max-height: 40px; max-width: 200px; display: block; }
.brand-mark { width: 28px; height: 28px; }
.brand-name { font-weight: 600; letter-spacing: .02em; color: var(--text); font-size: 15px; }
.progress { flex: 1; max-width: 420px; }
.progress-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 8px; letter-spacing: .04em; }
.progress-bar { height: 6px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; }
.progress-bar span { display: block; height: 100%; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--emerald-2)); transition: width .45s cubic-bezier(.2,.8,.2,1); }

/* ---------- Telas ---------- */
.stage { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; padding: clamp(18px, 4vw, 56px) 16px; }
.screen { display: none; width: 100%; max-width: 860px; }
.screen.is-active { display: block; margin: auto; animation: enter .5s cubic-bezier(.2,.8,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.eyebrow { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 14px;
  font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--gold); }
.eyebrow::before { content: ''; width: 22px; height: 1.5px; background: var(--gold); }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.12; margin: 0 0 16px; }
h1 { font-size: clamp(34px, 5.6vw, 58px); letter-spacing: -.01em; }
h2 { font-size: clamp(24px, 3.4vw, 34px); }
h3 { font-size: clamp(20px, 2.6vw, 26px); }
em { font-style: normal; background: linear-gradient(120deg, var(--gold-2), var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: clamp(16px, 2vw, 19px); line-height: 1.6; color: var(--muted); margin: 0 0 28px; max-width: 680px; }
.micro { font-size: 13px; color: var(--muted); margin: 16px 0 0; }

.card { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius);
  backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.08);
  padding: clamp(22px, 4vw, 44px); }

/* ---------- Botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer;
  font: 600 15px/1 var(--sans); padding: 15px 22px; border-radius: 14px; text-decoration: none; transition: transform .15s, box-shadow .2s, background .2s; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn-gold { color: #1A1306; background: linear-gradient(135deg, var(--gold-2), var(--gold) 60%, #B08A36);
  box-shadow: 0 12px 30px -10px rgba(201,165,76,.65), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-gold:hover { transform: translateY(-1px); box-shadow: 0 18px 40px -12px rgba(201,165,76,.8), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { color: var(--text); background: transparent; border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--glass-2); }
.btn-lg { padding: 19px 28px; font-size: 16px; }
.btn:disabled { opacity: .55; cursor: wait; transform: none; }

/* ---------- Intro ---------- */
.intro { text-align: left; }
.pillars-preview { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 0 0 32px; }
.pp { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 18px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); display: flex; flex-direction: column; gap: 6px; }
.pp b { font-size: 15px; }
.pp small { color: var(--muted); font-size: 13px; line-height: 1.45; }
.pp-ico { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 6px;
  background: linear-gradient(135deg, rgba(201,165,76,.28), rgba(201,165,76,.06)); border: 1px solid rgba(201,165,76,.35); }
.pp-ico svg { width: 22px; height: 22px; fill: none; stroke: var(--gold-2); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Formulário ---------- */
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; margin: 8px 0 18px; }
.field { display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: var(--muted); font-weight: 500; }
.field-full { grid-column: 1 / -1; }
.field-city { grid-column: 1; }
.field-uf { grid-column: 2; }
.field input, .field select { font: 500 15px var(--sans); color: var(--text); background: rgba(6,17,31,.55);
  border: 1px solid var(--line); border-radius: 12px; padding: 14px 14px; outline: none; transition: border .2s, box-shadow .2s; width: 100%; }
.field select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--gold) 50%), linear-gradient(135deg, var(--gold) 50%, transparent 50%);
  background-position: calc(100% - 20px) 55%, calc(100% - 14px) 55%; background-size: 6px 6px; background-repeat: no-repeat; padding-right: 36px; }
.field select option { background: var(--navy); }
.field input::placeholder { color: rgba(169,179,196,.55); }
.field input:focus, .field select:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,165,76,.15); }
.field.invalid input, .field.invalid select { border-color: #E06C6C; }
.consent { display: flex; gap: 12px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: var(--muted); cursor: pointer; }
.consent input { width: 18px; height: 18px; accent-color: var(--gold); margin-top: 2px; flex: none; }
.form-error { color: #F0A0A0; font-size: 14px; min-height: 20px; margin: 12px 0 0; }
.row-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.hint { font-size: 13px; color: var(--muted); }

/* ---------- Intake conversacional ---------- */
.intake h2 { margin-bottom: 8px; }
.intake-sub { color: var(--muted); font-size: 15px; line-height: 1.5; margin: 0 0 20px; }
.intake-body { display: grid; gap: 14px; }
.intake-fields { display: flex; gap: 12px; }
.intake-fields .grow { flex: 1; }
.intake-fields .uf { width: 92px; flex: none; }
.field input.big { font-size: 18px; padding: 17px 16px; }
.intake .consent { margin-top: 4px; }

/* ---------- Perguntas ---------- */
.question h2 { margin-bottom: 26px; }
.options { display: grid; gap: 12px; }
.opt { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  font: 500 16px/1.4 var(--sans); color: var(--text); padding: 18px 20px; border-radius: 16px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line); transition: background .18s, border .18s, transform .12s; }
.opt:hover { background: rgba(255,255,255,.08); border-color: rgba(201,165,76,.55); transform: translateX(2px); }
.opt .key { flex: none; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font: 600 13px var(--sans); color: var(--gold-2); border: 1px solid rgba(201,165,76,.45); background: rgba(201,165,76,.08); }
.opt.is-selected { border-color: var(--gold); background: linear-gradient(135deg, rgba(201,165,76,.2), rgba(201,165,76,.05)); box-shadow: 0 0 0 4px rgba(201,165,76,.12); }
.opt.is-selected .key { background: var(--gold); color: #1A1306; }
.scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 8px; }
.scale .opt { justify-content: center; padding: 16px 0; font-weight: 600; }
.scale-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 10px; }

/* ---------- Calculando ---------- */
.calc { text-align: center; }
.calc-ring { width: 84px; height: 84px; margin: 0 auto 28px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--gold), var(--emerald-2), transparent 70%); animation: spin 1.1s linear infinite; }
.calc-ring span { position: absolute; inset: 6px; border-radius: 50%; background: var(--night); }
@keyframes spin { to { transform: rotate(360deg); } }
.calc-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; color: var(--muted); }
.calc-steps li { opacity: 0; animation: fadeStep .5s forwards; }
.calc-steps li:nth-child(1) { animation-delay: .2s; }
.calc-steps li:nth-child(2) { animation-delay: .8s; }
.calc-steps li:nth-child(3) { animation-delay: 1.4s; }
@keyframes fadeStep { to { opacity: 1; } }

/* ---------- Resultado ---------- */
.result { display: grid; gap: 18px; }
.result-head { display: grid; grid-template-columns: auto 1fr; gap: clamp(20px, 4vw, 44px); align-items: center; }
.gauge { position: relative; width: clamp(150px, 22vw, 200px); aspect-ratio: 1; }
.gauge svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.gauge-track { fill: none; stroke: rgba(255,255,255,.08); stroke-width: 14; }
.gauge-fill { fill: none; stroke: url(#gGold); stroke-width: 14; stroke-linecap: round;
  stroke-dasharray: 527.8; stroke-dashoffset: 527.8; transition: stroke-dashoffset 1.6s cubic-bezier(.2,.8,.2,1); filter: drop-shadow(0 0 10px rgba(201,165,76,.5)); }
.gauge-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-num b { font: 700 clamp(42px, 6vw, 58px)/1 var(--serif); color: var(--gold-2); }
.gauge-num span { font-size: 14px; color: var(--muted); }
.result-intro h2 { margin-bottom: 10px; }
.result-intro .lead { margin: 0; }

.pillar-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pillar { background: var(--glass); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px;
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); position: relative; }
.pillar.is-worst { border-color: rgba(201,165,76,.7); box-shadow: 0 0 0 1px rgba(201,165,76,.35), 0 20px 50px -25px rgba(201,165,76,.6); }
.pillar-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.pillar-top b { font-size: 15px; }
.pillar-top span { font: 700 22px var(--serif); }
.pillar-bar { height: 8px; border-radius: 99px; background: rgba(255,255,255,.08); overflow: hidden; margin-bottom: 14px; }
.pillar-bar span { display: block; height: 100%; width: 0; border-radius: inherit; transition: width 1.4s cubic-bezier(.2,.8,.2,1); }
.lvl-0 .pillar-bar span { background: linear-gradient(90deg, #C0584F, #E08A62); }
.lvl-0 .pillar-top span { color: #E9967A; }
.lvl-1 .pillar-bar span { background: linear-gradient(90deg, #B8913A, var(--gold-2)); }
.lvl-1 .pillar-top span { color: var(--gold-2); }
.lvl-2 .pillar-bar span { background: linear-gradient(90deg, var(--emerald), var(--emerald-2)); }
.lvl-2 .pillar-top span { color: var(--emerald-2); }
.pillar p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.worst-tag { position: absolute; top: -11px; right: 18px; font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: #1A1306; background: linear-gradient(135deg, var(--gold-2), var(--gold)); padding: 5px 10px; border-radius: 99px; }
.result-close p { color: var(--muted); line-height: 1.6; margin: 0 0 24px; }
.ack-done { display: flex; align-items: center; gap: 10px; color: var(--emerald-2); font-size: 15px; margin: 4px 0 0; }
.ack-done::before { content: ''; width: 18px; height: 18px; flex: none; border-radius: 50%; background: var(--emerald-2);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/14px no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 13l4 4L19 7'/%3E%3C/svg%3E") center/14px no-repeat; }

/* ---------- Rodapé ---------- */
.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: 12px; color: rgba(169,179,196,.7);
  padding: 18px clamp(16px, 5vw, 56px); border-top: 1px solid rgba(255,255,255,.06); }

@media (max-width: 720px) {
  .top { padding: 12px 16px; gap: 14px; }
  .brand-name { font-size: 14px; }
  .progress { max-width: 55%; }
  .progress-label { margin-bottom: 6px; }
  .card { padding: 22px 20px; }
  .intro h1 { font-size: clamp(28px, 8vw, 40px); }
  .intro .lead { margin-bottom: 20px; }
  .pillars-preview { grid-template-columns: 1fr; gap: 10px; margin-bottom: 22px; }
  .pp { flex-direction: row; align-items: center; gap: 12px; padding: 12px 14px; }
  .pp-ico { margin-bottom: 0; }
  .result-head { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .pillar-grid { grid-template-columns: 1fr; }
  .scale { grid-template-columns: repeat(6, 1fr); }
  .hint { display: none; }
  .btn-lg { width: 100%; }
  .row-actions { margin-top: 18px; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 13px; }
  .progress-label { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
