/* ==================================================================== */
/* Tela 02 . mosaico de fundo de ponta a ponta                          */
/* A faixa continua tombada, entao as frestas entre os paineis saem    */
/* na diagonal e nao ha buraco entre as fotos. O trilho de marcas e    */
/* as descricoes ficam na mesma posicao aprovada de 10/11.             */
/*                                                                   */
/* Cada marca do trilho tem agora um bloco de imagens, com o mesmo     */
/* duotone azul e a mesma luminancia media.                            */
/* Carregada depois das folhas anteriores, entao vence.                */
/* ==================================================================== */

/* O fundo inteiro passa a ser o mosaico. */
#scene-2 .history-mosaic {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
  overflow: hidden;
  z-index: 0;
  pointer-events: none;
}

/* O conjunto e maior que a cena e fica tombado. As fotos entao        */
/* cobrem tudo e a linha de corte entre elas sai na diagonal.          */
#scene-2 .history-band {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1520px;
  height: 880px;
  margin: -440px 0 0 -760px;
  transform: rotate(-4deg);
  transform-origin: 50% 50%;
}

/* Cada celula e um painel vertical, recortado na proporcao que a      */
/* imagem tem no disco.                                                */
#scene-2 .history-mosaic figure {
  position: absolute;
  margin: 0;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px #ffffff10;
}

/* Incorpora Engenharia: obra de fundacoes. */
#scene-2 .history-mosaic figure:nth-child(1) { left: 0;    top: 0;   width: 380px; height: 880px; }

/* Bravo: tres fotos de obra empilhadas. */
#scene-2 .history-mosaic figure:nth-child(2) { left: 380px; top: 0;   width: 260px; height: 293px; }
#scene-2 .history-mosaic figure:nth-child(3) { left: 380px; top: 293px; width: 260px; height: 293px; }
#scene-2 .history-mosaic figure:nth-child(4) { left: 380px; top: 586px; width: 260px; height: 294px; }

/* ProjetA: a planta baixa em cima e o sistema de incendio do galpao   */
/* pronto embaixo, na altura da marca.                                  */
#scene-2 .history-mosaic figure:nth-child(5) { left: 640px; top: 0;   width: 260px; height: 380px; }
#scene-2 .history-mosaic figure:nth-child(6) { left: 640px; top: 380px; width: 260px; height: 500px; }

/* Incorpora Log: a obra com a estrutura em montagem e o galpao pronto. */
#scene-2 .history-mosaic figure:nth-child(7)  { left: 900px;  top: 0;   width: 260px; height: 300px; }
#scene-2 .history-mosaic figure:nth-child(8)  { left: 900px;  top: 300px; width: 260px; height: 580px; }

/* Bravo Britagem: as quatro fotos de brita, empilhadas. */
#scene-2 .history-mosaic figure:nth-child(9)  { left: 1160px; top: 0;   width: 360px; height: 220px; }
#scene-2 .history-mosaic figure:nth-child(10) { left: 1160px; top: 220px; width: 360px; height: 220px; }
#scene-2 .history-mosaic figure:nth-child(11) { left: 1160px; top: 440px; width: 360px; height: 220px; }
#scene-2 .history-mosaic figure:nth-child(12) { left: 1160px; top: 660px; width: 360px; height: 220px; }

#scene-2 .history-mosaic img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: filter .5s ease;
}

#scene-2 .history-mosaic figure:after { background: none }

/* O veu segura o titulo em cima a esquerda e as descricoes embaixo.
   No meio, onde ficam as marcas, a foto aparece. */
#scene-2 .history-wash {
  z-index: 1;
  background:
    linear-gradient(90deg,
      rgba(4,22,32,.85) 0%,
      rgba(4,22,32,.6) 20%,
      rgba(4,22,32,.18) 36%,
      rgba(4,22,32,0) 46%) no-repeat 0 0 / 100% 42%,
    linear-gradient(180deg,
      rgba(4,22,32,.62) 0%,
      rgba(4,22,32,.52) 14%,
      rgba(4,22,32,.24) 30%,
      rgba(4,22,32,.16) 44%,
      rgba(4,22,32,.18) 58%,
      rgba(3,17,26,.5) 66%,
      rgba(3,16,25,.66) 76%,
      rgba(3,15,24,.82) 100%);
}

/* A foto do bloco acende quando a marca correspondente recebe o foco. */
#scene-2[data-active="0"] .history-mosaic figure:nth-child(1) img { filter: brightness(1.24) saturate(1.04); }
#scene-2[data-active="1"] .history-mosaic figure:nth-child(n+2):nth-child(-n+4) img { filter: brightness(1.24) saturate(1.04); }
#scene-2[data-active="2"] .history-mosaic figure:nth-child(n+5):nth-child(-n+6) img { filter: brightness(1.24) saturate(1.04); }
#scene-2[data-active="3"] .history-mosaic figure:nth-child(n+7):nth-child(-n+8) img { filter: brightness(1.24) saturate(1.04); }
#scene-2[data-active="4"] .history-mosaic figure:nth-child(n+9):nth-child(-n+12) img { filter: brightness(1.24) saturate(1.04); }

@media (prefers-reduced-motion: reduce) {
  #scene-2 .history-mosaic img { transition: none; }
}
