/* Correção local: a barra de métricas do hero usa margem negativa e precisa
   transbordar sobre a próxima seção sem ser cortada pelo overflow do hero. */
#inicio {
  overflow: visible;
  z-index: 2;
}

#inicio + section {
  position: relative;
  z-index: 1;
}

#inicio > .relative.z-10 {
  z-index: 20;
}

/* Reduz o respiro entre os botões do hero e a barra de métricas, que
   estava exagerado (pb-28/lg:pb-40 originais), para a barra subir. */
#inicio > div.pb-28 {
  padding-bottom: 2.5rem;
}

@media (min-width: 1024px) {
  #inicio > div.pb-28 {
    padding-bottom: 3.5rem;
  }
}

@media (max-width: 640px) {
  #inicio > .relative.z-10 {
    margin-bottom: 0;
  }
}

/* Títulos com mais peso visual */
h1,
h2 {
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Barra de métricas do hero: eleva como card flutuante e refina a UI.
   Margem positiva garante respiro do hero escuro abaixo do card, para
   não "colar" no fim da seção (negativo demais fazia o card encostar
   na próxima seção). */
@media (min-width: 641px) {
  #inicio > .relative.z-10 {
    margin-bottom: 2rem;
  }
}

@media (min-width: 1024px) {
  #inicio > .relative.z-10 {
    margin-bottom: 3rem;
  }
}

#inicio .glass-bar {
  border-radius: 1.5rem;
  padding-top: 1.875rem;
  padding-bottom: 1.875rem;
  background: linear-gradient(
    160deg,
    oklch(0.28 0.08 260 / 78%),
    oklch(0.2 0.07 260 / 82%)
  );
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow:
    0 32px 64px -20px rgba(4, 8, 24, 0.65),
    0 4px 16px rgba(4, 8, 24, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

#inicio .glass-bar li {
  position: relative;
  transition: transform 0.25s ease;
}

#inicio .glass-bar li:hover {
  transform: translateY(-3px);
}

#inicio .glass-bar li:not(:first-child)::before {
  content: "";
  position: absolute;
  left: -1.25rem;
  top: 0.1rem;
  bottom: 0.1rem;
  width: 1px;
  background: rgba(255, 255, 255, 0.18);
}

@media (max-width: 639px) {
  #inicio .glass-bar li:nth-child(odd)::before {
    display: none;
  }
}

#inicio .glass-bar li svg.lucide-check {
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  padding: 6px;
  margin-top: 0;
  background: oklch(0.78 0.14 148 / 20%);
  border-radius: 9999px;
}

#inicio .glass-bar li p:first-of-type {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

#inicio .glass-bar li p:last-of-type {
  color: rgba(255, 255, 255, 0.8);
}

/* Grid de nichos: cartões azul/verde ganham a mesma elevação de hover
   dos cartões brancos (card-elevated-hover), mantendo o grid coeso. */
#nichos .nicho-card {
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#nichos .nicho-card:hover {
  transform: translateY(-4px);
}

#nichos article.bg-brand,
#nichos article.bg-cta {
  box-shadow:
    0 20px 40px -16px oklch(0.28 0.08 260 / 35%),
    0 2px 8px oklch(0.28 0.08 260 / 15%);
}

#nichos article.bg-brand:hover,
#nichos article.bg-cta:hover {
  box-shadow:
    0 28px 48px -16px oklch(0.28 0.08 260 / 42%),
    0 4px 12px oklch(0.28 0.08 260 / 18%);
}

/* Seção Sobre: moldura decorativa atrás da foto para dar profundidade
   e um cartão flutuante mais destacado. */
.sobre-media::before {
  content: "";
  position: absolute;
  inset: 1.5rem -1rem -1rem 1.5rem;
  z-index: -1;
  border-radius: 1.5rem;
  background: linear-gradient(
    135deg,
    oklch(0.78 0.14 148 / 20%),
    oklch(0.28 0.08 260 / 12%)
  );
}

.sobre-media .absolute.bg-white {
  box-shadow:
    0 20px 40px -12px oklch(0.28 0.08 260 / 25%),
    0 4px 12px oklch(0.28 0.08 260 / 12%);
}

/* Seção "Como funciona": grid de cards com número fantasma, ícone em
   destaque e o último passo com acento de conclusão. */
#como-funciona .step-card {
  overflow: hidden;
  box-shadow:
    0 1px 2px oklch(0.28 0.08 260 / 4%),
    0 8px 24px oklch(0.28 0.08 260 / 6%);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    border-color 0.25s ease;
}

#como-funciona .step-card:hover {
  transform: translateY(-4px);
  border-color: oklch(0.65 0.13 245 / 45%);
  box-shadow:
    0 20px 32px -14px oklch(0.28 0.08 260 / 18%),
    0 4px 12px oklch(0.28 0.08 260 / 8%);
}

#como-funciona .step-ghost {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  font-size: 2.75rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: oklch(0.28 0.08 260 / 8%);
  pointer-events: none;
}

#como-funciona .step-icon {
  box-shadow: 0 6px 16px -8px oklch(0.28 0.08 260 / 22%);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease;
}

#como-funciona .step-card:hover .step-icon {
  transform: scale(1.08);
  box-shadow: 0 10px 20px -8px oklch(0.28 0.08 260 / 30%);
}

#como-funciona .step-card h3 {
  font-weight: 700;
}

#como-funciona .step-card--highlight {
  border-color: transparent;
  border-left: 3px solid oklch(0.66 0.17 148);
  background: linear-gradient(160deg, oklch(0.66 0.17 148 / 7%), white 55%);
}

#como-funciona .step-card--highlight .step-icon {
  background: oklch(0.66 0.17 148 / 14%);
  color: oklch(0.5 0.15 148);
}

#como-funciona .step-card--highlight .step-ghost {
  color: oklch(0.66 0.17 148 / 16%);
}

/* CTA final: foto de fundo em baixa opacidade, com degradê para preservar
   contraste do texto branco sobre o navy da marca. */
.cta-photo {
  background-size: cover;
  background-position: center;
  opacity: 0.16;
  mix-blend-mode: luminosity;
}

/* Revelação suave ao rolar a página: cards, fotos e o cartão do mapa
   ganham um fade + leve deslocamento vertical na primeira vez que entram
   na viewport. Respeita prefers-reduced-motion (fica tudo visível). */
@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(28px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: no-preference) {
  .card-elevated,
  .nicho-card,
  .step-card,
  .sobre-media,
  .map-card,
  .reveal-card {
    opacity: 0;
  }

  .card-elevated.is-visible,
  .nicho-card.is-visible,
  .step-card.is-visible,
  .sobre-media.is-visible,
  .map-card.is-visible,
  .reveal-card.is-visible {
    animation: reveal-up 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  }

  /* Hero: entra assim que a página carrega, sem depender de scroll. */
  .hero-enter {
    opacity: 0;
    animation: reveal-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s forwards;
  }

  #inicio > .relative.z-10 {
    opacity: 0;
    animation: reveal-up 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.35s forwards;
  }
}

/* Logo da homepage: substitui visualmente o lockup antigo do header e footer. */
body > div > header > div > a[href="#inicio"],
body > div > footer > div:first-child > div:first-child > a[href="#inicio"] {
  position: relative;
  display: inline-block;
  flex: 0 0 auto;
  width: 190px;
  height: 64px;
  background: url("../logo.png") left center / contain no-repeat;
}

body > div > footer > div:first-child > div:first-child > a[href="#inicio"] {
  width: 210px;
  height: 70px;
}

body > div > header > div > a[href="#inicio"] > *,
body > div > footer > div:first-child > div:first-child > a[href="#inicio"] > * {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (max-width: 640px) {
  body > div > header > div > a[href="#inicio"] {
    width: 150px;
    height: 52px;
  }

  body > div > footer > div:first-child > div:first-child > a[href="#inicio"] {
    width: 170px;
    height: 58px;
  }
}
