/* `.hero` é `display:flex` (só pra centralizar `.container` verticalmente com `align-items:center`
   — `.hero-bg` é `position:absolute`, não conta como item flex). Isso torna `.container` um ITEM
   flex, e sem `width` própria um item flex se dimensiona pelo conteúdo (`flex-basis:auto`), não
   preenche a largura disponível como um bloco comum preencheria — mesma causa-raiz corrigida em
   `.hero-content` logo abaixo, um nível acima na árvore. `width:100%` aqui é o que efetivamente
   resolve o corte de conteúdo no celular; a correção em `.hero-content` sozinha não bastava
   porque o pai dela (`.container`) já estava largo demais. */
.hero .container {
  width: 100%;
}

.hero {
  position: relative;
  /* `100vh` sozinho é calculado contra a altura MÁXIMA possível do viewport no mobile — antes da
     barra de endereço recolher. Resultado real (achado desta integração): a seção corta/pula ao
     rolar, porque o navegador reserva espaço pra uma barra que ainda não sumiu. `100dvh` (altura
     visível DE VERDADE, dynamic viewport) resolve — mantido `100vh` como valor anterior pra
     navegador sem suporte a `dvh` não ficar sem `min-height` nenhum. */
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  padding: 120px 0 60px;
  background: var(--hero-gradient);
  text-align: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.hero-constellation {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  width: 700px;
  height: 500px;
  max-width: 90vw;
  background: var(--primary);
  opacity: .12;
  border-radius: 50%;
  filter: blur(130px);
  transform: translateX(-50%);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 2;
  /* `width: 100%` além do `max-width` — achado real desta integração (bug de mobile relatado):
     um contêiner flex com `width` em `auto` (o padrão, sem esta linha) usa "fit-content" pra se
     dimensionar, não "preencher o espaço disponível" como um bloco comum. Sem largura explícita,
     ele cresce até caber o filho mais largo sem quebrar linha (aqui, o texto do badge — mais de
     400px de largura mínima) — em vez de respeitar a tela de 390px e deixar os FILHOS quebrarem
     linha. Resultado visível: conteúdo inteiro deslocado e cortado à direita no celular. */
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

/* Selo/badge hero */
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 9999px;
  padding: .375rem .8rem .375rem 1rem;
  box-shadow: var(--shadow-md);
  font-size: .8rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.hero-badge svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

[data-theme="light"] .hero-badge {
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-secondary);
}

.hero-badge-stamp {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--primary-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.hero-badge-stamp svg {
  width: 11px;
  height: 11px;
  color: var(--primary-text);
}

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.02em;
  margin: 0;
}

.hero-subtitle {
  font-size: clamp(1rem, 2vw, 1.2rem);
  color: var(--text-secondary);
  max-width: 620px;
  margin: 0;
  line-height: 1.7;
}

.hero-subtitle strong {
  color: var(--text);
  font-weight: 600;
}

/* Linha decorativa sob palavra em gradiente */
.hero-word {
  position: relative;
  display: inline-block;
}

.hero-word::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--primary-hover));
  border-radius: 9999px;
  opacity: .5;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-note {
  margin: 0;
  font-size: .8rem;
  color: var(--text-muted);
}

/* Marvel: carrossel infinito de canais */
.hero-channels {
  margin-top: 24px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.channels-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-muted);
}

.marquee {
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
  mask-image: linear-gradient(90deg, transparent 0%, #000 8%, #000 92%, transparent 100%);
}

.marquee-track {
  display: flex;
  width: max-content;
  gap: 3.75rem;
  animation: marquee-scroll 40s linear infinite;
  will-change: transform;
}

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

.marquee-item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-secondary);
}

.marquee-item svg {
  width: 30px;
  height: 30px;
}

.marquee-item span {
  font-size: 1.25rem;
  font-weight: 600;
  white-space: nowrap;
}

@keyframes marquee-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-track { animation: none; }
}

/* Seta scroll down */
.hero-scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.hero-scroll svg {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

.animate-bounce {
  animation: hero-bounce 2s ease-in-out infinite;
}

@keyframes hero-bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(8px); }
}

/* Compat: logo antigo do hero */
.hero-logo { margin-bottom: 20px; }
.hero-logo-img {
  width: 88px;
  height: 88px;
  object-fit: contain;
  margin: 0 auto;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
}

/* ===== RESPONSIVO DO HERO =====
   Regras completas aqui (arquivo próprio) para garantir que nada
   ultrapasse a largura da tela e que os botões se ajustem sozinhos. */

.hero-content > * {
  max-width: 100%;
}

.hero-actions a {
  min-width: 0;
  text-align: center;
}

.hero-note {
  max-width: 100%;
  padding: 0 8px;
}

@media (max-width: 1024px) {
  .hero { padding: 110px 0 48px; }
  .hero-scroll { display: none; }
}

@media (max-width: 860px) {
  .hero { padding: 96px 0 44px; }
  .hero-content { gap: 18px; }
  .hero h1 { font-size: clamp(1.75rem, 6.5vw, 2.5rem); }
  .hero-subtitle { font-size: 1rem; line-height: 1.6; }
}

@media (max-width: 640px) {
  .hero { padding: 84px 0 40px; min-height: auto; }
  .hero-badge {
    max-width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    text-align: center;
    font-size: .7rem;
    padding: .35rem .7rem .35rem .9rem;
    gap: .5rem;
  }
  .hero-channels { margin-top: 18px; gap: 16px; }
  .channels-label { font-size: .65rem; }
  .marquee-track { gap: 2.75rem; }
  .marquee-item svg { width: 26px; height: 26px; }
  .marquee-item span { font-size: 1.05rem; }
}

@media (min-width: 421px) and (max-width: 640px) {
  /* Botões lado a lado em telas médias de celular/tablet;
     se não couberem, o flex-wrap empilha automaticamente */
  .hero-actions {
    width: 100%;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
  }
  .hero-actions a {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    padding: .85rem 1.1rem;
    font-size: .95rem;
    white-space: normal;
  }
}

@media (max-width: 420px) {
  .hero h1 { font-size: clamp(1.55rem, 7.5vw, 2rem); }
  .hero-subtitle { font-size: .95rem; }
  /* Botões empilhados verticalmente em telas pequenas */
  .hero-actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }
  .hero-actions a {
    width: 100%;
    max-width: 100%;
  }
}