/* ============================================================
   Muda Bem Mudanças — Landing Page
   Mobile-first: base 390px · ajustes ≥768px · ≥1200px
   Paleta extraída do logo oficial:
   navy #0C2B4D (texto do logo) · teal #2E9FC0 (pinceladas)
   CTA quente #C2410C · WhatsApp #25D366
   ============================================================ */

:root {
  --navy: #0c2b4d;
  --navy-deep: #081d36;
  --teal: #2e9fc0;
  --teal-link: #176e8c; /* variante escura p/ links sobre fundo claro (contraste AA) */
  --cta: #c2410c;
  --cta-hover: #ea580c;
  --whats: #25d366;
  --whats-text: #06301c;
  --ink: #22303f;
  --muted: #5b6b7c;
  --line: #dde5ec;
  --bg-alt: #f2f6f9;
  --white: #fff;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(8, 29, 54, 0.16);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar-h: 58px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* espaço para a barra fixa inferior no mobile */
  padding-bottom: var(--bar-h);
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--teal-link); }

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 16px;
}

.container-narrow { max-width: 760px; }

/* ================= BOTÕES ================= */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-weight: 700;
  text-decoration: none;
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s, transform 0.15s;
}

.btn:active { transform: scale(0.98); }

.btn-header {
  background: var(--cta);
  color: var(--white);
  font-size: 0.9rem;
  padding: 10px 14px;
  white-space: nowrap;
}
.btn-header:hover { background: var(--cta-hover); }

.btn-whats {
  background: var(--whats);
  color: var(--whats-text);
  font-size: 1.05rem;
  padding: 14px 22px;
  width: 100%;
}
.btn-whats:hover { background: #1fc25b; }

.btn-cta {
  background: var(--cta);
  color: var(--white);
  font-size: 1.1rem;
  font-family: var(--font);
  padding: 15px 20px;
  width: 100%;
}
.btn-cta:hover { background: var(--cta-hover); }
.btn-cta[disabled] { opacity: 0.75; cursor: wait; }

/* ================= HEADER ================= */
.header {
  background: var(--white);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.header-logo { width: auto; height: 56px; }

/* Selo circular com o logo (só desktop; ver bloco ≥1200px) */
.hero-badge { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.header-phone {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--navy);
  font-weight: 700;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
}
.header-phone span { display: none; } /* no mobile só o ícone; número completo ≥768px */

/* ================= HERO ================= */
.hero {
  position: relative;
  background: var(--navy-deep);
  color: var(--white);
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; }

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

/* véu escuro para contraste AA do texto sobre a foto */
.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 29, 54, 0.9) 0%, rgba(8, 29, 54, 0.82) 55%, rgba(8, 29, 54, 0.92) 100%);
}

.hero-grid {
  position: relative;
  display: grid;
  gap: 18px;
  padding-top: 20px;
  padding-bottom: 8px;
}

/* No mobile, os filhos de .hero-copy entram direto no grid do hero
   (display: contents) para permitir a ordem exigida na dobra:
   H1 → subheadline → botão WhatsApp → formulário → bullets */
.hero-copy { display: contents; }

h1 {
  font-size: 1.62rem;
  line-height: 1.25;
  letter-spacing: -0.01em;
  order: 1;
}

.hero-sub { font-size: 1rem; color: #dbe7f2; order: 2; }

.btn-whats-hero { order: 3; }
.hero-grid .form-card { order: 4; }
.trust-bullets { order: 5; }

.trust-bullets {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 0.95rem;
  font-weight: 600;
}

.trust-bullets li { display: flex; align-items: center; gap: 10px; }
.trust-bullets svg { flex-shrink: 0; color: #6ee7a0; }

/* Card do formulário */
.form-card {
  background: var(--white);
  color: var(--ink);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 18px 16px 16px;
}

.form-title {
  font-size: 1.2rem;
  color: var(--navy);
  margin-bottom: 12px;
  text-align: center;
}

.quote-form { display: flex; flex-direction: column; gap: 10px; }

.field { display: flex; flex-direction: column; gap: 4px; }

.field label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy);
}

.optional-tag { font-weight: 400; color: var(--muted); }

.field input {
  font: inherit;
  padding: 11px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: var(--white);
  width: 100%;
}

.field input::placeholder { color: #9aa8b5; }

.field input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(46, 159, 192, 0.2);
}

.field input[aria-invalid="true"] { border-color: #c0262d; }

.field-error {
  font-size: 0.8rem;
  color: #c0262d;
  font-weight: 600;
}

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.field-optional label { color: var(--muted); }

/* honeypot: invisível para humanos */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-microcopy {
  font-size: 0.83rem;
  color: var(--muted);
  text-align: center;
  margin-top: 6px;
}

.form-lgpd {
  font-size: 0.75rem;
  color: var(--muted);
  text-align: center;
}
.form-lgpd a { color: var(--teal-link); }

/* Faixa de clientes (prova social) */
.clients-strip {
  position: relative;
  padding-top: 18px;
  padding-bottom: 22px;
  text-align: center;
}

.clients-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #b9cadb;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.clients-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px 28px;
}

.clients-logos img {
  height: 38px;
  width: auto;
}

/* ================= SEÇÕES ================= */
.section { padding: 44px 0; }

.section-alt { background: var(--bg-alt); }

.section-dark {
  background: var(--navy);
  color: var(--white);
}

.section-title {
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.25;
  margin-bottom: 12px;
  text-align: center;
}

.section-dark .section-title { color: var(--white); }

.section-intro {
  color: var(--muted);
  text-align: center;
  max-width: 820px;
  margin: 0 auto 28px;
}

.section-dark .section-intro { color: #c6d4e2; }

.section-cta { text-align: center; margin-top: 28px; }
.section-cta .btn-whats { width: auto; }

/* Serviços */
.services-grid { display: grid; gap: 18px; }

.service-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 3px 12px rgba(8, 29, 54, 0.06);
}

.service-card img { width: 100%; aspect-ratio: 2 / 1; object-fit: cover; }

.service-body { padding: 16px; }

.service-body h3 {
  color: var(--navy);
  font-size: 1.1rem;
  margin-bottom: 6px;
}

.service-body p { font-size: 0.95rem; color: var(--muted); }

/* Diferenciais */
.why-grid {
  list-style: none;
  display: grid;
  gap: 14px;
}

.why-grid li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 14px;
  align-items: center;
}

.why-icon {
  grid-row: 1 / 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(46, 159, 192, 0.14);
  color: var(--navy);
}

.why-grid h3 { font-size: 1rem; color: var(--navy); }
.why-grid p { font-size: 0.9rem; color: var(--muted); }

/* Como funciona */
.steps {
  list-style: none;
  display: grid;
  gap: 16px;
  counter-reset: step;
  max-width: 640px;
  margin: 0 auto;
}

.steps li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  position: relative;
  padding-left: 4px;
}

.step-num {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--white);
  font-weight: 800;
  font-size: 1.05rem;
}

/* linha vertical da timeline */
.steps li:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 23px;
  top: 44px;
  bottom: -16px;
  width: 2px;
  background: var(--line);
}

.steps h3 { font-size: 1.02rem; color: var(--navy); }
.steps p { font-size: 0.92rem; color: var(--muted); }

/* Contadores */
.counters-grid {
  display: grid;
  gap: 22px;
  text-align: center;
}

.counter dt {
  font-size: 0.9rem;
  color: #b9cadb;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  order: 2;
}

.counter dd {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--white);
}

/* Galeria */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
}

/* Sobre */
.about-text {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.about-text p {
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 14px;
}

.about-text strong { color: var(--navy); }

.values-kicker {
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 26px 0 14px;
}

.values-grid {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  max-width: 860px;
  margin: 0 auto;
}

.values-grid li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--navy);
  text-align: center;
}

.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(46, 159, 192, 0.14);
  color: var(--navy);
}

/* FAQ */
.faq details {
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 10px;
  background: var(--white);
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--navy);
  padding: 14px 16px;
  list-style: none;
  position: relative;
  padding-right: 40px;
}

.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.3rem;
  color: var(--teal-link);
  font-weight: 800;
}

.faq details[open] summary::after { content: "–"; }

.faq details p { padding: 0 16px 14px; color: var(--muted); }

/* CTA final */
.final-cta .form-card { max-width: 560px; margin: 0 auto; }

.final-cta-whats {
  text-align: center;
  margin-top: 18px;
  color: #c6d4e2;
  font-size: 0.95rem;
}
.final-cta-whats a { color: #6ee7a0; font-weight: 700; }

/* ================= RODAPÉ ================= */
.footer {
  background: var(--navy-deep);
  color: #c6d4e2;
  padding: 36px 0 16px;
}

.footer-inner { display: grid; gap: 24px; }

.footer-logo-chip {
  display: inline-block;
  background: var(--white);
  border-radius: 10px;
  padding: 8px;
}

.footer-logo-chip img { height: 64px; width: auto; }

.footer-slogan { margin-top: 10px; font-weight: 700; color: var(--white); }

.footer-info p { margin-bottom: 6px; font-size: 0.95rem; }
.footer-info a { color: var(--white); font-weight: 700; text-decoration: none; }
.footer-info a:hover { text-decoration: underline; }

.footer-links { display: flex; flex-direction: column; gap: 6px; }
.footer-links a { color: #9fb3c8; font-size: 0.9rem; }

.footer-copy {
  text-align: center;
  font-size: 0.8rem;
  color: #7d92a9;
  margin-top: 28px;
  padding: 0 16px;
}

/* ================= ELEMENTOS PERSISTENTES ================= */
.whats-float {
  position: fixed;
  right: 16px;
  bottom: calc(var(--bar-h) + 14px);
  z-index: 60;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--whats);
  color: var(--whats-text);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s;
}

.mobile-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  height: var(--bar-h);
  display: grid;
  grid-template-columns: 1fr 1fr;
  transition: transform 0.25s, opacity 0.25s, visibility 0.25s;
}

.mobile-bar a {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 800;
  font-size: 0.98rem;
  text-decoration: none;
}

.mobile-bar-whats { background: var(--whats); color: var(--whats-text); }
.mobile-bar-phone { background: var(--navy); color: var(--white); }

/* estado oculto quando o formulário está visível (via JS) */
.is-hidden-cta {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.mobile-bar.is-hidden-cta { transform: translateY(100%); }

/* ================= TABLET ≥768px ================= */
@media (min-width: 768px) {
  h1 { font-size: 2.1rem; }

  .header-logo { height: 64px; }
  .header-phone span { display: inline; }
  .header-phone { font-size: 1.05rem; }

  .section { padding: 64px 0; }
  .section-title { font-size: 1.9rem; }

  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .counters-grid { grid-template-columns: repeat(3, 1fr); }
  .counter dd { font-size: 2.2rem; }
  .gallery-grid { grid-template-columns: repeat(3, 1fr); }

  .values-grid { grid-template-columns: repeat(4, 1fr); }

  .footer-inner { grid-template-columns: auto 1fr auto; gap: 40px; }

  .btn-whats { width: auto; }
  .form-card { padding: 24px 22px 20px; }
}

/* ================= DESKTOP ≥1200px ================= */
@media (min-width: 1200px) {
  /* layout do hero em 2 colunas: copy à esquerda, formulário à direita */
  .hero-copy { display: flex; flex-direction: column; gap: 16px; }
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 56px;
    padding-top: 56px;
    padding-bottom: 24px;
  }

  /* Selo circular com o logo em alta definição (como no site original).
     background-image dentro da media query = não é baixado no mobile. */
  .hero-badge {
    display: block;
    width: 132px;
    height: 132px;
    border-radius: 50%;
    background: var(--white) url("../assets/img/logo-mudabem-hd.webp") center / 76% no-repeat;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
    margin-bottom: 4px;
  }

  /* ordem desktop dentro da coluna esquerda: selo → H1 → sub → bullets → WhatsApp */
  h1 { order: 1; }
  .hero-sub { order: 2; }
  .trust-bullets { order: 3; margin: 6px 0; }
  .btn-whats-hero { order: 4; align-self: flex-start; }
  .hero-grid .form-card { order: 0; }

  h1 { font-size: 2.55rem; }
  .hero-sub { font-size: 1.15rem; max-width: 560px; }

  .hero-bg img { object-position: center 55%; }

  .clients-logos { gap: 56px; }
  .clients-logos img { height: 46px; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .why-grid { grid-template-columns: repeat(3, 1fr); }

  .steps {
    max-width: none;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px 28px;
  }
  .steps li:not(:last-child)::before { display: none; }

  /* barra mobile some no desktop; botão flutuante desce */
  .mobile-bar { display: none; }
  body { padding-bottom: 0; }
  .whats-float { bottom: 24px; right: 24px; width: 62px; height: 62px; }

  .form-title { font-size: 1.35rem; }
}

/* acessibilidade: respeita usuários que preferem menos movimento */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
