/* Mesma linguagem das páginas de orçamento (/orcamento/casamento/style.css): fonte do sistema, tinta #1d1d1f, botões em pílula. */
:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --muted: #616167;
  --line: #dedee3;
  --soft: #f5f5f7;
  --focus: #0071e3;
  --error: #a32727;
  --ease-out: cubic-bezier(.2, 0, 0, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
  color: var(--ink);
  background: #fff;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-width: 0; background: #fff; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
button, input, select { font: inherit; letter-spacing: normal; }
button, a, input, label { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; color: inherit; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; }
h1, h2, h3 { font-weight: 500; }
img { max-width: 100%; }
[hidden] { display: none !important; }

button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within:has(input[type="checkbox"]:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}
[tabindex="-1"]:focus { outline: none; }

.icon-definitions { position: absolute; width: 0; height: 0; overflow: hidden; }
.ui-icon { display: block; width: 16px; height: 16px; flex: none; fill: currentColor; }
.sr-only, .hp {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.hp { left: -9999px; }

.skip-link {
  position: fixed; top: 12px; left: 16px; z-index: 20; padding: 12px 16px; border-radius: 8px;
  background: var(--ink); color: #fff; text-decoration: none; transform: translateY(-160%);
}
.skip-link:focus { transform: none; }

/* Topo: voltar, marca e progresso */
.quiz-header {
  position: sticky; top: 0; z-index: 10;
  padding-top: env(safe-area-inset-top);
  background: #ffffffeb;
  -webkit-backdrop-filter: saturate(1.4) blur(16px);
  backdrop-filter: saturate(1.4) blur(16px);
}
.quiz-bar {
  display: grid;
  grid-template-columns: 44px 1fr 44px;
  align-items: center;
  max-width: 560px;
  min-height: 60px;
  margin: 0 auto;
  padding: 0 8px;
}
.brand { justify-self: center; display: inline-flex; }
.brand img { display: block; width: 92px; height: auto; }
.icon-button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: transparent; color: var(--ink);
}
.icon-button:hover { background: var(--soft); }
/* Escondido sem sair da grade, para a marca ficar no centro. */
.quiz-bar .icon-button[hidden] { display: grid !important; visibility: hidden; }
.icon-button .ui-icon { width: 20px; height: 20px; }
.progress { height: 3px; background: var(--soft); }
.progress span {
  display: block; height: 100%; width: 0; background: var(--ink);
  border-radius: 0 3px 3px 0;
  transition: width 420ms var(--ease-out);
}

/* Telas */
.screen {
  width: 100%;
  max-width: 560px;
  min-height: calc(100svh - 63px);
  margin: 0 auto;
  padding: 28px 16px calc(40px + env(safe-area-inset-bottom));
}
.screen > * { min-width: 0; }
.step-count { margin-bottom: 12px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.question {
  margin-bottom: 28px;
  font-size: clamp(27px, 7.4vw, 34px);
  line-height: 1.2;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.question-hint { margin: -16px 0 24px; color: var(--muted); font-size: 15px; line-height: 1.55; }

/* Abertura */
.intro {
  display: grid;
  align-content: center;
  min-height: calc(100svh - 63px - 68px);
  text-align: center;
}
.intro-kicker { margin-bottom: 18px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.intro h1 {
  margin: 0 auto 18px;
  max-width: 13ch;
  font-size: clamp(36px, 10.4vw, 52px);
  line-height: 1.1;
  text-wrap: balance;
}
.intro-lead { max-width: 34ch; margin: 0 auto 32px; color: var(--muted); font-size: 17px; line-height: 1.55; text-wrap: pretty; }
.intro .button { width: min(100%, 320px); margin: 0 auto; }
.intro-facts {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  margin: 22px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 13px; line-height: 1.5;
}
.intro-facts li { display: inline-flex; align-items: center; gap: 6px; }
.intro-facts .ui-icon { width: 14px; height: 14px; }

/* Botões (mesmos das páginas de orçamento, maiores para o toque) */
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; max-width: 100%; padding: 14px 24px;
  border: 1px solid transparent; border-radius: 999px;
  font-size: 16px; line-height: 1.3; font-weight: 500; text-align: center; text-decoration: none;
  transition: background-color 160ms ease, transform 160ms var(--ease-out);
}
.button:active { transform: scale(.98); }
.button.dark { background: var(--ink); color: #fff; }
.button.dark:hover { background: #353538; }
.button.light { background: #eaeaec; color: var(--ink); }
.button.light:hover { background: #dedee3; }
.button.block { display: flex; width: 100%; }
.button:disabled { opacity: .6; }
.button img { width: 20px; height: 20px; filter: invert(1); }

/* Opções: tocar já responde */
.options { display: grid; gap: 10px; margin: 0; padding: 0; border: 0; }
.option {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  width: 100%; min-height: 62px; padding: 14px 18px;
  border: 1px solid var(--line); border-radius: 18px; background: #fff;
  font-size: 17px; line-height: 1.35; text-align: left;
  transition: border-color 160ms ease, background-color 160ms ease, color 160ms ease, transform 160ms var(--ease-out);
}
.option small { display: block; margin-top: 2px; color: var(--muted); font-size: 14px; }
.option .mark {
  display: grid; place-items: center; flex: none; width: 24px; height: 24px;
  border: 1px solid #c7c7cc; border-radius: 50%; color: transparent;
  transition: inherit;
}
.option .mark .ui-icon { width: 16px; height: 16px; }
@media (hover: hover) and (pointer: fine) { .option:hover { border-color: #b9b9bf; background: var(--soft); } }
.option:active { transform: scale(.985); }
.option[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.option[aria-pressed="true"] small { color: #ffffffb3; }
.option[aria-pressed="true"] .mark { border-color: #fff; background: #fff; color: var(--ink); }

/* Campos de texto (nome, cidade, telefone) */
.line-field {
  display: flex; align-items: center; gap: 12px;
  padding-bottom: 10px; border-bottom: 1px solid #85858c;
}
.line-field:focus-within { border-bottom-color: var(--focus); }
.line-field:has([aria-invalid="true"]) { border-bottom-color: var(--error); }
.line-field input {
  width: 100%; min-width: 0; padding: 12px 0; border: 0; border-radius: 0;
  background: transparent; color: var(--ink); font-size: 22px; line-height: 1.35;
}
.line-field input::placeholder { color: #8a8a90; opacity: 1; }
.line-field input:focus-visible { outline: none; }
.round-button {
  display: grid; place-items: center; width: 50px; height: 50px; flex: 0 0 50px; padding: 0;
  border: 0; border-radius: 50%; background: var(--ink); color: #fff;
}
.round-button:hover { background: #353538; }
.round-button .ui-icon { width: 22px; height: 22px; }
.field-error { min-height: 28px; padding-top: 8px; color: var(--error); font-size: 13px; line-height: 1.5; }
.field-label { display: block; margin-bottom: 6px; color: var(--muted); font-size: 14px; }

/* Data */
.segmented {
  display: flex; gap: 2px; width: 100%; margin: 0 0 14px; padding: 4px;
  border-radius: 999px; background: var(--soft);
}
.segmented button {
  flex: 1; min-height: 44px; padding: 10px 12px; border: 0; border-radius: 999px;
  background: transparent; color: var(--muted); font-size: 15px; font-weight: 500;
}
.segmented button[aria-pressed="true"] { background: #fff; color: var(--ink); box-shadow: 0 1px 5px #0000001a; }
.months { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.months .option { justify-content: center; min-height: 54px; padding: 10px 6px; border-radius: 14px; font-size: 16px; text-align: center; }
.months .option:disabled { border-color: transparent; background: var(--soft); color: #b0b0b6; cursor: default; transform: none; }

.other-city { margin-top: 18px; }
.other-city .button { margin-top: 20px; }

/* WhatsApp */
.phone-form .line-field input { font-size: 24px; letter-spacing: .01em; }
.consent {
  display: flex; align-items: flex-start; gap: 12px; margin: 6px 0 22px; padding: 14px 16px;
  border-radius: 16px; background: var(--soft); font-size: 15px; line-height: 1.5; cursor: pointer;
}
.consent input {
  flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--ink); cursor: pointer;
}
.consent a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.privacy-note {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 16px;
  color: var(--muted); font-size: 13px; line-height: 1.55;
}
.privacy-note .ui-icon { width: 14px; height: 14px; margin-top: 3px; }

/* Analisando */
.analyzing { display: grid; align-content: center; justify-items: center; min-height: calc(100svh - 63px - 68px); text-align: center; }
.pulse { position: relative; width: 64px; height: 64px; margin-bottom: 28px; }
.pulse::before, .pulse::after {
  content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--ink);
  animation: spin 1s linear infinite;
}
.pulse::after { inset: 14px; border-top-color: #85858c; animation-duration: 1.6s; animation-direction: reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.analyzing h1 { margin-bottom: 10px; font-size: 26px; line-height: 1.25; }
.analyzing-line { min-height: 48px; max-width: 30ch; color: var(--muted); font-size: 16px; line-height: 1.5; }

/* Resultado */
.result-kicker { margin-bottom: 6px; color: var(--muted); font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; }
.result-title { margin-bottom: 14px; font-size: clamp(36px, 10vw, 48px); line-height: 1.1; text-wrap: balance; }
.result-about { margin-bottom: 28px; color: var(--muted); font-size: 17px; line-height: 1.6; text-wrap: pretty; }

.plan-card {
  --tint: #f3f5f8;
  position: relative; padding: 24px 20px;
  border: 1px solid #ffffffd9; border-radius: 24px;
  background: linear-gradient(145deg, #fff, var(--tint));
  box-shadow: 0 0 0 1px #28364b12, 0 8px 28px #28364b0d, inset 0 1px 1px #fff;
}
.plan-card[data-material="prata"] { --tint: #e9edf2; }
.plan-card[data-material="ouro"] { --tint: #fcf2da; }
.plan-card[data-material="diamante"] { --tint: #e4f3fa; }
.plan-label { display: block; margin-bottom: 10px; color: var(--muted); font-size: 12px; line-height: 1.5; letter-spacing: .02em; }
.plan-card h2 { font-size: 26px; line-height: 1.2; }
.plan-service { margin-top: 2px; color: var(--muted); font-size: 14px; line-height: 1.5; }
.price-block { margin: 20px 0 4px; }
.price-from { display: block; margin-bottom: 2px; color: var(--muted); font-size: 14px; text-decoration: line-through; }
.price { display: block; font-size: 34px; line-height: 1.15; font-weight: 500; white-space: nowrap; }
.price-caption { display: block; margin-top: 6px; color: var(--muted); font-size: 13px; line-height: 1.5; }
.highlights { display: grid; gap: 10px; margin: 20px 0 0; padding: 18px 0 0; border-top: 1px solid #1d1d1f14; list-style: none; }
.highlights li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; line-height: 1.5; }
.highlights .ui-icon { margin-top: 3px; }
.addon {
  margin-top: 18px; padding: 16px; border-radius: 16px; background: #ffffffb3;
  box-shadow: 0 0 0 1px #28364b12;
}
.addon h3 { font-size: 17px; line-height: 1.35; }
.addon p { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.55; }
.addon .addon-price { margin-top: 8px; color: var(--ink); font-size: 15px; }
.addon .addon-price s { color: var(--muted); }

.black-box {
  margin-top: 16px; padding: 20px; border-radius: 20px; background: #111; color: #fff;
}
.black-box h2 { font-size: 19px; line-height: 1.3; }
.black-box ul { display: grid; gap: 8px; margin: 14px 0 14px; padding: 0; list-style: none; }
.black-box li { display: flex; gap: 10px; font-size: 15px; line-height: 1.5; }
.black-box li .ui-icon { margin-top: 3px; }
.black-box p { color: #ffffffb3; font-size: 13px; line-height: 1.55; }
.black-box a { color: #fff; text-decoration: underline; text-underline-offset: 2px; }

.actions { display: grid; gap: 10px; margin-top: 24px; }
.result-note { margin-top: 14px; color: var(--muted); font-size: 13px; line-height: 1.55; text-align: center; }
.restart { display: flex; justify-content: center; margin-top: 18px; }
.text-button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 10px 4px; border: 0;
  background: transparent; color: var(--muted); font-size: 14px; font-weight: 500; text-decoration: none;
}
.text-button:hover { color: var(--ink); }

.no-script { padding: 40px 0; font-size: 17px; line-height: 1.6; }
.no-script a { text-decoration: underline; }

/* Entrada de cada tela */
.enter > * { animation: rise 460ms var(--ease-out) backwards; }
.enter > :nth-child(2) { animation-delay: 50ms; }
.enter > :nth-child(3) { animation-delay: 100ms; }
.enter > :nth-child(n+4) { animation-delay: 150ms; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

@media (min-width: 761px) {
  .screen { padding-top: 56px; }
  .brand img { width: 108px; }
  .quiz-bar { min-height: 68px; }
  .intro h1 { max-width: 15ch; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0ms !important; }
  .enter > * { animation: none; }
  .pulse::before, .pulse::after { animation-duration: 3s; }
}
