/*
  Manifesto / Tese Preventiva (Fase F).

  Direção: muito espaço negativo, sem card, sem fotografia obrigatória.
  Assimetria editorial herdada da Etapa 03 (§03 Manifesto): o título
  ocupa aproximadamente as colunas 2-8 e o texto de apoio é deslocado
  para 7-11, criando uma leve cascata diagonal em vez de um bloco
  centralizado único.

  A forma-assinatura AL aparece aqui apenas como um filete curto e
  estático — muito menos intensidade que o arco do Hero (item 5 da
  Fase F: "o Hero já realizou o gesto visual principal").
*/

.manifesto {
  position: relative;
  isolation: isolate;
  min-height: 110svh;
  overflow: clip;
  padding-block: 0;
  background-color: var(--color-navy-950);
  color: var(--color-ivory-50);
}

.manifesto__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  background-color: var(--color-navy-950);
}

.manifesto__backdrop picture,
.manifesto__backdrop img {
  width: 100%;
  height: 100%;
}

.manifesto__backdrop img {
  object-fit: cover;
  object-position: center 56%;
  transform: scale(var(--manifesto-photo-scale, 1));
  transform-origin: center;
}

.manifesto__backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgb(7 17 31 / 94%) 0%, rgb(7 17 31 / 80%) 48%, rgb(7 17 31 / 70%) 100%),
    linear-gradient(180deg, rgb(7 17 31 / 26%) 0%, rgb(7 17 31 / 48%) 100%);
}

.manifesto__grid {
  position: relative;
  z-index: 1;
  min-height: 110svh;
  align-content: center;
  row-gap: var(--space-5);
  padding-block: var(--section-padding-block);
}

.manifesto__lead {
  grid-column: 2 / 8;
}

.manifesto__eyebrow {
  font-family: var(--font-body);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  letter-spacing: var(--tracking-eyebrow);
  text-transform: uppercase;
  color: var(--color-gold-400);
  margin-bottom: var(--space-3);
}

.manifesto__filete {
  display: block;
  width: 56px;
  height: 2px;
  background-color: var(--color-gold-500);
  margin-bottom: var(--space-4);
}

.manifesto__headline {
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  line-height: var(--leading-snug);
  color: var(--color-ivory-50);
  max-width: 18ch;
}

.manifesto__headline-line {
  display: block;
}

.manifesto__support {
  grid-column: 7 / 11;
  align-self: end;
  font-family: var(--font-body);
  font-size: var(--text-lg);
  line-height: var(--leading-relaxed);
  /* Tom suave via alpha na cor, não via `opacity` do elemento — a
     propriedade `opacity` é a mesma que o sistema de reveal (reveal.css)
     anima de 0 a 1, e tem especificidade maior quando revelado; usá-la
     aqui faria o texto "esquecer" o tom suave assim que entrasse na
     tela. */
  color: rgb(246 243 236 / 78%);
  max-width: 36ch;
}

/* Motion L.1.1. O estado-base acima continua integralmente visível;
   somente a classe confirmada pelo módulo habilita os estados iniciais. */
@media (prefers-reduced-motion: no-preference) {
  html.manifesto-motion-ready .manifesto__filete {
    transform: scaleX(0);
    transform-origin: left center;
  }

  html.manifesto-motion-ready .manifesto__eyebrow {
    opacity: 0;
    transform: translateY(5px);
  }

  html.manifesto-motion-ready .manifesto__headline-line {
    overflow: hidden;
  }

  html.manifesto-motion-ready .manifesto__headline-line > span {
    display: block;
    opacity: 0;
    transform: translateY(22px);
  }

  html.manifesto-motion-ready .manifesto__support {
    opacity: 0;
    transform: translateY(12px);
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__filete {
    transform: scaleX(1);
    transition: transform 320ms var(--ease-editorial);
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__eyebrow {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 380ms var(--ease-editorial) 100ms,
      transform 380ms var(--ease-editorial) 100ms;
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__headline-line > span {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 520ms var(--ease-editorial),
      transform 520ms var(--ease-editorial);
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__headline-line:nth-child(1) > span {
    transition-delay: 300ms;
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__headline-line:nth-child(2) > span {
    transition-delay: 395ms;
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__headline-line:nth-child(3) > span {
    transition-delay: 490ms;
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__support {
    opacity: 1;
    transform: translateY(0);
    transition:
      opacity 550ms var(--ease-editorial) 1010ms,
      transform 550ms var(--ease-editorial) 1010ms;
  }

  .manifesto.is-scroll-active .manifesto__backdrop img {
    will-change: transform;
  }

  html.manifesto-motion-ready .manifesto__backdrop::after {
    opacity: var(--manifesto-overlay-opacity, 1);
  }
}

/* Em desktop, a fotografia permanece na viewport somente durante a
   travessia do Manifesto. Sem motion ou sem suporte, a base absoluta
   acima mantém o mesmo resultado estático e integralmente funcional. */
@media (min-width: 769px) and (prefers-reduced-motion: no-preference) {
  .manifesto__backdrop {
    position: sticky;
    top: 0;
    height: 100svh;
    margin-bottom: -100svh;
  }
}

@media (max-width: 1023px) {
  .manifesto__lead,
  .manifesto__support {
    grid-column: 1 / -1;
  }

  .manifesto__support {
    margin-top: var(--space-2);
  }

  .manifesto__headline {
    max-width: none;
    font-size: var(--text-2xl);
  }
}

@media (max-width: 768px) {
  .manifesto {
    min-height: auto;
  }

  .manifesto__backdrop img {
    object-position: 62% center;
  }

  .manifesto__grid {
    min-height: auto;
    align-content: initial;
  }

  .manifesto__headline-line {
    display: inline;
  }

  .manifesto__headline-line:not(:last-child)::after {
    content: ' ';
  }

}

@media (max-width: 768px) and (prefers-reduced-motion: no-preference) {
  html.manifesto-motion-ready .manifesto__headline-line {
    overflow: visible;
  }

  html.manifesto-motion-ready .manifesto__headline-line > span {
    display: inline;
    opacity: 1;
    transform: none;
    transition: none;
  }

  html.manifesto-motion-ready .manifesto__headline {
    opacity: 0;
    clip-path: inset(0 0 100% 0);
    transform: translateY(22px);
  }

  html.manifesto-motion-ready .manifesto.is-revealed .manifesto__headline {
    opacity: 1;
    clip-path: inset(0);
    transform: translateY(0);
    transition:
      clip-path 680ms var(--ease-editorial) 260ms,
      opacity 520ms var(--ease-editorial) 260ms,
      transform 680ms var(--ease-editorial) 260ms;
  }
}
