:root {
  --papel: #ffffff;
  --tinta: #000000;
  --cinza: #666666;
  --largura-conteudo: 92%;
  --largura-campos: calc(46vw + min(460px, 46vw));
  --duracao-proximas-batalhas: 36s;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--papel);
  color: var(--tinta);
  font-family: "IBM Plex Mono", monospace;
}

body.modal-aberto {
  overflow: hidden;
}

button,
a {
  color: inherit;
  font: inherit;
}

a {
  text-decoration: none;
}

button {
  border-radius: 0;
}

::selection {
  background: #000000;
  color: #ffffff;
}

.pagina-batalhas {
  min-height: 100vh;
  background: #ffffff;
}

.oculto {
  display: none !important;
}

.pagina-batalhas main {
  position: relative;
  z-index: 30;
}

/* GRÃO GLOBAL */

.ruido-global {
  position: fixed;
  inset: 0;
  z-index: 10;

  background-image: url("./assets/ruido.gif");
  background-size: 200px 200px;
  background-position: top left;
  background-repeat: repeat;

  opacity: 0.12;
  pointer-events: none;
}

/* CABEÇALHO UNIVERSAL */

.topbar {
  height: 54px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #000000;
}

.marca-topo {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28em;
  font-family: "IBM Plex Mono", monospace;
  font-size: clamp(36px, 3.2vw, 44px);
  font-weight: 600;
  line-height: 0.9;
  letter-spacing: -2.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.marca-topo span {
  width: auto;
  text-align: left;
}

.marca-topo .numero-marca {
  color: #93301e;
}

/* IDENTIFICAÇÃO DA PÁGINA */

.identificacao-pagina {
  margin: 14px 20px 0;

  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: nowrap;
  gap: 20px;

  position: relative;
  z-index: 30;
}

.relogio-sp,
.nome-pagina {
  margin: 0;

  display: block;
  flex-shrink: 0;

  color: #000000;

  font-family: "IBM Plex Mono", monospace;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 2px;
  white-space: nowrap;
}

.separador-relogio {
  opacity: 1;
}

.separador-relogio.apagado {
  opacity: 0;
}

/* PRIMEIRA TELA */

.caixa-programacao {
  width: var(--largura-campos);
  margin: clamp(36px, 5vw, 64px) auto 0;
  padding: 0;

  background: transparent;
  color: #000000;
}

.abertura-batalhas {
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: clamp(18px, 2.5vw, 30px);
}

.calendario-wrap {
  width: 100%;
  margin: 0 auto;
}

.miolo-programacao {
  width: min(100%, 650px);
  margin: 0 auto;
}

.titulo-programacao {
  width: min(430px, 100%);
  min-height: 42px;
  margin: 0 auto 16px;
  padding: 6px 24px;

  display: flex;
  align-items: center;
  justify-content: center;

  background: #000000;
  color: #ffffff;
  border: 1px solid #000000;
  border-radius: 999px;

  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.5px;
  text-align: center;
  text-transform: lowercase;
}

.calendario-semanal {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1px, 0.35vw, 5px);
  overflow: hidden;
}

.dia-semana {
  flex: 0 0 auto;
  min-width: 0;
  padding: 7px 3px;
  cursor: pointer;
  background: transparent;
  color: #000000;
  border: 0;
  font-size: clamp(12px, 1.3vw, 18px);
  font-weight: 600;
  letter-spacing: 0.4px;
  text-align: center;
  text-transform: uppercase;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  white-space: nowrap;
  transition: opacity 120ms linear;
}

.dia-semana:first-child {
  padding-left: 0;
  text-align: left;
}

.dia-semana:last-child {
  padding-right: 0;
  text-align: right;
}

.calendario-semanal .dia-semana:first-child,
.calendario-semanal .dia-semana:last-child {
  text-align: center;
}

.dia-semana:hover {
  opacity: 0.55;
}

.dia-semana.ativo {
  font-weight: 700;
  text-decoration-thickness: 2px;
}

.dia-curto {
  display: none;
}

/* PAINEL DO DIA */

.camada-agenda {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.42);
  pointer-events: none;
}

.painel-agenda {
  width: max-content;
  max-width: calc(100vw - 40px);
  max-height: 72vh;
  max-height: 72svh;
  padding: 16px;

  overflow: auto;

  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;

  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.4px;

  pointer-events: auto;
}

.topo-painel-agenda {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #000000;
}

.topo-painel-agenda strong {
  font-size: 13px;
}

.topo-painel-agenda button {
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 1px solid #000000;
  font-size: 18px;
  line-height: 1;
}

.lista-agenda {
  width: max-content;
  min-width: 100%;
  padding: 10px 0 0;
}

.evento-agenda {
  margin: 0;
  padding: 2px 0;

  display: block;

  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: 0.4px;
  text-transform: lowercase;
  white-space: nowrap;
}

.evento-agenda time {
  font: inherit;
  font-style: italic;
}

.agenda-vazia {
  margin: 0;
  padding: 30px 0;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.legenda-agenda {
  margin: 9px 0 0;
  padding: 8px 0 0;
  border-top: 1px solid #000000;
  font-size: 10px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0.4px;
  text-transform: lowercase;
}

/* TEXTOS EDITORIAIS */

.texto-editorial {
  width: 100%;
  margin: 0;

  font-size: clamp(12px, 1.1vw, 16px);
  line-height: 1.6;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.descricao-catalogo {
  width: 100%;
  margin-right: auto;
  margin-bottom: 18px;
  margin-left: auto;
}

/* FAIXA DO PRÓXIMO EVENTO */

.faixa-proximo-evento {
  width: 100%;
  min-width: 0;
  height: auto;
  margin: clamp(18px, 2vw, 28px) auto 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;

  overflow: hidden;

  background: transparent;
  border: 0;

  font-size: 14px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: 1.2px;
  text-transform: uppercase;
}

.rotulo-faixa {
  width: 100%;
  position: relative;
  z-index: 2;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: 400;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.janela-faixa {
  width: 100%;
  height: 2em;

  position: relative;
  overflow: hidden;

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 24%,
    #000000 76%,
    transparent 100%
  );

  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 24%,
    #000000 76%,
    transparent 100%
  );
}

.faixa-track {
  width: 100%;
  height: max-content;

  display: flex;
  flex-direction: column;

  animation: movimento-vertical var(--duracao-proximas-batalhas) linear infinite;
  will-change: transform;
}

.faixa-grupo {
  width: 100%;
  padding: 0.25em 0;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75em;
  flex-shrink: 0;

  white-space: nowrap;
}

.evento-faixa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  max-width: 100%;
  color: #000080;
  white-space: nowrap;
}

.evento-faixa b {
  font-weight: 700;
}

@keyframes movimento-vertical {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

/* DIVISOR DO MASCOTE */

.divisor-mascote {
  --tamanho-mascote: clamp(60px, 5vw, 84px);
  --margem-mascote: clamp(33.333px, 5vw, 53.333px);

  width: 100%;
  height: calc(var(--tamanho-mascote) + (2 * var(--margem-mascote)));
  min-height: 0;

  position: relative;
  overflow: hidden;

  background-color: #ffffff;
  background-image: url("./assets/mascote-quadrado.webp");
  background-position: center;
  background-repeat: no-repeat;
  background-size: var(--tamanho-mascote) auto;

  pointer-events: none;
  user-select: none;
}

.divisor-mascote::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("./assets/ruido.gif");
  background-position: top left;
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.12;
  pointer-events: none;
}

/* CATÁLOGO */

.catalogo-section {
  width: var(--largura-campos);
  margin: 0 auto;
  padding: 0 0 90px;
}

.tabela-scroll {
  width: 100%;
  margin: 14px auto 0;

  overflow: visible;

  border: 0;
  background: transparent;
}

.tabela-batalhas {
  width: 100%;
  min-width: 0;

  border-collapse: collapse;

  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  text-transform: uppercase;
}

.tabela-batalhas caption {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.tabela-batalhas thead {
  background: transparent;
  color: #000000;
}

.tabela-batalhas th,
.tabela-batalhas td {
  padding: 14px 0;

  border-right: 0;
  border-bottom: 1px solid #000000;

  vertical-align: middle;
}

.tabela-batalhas thead th {
  border-top: 1px solid #000000;

  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
}

.tabela-batalhas tbody th {
  width: 75%;

  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.3px;
}

.tabela-batalhas th:last-child,
.tabela-batalhas td:last-child {
  width: 25%;
  padding-left: 20px;
  text-align: right;
}

.botao-batalha {
  padding: 0;

  cursor: pointer;

  background: transparent;
  color: inherit;
  border: 0;

  font: inherit;
  text-align: left;
  text-transform: uppercase;
  text-decoration: none;
}

.botao-batalha:hover {
  opacity: 0.55;
}

.camada-endereco {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(255, 255, 255, 0.42);
}

.balao-endereco {
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #ffffff;
  color: #000000;
  border: 1px solid #000000;
  overflow: auto;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.4px;
}

.balao-endereco strong,
.balao-endereco > span,
.balao-endereco a {
  white-space: nowrap;
}

.topo-balao-endereco {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 10px;
  border-bottom: 1px solid #000000;
}

.topo-balao-endereco strong {
  font-size: 13px;
}

.topo-balao-endereco button {
  width: 26px;
  height: 26px;
  padding: 0;
  cursor: pointer;
  background: transparent;
  border: 1px solid #000000;
  font-size: 18px;
  line-height: 1;
}

.balao-endereco a {
  width: max-content;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.status-ranking {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid currentColor;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.valor-indice {
  font-variant-numeric: tabular-nums;
  font-weight: 700;
}

.aviso-demonstracao {
  margin: 12px 0 0;
  color: #555555;
  font-size: 9px;
  line-height: 1.4;
  letter-spacing: 0.8px;
  text-align: right;
  text-transform: uppercase;
}

/* FOCO E ACESSIBILIDADE */

a:focus-visible,
button:focus-visible {
  outline: 2px solid #000000;
  outline-offset: 4px;
}

/* CELULAR */

@media (max-width: 720px) {
  .topbar {
    height: 48px;
    padding: 0 12px;
  }

  .marca-topo {
    font-size: 34px;
    letter-spacing: -2px;
  }

  .identificacao-pagina {
    margin: 10px 12px 0;
    gap: 12px;
  }

  .relogio-sp,
  .nome-pagina {
    font-size: 10px;
    letter-spacing: 1.4px;
    white-space: nowrap;
  }

  .abertura-batalhas {
    padding: 0;
    gap: 18px;
  }

  .caixa-programacao {
    width: calc(100% - 24px);
    margin-top: 30px;
    padding: 0;
  }

  .titulo-programacao {
    width: min(340px, 100%);
    min-height: 38px;
    margin-bottom: 12px;
    padding: 5px 18px;

    background: #000000;
    color: #ffffff;

    font-size: 17px;
    font-weight: 700;
  }

  .calendario-semanal {
    width: 100%;
    margin-left: 0;
    gap: 1px;
  }

  .miolo-programacao {
    width: min(100%, 62vw);
  }

  .dia-semana {
    padding: 6px 2px;
    font-size: clamp(11px, 3.1vw, 14px);
  }

  .dia-extenso {
    display: none;
  }

  .dia-curto {
    display: inline;
  }

  .camada-agenda {
    padding: 12px;
  }

  .painel-agenda {
    width: max-content;
    max-width: calc(100vw - 24px);
    max-height: 76vh;
    max-height: 76svh;
    padding: 14px;

    font-size: 9px;
  }

  .evento-agenda {
    font-size: 9px;
  }

  .evento-agenda time {
    font: inherit;
    font-style: italic;
  }

  .texto-editorial {
    width: 100%;

    font-size: 10px;
    line-height: 1.55;
    letter-spacing: 0.75px;
  }

  .descricao-catalogo {
    margin-bottom: 14px;
  }

  .faixa-proximo-evento {
    width: calc(100vw - 24px);
    max-width: calc(100vw - 24px);
    height: auto;
    margin-top: 18px;
    margin-right: 0;
    margin-left: 50%;
    padding: 0;
    gap: 8px;
    transform: translateX(-50%);

    font-size: 10px;
    letter-spacing: 0.7px;
  }

.janela-faixa {
  height: 2em;

  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 24%,
    #000000 76%,
    transparent 100%
  );

  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 24%,
    #000000 76%,
    transparent 100%
  );
}

.faixa-grupo,
.evento-faixa {
  gap: 0.65em;
}

.faixa-grupo {
  padding: 0.25em 0;
}

  .divisor-mascote {
    --tamanho-mascote: 64px;
    --margem-mascote: 33.333px;
  }

  .catalogo-section {
    width: calc(100% - 24px);
    padding: 0 0 72px;
  }

  .tabela-scroll {
    margin-top: 10px;
  }

  .tabela-batalhas {
    min-width: 0;
    font-size: 11px;
  }

  .tabela-batalhas th,
  .tabela-batalhas td {
    padding: 11px 0;
  }

  .tabela-batalhas tbody th {
    width: 64%;
    font-size: 12px;
  }

  .tabela-batalhas th:last-child,
  .tabela-batalhas td:last-child {
    width: 36%;
    padding-left: 12px;
  }

  .balao-endereco {
    max-width: calc(100vw - 24px);
    font-size: 9px;
  }

  .aviso-demonstracao {
    font-size: 8px;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .ruido-global,
  .faixa-track {
    animation: none;
  }
}
