/* ============================================================
   EASY HOUSE — Simulador
   Tema claro. Deve parecer uma ferramenta, não uma peça de venda.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&display=swap');

:root {
  --navy: #12224A;
  --navy-soft: #1E3566;
  --green: #16A34A;
  --green-dark: #128040;
  --wa: #25D366;
  --gold: #B8860B;

  --ink: #16202E;
  --ink-soft: #4A5768;
  --ink-mute: #6B7789;

  --bg: #F6F8FB;
  --surface: #FFFFFF;
  --line: #E2E8F0;
  --line-strong: #CBD5E1;
  --tint: #EEF4FF;

  --danger: #B42318;
  --danger-bg: #FEF3F2;

  --font: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 14px;
  --radius-lg: 20px;
  --pill: 100px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow: 0 1px 2px rgba(16,32,46,0.05), 0 4px 16px rgba(16,32,46,0.06);
  --shadow-lg: 0 8px 32px rgba(16,32,46,0.10);
  --wrap: 560px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: var(--navy); }

:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; border-radius: 6px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

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

/* ---------------- Cabeçalho ---------------- */
.fx-top {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,248,251,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.fx-top__in {
  max-width: var(--wrap); margin-inline: auto;
  padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.fx-top__brand { display: flex; align-items: center; gap: 8px; }
.fx-top__brand img { height: 30px; width: auto; }
.fx-secure {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.78rem; color: var(--ink-mute); font-weight: 500;
}
.fx-secure svg { width: 14px; height: 14px; color: var(--green); }

/* barra de progresso */
.fx-progress { height: 3px; background: var(--line); overflow: hidden; }
.fx-progress__bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--navy), var(--green));
  transition: width .35s var(--ease);
}

/* ---------------- Container ---------------- */
.fx-main { max-width: var(--wrap); margin-inline: auto; padding: 24px 20px 120px; }

.fx-step { display: none; animation: fx-in .35s var(--ease); }
.fx-step.active { display: block; }
@keyframes fx-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.fx-count { font-size: 0.82rem; font-weight: 600; color: var(--ink-mute); margin-bottom: 10px; letter-spacing: 0.02em; }

.fx-q { font-size: clamp(1.35rem, 4.6vw, 1.7rem); font-weight: 700; line-height: 1.25; color: var(--navy); margin-bottom: 8px; letter-spacing: -0.01em; }
.fx-help { font-size: 0.94rem; color: var(--ink-soft); margin-bottom: 22px; }

/* ---------------- Opções ---------------- */
.fx-options { display: flex; flex-direction: column; gap: 10px; }
.fx-opt {
  width: 100%; text-align: left;
  display: flex; align-items: center; gap: 14px;
  padding: 17px 18px; min-height: 60px;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); font-size: 1.02rem; font-weight: 500;
  transition: border-color .18s, background .18s, transform .12s;
}
.fx-opt:hover { border-color: var(--line-strong); }
.fx-opt:active { transform: scale(.995); }
.fx-opt[aria-pressed="true"], .fx-opt.selected {
  border-color: var(--navy); background: var(--tint);
}
.fx-opt__mark {
  width: 22px; height: 22px; flex-shrink: 0;
  border-radius: 50%; border: 2px solid var(--line-strong);
  display: grid; place-items: center;
}
.fx-opt[aria-pressed="true"] .fx-opt__mark, .fx-opt.selected .fx-opt__mark {
  border-color: var(--navy); background: var(--navy);
}
.fx-opt__mark::after {
  content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff;
  opacity: 0; transition: opacity .15s;
}
.fx-opt[aria-pressed="true"] .fx-opt__mark::after, .fx-opt.selected .fx-opt__mark::after { opacity: 1; }
.fx-opt--check .fx-opt__mark { border-radius: 6px; }
.fx-opt--check .fx-opt__mark::after { border-radius: 2px; width: 9px; height: 9px; }
.fx-opt__text { flex: 1; }
.fx-opt__text small { display: block; font-size: 0.84rem; color: var(--ink-mute); font-weight: 400; margin-top: 2px; }

/* ---------------- Campos ---------------- */
.fx-field { margin-top: 14px; }
.fx-field label { display: block; font-size: 0.92rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 7px; }
.fx-field label .opt { font-weight: 400; color: var(--ink-mute); }
.fx-input, .fx-select {
  width: 100%; padding: 15px 16px; min-height: 56px;
  background: var(--surface); border: 2px solid var(--line);
  border-radius: var(--radius); font-size: 1.05rem;
  transition: border-color .18s, box-shadow .18s;
}
.fx-input:focus, .fx-select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 4px rgba(18,34,74,.10); }
.fx-input[aria-invalid="true"] { border-color: var(--danger); }
.fx-input-yen { position: relative; }
.fx-input-yen .fx-input { padding-left: 34px; }
.fx-input-yen::before {
  content: '¥'; position: absolute; left: 15px; top: 50%; transform: translateY(-50%);
  color: var(--ink-mute); font-size: 1.05rem; pointer-events: none; z-index: 1;
}
.fx-error { display: none; margin-top: 7px; font-size: 0.88rem; color: var(--danger); font-weight: 500; }
.fx-error.show { display: block; }

/* ---------------- Ações ---------------- */
.fx-actions {
  position: fixed; inset: auto 0 0 0; z-index: 40;
  background: rgba(246,248,251,.96); backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
}
.fx-actions__in { max-width: var(--wrap); margin-inline: auto; display: flex; gap: 10px; align-items: center; }

.fx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 16px 26px; min-height: 56px;
  border-radius: var(--pill); font-size: 1.02rem; font-weight: 700;
  text-decoration: none;          /* vale também quando o botão é um <a> */
  transition: background .18s, transform .12s, box-shadow .18s;
}
.fx-btn:active { transform: scale(.985); }
.fx-btn--primary { background: var(--navy); color: #fff; flex: 1; box-shadow: 0 4px 14px rgba(18,34,74,.22); }
.fx-btn--primary:hover { background: var(--navy-soft); }
.fx-btn--primary:disabled { background: var(--line-strong); color: #fff; box-shadow: none; cursor: not-allowed; }
.fx-btn--green { background: var(--green); color: #fff; flex: 1; box-shadow: 0 4px 14px rgba(22,163,74,.24); }
.fx-btn--green:hover { background: var(--green-dark); }
.fx-btn--wa { background: var(--wa); color: #fff; }
.fx-btn--wa:hover { background: #1FBF5B; }
.fx-btn--ghost { background: var(--surface); color: var(--navy); border: 2px solid var(--line); }
.fx-btn--ghost:hover { border-color: var(--line-strong); }
.fx-btn--back {
  width: 56px; min-width: 56px; padding: 0;
  background: var(--surface); border: 2px solid var(--line); color: var(--ink-soft);
}
.fx-btn--block { width: 100%; }
.fx-btn svg { width: 18px; height: 18px; }
.fx-btn--wa { box-shadow: 0 4px 14px rgba(37,211,102,.28); }
.fx-btn--wa svg { width: 21px; height: 21px; }

/* Separador "ou" entre dois caminhos de ação */
.fx-or {
  display: flex; align-items: center; gap: 14px;
  margin: 18px 0;
  color: var(--ink-soft); font-size: .9rem;
}
.fx-or::before, .fx-or::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

/* ---------------- Cartões de resultado ---------------- */
.fx-card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 14px;
}
.fx-card__label {
  font-size: 0.78rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-mute); margin-bottom: 12px;
}
.fx-range { text-align: center; padding: 6px 0 2px; }
.fx-range__value {
  font-size: clamp(1.9rem, 7vw, 2.6rem); font-weight: 700; color: var(--navy);
  letter-spacing: -0.02em; line-height: 1.1;
}
.fx-range__bounds {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 8px; font-size: 0.92rem; color: var(--ink-mute);
}
.fx-range__bar { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--line-strong), var(--navy), var(--line-strong)); margin: 14px 0 6px; }

.fx-rows { display: flex; flex-direction: column; }
.fx-row {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 0.96rem;
}
.fx-row:last-child { border-bottom: none; }
.fx-row dt, .fx-row span:first-child { color: var(--ink-soft); }
.fx-row dd, .fx-row span:last-child { font-weight: 600; text-align: right; }
.fx-row--total { border-top: 2px solid var(--line); margin-top: 4px; padding-top: 14px; font-size: 1.05rem; }
.fx-row--total span:last-child { color: var(--navy); font-weight: 700; }
.fx-row--sub { font-size: 0.88rem; color: var(--ink-mute); }
.fx-row--sub span:last-child { font-weight: 500; }

.fx-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 14px; border-radius: var(--pill);
  font-size: 0.85rem; font-weight: 600;
}
.fx-badge--ok { background: #ECFDF3; color: #067647; }
.fx-badge--review { background: #FFFAEB; color: #B54708; }
.fx-badge--info { background: var(--tint); color: var(--navy); }

.fx-note {
  padding: 14px 16px; border-radius: var(--radius);
  background: var(--tint); border-left: 4px solid var(--navy);
  font-size: 0.9rem; color: var(--ink-soft); line-height: 1.6; margin-bottom: 12px;
}
.fx-note--warn { background: #FFFAEB; border-left-color: #DC6803; }
.fx-note strong { color: var(--ink); }

.fx-legal {
  font-size: 0.82rem; color: var(--ink-mute); line-height: 1.6;
  padding: 14px 16px; background: #F1F5F9; border-radius: var(--radius); margin-top: 16px;
}

/* ---------------- Consentimento ---------------- */
.fx-consent {
  display: flex; gap: 12px; align-items: flex-start;
  padding: 15px 16px; background: var(--surface);
  border: 2px solid var(--line); border-radius: var(--radius); margin-top: 12px;
  cursor: pointer;
}
.fx-consent:has(input:checked) { border-color: var(--navy); background: var(--tint); }
.fx-consent input { width: 22px; height: 22px; margin-top: 1px; accent-color: var(--navy); flex-shrink: 0; cursor: pointer; }
.fx-consent span { font-size: 0.9rem; color: var(--ink-soft); line-height: 1.55; }
.fx-consent a { font-weight: 600; }

/* ---------------- Entrada ---------------- */
.fx-hero { text-align: center; padding: 26px 0 8px; }
.fx-hero__eyebrow {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px; border-radius: var(--pill);
  background: #ECFDF3; color: #067647;
  font-size: 0.82rem; font-weight: 700; margin-bottom: 18px;
}
.fx-hero__title {
  font-size: clamp(1.75rem, 6.4vw, 2.4rem); font-weight: 700; color: var(--navy);
  line-height: 1.18; letter-spacing: -0.02em; margin-bottom: 14px;
}
.fx-hero__sub { font-size: 1.05rem; color: var(--ink-soft); margin-bottom: 24px; }
.fx-hero__img {
  border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 22px;
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.fx-hero__img img { width: 100%; aspect-ratio: 16/10; object-fit: cover; }

.fx-signals { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; margin: 20px 0 0; }
.fx-signal {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  font-size: 0.9rem; font-weight: 600; color: var(--ink-soft);
}
.fx-signal svg { width: 17px; height: 17px; color: var(--green); flex-shrink: 0; }

.fx-disclaimer { font-size: 0.85rem; color: var(--ink-mute); text-align: center; margin-top: 18px; line-height: 1.55; }

/* ---------------- Imóveis ---------------- */
.fx-props { display: flex; flex-direction: column; gap: 12px; margin-top: 8px; }
.fx-prop {
  display: flex; gap: 13px; padding: 13px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); text-decoration: none; color: inherit;
}
.fx-prop img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; flex-shrink: 0; background: var(--bg); }
.fx-prop__body { flex: 1; min-width: 0; }
.fx-prop__city { font-size: 0.8rem; color: var(--ink-mute); }
.fx-prop__title { font-size: 0.98rem; font-weight: 700; margin: 2px 0 6px; }
.fx-prop__price { font-size: 1.1rem; font-weight: 700; color: var(--navy); }
.fx-prop__pay { font-size: 0.85rem; color: var(--ink-soft); }
.fx-prop__tag {
  display: inline-block; margin-top: 6px; padding: 3px 9px;
  border-radius: var(--pill); font-size: 0.74rem; font-weight: 700;
}
.fx-prop__tag--in { background: #ECFDF3; color: #067647; }
.fx-prop__tag--near { background: #FFFAEB; color: #B54708; }

/* ---------------- Carregando ---------------- */
.fx-loading { text-align: center; padding: 50px 0; }
.fx-spin {
  width: 42px; height: 42px; margin: 0 auto 18px;
  border: 3px solid var(--line); border-top-color: var(--navy);
  border-radius: 50%; animation: fx-spin .8s linear infinite;
}
@keyframes fx-spin { to { transform: rotate(360deg); } }
.fx-loading p { color: var(--ink-soft); font-weight: 500; }

/* ---------------- Rodapé ---------------- */
.fx-foot {
  max-width: var(--wrap); margin-inline: auto;
  padding: 26px 20px 34px; text-align: center;
  font-size: 0.83rem; color: var(--ink-mute); line-height: 1.7;
}
.fx-foot a { color: var(--ink-soft); }

@media (min-width: 620px) {
  .fx-signals { grid-template-columns: repeat(4, 1fr); }
  .fx-actions { position: static; background: none; border: none; padding: 22px 0 0; backdrop-filter: none; }
  .fx-main { padding-bottom: 40px; }
}
