/* ================================================================
   HERO.CSS — Preventiva Redes de Proteção
   Hero + faixa marquee de autoridade abaixo do fold
================================================================ */


/* ----------------------------------------------------------------
   HERO — Wrapper principal
---------------------------------------------------------------- */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100vh; /* fallback */
  display: flex;
  align-items: center;
  padding-top: max(140px, var(--navbar-height));
  padding-bottom: 0;
  margin-bottom: 0;
  overflow: hidden;
  background-color: #071e2e; /* fallback sólido enquanto imagem carrega */
}

/* Foco no conteúdo + vinheta lateral (sobre o overlay; não bloqueia cliques) */
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 30% 50%,
      rgba(0, 0, 0, 0.25),
      transparent 60%
    ),
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.38) 0%,
      transparent 22%,
      transparent 78%,
      rgba(0, 0, 0, 0.32) 100%
    );
}

#sobre {
  scroll-margin-top: calc(var(--navbar-height) + var(--space-4));
}


/* ----------------------------------------------------------------
   HERO — Background (parallax + slideshow crossfade)
---------------------------------------------------------------- */
.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  transform: translate3d(0, var(--hero-parallax, 0px), 0);
  will-change: transform;
}

.hero__bg-slide {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 1; /* first slide is in HTML as is-active — visible for LCP */
}

.hero__bg-slide:not(.is-active) {
  opacity: 0;
}

.hero__bg-slide.is-active + .hero__bg-slide,
.hero__bg-slide:not(.is-active) {
  transition: opacity 0.85s ease;
}

.hero__bg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  /* Leve zoom evita bordas ao deslocar o fundo no parallax */
  transform: scale(1.06);
}

/* ----------------------------------------------------------------
   HERO — Textura de rede (overlay premium)
---------------------------------------------------------------- */
.hero-overlay-net {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image: url("../img/banners/rede-textura.svg");
  background-size: 220px auto;
  background-repeat: repeat;
  opacity: 0.22;
  mix-blend-mode: soft-light;
  animation: hero-move-net 20s linear infinite;
}

@keyframes hero-move-net {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-40px);
  }
}


/* ----------------------------------------------------------------
   HERO — Overlay (gradiente escuro para legibilidade)
---------------------------------------------------------------- */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  /*
    Mobile: overlay mais denso (tela menor, menos espaço para contraste)
    Desktop: gradiente horizontal (conteúdo à esquerda, imagem visível à direita)
  */
  background: linear-gradient(
    to bottom,
    rgba(6, 28, 46, 0.82) 0%,
    rgba(6, 28, 46, 0.75) 60%,
    rgba(6, 28, 46, 0.88) 100%
  );
}


/* ----------------------------------------------------------------
   HERO — Container do conteúdo
---------------------------------------------------------------- */
.hero__content {
  position: relative;
  z-index: 10;
  width: 100%;
  /* Mobile: espaço generoso topo/baixo para não colidir com navbar e scroll indicator */
  padding: var(--space-10) 0 var(--space-20);
}


/* ----------------------------------------------------------------
   HERO — Inner (área de texto)
   Mobile first: coluna única, alinhado à esquerda
---------------------------------------------------------------- */
.hero__inner {
  max-width: 680px;
}


/* ----------------------------------------------------------------
   HERO — Headline (H1)
---------------------------------------------------------------- */
.hero__title {
  font-size: clamp(1.75rem, 5vw, 3.25rem);
  font-weight: 900;
  color: var(--color-white);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: var(--space-5);
}


/* ----------------------------------------------------------------
   HERO — Subheadline
---------------------------------------------------------------- */
.hero__subtitle {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: rgba(255, 255, 255, 0.80);
  line-height: 1.65;
  margin-bottom: var(--space-8);
  max-width: 540px;
}


/* ----------------------------------------------------------------
   HERO — Lista de benefícios
---------------------------------------------------------------- */
.hero__benefits {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-8);

  opacity: 0;
  animation: fade-up 0.55s ease 0.34s forwards;
}

.hero ul li.hero__benefit {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
}

.hero__benefit-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--color-accent);
  border-radius: 50%;
  flex-shrink: 0;
  transform: scale(1.2);
  transform-origin: center center;
}

.hero__benefit-icon svg {
  width: 14px;
  height: 14px;
  color: var(--color-primary);
  stroke-width: 3;
}

.hero__benefit-text {
  font-size: inherit;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.94);
  line-height: 1.5;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.35);
}


/* ----------------------------------------------------------------
   HERO — Grupo de CTAs
---------------------------------------------------------------- */
.hero__actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);

  opacity: 0;
  animation: fade-up 0.55s ease 0.46s forwards;
}

@media (max-width: 639px) {
  .hero__actions .btn--lg {
    max-width: 100%;
  }
}


/* ----------------------------------------------------------------
   HERO — Indicador de scroll
---------------------------------------------------------------- */
.hero__scroll {
  position: absolute;
  bottom: var(--space-6);
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.45);
  font-size: var(--text-xs);
  font-weight: 500;
  text-decoration: none;
  transition: color 0.2s ease;

  opacity: 0;
  animation: fade-up 0.5s ease 0.75s forwards;
}

.hero__scroll:hover {
  color: rgba(255, 255, 255, 0.75);
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
  animation: bounce-y 1.6s ease-in-out infinite;
}


/* ----------------------------------------------------------------
   HERO — Animações de entrada
---------------------------------------------------------------- */
@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ----------------------------------------------------------------
   HERO — Responsivo: tablet (≥ 640px)
---------------------------------------------------------------- */
@media (min-width: 640px) {
  .hero__actions {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
  }
}


/* ----------------------------------------------------------------
   HERO — Responsivo: desktop (≥ 1024px)
---------------------------------------------------------------- */
@media (min-width: 1024px) {
  .hero__overlay {
    /* Desktop: gradiente horizontal — texto à esquerda, foto visível à direita */
    background: linear-gradient(
      105deg,
      rgba(6, 28, 46, 0.96) 0%,
      rgba(6, 28, 46, 0.82) 45%,
      rgba(6, 28, 46, 0.35) 100%
    );
  }

  .hero__content {
    padding: var(--space-16) 0 var(--space-20);
  }

  .hero__inner {
    max-width: 600px;
  }
}


/* ----------------------------------------------------------------
   HERO — Responsivo: large (≥ 1280px)
---------------------------------------------------------------- */
@media (min-width: 1280px) {
  .hero__inner {
    max-width: 640px;
  }

  .hero__title {
    font-size: 3.5rem;
  }
}


/* ----------------------------------------------------------------
   MARQUEE — Faixa premium (abaixo do hero, sem gap visual)
---------------------------------------------------------------- */
.marquee {
  position: relative;
  z-index: 5;
  margin-top: -4px;
  overflow: hidden;
  padding: 20px 0;
  isolation: isolate;
  background: linear-gradient(
    to right,
    #0a2540,
    #123a5c,
    #0a2540
  );
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.marquee__viewport {
  position: relative;
  z-index: 1;
  overflow: hidden;
  width: 100%;
}

.marquee__roller {
  position: relative;
  z-index: 1;
  display: flex;
  width: max-content;
  will-change: transform;
  animation: marquee-move 20s linear infinite;
}

.marquee:hover .marquee__roller {
  animation-play-state: paused;
}

.marquee-content {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 40px;
  padding-right: 40px;
  white-space: nowrap;
}

.marquee-content span {
  flex-shrink: 0;
  text-transform: uppercase;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 1px;
  line-height: 1.4;
  background: linear-gradient(
    90deg,
    #facc15,
    #fde047,
    #facc15
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  animation: gradientTextMove 6s linear infinite;
}

.marquee-content span:nth-child(2n) {
  opacity: 0.3;
  font-weight: 500;
}

/* Brilho: dentro do viewport para ficar visível atrás do texto (evita ficar atrás do fundo) */
.marquee__viewport::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.1),
    transparent
  );
  background-size: 40% 100%;
  background-repeat: no-repeat;
  background-position: 0 0;
  animation: marquee-shine 6s ease-in-out infinite;
}

@keyframes marquee-move {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@keyframes gradientTextMove {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

@keyframes marquee-shine {
  0% {
    background-position: -60% 0;
  }
  100% {
    background-position: 160% 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__benefit-icon {
    transform: none;
  }

  .hero-overlay-net {
    animation: none;
    transform: none;
  }

  .hero__bg {
    --hero-parallax: 0px !important;
    will-change: auto;
  }

  .hero__bg-slide {
    transition: none;
  }

  .marquee__roller {
    animation: none;
    width: 100%;
    max-width: 56rem;
    margin-inline: auto;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 0.5rem;
    will-change: auto;
  }

  .marquee-content[aria-hidden="true"] {
    display: none;
  }

  .marquee-content {
    flex-wrap: wrap;
    justify-content: center;
    white-space: normal;
    padding-right: 0;
    row-gap: 0.35rem;
    column-gap: 1rem;
  }

  .marquee-content span {
    white-space: normal;
    text-align: center;
    animation: none;
    text-transform: uppercase;
    background: none;
    -webkit-text-fill-color: rgba(253, 224, 71, 0.95);
    color: rgba(253, 224, 71, 0.95);
    -webkit-background-clip: border-box;
    background-clip: border-box;
  }

  .marquee-content span:nth-child(2n) {
    opacity: 0.35;
  }

  .marquee__viewport::before {
    animation: none;
    opacity: 0;
  }

  .marquee__viewport {
    overflow: visible;
  }
}
