/* Ziegler Perícia — valordomeuimovel.com
   Design: Home v2 (Paper). Tipos: Spectral (títulos) + Public Sans (texto).
   Movimento: ver prancheta "Guia de animações". Tudo que anima fica sob .motion
   (JS ativo e sem prefers-reduced-motion). */

:root {
  --ink: #0E1E36;
  --ink-2: #1B2D4A;
  --paper: #FFFFFF;
  --sulfite: #EDF1F5;
  --line: #D5DCE5;
  --text: #1A2433;
  --muted: #4F5B6B;
  --placeholder: #8A93A1;
  --brass: #A27A2E;
  --brass-dark: #7A5B20;
  --brass-soft: #E9DDC4;
  --ok: #2E6B4A;
  --risk: #9A3B2B;
  --on-ink: #FFFFFF;
  --on-ink-muted: #B9C3D1;

  --serif: "Spectral", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(16px, 4vw, 40px);
  --section: clamp(72px, 9vw, 120px);
  --radius: 10px;
  --radius-sm: 8px;

  --dur-fast: 150ms;
  --dur-base: 200ms;
  --dur-slow: 300ms;
  --dur-draw: 1200ms;
  --ease-out: cubic-bezier(0.2, 0, 0, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 96px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--text); font: 400 17px/1.6 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; color: var(--ink); margin: 0; letter-spacing: -0.01em; }
h2 { font-size: clamp(34px, 3vw + 14px, 52px); line-height: 1.15; }
h3 { font-size: 24px; line-height: 1.3; font-weight: 600; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--brass); outline-offset: 3px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -9999px; z-index: 100; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: var(--section) 0; }
.section--sulfite { background: var(--sulfite); }
.section--ink { background: var(--ink); color: var(--on-ink); }
.section--ink h2, .section--ink h3 { color: var(--on-ink); }
.section-head { display: grid; gap: 20px; margin-bottom: 56px; }
.section-head p { font-size: 18px; line-height: 1.6; color: var(--muted); max-width: 38em; }
.lead { font-size: 19px; line-height: 1.6; color: var(--muted); }
.section--ink .lead { color: var(--on-ink-muted); }

/* Botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border-radius: var(--radius-sm); border: 1.5px solid transparent;
  font: 600 16px/1 var(--sans); text-decoration: none; cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-in-out), border-color var(--dur-fast), color var(--dur-fast);
}
.btn svg { width: 20px; height: 20px; flex-shrink: 0; }
.btn--primary { background: var(--ink); color: var(--on-ink); }
.btn--primary:hover { background: var(--ink-2); }
.btn--light { background: var(--paper); color: var(--ink); }
.btn--light:hover { background: var(--brass-soft); }
.btn--outline-light { border-color: rgba(255,255,255,.55); color: var(--on-ink); background: transparent; }
.btn--outline-light:hover { border-color: var(--on-ink); background: rgba(255,255,255,.06); }
.btn--block { width: 100%; }
.text-link {
  font-weight: 600; color: var(--ink); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 4px;
  transition: color var(--dur-fast), text-decoration-color var(--dur-fast), text-decoration-thickness var(--dur-fast);
}
.text-link:hover { color: var(--brass-dark); text-decoration-thickness: 2.5px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 0 0 rgba(14,30,54,0); transition: box-shadow var(--dur-base) var(--ease-out);
}
.site-header.is-scrolled { box-shadow: 0 6px 18px -10px rgba(14,30,54,.28); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 76px; }
.brand img { width: 220px; height: auto; }
.footer-logo { width: 240px; height: auto; margin-bottom: 16px; }
.nav { display: flex; gap: 30px; }
.nav a { position: relative; text-decoration: none; font-size: 15px; font-weight: 500; transition: color var(--dur-fast); }
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -6px; height: 1.5px; background: var(--brass);
  transform: scaleX(0); transform-origin: left; transition: transform var(--dur-base) var(--ease-out);
}
.nav a:hover { color: var(--brass-dark); }
.nav a:hover::after { transform: scaleX(1); }
.header-actions { display: flex; align-items: center; gap: 20px; }
.header-phone { font-weight: 600; font-size: 15px; text-decoration: none; color: var(--ink); white-space: nowrap; transition: color var(--dur-fast); }
.header-phone:hover { color: var(--brass-dark); }
.header-actions .btn { min-height: 44px; padding: 0 20px; font-size: 15px; }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; color: var(--ink); }
.menu-btn svg { width: 24px; height: 24px; display: block; }
.mobile-nav { display: none; }

/* Hero */
main { display: block; margin: 0; padding: 0; }
.hero { position: relative; overflow: hidden; background: var(--ink); color: var(--on-ink); margin-top: -1px; }
.planta { position: absolute; top: 0; right: 0; height: 100%; width: auto; min-width: 57%; pointer-events: none; }
.hero-fade {
  position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(90deg, var(--ink) 0%, var(--ink) 40%, rgba(14,30,54,.35) 56%, rgba(14,30,54,0) 100%);
}
.hero .wrap { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 80px; align-items: center; padding-top: 40px; padding-bottom: 40px; min-height: 722px; }
.hero h1 { font-size: clamp(48px, 4vw + 20px, 76px); line-height: 1.05; letter-spacing: -0.02em; color: var(--on-ink); max-width: 9.5em; }
.hero .lead { margin-top: 28px; color: var(--on-ink-muted); max-width: 30em; }
.hero-actions { margin-top: 36px; }
.assurance { display: flex; align-items: center; gap: 14px; margin-top: 32px; font-size: 15px; line-height: 1.4; color: var(--on-ink-muted); }
.assurance img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; object-position: 50% 20%; border: 2px solid var(--paper); }
.assurance strong { display: block; color: var(--on-ink); font-weight: 600; }

/* Card do formulário */
.form-card { background: var(--paper); color: var(--text); border-radius: var(--radius); padding: 28px 32px; box-shadow: 0 1px 2px rgba(14,30,54,.06), 0 18px 40px -12px rgba(14,30,54,.35); }
.form-card .card-title { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.25; color: var(--ink); margin-bottom: 16px; }
.lead-form { display: grid; gap: 16px; }
.fg { border: 0; margin: 0; padding: 0; min-width: 0; display: grid; gap: 8px; }
.fg legend, .field label { padding: 0; font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.field label { margin-bottom: 0; }
.tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.tile { position: relative; display: block; cursor: pointer; }
.tile input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.tile-box {
  display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--paper);
  font-size: 15px; font-weight: 500; color: var(--text); white-space: nowrap;
  transition: background-color var(--dur-base) var(--ease-in-out), border-color var(--dur-fast), color var(--dur-base), transform 100ms var(--ease-out);
}
.tile-box svg { width: 22px; height: 22px; flex-shrink: 0; stroke: var(--ink); transition: stroke var(--dur-base); }
.tile:hover .tile-box { border-color: var(--muted); }
.tile:active .tile-box { transform: scale(.98); }
.tile input:checked + .tile-box { background: var(--ink); border-color: var(--ink); color: var(--on-ink); font-weight: 600; }
.tile input:checked + .tile-box svg { stroke: var(--on-ink); }
.tile input:focus-visible + .tile-box { outline: 3px solid var(--brass); outline-offset: 2px; }
.tile.flash .tile-box { animation: flash 600ms var(--ease-out); }
@keyframes flash { 0%, 30% { background: var(--brass-soft); border-color: var(--brass); } }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { display: grid; gap: 6px; align-content: start; }
.field input {
  width: 100%; height: 48px; padding: 0 14px; font: 400 15px/1 var(--sans); color: var(--text);
  background: var(--paper); border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  transition: border-color var(--dur-fast), box-shadow var(--dur-fast);
}
.field input::placeholder { color: var(--placeholder); }
.field input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(162,122,46,.45); }
.field input[aria-invalid="true"] { border-color: var(--risk); }
.field-error { font-size: 13px; line-height: 1.4; color: var(--risk); }
.field-error[hidden] { display: none; }
.motion .field-error:not([hidden]) { animation: fadein var(--dur-fast) var(--ease-out); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.submit { position: relative; min-height: 52px; margin-top: 4px; }
.submit[disabled] { background: #4A5A72; cursor: progress; }
.spinner { display: none; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin 700ms linear infinite; }
.submit[disabled] .spinner { display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.form-note { font-size: 14px; color: var(--muted); text-align: center; }
.form-state { display: grid; gap: 14px; padding: 8px 0 4px; }
.form-state[hidden] { display: none; }
.form-state .state-title { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 24px; font-weight: 600; color: var(--ink); }
.form-state .state-title svg { width: 28px; height: 28px; flex-shrink: 0; }
.form-state p { color: var(--muted); }
.form-state .btn { justify-self: start; }
.form-state--ok .state-title svg { stroke: var(--ok); }.form-state--fail .state-title svg { stroke: var(--risk); }
.motion .form-state:not([hidden]) { animation: fadein var(--dur-slow) var(--ease-out); }
.motion .lead-form.is-leaving { opacity: 0; transition: opacity var(--dur-fast) var(--ease-in-out); }

/* Situações */
.uses { display: grid; grid-template-columns: 1fr 1fr; column-gap: 72px; }
.use { display: grid; gap: 10px; align-content: start; padding: 28px 0 32px; border-top: 1px solid var(--line); }
.uses .use:nth-last-child(-n+2) { border-bottom: 1px solid var(--line); }
.use p { color: var(--muted); max-width: 34em; }
.use .text-link { justify-self: start; margin-top: 6px; font-size: 15px; }

/* Benefícios */
.benefits { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 72px; }
.benefit { position: relative; display: grid; gap: 12px; align-content: start; padding-top: 24px; }
.benefit::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--ink); transform-origin: left; }
.benefit .where { font-size: 15px; font-weight: 600; color: var(--brass-dark); }
.benefit h3 { font-size: 34px; line-height: 1.18; font-weight: 500; }
.benefit p { color: var(--muted); }
.benefits-cta { margin-top: 64px; }

/* Passos */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; counter-reset: step; }
.steps li { counter-increment: step; display: grid; gap: 10px; align-content: start; }
.steps li::before {
  content: counter(step); font: 500 44px/1 var(--serif); color: var(--brass); font-variant-numeric: lining-nums;
  padding-bottom: 16px; border-bottom: 2px solid var(--ink); margin-bottom: 8px;
}
.steps h3 { font-size: 22px; }
.steps p { color: var(--muted); font-size: 16px; }
.norm { display: flex; flex-wrap: wrap; gap: 12px 56px; margin-top: 56px; padding: 24px 28px; background: var(--sulfite); border-radius: var(--radius); }
.norm div { display: grid; }
.norm dt { font-size: 14px; color: var(--muted); }
.norm dd { margin: 0; font: 600 20px/1.4 var(--serif); color: var(--ink); font-variant-numeric: lining-nums; }

/* Advogados */
.lawyers { display: grid; grid-template-columns: 1fr 1fr; gap: 96px; align-items: start; }
.lawyers .lead { margin-top: 20px; }
.lawyers .btn { margin-top: 32px; }
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: grid; grid-template-columns: 22px 1fr; gap: 14px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.14); }
.checklist li:last-child { border-bottom: 1px solid rgba(255,255,255,.14); }
.checklist svg { width: 20px; height: 20px; margin-top: 3px; stroke: var(--brass-soft); }
.checklist strong { display: block; font-weight: 600; color: var(--on-ink); }
.checklist span { color: var(--on-ink-muted); font-size: 16px; }

/* O perito */
.about { display: grid; grid-template-columns: 440px 1fr; gap: 96px; align-items: center; }
.about img { border-radius: var(--radius); aspect-ratio: 440 / 547; object-fit: cover; }
.about h2 { font-size: clamp(40px, 3vw + 18px, 56px); }
.about .lead { margin-top: 20px; color: var(--text); font-size: 20px; }
.about .body { margin-top: 16px; color: var(--muted); }
.credentials { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 32px 0; }
.credentials div { padding: 18px 20px; background: var(--sulfite); border-radius: var(--radius-sm); }
.credentials dt { font-size: 14px; color: var(--muted); }
.credentials dd { margin: 4px 0 0; font: 600 24px/1.3 var(--serif); color: var(--ink); font-variant-numeric: lining-nums; }
.about-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 28px; }

/* Depoimentos */
.quotes { display: grid; grid-template-columns: 1.4fr 1fr; gap: 72px; align-items: start; }
.quote { margin: 0; }
.quote blockquote { margin: 0; font-family: var(--serif); color: var(--ink); }
.quote--main blockquote { font-size: clamp(24px, 1.5vw + 12px, 32px); line-height: 1.38; }
.quote--side { padding-top: 24px; border-top: 1px solid var(--line); }
.quote--side + .quote--side { margin-top: 32px; }
.quote--side blockquote { font-size: 19px; line-height: 1.5; }
.quote figcaption { margin-top: 18px; font-size: 15px; color: var(--muted); }
.quote figcaption strong { display: block; color: var(--text); font-weight: 600; }

/* Dúvidas */
.faq { display: grid; grid-template-columns: 380px 1fr; gap: 96px; }
.faq h2 { font-size: 40px; line-height: 1.2; }
.faq .lead { margin-top: 16px; font-size: 17px; }
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 24px 0;
  background: none; border: 0; cursor: pointer; text-align: left; font: 600 18px/1.4 var(--sans); color: var(--ink);
}
.faq-q .sign { width: 24px; flex-shrink: 0; text-align: right; font: 400 28px/1 var(--sans); color: var(--brass); transition: transform var(--dur-base) var(--ease-in-out); }
.faq-item.is-open .sign { transform: rotate(45deg); }
.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows var(--dur-slow) var(--ease-in-out); }
.faq-item.is-open .faq-a { grid-template-rows: 1fr; }
.faq-a > div { overflow: hidden; }
.faq-a p { padding-bottom: 24px; color: var(--muted); max-width: 40em; }

/* Contato */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) 560px; gap: 80px; align-items: start; }
.contact .lead { margin-top: 20px; }
.direct { display: grid; gap: 14px; margin-top: 40px; }
.direct .label { font-size: 15px; color: var(--on-ink-muted); }
.direct .phone { font: 600 36px/1.2 var(--serif); color: var(--brass-soft); text-decoration: none; font-variant-numeric: lining-nums; transition: color var(--dur-fast); }
.direct .phone:hover { color: var(--on-ink); }
.direct .btn { justify-self: start; }
.direct .email { font-size: 15px; color: var(--on-ink-muted); text-decoration: none; transition: color var(--dur-fast); }
.direct .email:hover { color: var(--on-ink); }

/* Rodapé */
.site-footer { background: #091526; color: var(--on-ink-muted); padding: 64px 0 32px; font-size: 15px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer-brand { font: 600 24px/1.3 var(--serif); color: var(--on-ink); margin-bottom: 12px; }
.footer-grid h3 { font: 600 15px/1.4 var(--sans); color: var(--on-ink); margin-bottom: 14px; letter-spacing: 0; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer-grid a { text-decoration: none; transition: color var(--dur-fast); }
.footer-grid a:hover { color: var(--on-ink); }
.footer-legal { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 13px; }

/* WhatsApp flutuante (celular) */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60;
  display: none; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: #1F8F55; color: #fff; box-shadow: 0 8px 24px -6px rgba(14,30,54,.45);
  transform: translateY(140%); transition: transform var(--dur-slow) var(--ease-out);
}
.wa-float svg { width: 28px; height: 28px; }
.wa-float.is-visible { transform: none; }

/* Movimento (só com JS e sem prefers-reduced-motion) */
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeup { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }

.motion .planta.is-drawing .pw { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw var(--dur-draw) var(--ease-out) forwards; }
.motion .planta.is-drawing .pd { opacity: 0; animation: fadein var(--dur-slow) ease forwards 600ms; }
.motion .hero-copy { animation: fadein var(--dur-slow) var(--ease-out) both; }
.motion .hero .form-card { animation: fadeup var(--dur-slow) var(--ease-out) 150ms both; }

.motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--dur-slow) var(--ease-out), transform var(--dur-slow) var(--ease-out); }
.motion .reveal.is-in { opacity: 1; transform: none; }

.motion .benefits .benefit::before { transform: scaleX(0); transition: transform var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.motion .benefits.is-in .benefit::before { transform: scaleX(1); }

.motion .steps li::before { color: transparent; transition: color var(--dur-slow) var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); }
.motion .steps.is-in li::before { color: var(--brass); }

/* Responsivo */
@media (max-width: 1100px) {
  .nav, .header-phone { display: none; }
  .menu-btn { display: block; }
  .mobile-nav { display: none; background: var(--paper); border-top: 1px solid var(--line); }
  .mobile-nav.is-open { display: grid; }
  .mobile-nav a { padding: 16px var(--gutter); text-decoration: none; font-weight: 500; border-bottom: 1px solid var(--line); }
  .hero .wrap, .contact { grid-template-columns: 1fr; gap: 48px; min-height: 0; padding-top: 56px; padding-bottom: 64px; }
  .contact { padding: 0; }
  .form-card { max-width: 560px; }
  .hero-fade { background: linear-gradient(180deg, rgba(14,30,54,.55) 0%, var(--ink) 70%); }
  .planta { height: auto; width: 130%; min-width: 0; max-width: 1000px; right: -15%; opacity: .6; }
  .steps { grid-template-columns: 1fr 1fr; }
  .lawyers, .about, .quotes, .faq { grid-template-columns: 1fr; gap: 48px; }
  .about img { max-width: 420px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 720px) {
  body { font-size: 16px; }
  .header-actions .btn { display: none; }
  .brand img { width: 180px; }
  .uses, .benefits, .steps, .credentials, .footer-grid { grid-template-columns: 1fr; }
  .uses .use:nth-last-child(2) { border-bottom: 0; }
  .benefit h3 { font-size: 28px; }
  .form-card { padding: 24px 20px; }
  .tile-box { font-size: 14px; gap: 8px; padding: 0 10px; }
  .tile-box svg { width: 20px; height: 20px; }
  .row { grid-template-columns: 1fr; }
  .wa-float { display: grid; }
  .hero-actions .btn { width: 100%; }
}
@media (max-width: 400px) {
  .tiles { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
