:root {
  --bg: #f8f3ee;
  --surface: #ffffff;
  --surface-muted: rgba(255, 255, 255, 0.88);
  --border: #e8dcd1;
  --divider: #e1d4c9;
  --accent: #d97946;
  --accent-strong: #b85b2a;
  --accent-soft: rgba(217, 121, 70, 0.18);
  --text: #2d1f18;
  --muted: #7c6255;
  --muted-soft: rgba(124, 98, 85, 0.7);
  --danger: #d14949;
  --shadow: 0 32px 70px -50px rgba(45, 31, 24, 0.7);
  --radius-lg: 26px;
  --radius-md: 18px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 500 16px/1.6 "Poppins", "Inter", system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

a {
  color: inherit;
  text-decoration: none;
}

/* Container base */

.container {
  width: min(1160px, calc(100% - 48px));
  margin: 0 auto;
}

/* MASTHEAD / HEADER */

.masthead {
  position: relative;
  padding: 56px 0 40px;
  background:
    linear-gradient(180deg, #fbf7f2 0%, rgba(251, 247, 242, 0) 100%),
    repeating-linear-gradient(
      135deg,
      rgba(217, 121, 70, 0.06),
      rgba(217, 121, 70, 0.06) 12px,
      transparent 12px,
      transparent 24px
    );
  border-bottom: 1px solid var(--divider);
}

.masthead__grid {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 48px;
  align-items: stretch;
}

.masthead__badge {
  display: inline-flex;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.masthead__contact-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 34px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 26px;
}

.masthead__identity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}

.masthead__identity-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.brand__name {
  height: 44px;
  width: auto;
  object-fit: contain;
}

.masthead__subtitle {
  margin: 0;
  font-size: 18px;
  color: #000;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.masthead__subtitle a {
  color: #000;
  font-weight: 600;
  font-size: 18px;
}

.masthead__contact-note {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
}

.masthead__contact-note strong {
  color: var(--accent-strong);
}

.masthead__contact-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 14px;
}

.masthead__content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.masthead__tagline {
  margin: 22px 0 30px;
  font-size: clamp(28px, 4.5vw, 38px);
  line-height: 1.2;
  font-weight: 700;
  max-width: 520px;
}

.masthead__copy {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 560px;
  font-size: 17px;
}

.masthead__list {
  list-style: none;
  margin: 0 0 32px;
  padding: 0;
  display: grid;
  gap: 12px;
  color: var(--muted);
  font-size: 15px;
}

.masthead__list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 500;
}

.masthead__list-icon {
  color: var(--accent-strong);
  font-weight: 700;
  line-height: 1;
  margin-top: 2px;
}

/* AVATAR */

.avatar {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  overflow: hidden;
  border: 3px solid rgba(217, 121, 70, 0.28);
  box-shadow: 0 18px 45px -24px rgba(45, 31, 24, 0.55);
}

.avatar--small {
  width: 128px;
  height: 128px;
  border-width: 2px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* BOTÕES */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  font-size: 15px;
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 14px 36px -18px rgba(184, 91, 42, 0.7);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 18px 44px -18px rgba(184, 91, 42, 0.78);
}

.btn-ghost {
  background: transparent;
  color: var(--accent-strong);
  border: 1px solid rgba(184, 91, 42, 0.4);
}

.btn-ghost:hover,
.btn-ghost:focus-visible {
  background: rgba(217, 121, 70, 0.1);
  transform: translateY(-1px);
}

/* SECÇÃO PRINCIPAL */

.simulator {
  padding: 48px 0 60px;
}

.simulator__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 360px);
  gap: 34px;
  align-items: start;
}

/* PAINÉIS / CARDS */

.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 30px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel h2,
.panel h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 22px;
  font-weight: 600;
}

/* Formulário com "vidro" laranja subtil */

form.panel {
  position: relative;
  isolation: isolate;
}

form.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    145deg,
    rgba(217, 121, 70, 0.14),
    transparent 60%
  );
  z-index: -1;
}

/* GRID DO FORMULÁRIO */

.form-grid {
  display: grid;
  gap: 18px;
}

.form-grid__row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* Labels + inputs */

label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-soft);
  margin-bottom: 6px;
}

label input,
label select {
  text-transform: none;
}

input,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(160, 130, 110, 0.35);
  background: rgba(255, 255, 255, 0.9);
  padding: 12px 14px;
  font: inherit;
  color: var(--text);
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

input:focus,
select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 121, 70, 0.22);
  outline: none;
  background: #fff;
}

input::placeholder {
  color: rgba(124, 98, 85, 0.45);
}

/* AUTOCOMPLETE MORADA */

.autocomplete {
  position: relative;
}

.suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(160, 130, 110, 0.35);
  box-shadow: 0 20px 35px rgba(45, 31, 24, 0.18);
  list-style: none;
  margin: 0;
  padding: 4px 0;
  max-height: 240px;
  overflow-y: auto;
  z-index: 40;
}

.suggestions[hidden] {
  display: none;
}

.suggestion-option {
  display: block;
  width: 100%;
  text-align: left;
  padding: 8px 12px;
  border: none;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease;
}

.suggestion-option:hover,
.suggestion-option:focus-visible {
  background: rgba(217, 121, 70, 0.08);
  outline: none;
}

.suggestion-empty {
  padding: 8px 12px;
  font-size: 13px;
  color: var(--muted);
}

/* CAMPOS READONLY (lat/long) */

#latitude,
#longitude {
  background: #f3ebe4;
  color: var(--muted-soft);
}

/* SECÇÃO LEAD / CONSENTIMENTO */

.lead-section {
  margin-top: 22px;
  border-radius: 18px;
  border: 1px solid rgba(160, 130, 110, 0.28);
  background: rgba(248, 243, 238, 0.9);
  padding: 18px 18px 14px;
}

.lead-section legend {
  padding: 0 6px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.consent {
  margin-top: 14px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 13px;
  color: var(--text);
}

.consent input[type="checkbox"] {
  margin-top: 2px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent-strong);
}

/* INFO PANEL À DIREITA */

.info-panel {
  background: var(--surface-muted);
  backdrop-filter: blur(18px);
}

.info-panel ul {
  list-style: none;
  padding: 0;
  margin: 0 0 22px;
  display: grid;
  gap: 12px;
}

.info-panel li {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 12px;
  font-size: 15px;
  color: var(--muted);
  align-items: start;
}

.info-panel li::before {
  content: "";
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: var(--accent);
  margin-top: 6px;
  box-shadow: 0 8px 16px -10px rgba(184, 91, 42, 0.7);
}

.info-panel__note {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(217, 121, 70, 0.1);
  color: var(--accent-strong);
  font-weight: 600;
  font-size: 14px;
}

/* RESULTADOS / MÉTRICAS */

.metrics {
  padding: 24px 0 60px;
}

.panel--glass {
  background: var(--surface-muted);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(160, 130, 110, 0.35);
}

/* VALUATION BLOCK (usado pelo app.js) */

.valuation {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 12px;
}

.valuation__price {
  font-size: clamp(28px, 4.4vw, 36px);
  font-weight: 700;
  font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}

.valuation__source {
  font-size: 14px;
  color: var(--muted);
}

/* TAGS (região, intervalo, base) */

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.tag {
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

/* NOTIFICAÇÕES DE EMAIL */

.notification-status {
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
}

.notification-status--ok {
  background: rgba(46, 125, 50, 0.08);
  color: #1b5e20;
  border-color: rgba(46, 125, 50, 0.2);
}

.notification-status--warn {
  background: rgba(198, 40, 40, 0.08);
  color: #b71c1c;
  border-color: rgba(198, 40, 40, 0.2);
}

/* FOOTER */

.footer {
  padding: 34px 0 60px;
  border-top: 1px solid var(--divider);
  background: linear-gradient(
    180deg,
    rgba(248, 243, 238, 0) 0%,
    #f4ebe3 100%
  );
}

.footer__inner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}

.footer__monogram {
  width: 92px;
  height: auto;
  display: block;
}

.footer__info {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.footer__info a {
  color: var(--accent-strong);
  font-weight: 600;
}

.disclaimer {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
}

/* RESPONSIVO */

@media (max-width: 1024px) {
  .masthead__grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .masthead__contact-card {
    text-align: center;
    align-items: center;
  }

  .masthead__identity {
    flex-direction: column;
  }

  .masthead__identity-group {
    align-items: center;
  }

  .masthead__subtitle {
    justify-content: center;
  }

  .masthead__contact-note {
    max-width: 520px;
  }

  .masthead__contact-actions {
    justify-content: center;
  }

  .masthead__content {
    text-align: center;
  }

  .masthead__tagline,
  .masthead__copy {
    margin-left: auto;
    margin-right: auto;
  }

  .simulator__grid {
    grid-template-columns: 1fr;
  }

  .footer__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

@media (max-width: 720px) {
  .panel {
    padding: 24px;
  }

  .form-grid__row {
    grid-template-columns: 1fr;
  }
}
