/* Hero L'OR — branding esquerda, formulário direita */
.hero {
  position: relative;
  padding-top: var(--hero-stack-h);
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--color-black);
  overflow-x: clip;
  overflow-y: visible;
  max-width: 100%;
}

.hero img {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  user-drag: none;
  pointer-events: none;
}

/* KV fixo — evita faixa vazia de background entre Home e Como Participar */
.hero:not(.hero--flow) .hero__media {
  position: absolute;
  top: var(--hero-stack-h);
  left: 0;
  right: 0;
  bottom: 0;
  height: auto;
  overflow: hidden;
  pointer-events: none;
}

.hero:not(.hero--flow) picture.hero__image--home,
.hero:not(.hero--flow) .hero__image--home {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - var(--hero-stack-h));
}

.hero:not(.hero--flow) picture.hero__image--home img,
.hero:not(.hero--flow) .hero__image--home img {
  width: 100%;
  height: 100%;
  min-height: calc(100dvh - var(--hero-stack-h));
  object-fit: cover;
  object-position: center top;
}

.hero:not(.hero--flow) .hero__image--cadastro {
  display: none !important;
}

.hero__media {
  position: relative;
  width: 100%;
  z-index: 0;
  line-height: 0;
}

picture.hero__image {
  display: block;
  width: 100%;
}

picture.hero__image img {
  display: block;
  width: 100%;
}

.hero__image {
  width: 100%;
  height: auto;
}

.hero__overlay {
  position: absolute;
  top: var(--hero-stack-h);
  left: 0; right: 0;
  bottom: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 1) 0%,
      rgba(0, 0, 0, 0.525) 8%,
      transparent 15%
    ),
    var(--gradient-hero-overlay);
}

.hero__content {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  height: auto;
  min-height: calc(100dvh - var(--hero-stack-h));
  max-height: none;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-around;
  gap: clamp(1.2rem, 3vw, 3.2rem);
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(1.2rem, 3vh, 2.4rem) var(--space-3);
  padding-right: clamp(var(--space-3), 5vw, var(--space-6));
  box-sizing: border-box;
  pointer-events: none;
  overflow: visible;
}

/* Branding à esquerda do formulário — position relative conforme especificação */
.hero__selo {
  position: relative;
  flex: 0 1 auto;
  width: min(42vw, 650px);
  max-width: 650px;
  margin: 0;
  pointer-events: none;
  line-height: 0;
}

.hero__selo picture {
  display: block;
  width: 100%;
}

.hero__selo-img {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
  transform-origin: center center;
  will-change: transform;
  animation: hero-selo-shake 3.7s ease-in-out infinite;
}

/* Tremer ~0.7s, pausar 3s, repetir */
@keyframes hero-selo-shake {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  2.7% {
    transform: translate(-4px, 2px) rotate(-4deg);
  }
  5.4% {
    transform: translate(5px, -2px) rotate(4deg);
  }
  8.1% {
    transform: translate(-4px, -1px) rotate(-3deg);
  }
  10.8% {
    transform: translate(4px, 2px) rotate(3deg);
  }
  13.5% {
    transform: translate(-2px, 1px) rotate(-2deg);
  }
  18.9% {
    transform: translate(0, 0) rotate(0deg);
  }
  19%,
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero__selo-img {
    animation: none;
  }
}

.hero.hero--flow .hero__selo {
  display: none;
}

.hero--flow .hero__image--home { display: none !important; }
.hero--flow .hero__image--cadastro:not([hidden]) { display: block !important; }

.hero__logged-box {
  width: min(100%, 420px);
  pointer-events: auto;
}

.hero__cpf-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.hero__cpf-form .form-control {
  min-height: 52px;
  padding: 1.2rem 1.5rem;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid rgba(216, 180, 106, 0.45);
  border-radius: var(--radius-pill);
  font-size: 1.45rem;
  color: var(--color-text-dark);
}

.hero__cpf-form .form-control:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 3px rgba(216, 180, 106, 0.22);
  outline: none;
}

.hero__cpf-form .btn-primary {
  margin-top: 0;
}

.hero__cpf-hint {
  margin-top: var(--space-2);
  font-size: 1.15rem;
  color: var(--color-text-soft);
  line-height: 1.45;
}

.hero__logged-title {
  font-family: var(--font-heading);
  font-size: clamp(2.2rem, 4vw, 3rem);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0 0 var(--space-2);
}

.hero__logged-lead {
  margin: 0 0 var(--space-4);
  font-size: 1.45rem;
  color: var(--color-text-muted);
}

.hero__logged-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

@media (min-width: 992px) {
  .hero__content {
    justify-content: space-around;
    padding-left: clamp(2.4rem, 5vw, 6rem);
    padding-right: clamp(2.4rem, 6vw, 8rem);
  }
}

@media (min-width: 992px) and (max-width: 1366px) {
  .hero__selo {
    width: min(42vw, 450px);
    max-width: 450px;
  }
}

@media (max-width: 991px) {
  .hero__content {
    align-items: center;
    justify-content: flex-start;
    flex-direction: column;
    padding-top: var(--space-3);
    gap: var(--space-3);
  }

  .hero__selo {
    display: block;
    flex: 0 0 auto;
    width: min(88vw, 700px);
    max-width: 700px;
    margin: 0 auto;
  }

  .hero__logged-box, .hero__vitrine-box {
    margin: 0 auto;
  }

  /* Desktop cover não se aplica ao KV mobile em fluxo natural */
  .hero:not(.hero--flow):not(.hero--hub-collapsed) .hero__image--home {
    object-fit: cover;
    min-height: 100%;
  }
}
