:root {
  --bg: #FBF6EE;
  --surface: #FFFFFF;
  --ink: #1C1A17;
  --ink-2: #57514A;
  --ink-3: #8A8279;
  --line: #E7DED1;
  --red: #C8312B;
  --red-ink: #A6241F;
  --red-soft: #FBE7E3;
  --jade: #0F7A5C;
  --gold: #F2C14E;
  --focus: #1D4ED8;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(28, 26, 23, .06), 0 8px 24px -12px rgba(28, 26, 23, .18);
  --display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
  --body: 'Inter', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15120F; --surface: #1F1B17; --ink: #F5EFE6; --ink-2: #C9C0B4; --ink-3: #8F867B;
    --line: #36302A; --red: #F0685C; --red-ink: #FF8A7F; --red-soft: #3A1E1A; --jade: #3FBF94;
    --gold: #F2C14E; --focus: #93B4FF; color-scheme: dark;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -12px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  --bg: #15120F; --surface: #1F1B17; --ink: #F5EFE6; --ink-2: #C9C0B4; --ink-3: #8F867B;
  --line: #36302A; --red: #F0685C; --red-ink: #FF8A7F; --red-soft: #3A1E1A; --jade: #3FBF94;
  --gold: #F2C14E; --focus: #93B4FF; color-scheme: dark;
}

[hidden] { display: none !important; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--ink); font: 400 16px/1.55 var(--body);
  -webkit-font-smoothing: antialiased; min-height: 100dvh; overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 8px; }

/* ───────── cenário */
.scene { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.sun {
  position: absolute; width: min(70vw, 620px); aspect-ratio: 1; border-radius: 50%;
  right: -18vw; top: -22vh; background: radial-gradient(circle at 40% 40%, var(--red) 0 55%, transparent 70%);
  opacity: .14; transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
  transform: translate(calc(var(--step, 0) * -3vw), calc(var(--step, 0) * 6vh)) scale(calc(1 + var(--step, 0) * .04));
}
.arc {
  position: absolute; width: 140vw; height: 70vh; left: -20vw; bottom: -52vh; border-radius: 50%;
  border: 2px solid var(--jade); opacity: .22; transition: transform 1.2s cubic-bezier(.2,.8,.2,1);
  transform: translateY(calc(var(--step, 0) * -2.5vh)) rotate(calc(var(--step, 0) * -1.2deg));
}
.arc::after {
  content: ''; position: absolute; inset: 18px; border-radius: 50%; border: 1px solid var(--gold); opacity: .8;
}
.grain {
  position: absolute; inset: 0; opacity: .35; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ───────── topo */
.topbar {
  position: sticky; top: 0; z-index: 5; display: flex; align-items: center; gap: 20px;
  justify-content: space-between; padding: 14px clamp(16px, 4vw, 40px);
  background: linear-gradient(var(--bg) 60%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; font: 600 14px/1 var(--display); letter-spacing: .01em; white-space: nowrap; }
.brand-mark {
  width: 22px; height: 22px; border-radius: 7px; background: var(--red); position: relative; overflow: hidden; flex: none;
}
.brand-mark::before { content: ''; position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); right: 3px; top: 3px; }
.brand-mark::after { content: ''; position: absolute; left: -4px; right: -4px; bottom: -8px; height: 14px; border-radius: 50% 50% 0 0; background: var(--jade); }
.progress { display: flex; align-items: center; gap: 12px; flex: 1; max-width: 420px; }
.progress-steps { display: flex; gap: 4px; flex: 1; }
.progress-steps i { flex: 1; height: 6px; border-radius: 99px; background: var(--line); overflow: hidden; position: relative; }
.progress-steps i::after {
  content: ''; position: absolute; inset: 0; background: var(--red); border-radius: inherit;
  transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.progress-steps i.done::after, .progress-steps i.on::after { transform: scaleX(1); }
.progress-steps i.on::after { background: var(--jade); }
.progress-label { font: 600 12px/1 var(--body); color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ───────── telas */
main { position: relative; z-index: 1; width: 100%; max-width: 860px; margin: 0 auto; padding: 8px clamp(16px, 4vw, 40px) 120px; }
.screen { animation: enter .55s cubic-bezier(.2,.8,.2,1) both; }
.screen.leaving { animation: leave .28s ease-in both; }
.screen.back { animation-name: enterBack; }
.screen.back.leaving { animation-name: leaveBack; }
@keyframes enter { from { opacity: 0; transform: translateY(28px); } }
@keyframes leave { to { opacity: 0; transform: translateY(-24px); } }
@keyframes enterBack { from { opacity: 0; transform: translateY(-28px); } }
@keyframes leaveBack { to { opacity: 0; transform: translateY(24px); } }

/* intro */
.intro { min-height: calc(100dvh - 160px); display: flex; flex-direction: column; justify-content: center; padding: 24px 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chips span {
  font: 600 12px/1 var(--body); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2);
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 99px; background: color-mix(in srgb, var(--surface) 70%, transparent);
  animation: enter .6s cubic-bezier(.2,.8,.2,1) both; animation-delay: calc(var(--i) * 70ms + 100ms);
}
.kicker { font: 700 15px/1.2 var(--display); color: var(--red-ink); margin: 0 0 12px; letter-spacing: .01em; }
.intro h1 {
  font: 800 clamp(40px, 8.5vw, 84px)/.95 var(--display); letter-spacing: -.035em; margin: 0 0 24px; text-wrap: balance;
}
.intro h1 em { font-style: normal; color: var(--red); }
.intro .lead { font-size: clamp(16px, 2.1vw, 19px); color: var(--ink-2); max-width: 62ch; margin: 0 0 12px; text-wrap: pretty; }
.intro .reassure { font-weight: 600; color: var(--ink); margin: 0 0 36px; }
.start-row { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.meta { display: flex; gap: 16px; color: var(--ink-3); font-size: 14px; flex-wrap: wrap; }
.meta span { display: inline-flex; align-items: center; gap: 6px; }

/* pergunta */
.q { padding-top: clamp(8px, 4vh, 40px); }
.q-section { display: flex; align-items: center; gap: 10px; font: 600 13px/1.2 var(--body); color: var(--jade); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 14px; }
.q-num {
  display: inline-grid; place-items: center; min-width: 28px; height: 28px; padding: 0 8px; border-radius: 99px;
  background: var(--jade); color: var(--bg); font-variant-numeric: tabular-nums; letter-spacing: 0;
}
.q h2 { font: 750 clamp(28px, 5vw, 46px)/1.05 var(--display); letter-spacing: -.025em; margin: 0 0 10px; text-wrap: balance; }
.q-hint { color: var(--ink-3); font-size: 15px; margin: 0 0 26px; display: flex; align-items: center; gap: 8px; }
.q-hint b { color: var(--ink-2); font-weight: 600; }

.options { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 10px; }
.opt {
  --d: calc(var(--i) * 35ms);
  position: relative; display: flex; align-items: center; gap: 14px; width: 100%; text-align: left;
  padding: 14px 16px 14px 14px; min-height: 64px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer;
  transition: border-color .18s, background .18s, transform .18s cubic-bezier(.2,.8,.2,1);
  animation: enter .5s cubic-bezier(.2,.8,.2,1) both; animation-delay: var(--d);
  -webkit-tap-highlight-color: transparent;
}
.opt:hover { border-color: color-mix(in srgb, var(--red) 45%, var(--line)); transform: translateY(-1px); }
.opt:active { transform: scale(.985); }
.opt .ico { font-size: 22px; line-height: 1; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 11px; background: var(--bg); flex: none; transition: transform .3s cubic-bezier(.3,1.6,.5,1); }
.opt .lbl { flex: 1; font-weight: 550; line-height: 1.3; }
.opt .key {
  font: 600 11px/1 var(--body); color: var(--ink-3); border: 1px solid var(--line); border-radius: 6px;
  min-width: 22px; height: 22px; display: grid; place-items: center; flex: none;
}
.opt .tick {
  position: absolute; right: 12px; top: 50%; width: 24px; height: 24px; margin-top: -12px; border-radius: 50%;
  background: var(--red); color: #fff; display: grid; place-items: center; transform: scale(0); transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.opt[data-type="multi"] .tick { border-radius: 7px; }
.opt[aria-checked="true"] { border-color: var(--red); background: var(--red-soft); }
.opt[aria-checked="true"] .ico { transform: scale(1.12) rotate(-6deg); background: var(--surface); }
.opt[aria-checked="true"] .tick { transform: scale(1); }
.opt[aria-checked="true"] .key { visibility: hidden; }
@media (hover: none) { .opt .key { display: none; } }

.followup { margin-top: 26px; display: grid; grid-template-rows: 1fr; transition: opacity .3s; }
.followup label { display: block; font-weight: 600; margin-bottom: 10px; color: var(--ink); }
.followup label small { font-weight: 500; color: var(--ink-3); margin-left: 4px; }
.followup textarea {
  width: 100%; min-height: 88px; resize: vertical; padding: 14px 16px; border-radius: 14px; border: 1.5px solid var(--line);
  background: var(--surface); line-height: 1.5; transition: border-color .2s, box-shadow .2s;
}
.followup textarea:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 4px color-mix(in srgb, var(--jade) 18%, transparent); }
.followup.pulse textarea { animation: pulse 1.2s ease-out 1; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--jade) 40%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.count { font-size: 12px; color: var(--ink-3); text-align: right; margin-top: 6px; font-variant-numeric: tabular-nums; }

/* dados pessoais */
.fields { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 12px; margin-top: 4px; }
.fld { grid-column: span 3; display: flex; flex-direction: column; gap: 7px; animation: enter .5s cubic-bezier(.2,.8,.2,1) both; }
.fld.full { grid-column: 1 / -1; }
.fld.city { grid-column: span 4; }
.fld.uf { grid-column: span 2; }
.fld label { font-weight: 600; font-size: 15px; }
.fld input, .fld select {
  width: 100%; height: 54px; padding: 0 16px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface);
  font-size: 17px; transition: border-color .2s, box-shadow .2s; box-shadow: var(--shadow); -webkit-appearance: none; appearance: none;
}
.fld select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%238A8279' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 40px;
}
.fld input::placeholder { color: var(--ink-3); }
.fld input:focus, .fld select:focus { outline: none; border-color: var(--jade); box-shadow: 0 0 0 4px color-mix(in srgb, var(--jade) 18%, transparent); }
.fld.bad input, .fld.bad select { border-color: var(--red); }
.fld-err { font-size: 13px; font-weight: 550; color: var(--red-ink); min-height: 0; }
.fld-err:empty { display: none; }
.consent { margin-top: 22px; }
.consent label { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.consent input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.consent .box {
  flex: none; width: 24px; height: 24px; border-radius: 7px; border: 1.5px solid var(--line); background: var(--surface); margin-top: 1px;
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.consent .box::after { content: ''; width: 6px; height: 11px; border: solid #fff; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg) scale(0); margin-top: -3px; transition: transform .2s cubic-bezier(.3,1.6,.5,1); }
.consent input:checked + .box { background: var(--red); border-color: var(--red); }
.consent input:checked + .box::after { transform: rotate(45deg) scale(1); }
.consent input:focus-visible + .box { outline: 3px solid var(--focus); outline-offset: 2px; }
.consent.bad .box { border-color: var(--red); }
.consent .fld-err { margin: 8px 0 0 36px; }
@media (max-width: 560px) {
  .fld, .fld.city { grid-column: 1 / -1; }
  .fld.city { grid-column: span 4; }
  .fld.uf { grid-column: span 2; }
}

/* botão do Instagram */
.btn.insta {
  color: #fff; text-decoration: none; margin-bottom: 14px;
  background: linear-gradient(45deg, #F58529 0%, #DD2A7B 45%, #8134AF 75%, #515BD4 100%);
  box-shadow: 0 12px 28px -12px rgba(221, 42, 123, .7);
}
.btn.insta .insta-ico { display: inline-flex; width: 22px; height: 22px; }
.btn.insta .insta-ico svg { width: 100%; height: 100%; }

/* navegação */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 6; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px clamp(16px, 4vw, 40px) calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 35%);
}
.nav-inner { width: 100%; max-width: 860px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; cursor: pointer; border-radius: 99px;
  padding: 15px 26px; font: 650 16px/1 var(--body); background: var(--ink); color: var(--bg);
  transition: transform .18s cubic-bezier(.2,.8,.2,1), opacity .2s, background .2s; white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .35; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--red); color: #fff; box-shadow: 0 10px 24px -10px color-mix(in srgb, var(--red) 70%, transparent); }
.btn.big { padding: 19px 32px; font-size: 18px; }
.btn.ghost { background: transparent; color: var(--ink-2); padding: 15px 14px; }
.btn.ghost:hover { color: var(--ink); }
.btn .arrow { transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.enter-hint { font-size: 13px; color: var(--ink-3); display: none; align-items: center; gap: 6px; }
.enter-hint kbd { font: 600 11px/1 var(--body); border: 1px solid var(--line); border-radius: 5px; padding: 3px 6px; background: var(--surface); }
@media (hover: hover) and (min-width: 700px) { .enter-hint { display: inline-flex; } }
.nav-right { display: flex; align-items: center; gap: 16px; }

.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 9; background: var(--ink); color: var(--bg);
  padding: 12px 18px; border-radius: 12px; font-weight: 550; font-size: 14px; box-shadow: var(--shadow); animation: enter .3s both; max-width: calc(100vw - 32px);
}

/* final */
.finish { min-height: calc(100dvh - 160px); display: flex; flex-direction: column; justify-content: center; align-items: flex-start; }
.finish-badge {
  width: 84px; height: 84px; border-radius: 26px; background: var(--jade); display: grid; place-items: center; margin-bottom: 28px;
  animation: pop .7s cubic-bezier(.3,1.6,.5,1) both .1s;
}
.finish-badge svg { width: 42px; height: 42px; stroke: #fff; stroke-width: 3.2; fill: none; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 40; stroke-dashoffset: 40; animation: draw .5s ease-out forwards .55s; }
@keyframes pop { from { transform: scale(0) rotate(-20deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.finish h1 { font: 800 clamp(36px, 7vw, 64px)/1 var(--display); letter-spacing: -.03em; margin: 0 0 16px; }
.finish p { color: var(--ink-2); font-size: 18px; max-width: 56ch; margin: 0 0 32px; }
.finish .row { display: flex; flex-wrap: wrap; gap: 12px; }

.closed { min-height: 60vh; display: grid; place-items: center; text-align: center; }
.closed h1 { font: 800 clamp(30px, 6vw, 48px)/1.05 var(--display); margin: 0 0 12px; }
.closed p { color: var(--ink-2); }

.loading { min-height: 60vh; display: flex; align-items: center; justify-content: center; gap: 8px; }
.loading span { width: 10px; height: 10px; border-radius: 50%; background: var(--red); animation: bounce 1s infinite ease-in-out; }
.loading span:nth-child(2) { animation-delay: .15s; background: var(--gold); }
.loading span:nth-child(3) { animation-delay: .3s; background: var(--jade); }
@keyframes bounce { 50% { transform: translateY(-10px); } }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
#confetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 10; }
.noscript { text-align: center; padding: 40px; }

@media (max-width: 520px) {
  .brand span:last-child { display: none; }
  .opt { min-height: 58px; padding: 12px 14px 12px 12px; }
  .opt .ico { width: 36px; height: 36px; font-size: 20px; }
  .btn.big { width: 100%; }
  .nav .btn.primary { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}
