/* Composição direita no desktop; no celular a foto ocupa a largura inteira. */
@font-face {
  font-family: "Bianca Profile Oswald";
  src: url("../fonts/oswald-700-latin.665f37b2d0e8.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

.hero--ambiente .hero__midia {
  z-index: 0;
}

.hero--ambiente .hero__interno {
  position: relative;
  z-index: 2;
  pointer-events: none;
}

.hero--ambiente .hero__texto {
  pointer-events: auto;
}

.hero--ambiente .hero__imagem.hero-profile {
  --profile-accent: var(--cor-titulo-trajetoria);
  --profile-ink: var(--cor-fundo);
  --profile-paper: var(--cor-texto);
  --profile-foot-bottom: max(26px, calc(100% - 100svh + 106px));
  --profile-gutter: clamp(24px, 4cqw, 40px);
  /* A fusao com o video termina em 16% da caixa, mas nunca antes de 8,64vw -
     os mesmos 16% de quando a caixa tem 54% da tela. Quando a foto estreita
     numa tela larga e baixa (`--heroi-foto`, em app.css), 16% dela viravam uma
     borda visivel sobre o video. */
  --profile-blend-fim: max(16%, 8.64vw);
  --profile-blend: linear-gradient(to right,
    transparent,
    color-mix(in srgb, var(--profile-ink) 8%, transparent) calc(var(--profile-blend-fim) * .125),
    color-mix(in srgb, var(--profile-ink) 32%, transparent) calc(var(--profile-blend-fim) * .3125),
    color-mix(in srgb, var(--profile-ink) 70%, transparent) calc(var(--profile-blend-fim) * .5625),
    color-mix(in srgb, var(--profile-ink) 95%, transparent) calc(var(--profile-blend-fim) * .8125),
    var(--profile-ink) var(--profile-blend-fim));
  container-type: inline-size;
  z-index: 1;
  background: transparent;
  mask-image: none;
  pointer-events: auto;
}

.hero-profile__name {
  position: absolute;
  inset: auto var(--profile-gutter) calc(var(--profile-foot-bottom) + 156px);
  z-index: 3;
  font-family: "Bianca Profile Oswald", Impact, sans-serif;
  font-size: 14.45cqw;
  font-weight: var(--peso-forte);
  line-height: 0.96;
  letter-spacing: -0.035em;
  color: var(--profile-accent);
  text-align: center;
  text-transform: uppercase;
  pointer-events: none;
}

.hero-profile__name > span {
  display: block;
  position: relative;
  isolation: isolate;
  width: max-content;
  margin-inline: auto;
}

/* A foto pode ser mais clara que a tinta da marca. Cada linha recebe uma
   faixa escura atrás dos glifos, com laterais dissolvidas. A faixa não invade
   a linha vizinha: o fundo do segundo span poderia cobrir o primeiro nome. */
.hero-profile__name > span::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0 -.625em;
  background: linear-gradient(90deg,
    transparent 0%, var(--profile-ink) 12% 88%, transparent 100%);
  pointer-events: none;
}

.hero--ambiente .hero__imagem.hero-profile picture {
  position: relative;
  z-index: 1;
  mask-image: var(--profile-blend);
}

.hero-profile::after {
  content: "";
  position: absolute;
  z-index: 2;
  inset: 36% 0 0;
  background: linear-gradient(transparent,
    color-mix(in srgb, var(--profile-ink) 72%, transparent) 55%,
    var(--profile-ink) 92%);
  mask-image: var(--profile-blend);
  pointer-events: none;
}

.hero-profile__caption {
  position: absolute;
  z-index: 3;
  inset: auto var(--profile-gutter) calc(var(--profile-foot-bottom) + 118px);
  margin: 0;
  color: var(--profile-paper);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-align: center;
  text-transform: uppercase;
}

.hero-profile__foot {
  position: absolute;
  z-index: 3;
  inset: auto var(--profile-gutter) calc(var(--profile-foot-bottom) + 44px);
  display: grid;
  grid-template-columns: 1fr;
  color: var(--profile-paper);
  text-transform: uppercase;
}

.hero-profile__cta {
  display: flex;
  justify-self: center;
  width: min(100%, 15rem);
  min-height: 44px;
  padding: 10px 16px;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--profile-accent) 65%, var(--profile-ink));
  border-radius: var(--raio-xl);
  background: color-mix(in srgb, var(--profile-ink) 94%, var(--profile-accent));
  color: var(--profile-paper);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease;
}
.hero-profile__cta--texto {
  --profile-accent: var(--cor-titulo-trajetoria);
  --profile-ink: var(--cor-fundo);
  --profile-paper: var(--cor-texto);
  display: none;
}

.hero-profile__cta:active {
  background: var(--profile-accent);
  border-color: var(--profile-accent);
  color: var(--profile-ink);
}

.hero-profile__cta:focus-visible {
  outline: 2px solid var(--profile-paper);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .hero-profile__cta:hover {
    background: var(--profile-accent);
    border-color: var(--profile-accent);
    color: var(--profile-ink);
  }
}

@media (min-width: 651px) and (max-width: 1023px) {
  .hero-profile__name {
    font-size: 15.3cqw;
    bottom: calc(var(--profile-foot-bottom) + 200px);
  }

  .hero-profile__caption {
    bottom: calc(var(--profile-foot-bottom) + 162px);
  }

  .hero-profile__foot {
    bottom: calc(var(--profile-foot-bottom) + 42px);
  }
}

@media (max-width: 650px) {
  .hero--ambiente .hero__imagem.hero-profile {
    --profile-gutter: var(--espaco-4);
    --profile-foot-bottom: 0px;
  }
  .hero--ambiente .hero__imagem.hero-profile picture { mask-image: none; }
  .hero-profile__name {
    inset: auto var(--profile-gutter) 70px;
  }
  .hero-profile__caption {
    bottom: 40px;
    font-size: 11px;
  }
  .hero--com-chamada .hero-profile__foot { display: none; }
  .hero--ambiente:not(.hero--com-chamada) .hero-profile__name {
    bottom: 105px;
    font-size: 12cqw;
  }
  .hero--ambiente:not(.hero--com-chamada) .hero-profile__caption {
    bottom: 76px;
  }
  .hero--ambiente:not(.hero--com-chamada) .hero-profile__foot {
    inset: auto var(--profile-gutter) var(--espaco-2);
  }
  .hero-profile::after {
    top: 30%;
    background: linear-gradient(transparent 20%,
      color-mix(in srgb, var(--profile-ink) 85%, transparent) 60%,
      var(--profile-ink) 100%);
    mask-image: none;
  }
  .hero--ambiente .hero__acoes .hero-profile__cta--texto {
    display: flex;
    width: 100%;
    min-height: var(--altura-controle);
    padding: 8px 10px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-profile__cta {
    transition: none;
  }
}

@media (forced-colors: active) {
  .hero-profile__name > span::before {
    display: none;
  }

  .hero-profile::after {
    display: none;
  }

  .hero--ambiente .hero__imagem.hero-profile picture {
    mask-image: none;
  }
}
