/* hero: desktop ancorado embaixo, com H1 à esquerda e ações à direita.
   Celular e tablet em pé: foto no alto, com o letreiro e a professora inteiros, e
   navy liso sob o texto. A foto mantém a proporção: cortar as laterais perderia o
   letreiro. O corte do arquivo já tira a arte gravada no rodapé. */

.hero {
  --texto: var(--branco);
  --foco: var(--coral);
  position: relative;
  z-index: 3; /* A linha L1 cruza a divisa: a seção fica acima da seguinte */
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--navy);
  color: var(--branco);
}

/* Faixa do header transparente. main.js mede a altura. Sem JS não faz nada */
.hero__sentinela {
  position: absolute;
  inset: 0 0 auto;
  height: 50%;
  visibility: hidden;
  pointer-events: none;
}

.hero__midia {
  position: absolute;
  inset: 0;
  overflow: hidden;
}
.hero__poster,
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
}
.hero__video {
  opacity: 0;
  transition: opacity 1.2s var(--ease-controle);
}
.hero__video.is-tocando { opacity: 1; }

/* Quem decide a foto é o layout. O <picture> do outro layout só tem um gif vazio */
@media (max-width: 1023.98px) and (orientation: portrait) {
  .hero__foto--larga,
  .hero__video,
  .hero__veu { display: none; }

  .hero { justify-content: flex-start; }

  /* A faixa livre acima do texto: a foto centra nela e, em tela baixa, passa por baixo */
  .hero__midia {
    position: relative;
    inset: auto;
    flex: 1 0 auto;
    min-height: 15rem;
    overflow: visible;
    --foto-altura: calc(100vw * 1065 / 980);
  }
  .hero__foto--em-pe {
    position: absolute;
    left: 0;
    top: max(2.25rem, calc(50% - var(--foto-altura) / 2));
    display: block;
    width: 100%;
  }
  .hero__foto--em-pe img { width: 100%; height: auto; }
  /* Sobe do navy do topo e volta para o navy embaixo: a foto não tem borda */
  .hero__foto--em-pe::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
      var(--navy) 0,
      rgb(37 47 85 / 0) 3rem,
      rgb(37 47 85 / 0) 76%,
      var(--navy) 100%);
  }

  .hero__conteudo {
    z-index: 1;
    margin-top: -1rem;
    background: var(--navy);
  }
  /* Sempre sobre navy liso: nem o H1 nem o apoio dependem da foto */
  .hero__conteudo::before {
    content: "";
    position: absolute;
    inset: auto 0 100%;
    height: clamp(3.5rem, 12vw, 6rem);
    background: linear-gradient(to top, var(--navy), rgb(37 47 85 / 0));
    pointer-events: none;
  }
}
@media (min-width: 1024px), (orientation: landscape) {
  .hero__foto--em-pe { display: none; }
}

.hero__veu {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top,
      var(--navy) 0%,
      var(--navy) 30%,
      rgb(37 47 85 / .72) 38%,
      rgb(37 47 85 / 0) 47%),
    linear-gradient(to bottom, rgb(37 47 85 / .5), rgb(37 47 85 / 0) 18%);
}

.hero__conteudo {
  position: relative;
  padding: 0 var(--margem) calc(1.25rem + env(safe-area-inset-bottom));
}

.hero__selo {
  display: none;
  margin-bottom: .75rem;
  font-size: .9375rem;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero__titulo {
  font-family: var(--serif);
  font-size: clamp(3.25rem, 15vw, 5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
}
.hero__titulo-linha { display: block; }
.hero__titulo em { color: var(--branco); }

.hero__apoio {
  margin-top: .875rem;
  font-size: 1.0625rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.hero__botoes {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-top: 1rem;
}
.hero__botoes .btn--primario { flex: 1 1 auto; padding-inline: .75rem; }
/* No celular o secundário vira link ao lado: o primário manda na tela */
.hero__botoes .btn--contorno {
  flex: none;
  min-height: 44px;
  padding: 0;
  border: 0;
  font-weight: 700;
  text-decoration: underline;
}
.hero__botoes .btn--contorno:hover { background: none; color: var(--branco); }

/* Telas baixas, como 360x640: tudo um pouco mais compacto */
@media (max-height: 700px) and (max-width: 1023.98px) {
  .hero__titulo { font-size: clamp(3rem, 14.4vw, 4.5rem); }
  .hero__apoio { margin-top: .625rem; line-height: 1.4; }
  .hero__botoes { margin-top: .75rem; }
}

/* Tablet em pé: o título ganha ar e o texto não estica */
@media (min-width: 640px) and (max-width: 1023.98px) and (orientation: portrait) {
  .hero__titulo { font-size: clamp(5rem, 13vw, 7.5rem); }
  .hero__apoio { max-width: 34em; font-size: 1.1875rem; }
  .hero__botoes .btn--primario { flex: 0 1 auto; padding-inline: 1.75rem; }
  .hero__conteudo { padding-bottom: 3rem; }
  /* Aqui a foto é maior que a faixa livre: sobe um pouco para mostrar os pés no chair */
  .hero__foto--em-pe { top: -2vw; }
}

/* Telas largas e celular deitado usam o vídeo horizontal */
@media (min-width: 1024px), (orientation: landscape) {
  .hero__poster,
  .hero__video { object-position: 48% 60%; }

  .hero__veu {
    background:
      radial-gradient(80% 66% at 12% 58%,
        rgb(26 33 60 / .9) 0%,
        rgb(37 47 85 / .8) 46%,
        rgb(37 47 85 / .46) 78%,
        rgb(37 47 85 / 0) 100%),
      radial-gradient(58% 54% at 100% 100%,
        rgb(26 33 60 / .92) 0%,
        rgb(26 33 60 / .8) 52%,
        rgb(26 33 60 / 0) 100%),
      linear-gradient(to bottom,
        rgb(26 33 60 / .68) 0,
        rgb(26 33 60 / .6) 5.5rem,
        rgb(26 33 60 / 0) 13rem);
  }

  .hero__conteudo {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    column-gap: var(--gutter);
    align-items: end;
    padding: 0 var(--margem) clamp(2rem, 6vh, 4rem);
  }
  /* O bloco sobe para o H1 não cobrir o rosto da aluna, deitada na base do quadro */
  .hero__bloco-titulo { grid-column: 1 / span 8; margin-bottom: clamp(5rem, 19vh, 13rem); }
  .hero__bloco-acoes { grid-column: 9 / -1; }

  .hero__selo { display: block; }
  .hero__titulo { font-size: clamp(4.5rem, 10.5vw, 11rem); line-height: .98; }
  .hero__titulo-linha--recuo { margin-left: calc((100% + var(--gutter)) / 8); }

  .hero__apoio { margin-top: 0; font-size: 1.125rem; line-height: 1.55; }
  .hero__botoes { flex-wrap: wrap; margin-top: 1.5rem; }
  .hero__botoes .btn--primario { flex: 0 1 auto; padding-inline: 1.75rem; }
  .hero__botoes .btn--contorno {
    min-height: 52px;
    padding: .75rem 1.5rem;
    border: 1.5px solid currentColor;
    font-weight: 800;
    text-decoration: none;
  }
  .hero__botoes .btn--contorno:hover { background: var(--branco); border-color: var(--branco); color: var(--navy); }
}

/* Celular deitado: título à esquerda, texto e botões à direita, tudo na primeira tela.
   A foto é clara, então o véu aqui cobre toda a metade de baixo */
@media (orientation: landscape) and (max-height: 560px) {
  .hero__veu {
    background: linear-gradient(to top,
      rgb(26 33 60 / .92) 0%,
      rgb(26 33 60 / .86) 58%,
      rgb(26 33 60 / .62) 100%);
  }
  .hero__conteudo { padding-bottom: 1rem; }
  .hero__selo { display: none; }
  .hero__bloco-titulo { grid-column: 1 / span 6; margin-bottom: 0; }
  .hero__bloco-acoes { grid-column: 7 / -1; }
  .hero__titulo { font-size: clamp(2.75rem, 7.6vw, 4.25rem); }
  .hero__titulo-linha--recuo { margin-left: 0; }
  .hero__apoio { font-size: 1rem; line-height: 1.4; }
  .hero__botoes { flex-wrap: nowrap; gap: .5rem; margin-top: .75rem; }
  .hero__botoes .btn--primario,
  .hero__botoes .btn--contorno { min-height: 44px; padding: .5rem .875rem; white-space: nowrap; }
}

/* Celular pequeno deitado: os dois botões não cabem na meia coluna. O secundário volta a ser link */
@media (orientation: landscape) and (max-height: 560px) and (max-width: 719.98px) {
  .hero__bloco-titulo { grid-column: 1 / span 5; }
  .hero__bloco-acoes { grid-column: 6 / -1; }
  .hero__titulo { font-size: clamp(2.25rem, 7.2vw, 3rem); }
  .hero__botoes .btn--primario,
  .hero__botoes .btn--contorno { font-size: .9375rem; }
  .hero__botoes .btn--contorno { padding-inline: .25rem; border: 0; text-decoration: underline; }
}
