/* Avaliação de imóvel — Zroo, público proprietário (roxo).
   Toda cor e medida de marca vem de assets/zroo-tokens.css (var(--zr-*)).
   Coluna única, pensada no celular; leitura maior porque o proprietário tem 60+. */

@font-face { font-family: 'Effra'; src: url('assets/fonts/effra-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Effra'; src: url('assets/fonts/effra-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Effra'; src: url('assets/fonts/effra-900.woff2') format('woff2'); font-weight: 900; font-display: swap; }

:root {
  --lp-ease: var(--zr-easing);
  --lp-ease-out: cubic-bezier(.22, 1, .36, 1);
  --lp-ease-pop: cubic-bezier(.34, 1.56, .64, 1);
  --lp-texto: 1.25rem;                          /* 20px — corpo */
  --lp-opcao: 1.375rem;                         /* 22px — rótulo de opção */
  --lp-pergunta: clamp(2rem, 8.4vw, 2.5rem);
  --lp-hero: clamp(2.625rem, 11.5vw, 4rem);
  --lp-toque: 4.5rem;                           /* altura mínima de um alvo de toque */
  --lp-coluna: 36rem;
  --lp-lateral: 1.25rem;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  overflow-x: clip;
  font-family: var(--zr-font-family);
  font-weight: 500;
  font-size: var(--lp-texto);
  line-height: 1.45;
  color: var(--zr-color-text);
  background: var(--zr-color-bg);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
button, input { font: inherit; color: inherit; }
a { color: var(--zr-accent); }
:focus-visible { outline: 3px solid var(--zr-accent); outline-offset: 3px; }

/* ---------- Topo: pílula flutuante, como na home ---------- */

.topo {
  position: sticky;
  top: 0;
  z-index: 10;
  padding: calc(.75rem + env(safe-area-inset-top, 0px)) var(--lp-lateral) .75rem;
  background: linear-gradient(var(--zr-color-bg) 75%, transparent);
}
.topo__barra {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: var(--lp-coluna);
  min-height: 4rem;
  margin-inline: auto;
  padding: .5rem;
  background: var(--zr-color-surface);
  border: 1px solid var(--zr-color-border);
  border-radius: var(--zr-radius-pill);
  box-shadow: var(--zr-shadow-md);
}
.topo__logo { grid-column: 2; }
.topo__logo img { height: 2.25rem; width: auto; }

.voltar {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  min-height: 3rem;
  padding: 0 1rem 0 .625rem;
  border: 0;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-color-surface-muted);
  font-size: 1.0625rem;
  font-weight: 700;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-.5rem);
  transition: opacity .3s var(--lp-ease), transform .4s var(--lp-ease-out), visibility .3s, background .2s;
}
.voltar svg { width: 1.375rem; height: 1.375rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }
.em-fluxo .voltar { opacity: 1; visibility: visible; transform: none; }
.voltar:active { background: var(--zr-color-surface-sunken); }

.progresso {
  max-width: var(--lp-coluna);
  height: .375rem;
  margin: .875rem auto 0;
  overflow: hidden;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-color-surface-sunken);
  opacity: 0;
  transition: opacity .4s var(--lp-ease);
}
.progresso i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--zr-accent);
  transition: width .7s var(--lp-ease-out);
}
.em-fluxo .progresso { opacity: 1; }

/* ---------- Palco: um passo por tela ---------- */

.palco {
  position: relative;
  isolation: isolate;
  overflow-x: clip;
  max-width: calc(var(--lp-coluna) + 2 * var(--lp-lateral));
  margin-inline: auto;
  padding: .5rem var(--lp-lateral) 0;
}
.passo {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  min-height: calc(100dvh - 8rem);
  padding-bottom: 1.5rem;
}
.passo[inert] { pointer-events: none; }

.passo__icone { width: 4rem; height: 4rem; }
.passo__titulo {
  margin: .25rem 0 0;
  font-size: var(--lp-pergunta);
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: var(--zr-letter-spacing-display);
  text-wrap: balance;
}
.passo__titulo:focus { outline: none; }
.passo__titulo label { cursor: text; }
.passo__ajuda { margin: -.5rem 0 0; color: var(--zr-color-text-subtle); }

/* Primeira tela: manchete + a primeira pergunta já tocável */
.passo--inicio { gap: 1.125rem; }
.passo--inicio::before {
  content: '';
  position: absolute;
  z-index: -2;
  top: -6rem;
  right: -45%;
  width: 30rem;
  height: 30rem;
  border-radius: 50%;
  background: radial-gradient(closest-side, var(--zr-accent-soft), transparent);
}
.hero__titulo {
  margin: .75rem 0 0;
  font-size: var(--lp-hero);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: var(--zr-letter-spacing-display);
  text-wrap: balance;
}
.hero__titulo strong { font-weight: 900; }
.hero__titulo em { font-style: normal; color: var(--zr-accent); }
.hero__texto { margin: 0; max-width: 28ch; font-size: 1.3125rem; color: var(--zr-color-text-subtle); }
.passo--inicio .passo__titulo { margin-top: 1rem; font-size: 1.625rem; letter-spacing: var(--zr-letter-spacing-heading); }
.hero__nota {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .25rem 0 0;
  font-size: 1.0625rem;
  color: var(--zr-color-text-subtle);
}
.hero__nota svg { flex: none; width: 1.375rem; height: 1.375rem; fill: none; stroke: var(--zr-accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@keyframes traca { to { stroke-dashoffset: 0; } }

/* ---------- Opções ---------- */

.lista { display: grid; gap: .75rem; }
.grade { display: grid; grid-template-columns: repeat(var(--colunas, 2), minmax(0, 1fr)); gap: .5rem; }

.opcao {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
  min-height: var(--lp-toque);
  padding: .875rem 1rem .875rem 1.375rem;
  border: 2px solid var(--zr-color-border);
  border-radius: var(--zr-radius-lg);
  background: var(--zr-color-surface);
  font-size: var(--lp-opcao);
  font-weight: 700;
  line-height: 1.2;
  text-align: left;
  cursor: pointer;
  touch-action: manipulation;
  transition: border-color .25s var(--lp-ease), box-shadow .25s var(--lp-ease), transform .3s var(--lp-ease-out), color .3s var(--lp-ease);
}
/* o preenchimento nasce no ponto do toque */
.opcao::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--zr-accent-soft);
  clip-path: circle(0 at var(--x, 50%) var(--y, 50%));
  transition: clip-path .6s var(--lp-ease-out);
}
.opcao[aria-pressed="true"] { border-color: var(--zr-accent); }
.opcao[aria-pressed="true"]::before { clip-path: circle(150% at var(--x, 50%) var(--y, 50%)); }
.opcao:active { transform: scale(.98); }
@media (hover: hover) {
  .opcao:hover { border-color: var(--zr-accent-light); box-shadow: var(--zr-shadow-md); }
  .opcao[aria-pressed="true"]:hover { border-color: var(--zr-accent); }
}
.opcao small { display: block; margin-top: .25rem; font-size: 1.0625rem; font-weight: 500; color: var(--zr-color-text-subtle); }
.opcao > img { flex: none; width: 3rem; height: 3rem; }

.opcao__marca {
  flex: none;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-left: auto;
  border: 2px solid var(--zr-color-border-strong);
  border-radius: 50%;
  background: var(--zr-color-surface);
  transition: background .25s var(--lp-ease), border-color .25s var(--lp-ease), transform .45s var(--lp-ease-pop);
}
.opcao__marca svg {
  width: 1.125rem;
  height: 1.125rem;
  fill: none;
  stroke: var(--zr-accent-contrast);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  transition: stroke-dashoffset .35s .12s var(--lp-ease);
}
.opcao[aria-pressed="true"] .opcao__marca { background: var(--zr-accent); border-color: var(--zr-accent); transform: scale(1.1); }
.opcao[aria-pressed="true"] .opcao__marca svg { stroke-dashoffset: 0; }

/* grade de números: o toque enche o bloco inteiro de roxo */
.grade .opcao {
  flex-direction: column;
  justify-content: center;
  gap: .125rem;
  min-height: 5.75rem;
  padding: .5rem;
  text-align: center;
}
.grade .opcao:not(.opcao--largo) .opcao__marca { display: none; }
.grade .opcao::before { background: var(--zr-accent); }
.grade .opcao[aria-pressed="true"] { color: var(--zr-accent-contrast); }
.grade .opcao small { margin: 0; font-size: 1.1875rem; font-weight: 700; color: inherit; }
.grade .opcao > span:not(.opcao__marca), .opcao__num { display: block; font-size: 3rem; font-weight: 900; line-height: 1; letter-spacing: -0.02em; }
.grade .opcao__marca, .chips .opcao__marca { position: absolute; top: .625rem; right: .625rem; width: 1.75rem; height: 1.75rem; }
.grade .opcao[aria-pressed="true"] .opcao__marca { background: var(--zr-accent-contrast); border-color: var(--zr-accent-contrast); }
.grade .opcao__marca svg { stroke: var(--zr-accent); }
/* "Mais de 4": faixa larga sob a grade, abre o campo para digitar */
.grade .opcao--largo { grid-column: 1 / -1; flex-direction: row; justify-content: flex-start; min-height: var(--lp-toque); padding: .875rem 1rem .875rem 1.375rem; text-align: left; }
.grade .opcao--largo > span:not(.opcao__marca) { font-size: var(--lp-opcao); font-weight: 700; letter-spacing: 0; }
.grade .opcao--largo .opcao__marca { position: static; width: 2rem; height: 2rem; }

/* lazer: vários de uma vez */
.chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; padding-bottom: 1rem; }
.chips .opcao {
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: .875rem;
  min-height: 8.25rem;
  padding: 1rem;
  font-size: 1.1875rem;
}

/* ---------- Campos ---------- */

.campo { display: grid; gap: .75rem; }
.campo input {
  width: 100%;
  min-height: 4.25rem;
  padding: 0 1.375rem;
  border: 2px solid transparent;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-color-surface-muted);
  font-size: 1.5rem;
  font-weight: 500;
  transition: border-color .2s var(--lp-ease), box-shadow .2s var(--lp-ease), background .2s var(--lp-ease);
}
.campo input::placeholder { color: var(--zr-color-text-muted); opacity: 1; }
.campo input:focus { outline: none; background: var(--zr-color-surface); border-color: var(--zr-accent); box-shadow: 0 0 0 4px var(--zr-accent-ring); }
.campo input[aria-invalid="true"] { border-color: var(--zr-color-danger); }
.erro { margin: 0 0 0 1.375rem; font-size: 1.125rem; color: var(--zr-color-danger); }
.passo__extra { display: grid; gap: .75rem; }
.passo__extra label, .campo--solto label { font-size: 1.125rem; font-weight: 700; }
.campo--solto small { font-size: 1rem; font-weight: 500; color: var(--zr-color-text-subtle); }
.campo__caixa { position: relative; }
.campo__caixa input { padding-right: 4.5rem; }
.campo__sufixo { position: absolute; top: 50%; right: 1.5rem; transform: translateY(-50%); font-size: 1.5rem; font-weight: 700; color: var(--zr-color-text-subtle); pointer-events: none; }

.segmento { border: 0; margin: .5rem 0 0; padding: 0; display: grid; gap: .625rem; }
.segmento legend { padding: 0; margin-bottom: .625rem; font-size: 1.125rem; font-weight: 700; }
.segmento__trilho {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
  padding: .375rem;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-color-surface-muted);
}
.segmento__trilho::before {
  content: '';
  position: absolute;
  top: .375rem;
  bottom: .375rem;
  left: .375rem;
  width: calc(50% - .625rem);
  border-radius: var(--zr-radius-pill);
  background: var(--zr-accent);
  box-shadow: 0 6px 16px var(--zr-accent-ring);
  transition: transform .5s var(--lp-ease-out);
}
.segmento__trilho[data-v="WhatsApp"]::before { transform: translateX(calc(100% + .5rem)); }
.segmento__trilho button {
  position: relative;
  min-height: 3.5rem;
  border: 0;
  border-radius: var(--zr-radius-pill);
  background: transparent;
  font-size: 1.1875rem;
  font-weight: 700;
  cursor: pointer;
  transition: color .3s var(--lp-ease);
}
.segmento__trilho button[aria-pressed="true"] { color: var(--zr-accent-contrast); }
.legal { margin: 0; font-size: 1rem; color: var(--zr-color-text-subtle); }

/* ---------- Botões ---------- */

.passo__acoes {
  position: sticky;
  bottom: 0;
  margin-top: auto;
  padding: 1.5rem 0 calc(1rem + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(transparent, var(--zr-color-bg) 40%);
}
.passo--campo .passo__acoes, .passo__extra .passo__acoes { position: static; margin-top: .25rem; padding: 0; background: none; }

.btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  width: 100%;
  min-height: 4rem;
  padding: 0 1.5rem;
  border: 0;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-accent);
  color: var(--zr-accent-contrast);
  font-size: 1.3125rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 24px var(--zr-accent-ring);
  touch-action: manipulation;
  transition: transform .3s var(--lp-ease-out), background .2s var(--lp-ease), box-shadow .3s var(--lp-ease);
}
.btn svg { width: 1.5rem; height: 1.5rem; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; transition: transform .35s var(--lp-ease-out); }
.btn:active { transform: scale(.97); }
@media (hover: hover) {
  .btn:hover { background: var(--zr-accent-strong); }
  .btn:hover svg { transform: translateX(.25rem); }
}
.btn__giro {
  position: absolute;
  width: 1.75rem;
  height: 1.75rem;
  border: 3px solid var(--zr-accent-contrast);
  border-right-color: transparent;
  border-radius: 50%;
  opacity: 0;
  animation: gira .8s linear infinite;
}
.btn[aria-busy="true"] { cursor: progress; }
.btn[aria-busy="true"] > :not(.btn__giro) { opacity: 0; }
.btn[aria-busy="true"] .btn__giro { opacity: 1; }
@keyframes gira { to { transform: rotate(1turn); } }

.btn--contorno { background: var(--zr-color-surface); color: var(--zr-accent); border: 2px solid var(--zr-accent); box-shadow: none; }
@media (hover: hover) { .btn--contorno:hover { background: var(--zr-accent-soft); } }

/* ---------- Fim: confirmação e, só agora, a Zroo ---------- */

.fim {
  overflow-x: clip;
  max-width: calc(var(--lp-coluna) + 2 * var(--lp-lateral));
  margin-inline: auto;
  padding: .5rem var(--lp-lateral) 0;
}
.concluido .progresso { opacity: 0; transition-delay: .8s; }

.ok { display: grid; justify-items: start; gap: 1rem; }
.ok__selo { position: relative; width: 5.5rem; height: 5.5rem; margin: .5rem 0 .5rem; }
.ok__selo svg { width: 100%; height: 100%; }
.ok__selo circle { fill: var(--zr-accent); }
.ok__selo path {
  fill: none;
  stroke: var(--zr-accent-contrast);
  stroke-width: 6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: traca .6s .45s var(--lp-ease) forwards;
}
.ok__selo::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px solid var(--zr-accent);
  border-radius: 50%;
  animation: onda 1.4s .35s var(--lp-ease-out) both;
}
@keyframes onda { from { transform: scale(1); opacity: .7; } to { transform: scale(1.9); opacity: 0; } }

.ok__titulo { margin: 0; font-size: clamp(2.5rem, 10.5vw, 3.5rem); font-weight: 900; line-height: 1.05; letter-spacing: var(--zr-letter-spacing-display); text-wrap: balance; }
.ok__titulo:focus { outline: none; }
.ok__texto { margin: 0; font-size: 1.375rem; line-height: 1.4; text-wrap: pretty; }
.ok__fone { margin: 0; color: var(--zr-color-text-subtle); }
.ok__fone strong { color: var(--zr-color-text); white-space: nowrap; }

.ficha {
  width: 100%;
  margin-top: 1rem;
  padding: 1.5rem 1.5rem .5rem;
  border: 1px solid var(--zr-color-border);
  border-radius: var(--zr-radius-xl);
  background: var(--zr-color-surface);
  box-shadow: var(--zr-shadow-md);
}
.ficha h2 { margin: 0 0 .75rem; font-size: 1.5rem; font-weight: 900; letter-spacing: var(--zr-letter-spacing-heading); }
.ficha dl { display: grid; grid-template-columns: auto minmax(0, 1fr); margin: 0; }
.ficha dt, .ficha dd { padding: .875rem 0; border-top: 1px solid var(--zr-color-border); }
.ficha dt { padding-right: 1rem; font-size: 1.0625rem; color: var(--zr-color-text-muted); }
.ficha dd { margin: 0; text-align: right; font-size: 1.1875rem; font-weight: 700; overflow-wrap: anywhere; }

.dif, .dif__aluguel { display: grid; gap: 4rem; }
.dif { padding-top: 5rem; }
.dif__abre { margin: 0; font-size: clamp(2rem, 8.6vw, 3rem); font-weight: 500; line-height: 1.06; letter-spacing: var(--zr-letter-spacing-display); text-wrap: balance; }
.dif__abre strong { font-weight: 900; color: var(--zr-accent); }

/* foto dentro da máscara arredondada */
.foto { position: relative; isolation: isolate; margin: 0; }
.foto img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 30%; border-radius: var(--zr-radius-xl); }
.foto__selo {
  position: absolute;
  left: 1rem;
  bottom: 1rem;
  padding: .625rem 1.25rem;
  border-radius: var(--zr-radius-pill);
  background: var(--zr-color-surface);
  color: var(--zr-accent);
  font-size: 1.125rem;
  font-weight: 900;
  box-shadow: var(--zr-shadow-md);
}

.bloco { display: grid; gap: 1rem; }
.bloco h3 { margin: 0; font-size: clamp(1.75rem, 7.4vw, 2.25rem); font-weight: 500; line-height: 1.1; letter-spacing: var(--zr-letter-spacing-heading); text-wrap: balance; }
.bloco h3 strong { font-weight: 900; }
.bloco > p, .stat > p:last-child { margin: 0; max-width: 34ch; color: var(--zr-color-text-subtle); }

.stat {
  display: grid;
  gap: .5rem;
  padding: 2rem 1.75rem;
  border-radius: var(--zr-radius-xl);
  background: var(--zr-accent-soft);
}
.stat p { margin: 0; }
.stat__num { display: flex; align-items: baseline; gap: .5rem; font-size: clamp(5.5rem, 28vw, 8rem); font-weight: 900; line-height: .9; letter-spacing: -0.04em; color: var(--zr-accent); }
.stat__num small { font-size: 1.5rem; font-weight: 700; letter-spacing: 0; }
.stat__rotulo { font-size: 1.625rem; font-weight: 900; line-height: 1.15; }

.feito { display: grid; gap: 1.5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.feito li { display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 1rem; align-items: start; }
.feito b { display: block; font-size: 1.3125rem; font-weight: 700; line-height: 1.25; }
.feito span { display: block; margin-top: .25rem; font-size: 1.125rem; color: var(--zr-color-text-subtle); }
.feito__check { width: 2.25rem; height: 2.25rem; }
.feito__check circle { fill: var(--zr-accent-soft); }
.feito__check path { fill: none; stroke: var(--zr-accent); stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

.contato {
  display: grid;
  gap: .75rem;
  padding: 2rem 1.5rem;
  border-radius: var(--zr-radius-xl);
  background: var(--zr-color-surface-muted);
}
.contato p { margin: 0; }
.contato__num { font-size: 2rem; font-weight: 900; letter-spacing: -0.01em; user-select: all; }
.contato .btn { margin-top: .5rem; }

.rodape {
  display: grid;
  justify-items: start;
  gap: 1.5rem;
  margin-top: 4rem;
  padding: 2.5rem 0 calc(2.5rem + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid var(--zr-color-border);
}
.rodape__assinatura { width: min(24rem, 100%); }
.rodape small { font-size: 1rem; line-height: 1.6; color: var(--zr-color-text-muted); }

/* surge ao rolar, onde o navegador anima pela rolagem; nos outros fica parado e visível */
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .revela { animation: surge linear both; animation-timeline: view(); animation-range: entry 0% entry 80%; }
    .feito__check path { stroke-dasharray: 1; animation: risca linear both; animation-timeline: view(); animation-range: entry 60% cover 35%; }
  }
}
@keyframes surge { from { opacity: 0; transform: translateY(2.5rem); } }
@keyframes risca { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

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

@media (min-width: 60rem) {
  .palco { overflow-x: visible; }
  .passo--inicio::before { width: 44rem; height: 44rem; right: -70%; }
}
