/* Entre Duas — Quiz de entrada */
:root {
  --cream: #fcefde;
  --cream-2: #fff7ec;
  --paper: #fffaf3;
  --sand: #efd9bf;
  --sand-2: #e6c9a6;
  --brown: #2b180a;
  --brown-2: #3d2410;
  --muted: #7a5a40;
  --caramel: #b86b12;
  --orange: #d77709;
  --orange-soft: #f6e1c4;
  --danger: #a8331c;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 22px;
  --shadow: 0 1px 2px rgba(61, 36, 16, .06), 0 12px 40px -12px rgba(61, 36, 16, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--cream);
  color: var(--brown);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
button, input, textarea { font: inherit; color: inherit; }
::selection { background: var(--orange-soft); }

/* ---------- decoração ---------- */
.deco { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.blob { position: absolute; width: min(42vw, 420px); height: auto; }
.blob-tr { top: 0; right: 0; fill: var(--orange); opacity: .9; }
.blob-bl { bottom: 0; left: 0; fill: var(--brown-2); }
.leaf { position: absolute; right: 2vw; bottom: -10px; width: min(22vw, 200px); color: var(--sand-2); opacity: .55; }
.dots { position: absolute; width: 260px; color: var(--caramel); fill: var(--caramel); opacity: .55; }
.dots-1 { top: 18%; left: -40px; }
.dots-2 { bottom: 24%; right: -30px; }
@media (max-width: 720px) {
  .blob { width: 46vw; }
  .blob-tr { opacity: .85; width: 38vw; }
  .blob-bl { width: 34vw; }
  .leaf, .dots-2 { display: none; }
  .dots-1 { top: 6%; }
}

/* ---------- layout ---------- */
.app {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 20px 18px 28px;
  display: flex;
  flex-direction: column;
}
.noscript { text-align: center; margin-top: 30vh; }

/* ---------- topo: marca + progresso ---------- */
.top {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0 -6px;
  padding: 12px 16px 14px;
  border-radius: 18px;
  background: rgba(252, 239, 222, .82);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; margin-bottom: 12px; }
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: .18em;
  color: var(--brown);
  line-height: 1;
}
.brand-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--caramel);
  display: flex;
  align-items: center;
  gap: 8px;
}
.brand-tag::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--caramel); }

.progress-row { display: flex; align-items: center; gap: 12px; }
.progress {
  position: relative;
  flex: 1;
  height: 8px;
  border-radius: 99px;
  background: var(--sand);
  overflow: hidden;
}
.progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--caramel), var(--orange));
  transition: width .6s var(--ease);
}
.progress-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  min-width: 64px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ---------- cartão / pergunta ---------- */
.stage { flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 8px 0 12px; }
.card {
  background: var(--paper);
  border: 1px solid rgba(184, 107, 18, .14);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 34px 32px 28px;
  animation: enter .5s var(--ease) both;
}
.card.back { animation-name: enter-back; }
@keyframes enter { from { opacity: 0; transform: translateY(18px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes enter-back { from { opacity: 0; transform: translateY(-14px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 560px) { .card { padding: 26px 20px 22px; border-radius: 18px; } }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 10px;
}
.eyebrow .req { color: var(--muted); letter-spacing: .04em; text-transform: none; font-weight: 500; }
.q-title {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(26px, 4.6vw, 34px);
  line-height: 1.15;
  margin: 0 0 8px;
  color: var(--brown);
}
.q-lead {
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(20px, 3.6vw, 24px);
  line-height: 1.3;
  color: var(--brown-2);
  margin: 0 0 6px;
}
.q-help { color: var(--muted); font-size: 14px; margin: 4px 0 0; }
.q-help.note {
  background: var(--cream-2);
  border-left: 3px solid var(--orange);
  padding: 10px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  margin-top: 12px;
}
.q-body { margin-top: 22px; }

/* campos de texto */
.field {
  width: 100%;
  border: 0;
  border-bottom: 2px solid var(--sand-2);
  background: transparent;
  padding: 10px 2px;
  font-size: 20px;
  outline: none;
  transition: border-color .2s;
  border-radius: 0;
}
.field::placeholder { color: #bda387; }
.field:focus { border-color: var(--caramel); }
textarea.field {
  border: 2px solid var(--sand);
  border-radius: 14px;
  padding: 14px 16px;
  min-height: 140px;
  resize: vertical;
  font-size: 17px;
  line-height: 1.5;
  background: #fff;
}
textarea.field:focus { border-color: var(--caramel); }
.field.invalid { border-color: var(--danger); }
.char-hint { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: right; }

/* opções */
.options { display: grid; gap: 10px; }
.options.compact { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }
.opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  padding: 13px 16px;
  border: 1.5px solid var(--sand);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-size: 15.5px;
  line-height: 1.35;
  transition: border-color .18s, background .18s, transform .18s var(--ease), box-shadow .18s;
}
.opt:hover { border-color: var(--sand-2); background: var(--cream-2); }
.opt:active { transform: scale(.99); }
.opt:focus-visible { outline: 3px solid rgba(215, 119, 9, .35); outline-offset: 2px; }
.opt .key {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 8px;
  border: 1.5px solid var(--sand-2);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  background: var(--cream-2);
  transition: all .18s;
}
.opt.multi .key { border-radius: 7px; }
.opt .txt { flex: 1; }
.opt.selected {
  border-color: var(--caramel);
  background: #fdf1e1;
  box-shadow: 0 0 0 3px rgba(184, 107, 18, .12);
}
.opt.selected .key { background: var(--caramel); border-color: var(--caramel); color: #fff; }
.opt.disabled { opacity: .45; cursor: not-allowed; }
.opt.pop { animation: pop .35s var(--ease); }
@keyframes pop { 40% { transform: scale(1.015); } }
.compact .opt { padding: 11px 13px; font-size: 14.5px; }
.compact .opt .key { width: 22px; height: 22px; font-size: 13px; }

.other-input { margin-top: 10px; animation: enter .3s var(--ease) both; }
.other-input .field { font-size: 17px; }

.counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--caramel);
  background: var(--orange-soft);
  padding: 4px 12px;
  border-radius: 99px;
  margin-top: 10px;
}
.counter.full { background: var(--caramel); color: #fff; }

/* termos */
.terms-intro p { margin: 0 0 10px; color: var(--brown-2); }
.terms-box {
  margin-top: 16px;
  max-height: 46vh;
  overflow: auto;
  padding: 20px 22px;
  border: 1.5px solid var(--sand);
  border-radius: 16px;
  background: #fff;
  font-size: 14.5px;
  line-height: 1.6;
  scroll-behavior: smooth;
}
.terms-box h3 { font-family: var(--serif); font-size: 24px; margin: 0; letter-spacing: .04em; }
.terms-box h4 { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; margin: 0 0 14px; color: var(--caramel); }
.terms-box h5 { font-size: 12.5px; letter-spacing: .08em; margin: 22px 0 8px; color: var(--brown); }
.terms-box p { margin: 0 0 10px; }
.terms-box ul { list-style: none; padding: 0; margin: 0 0 12px; }
.terms-box li { padding-left: 26px; position: relative; margin-bottom: 4px; }
.terms-box .checks li::before { content: "✓"; position: absolute; left: 4px; color: #3c8a3c; font-weight: 700; }
.terms-box .flowers li::before { content: "🌻"; position: absolute; left: 0; font-size: 13px; }
.terms-scroll-hint { font-size: 12.5px; color: var(--muted); margin: 8px 0 0; text-align: center; }
.terms-accept { margin-top: 16px; }

/* rodapé de navegação */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 26px;
}
.nav .hint { font-size: 12px; color: var(--muted); }
.nav .hint kbd {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 5px;
  border: 1px solid var(--sand-2);
  background: var(--cream-2);
}
@media (hover: none) { .nav .hint { display: none; } }
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 99px;
  padding: 14px 26px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background .2s, transform .15s var(--ease), opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--brown); color: var(--cream); box-shadow: 0 8px 22px -10px rgba(43, 24, 10, .6); }
.btn-primary:hover { background: var(--caramel); }
.btn-primary[disabled] { opacity: .35; cursor: not-allowed; box-shadow: none; }
.btn-primary[disabled]:hover { background: var(--brown); }
.btn-ghost { background: transparent; color: var(--muted); padding: 12px 14px; }
.btn-ghost:hover { color: var(--brown); background: rgba(184, 107, 18, .08); }
.btn .arrow { transition: transform .2s var(--ease); }
.btn-primary:not([disabled]):hover .arrow { transform: translateX(3px); }
.btn.loading { pointer-events: none; opacity: .8; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(252, 239, 222, .35); border-top-color: var(--cream); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.error-msg {
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
  margin-top: 12px;
  animation: shake .35s;
}
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- tela inicial ---------- */
.intro { animation: enter .6s var(--ease) both; }
.intro .banner {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.intro .card { animation: none; }
.intro h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(30px, 6vw, 42px);
  line-height: 1.05;
  margin: 0 0 14px;
}
.intro h1 em { color: var(--caramel); font-style: italic; font-weight: 500; }
.intro .lead { font-family: var(--serif); font-size: 21px; line-height: 1.35; margin: 0 0 16px; color: var(--brown-2); }
.intro p { margin: 0 0 12px; }
.intro .highlight {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--brown-2);
  border-left: 3px solid var(--orange);
  padding: 4px 0 4px 16px;
  margin: 18px 0;
}
.intro .meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.intro .chip {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--brown-2);
  background: var(--orange-soft);
  padding: 6px 12px;
  border-radius: 99px;
}
.intro .start-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-top: 22px; }
.intro .resume { font-size: 13px; color: var(--muted); }
.intro .resume button { background: none; border: 0; color: var(--caramel); font-weight: 600; cursor: pointer; text-decoration: underline; padding: 0; }
.more-toggle { background: none; border: 0; padding: 0; color: var(--caramel); font-weight: 600; cursor: pointer; font-size: 14px; }
.more { display: none; }
.more.open { display: block; animation: enter .35s var(--ease) both; }

/* ---------- tela final ---------- */
.done { text-align: center; }
.done .sun { font-size: 56px; display: inline-block; animation: bloom 1s var(--ease) both; }
@keyframes bloom { from { transform: scale(.2) rotate(-90deg); opacity: 0; } to { transform: none; opacity: 1; } }
.done h2 { font-family: var(--serif); font-size: clamp(30px, 6vw, 40px); margin: 8px 0 10px; line-height: 1.1; }
.done p { max-width: 480px; margin: 0 auto 12px; color: var(--brown-2); }
.done .sign { font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--caramel); margin-top: 18px; }
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 10; overflow: hidden; }
.confetti i {
  position: absolute;
  top: -20px;
  width: 9px;
  height: 14px;
  border-radius: 3px;
  opacity: .9;
  animation: fall linear forwards;
}
@keyframes fall { to { transform: translateY(110vh) rotate(720deg); opacity: .2; } }

.footer-note { text-align: center; font-size: 11.5px; color: var(--muted); margin-top: 14px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* coração laranja da marca (substitui o emoji, que muda de cor em cada aparelho) */
.coracao {
  display: inline-block;
  width: .95em; height: .95em;
  vertical-align: -.12em;
  margin: 0 .08em;
  background-color: #d77709;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-10-9.3C.4 8.4 2.2 4.5 5.9 4.1c2.2-.2 3.6.9 4.6 2.3.4.6.9.6 1.3 0 1-1.4 2.4-2.5 4.6-2.3 3.7.4 5.5 4.3 3.9 7.6C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21s-7.5-4.6-10-9.3C.4 8.4 2.2 4.5 5.9 4.1c2.2-.2 3.6.9 4.6 2.3.4.6.9.6 1.3 0 1-1.4 2.4-2.5 4.6-2.3 3.7.4 5.5 4.3 3.9 7.6C19.5 16.4 12 21 12 21z'/%3E%3C/svg%3E") center / contain no-repeat;
}
