/* Página inicial — Instituto Melhor pela Vida
   Fontes hospedadas no próprio servidor (licença SIL OFL 1.1). */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  font-weight: 200 800; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/atkinson-hyperlegible-latin-700-normal.woff2") format("woff2");
  font-weight: 700; font-display: swap;
}

:root {
  --mar:    #0a5c5e;   /* teal profundo: texto forte, faixa escura */
  --mpv:    #14a3a6;   /* teal do logo */
  --brisa:  #e3f2f0;   /* céu / fundo claro */
  --sol:    #f2b33d;   /* sol do sertão: só o sol e o foco */
  --areia:  #f3e6c8;   /* estrada */
  --tinta:  #12302f;
  --titulo: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --texto:  "Atkinson Hyperlegible", "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: #fff; color: var(--tinta); font: 400 1.0625rem/1.6 var(--texto); }
h1, h2, h3 { font-family: var(--titulo); color: var(--mar); margin: 0; }
a:focus-visible { outline: 3px solid var(--sol); outline-offset: 3px; border-radius: 6px; }

/* ---------- Topo ---------- */
.topo-inicio {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 1rem clamp(1.25rem, 5vw, 4.5rem); background: var(--brisa);
}
.marca-inicio { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.marca-inicio img { width: 52px; height: auto; }
.marca-inicio span { font: 700 1rem/1.15 var(--titulo); color: var(--mar); }

.botao-entrar {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px; background: var(--mar); color: #fff;
  font: 700 1rem/1 var(--texto); text-decoration: none; white-space: nowrap;
  transition: background-color .15s ease;
}
.botao-entrar:hover { background: #084a4c; }
.botao-entrar-topo { padding: .65rem 1.15rem; font-size: .95rem; }

/* ---------- Abertura: a paisagem é o elemento marcante ---------- */
.abertura { background: var(--brisa); position: relative; overflow: hidden; }
.abertura-texto {
  position: relative; z-index: 1; max-width: 38rem;
  padding: clamp(2.5rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem) 0;
}
.abertura h1 {
  font-size: clamp(2.5rem, 6.2vw, 4.75rem); line-height: 1.02; font-weight: 800;
  letter-spacing: -.025em; font-variation-settings: "wdth" 90;
}
.abertura-lead { margin: 1.4rem 0 0; font-size: clamp(1.05rem, 1.6vw, 1.2rem); max-width: 32rem; }
.abertura-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-top: 2rem; }
.link-suave { color: var(--mar); font-weight: 700; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.paisagem {
  display: block; width: 100%; height: clamp(220px, 34vw, 500px);
  margin-top: clamp(-15rem, -15vw, -2rem); margin-bottom: -1px;
}
.sol { fill: var(--sol); }
.morro-longe { fill: #c4e5e1; }
.morro-meio  { fill: #78c6c2; }
.morro-perto { fill: var(--mpv); }
.chao        { fill: var(--mar); }
.estrada     { fill: var(--areia); }
.faixa {
  fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-dasharray: 14 16;
  animation: percorrer 2.4s ease-out both;
}
.carnauba path { fill: none; stroke: var(--mar); stroke-width: 3; stroke-linecap: round; }
.tronco { fill: none; stroke: var(--mar); stroke-width: 6; stroke-linecap: round; }
.copa  { fill: var(--mar); }
.tenda { fill: #fff; }
.cruz  { fill: #d64545; }

/* Único movimento da página: a faixa da estrada aparece de quem chega até a tenda */
@keyframes percorrer {
  from { stroke-dashoffset: 1200; opacity: 0; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}

/* ---------- Quem atendemos ---------- */
.quem {
  display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 36rem); gap: 1rem 4rem;
  padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem);
  background: var(--mar); color: #e9f5f4;
}
.quem h2 { color: #fff; font-size: clamp(1.6rem, 3vw, 2.2rem); line-height: 1.1; }
.quem p { margin: 0; font-size: 1.15rem; }

/* ---------- Como funciona (sequência real: numerada) ---------- */
.como { padding: clamp(3rem, 7vw, 5.5rem) clamp(1.25rem, 5vw, 4.5rem); }
.como-dentro { max-width: 72rem; }
.como h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.passos {
  list-style: none; counter-reset: passo; margin: 2.2rem 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem;
}
.passos li { counter-increment: passo; border-top: 3px solid var(--mpv); padding-top: 1rem; }
.passos li::before {
  content: counter(passo); display: block; margin-bottom: .4rem;
  font: 800 2.6rem/1 var(--titulo); color: var(--mpv);
}
.passos h3 { font-size: 1.2rem; margin-bottom: .3rem; }
.passos p { margin: 0; color: #36504f; }
.como-nota {
  margin: 2.6rem 0 0; max-width: 40rem; padding-left: 1rem; border-left: 4px solid var(--sol);
  font-size: 1.1rem;
}

/* ---------- Equipe ---------- */
.equipe {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem;
  margin: 0 clamp(1.25rem, 5vw, 4.5rem) clamp(3rem, 7vw, 5rem);
  padding: clamp(1.75rem, 4vw, 2.75rem); border-radius: 20px; background: var(--brisa);
}
.equipe h2 { font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: .4rem; }
.equipe p { margin: 0; max-width: 34rem; }
.botao-grande { padding: 1rem 1.9rem; font-size: 1.1rem; }

/* ---------- Rodapé ---------- */
.rodape-inicio {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem 2rem;
  padding: 2rem clamp(1.25rem, 5vw, 4.5rem); background: var(--tinta); color: #b9cfcd; font-size: .92rem;
}
.rodape-inicio img { width: 72px; height: auto; }
.rodape-inicio address { font-style: normal; line-height: 1.6; }
.rodape-inicio a { color: #fff; }
.rodape-inicio p { margin: 0; }

/* ---------- Telas menores ---------- */
@media (max-width: 900px) {
  .quem { grid-template-columns: 1fr; }
  .passos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .marca-inicio span { display: none; }
  .passos { grid-template-columns: 1fr; gap: 1.5rem; }
  /* no celular mostra o trecho final da estrada: tenda, árvore e sol */
  .paisagem { width: 220%; margin-left: -120%; height: 250px; margin-top: 0; }
  .rodape-inicio { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faixa { animation: none; }
}
