@layer sections {
  .hero {
    position: relative;
    overflow: hidden;
    background: var(--color-blue-600);
  }

  .hero__bg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 50% 30%;
  }

  .hero__stage {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    min-height: min(100svh, 52rem);
    padding: 5.5rem var(--gutter) 2rem;
  }

  .hero__logo {
    position: absolute;
    top: 0.75rem;
    left: var(--gutter);
    width: 7.5rem;
    padding-block: 0.75rem; /* alvo de toque >= 44px */
    box-sizing: content-box;
  }

  .hero__logo img {
    width: 100%;
    height: auto;
  }

  .hero__toggle {
    position: fixed;
    top: 1rem;
    right: var(--gutter);
    z-index: 50;
    display: grid;
    place-items: center;
    width: 2.75rem;
    height: 2.75rem;
    border: 1.5px solid var(--color-yellow);
    border-radius: var(--radius-pill);
    /* Mesmo fundo do menu desktop (menu-bg) */
    background: linear-gradient(90deg, var(--color-blue-800), var(--color-blue-700) 55%, var(--color-blue-600));
    box-shadow: 0 0.6rem 1.1rem -0.35rem rgb(2 25 73 / 0.5);
  }

  .hero__toggle-bar,
  .hero__toggle-bar::before,
  .hero__toggle-bar::after {
    display: block;
    width: 1.15rem;
    height: 2px;
    border-radius: 2px;
    background: var(--color-white);
    transition:
      transform var(--dur-fast) var(--ease-out),
      opacity var(--dur-fast) var(--ease-out);
  }

  .hero__toggle-bar {
    position: relative;
  }

  .hero__toggle-bar::before,
  .hero__toggle-bar::after {
    content: "";
    position: absolute;
    left: 0;
  }

  .hero__toggle-bar::before {
    top: -0.38rem;
  }

  .hero__toggle-bar::after {
    top: 0.38rem;
  }

  .hero__toggle[aria-expanded="true"] .hero__toggle-bar {
    background: transparent;
  }

  .hero__toggle[aria-expanded="true"] .hero__toggle-bar::before {
    transform: translateY(0.38rem) rotate(45deg);
  }

  .hero__toggle[aria-expanded="true"] .hero__toggle-bar::after {
    transform: translateY(-0.38rem) rotate(-45deg);
  }

  /* Navegação (mobile: painel; sem JS fica sempre aberta) */
  .nav {
    position: fixed;
    top: 4.25rem;
    right: var(--gutter);
    left: var(--gutter);
    z-index: 49;
    padding: 0.5rem 1rem;
    border: 1.5px solid var(--color-yellow);
    border-radius: var(--radius-md);
    /* Mesmo fundo do menu desktop (menu-bg): degradê azul, borda amarela fina e sombra suave */
    background: linear-gradient(90deg, var(--color-blue-800), var(--color-blue-700) 55%, var(--color-blue-600));
    box-shadow: 0 0.6rem 1.1rem -0.35rem rgb(2 25 73 / 0.5);
  }

  .nav::before {
    content: none;
  }

  .js .nav {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-0.5rem);
    transition:
      opacity var(--dur-fast) var(--ease-out),
      transform var(--dur-fast) var(--ease-out),
      visibility 0s var(--dur-fast);
  }

  .js .nav.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }

  .nav__list {
    display: grid;
  }

  .nav__link {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: 1.0625rem;
    font-weight: var(--fw-black);
    text-transform: uppercase;
    transition: color var(--dur-fast) var(--ease-out);
  }

  .nav__link:hover,
  .nav__link[aria-current] {
    color: var(--color-yellow);
  }

  .hero__title {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 40rem;
    margin-inline: auto;
  }

  .hero__title img {
    width: 100%;
    height: auto;
  }

  /* Textos de apoio da hero (Figma: 32px, caixa alta, tracking -5%, amarelo) */
  .hero__note {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: 40rem;
    margin-bottom: 0.75rem;
    color: var(--color-yellow);
    font-size: clamp(1.125rem, 5.4vw, 2rem);
    font-weight: var(--fw-extrabold);
    line-height: 1.0625;
    letter-spacing: -0.05em;
    text-transform: uppercase;
    white-space: nowrap;
  }

  .hero__note--gratidao {
    margin-left: 0;
  }

  .hero__note--boas-vindas {
    margin-left: auto;
    margin-right: 0;
    text-align: left;
  }

  .hero__badge {
    position: absolute;
    top: 8rem;
    right: var(--gutter);
    width: 5.5rem;
    height: auto;
  }

  .hero__star {
    top: 42%;
    left: 62%;
    width: 2.25rem;
    height: auto;
  }

  .js .hero__title {
    animation: hero-rise var(--dur-hero) var(--ease-out) both;
  }

  @keyframes hero-rise {
    from {
      opacity: 0;
      transform: translateY(2.5rem);
    }

    to {
      opacity: 1;
      transform: none;
    }
  }

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

  @media (min-width: 1024px) {
    .hero__stage {
      display: block;
      /* Mesma base do --px (100vw): com o zoom 0.75 do desktop, min(100%,1920px) ficava maior e a arte ia para a esquerda da foto */
      width: calc(var(--px) * 1920);
      min-height: 0;
      height: calc(var(--px) * 1258);
      margin-inline: auto;
      padding: 0;
    }

    .hero__logo {
      padding-block: 0;
      top: calc(var(--px) * 95);
      left: calc(var(--px) * 85);
      width: calc(var(--px) * 223.797);
    }

    .hero__toggle {
      display: none;
    }

    .nav {
      top: calc(var(--px) * 73);
      right: auto;
      /* Mesmo centro da barra original (esquerda 50% - 600, largura 1410), mas a largura agora acompanha os links */
      left: calc(50% + var(--px) * 105);
      translate: -50% 0;
      transition:
        transform var(--dur-base) var(--ease-out),
        opacity var(--dur-base) var(--ease-out);
      width: max-content;
      height: calc(var(--px) * 81);
      padding: 0 calc(var(--px) * 40);
      border: 0;
      border-radius: 0;
      background: none;
      box-shadow: none;
    }

    .nav::before {
      content: "";
      /* A largura da barra mudou: a arte é fatiada em 9 partes (pontas intactas, miolo esticado),
         assim as pontas arredondadas e a sombra mantêm o formato original */
      background: none;
      border: solid transparent;
      border-width: calc(var(--px) * 87.2) calc(var(--px) * 157.5) calc(var(--px) * 87.2) calc(var(--px) * 157.5);
      border-image: var(--glow-img) 83 150 83 150 fill stretch;
    }

    /* Desktop: a barra existe só na home (hero) e rola junto com a página, sem acompanhar o usuário */
    .nav {
      position: absolute;
    }

    .js .nav {
      visibility: visible;
      opacity: 1;
      transform: none;
    }

    .nav__list {
      display: flex;
      align-items: center;
      /* Espaço fixo entre os links (o mesmo de quando eram 6 itens), centralizados na barra */
      justify-content: center;
      gap: calc(var(--px) * 21.4);
      height: 100%;
    }

    .nav__link {
      min-height: 2.75rem;
      font-size: calc(var(--px) * 29.222);
      white-space: nowrap;
    }

    .hero__title {
      position: absolute;
      top: calc(var(--px) * 698);
      left: calc(var(--px) * 96);
      width: calc(var(--px) * 1608);
      max-width: none;
      margin: 0;
    }

    .hero__note {
      position: absolute;
      max-width: none;
      margin: 0;
      font-size: calc(var(--px) * 32);
      line-height: calc(var(--px) * 34);
    }

    .hero__note--gratidao {
      top: calc(var(--px) * 691);
      left: calc(var(--px) * 1324);
    }

    .hero__note--boas-vindas {
      top: calc(var(--px) * 831);
      left: calc(var(--px) * 1538);
    }

    .hero__badge {
      top: calc(var(--px) * 245);
      right: auto;
      left: calc(var(--px) * 1614);
      width: calc(var(--px) * 205);
    }

    .hero__star {
      top: calc(var(--px) * 581);
      left: calc(var(--px) * 1163);
      width: calc(var(--px) * 74);
    }
  }
}
