/* Pharus: seção Módulos (apresentação horizontal conduzida pela rolagem). Comportamento em js/modulos.js.
   Sem a classe .is-horiz (celular, sem JS, movimento reduzido) a seção é uma lista vertical com os mesmos mockups. */

/* ---------- lista vertical (padrão) ---------- */
.hpista__topo { position: sticky; top: calc(var(--topo-h) + 8px); z-index: 6; }
.hpista__topo .mods__indice { position: relative; top: auto; }
.hpista__hud, .hpista__rastro, .mod__marca { display: none; }
.hpista__trilho { position: relative; }
.mod { position: relative; }

/* ---------- apresentação horizontal ---------- */
.mods.is-horiz .hpista { position: relative; }
.mods.is-horiz .hpista__fixo {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: flex; flex-direction: column;
  padding-top: calc(var(--topo-h) + 10px);
  overflow: hidden;
}
.mods.is-horiz .hpista__topo { position: relative; top: auto; display: flex; align-items: center; gap: 18px; flex: none; max-width: 1576px; }
.mods.is-horiz .mods__indice { flex: 1; min-width: 0; margin: 0; }
.mods.is-horiz .hpista__hud {
  display: flex; align-items: center; gap: 12px; flex: none;
  font-family: var(--f-mono); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--apagado);
}
.hpista__n b { color: var(--ouro-claro); font-weight: 600; font-size: 1.05rem; margin-right: 2px; font-variant-numeric: tabular-nums; }
.hpista__barra { position: relative; display: block; width: 110px; height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.hpista__barra em { position: absolute; inset: 0; transform-origin: 0 50%; transform: scaleX(.0909); background: linear-gradient(90deg, var(--ouro-escuro), var(--ouro-claro)); box-shadow: 0 0 10px rgba(247, 207, 110, .6); }
@media (max-width: 1180px) { .hpista__dica { display: none; } }

.mods.is-horiz .hpista__janela { position: relative; flex: 1; min-height: 0; overflow: hidden; overflow: clip; }
.mods.is-horiz .hpista__trilho { display: flex; height: 100%; max-width: none; margin: 0; padding: 0; will-change: transform; }

.mods.is-horiz .mod {
  flex: 0 0 100%; width: 100%; height: 100%; min-height: 0;
  display: grid; grid-template-columns: minmax(0, .74fr) minmax(0, 1.26fr); grid-template-rows: 1fr auto auto auto auto 1fr;
  column-gap: clamp(28px, 4.5vw, 72px); align-items: start;
  padding: 14px max(clamp(20px, 5vw, 48px), calc((100% - 1480px) / 2)) 26px;
  border: 0; perspective: 1600px;
}
.mods.is-horiz .mod > * { position: relative; z-index: 1; grid-column: 1; }
.mods.is-horiz .mod > .mod__num { grid-row: 2; }
.mods.is-horiz .mod > .mod__titulo { grid-row: 3; font-size: clamp(1.7rem, 2.9vw, 2.75rem); max-width: 15ch; }
.mods.is-horiz .mod > .mod__texto { grid-row: 4; font-size: clamp(.98rem, 1.15vw, 1.08rem); }
.mods.is-horiz .mod > .mod__itens { grid-row: 5; }
.mods.is-horiz .mod > *:not(.mod__slot):not(.mod__marca) { will-change: transform, opacity; }
.mods.is-horiz .mod__slot {
  grid-column: 2; grid-row: 1 / -1; align-self: center; justify-self: center;
  width: min(100%, calc((var(--hp-h, 600px) - 96px) * 1.6)); margin: 0;
  transform-origin: 50% 55%; will-change: transform, opacity;
}
@media (max-height: 720px) {
  .mods.is-horiz .mod__itens { gap: 6px; margin-top: 14px; }
  .mods.is-horiz .mod__texto { margin-top: 12px; }
}

/* número grande ao fundo de cada cena (conta ao entrar) */
.mods.is-horiz .mod__marca {
  display: block; position: absolute; z-index: 0; grid-column: auto; grid-row: auto; left: max(clamp(10px, 3vw, 30px), calc((100% - 1480px) / 2 - 18px)); top: 1%;
  font-family: var(--f-mono); font-weight: 600; font-size: clamp(6rem, 19vh, 12.5rem); line-height: .8; letter-spacing: -.04em;
  color: transparent; -webkit-text-stroke: 1px rgba(240, 184, 72, .16);
  background: linear-gradient(180deg, rgba(240, 184, 72, .1), transparent 75%); -webkit-background-clip: text; background-clip: text;
  pointer-events: none; user-select: none; font-variant-numeric: tabular-nums;
}

/* rastro de luz dourada que cruza a tela na troca de cena */
.mods.is-horiz .hpista__rastro {
  display: block; position: absolute; z-index: 4; top: -10%; bottom: -10%; left: 50%; width: 30%; margin-left: -15%;
  pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, rgba(240, 184, 72, .08) 25%, rgba(247, 207, 110, .32) 46%, rgba(255, 228, 160, .75) 50%, rgba(247, 207, 110, .32) 54%, rgba(240, 184, 72, .08) 75%, transparent);
  mix-blend-mode: screen; will-change: transform, opacity;
}
.mods.is-horiz .hpista__janela::before, .mods.is-horiz .hpista__janela::after {
  content: ""; position: absolute; z-index: 3; top: 0; bottom: 0; width: clamp(16px, 3vw, 48px); pointer-events: none;
}
.mods.is-horiz .hpista__janela::before { left: 0; background: linear-gradient(90deg, var(--fundo), transparent); }
.mods.is-horiz .hpista__janela::after { right: 0; background: linear-gradient(-90deg, var(--fundo), transparent); }

/* a cena ativa sempre 100% legível */
.mods.is-horiz .mod.is-atual > * { visibility: visible; }

/* app do cliente: celular + cartões lado a lado */
.mods.is-horiz .tela-caixa--cel { display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 40px); }
.mods.is-horiz .tela-caixa--cel .tela--mobile { width: min(300px, calc((var(--hp-h, 600px) - 110px) * .44)); margin: 0; flex: none; }
.mods.is-horiz .ta__lado { display: grid; gap: 12px; width: min(260px, 42%); }

/* =========================================================
   Mockups construídos (módulos sem print): 1em = 1/120 da largura da tela
   ========================================================= */

/* cartazes: cartaz com QR + fila de cartazes vinda do ERP */
.mock--cartaz { grid-template-columns: 42em 1fr; gap: 4em; padding: 4em 4.6em; }
.tz__cartaz { height: 64em; display: flex; flex-direction: column; }
.tz__rodape { margin-top: auto; display: flex; align-items: flex-end; justify-content: space-between; gap: 1em; }
.mock--cartaz .tz__logo { position: static; font-size: 2.2em; }
.tz__qr { display: flex; flex-direction: column; align-items: center; gap: .3em; }
.tz__qr svg { width: 9.5em; height: 9.5em; padding: .5em; background: #FFF8E6; border: .2em solid #1A1A1A; border-radius: .5em; }
.tz__qr i { font-style: normal; font-size: 1.15em; font-weight: 700; color: #1A1A1A; }
.tz__painel { gap: 0; }
.mock--cartaz .tz__sync { margin-bottom: 2em; }
.tz__fila { list-style: none; margin: 0 0 2.2em; padding: 0; display: grid; gap: .8em; }
.tz__fila li { display: grid; grid-template-columns: 1fr auto auto; gap: 1.2em; align-items: baseline; padding: 1em 1.4em; border-radius: 1em; background: #12284A; border: 1px solid rgba(255, 255, 255, .05); font-size: 1.6em; }
.tz__fila li span { color: #DCE6F2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tz__fila s { color: #7D8FA8; font-size: .9em; }
.tz__fila b { font-family: var(--f-titulo); color: var(--ouro-claro); }
.tz__fila li.on { border-color: rgba(240, 184, 72, .7); box-shadow: 0 0 0 1px rgba(240, 184, 72, .25), 0 1em 3em -1em rgba(240, 184, 72, .35); }
.tz__opcoes { display: flex; gap: 4em; align-items: flex-start; }
.tz__opcoes .tz__temas, .tz__opcoes .tz__tams { margin-bottom: 2em; }
.tz__opcoes .tz__temas span { width: 4.6em; height: 4.6em; }
/* o preço novo some por pouco tempo (a versão antiga deixava o cartaz sem preço por 2 s) */
.js .mock--cartaz .tz__novo.anima { animation-name: virarCurto; }
.js .mock--cartaz .tz__velho.anima { animation-name: piscaCurto; }
.js .mock--cartaz .tz__sync.anima { animation-name: avisoCurto; }
.js .tz__fila li.on { animation: destacaFila 7s var(--ease) infinite; animation-play-state: paused; }
.js .is-vivo .tz__fila li.on { animation-play-state: running; }
@keyframes virarCurto { 0%, 6% { opacity: 0; transform: rotateX(80deg); } 14%, 100% { opacity: 1; transform: none; } }
@keyframes piscaCurto { 0%, 5% { transform: scale(1.2); color: #1a1a1a; } 13%, 100% { transform: none; } }
@keyframes avisoCurto { 0%, 4% { opacity: .35; transform: translateY(-.6em); } 12%, 100% { opacity: 1; transform: none; } }
@keyframes destacaFila { 0%, 4% { background: #12284A; } 10%, 30% { background: rgba(240, 184, 72, .2); } 45%, 100% { background: #12284A; } }

/* geolocalização: mapa de calor com bairros, raio da loja e clientes */
.mock--geo { grid-template-columns: 1fr 32em; }
.tg__raio { position: absolute; left: var(--x); top: var(--y); width: 46em; height: 46em; margin: -23em 0 0 -23em; border-radius: 50%; border: 1px dashed rgba(247, 207, 110, .55); background: radial-gradient(circle, rgba(240, 184, 72, .08), transparent 70%); }
.js .tg__raio.anima { animation: raioPulsa 4s ease-in-out infinite; }
@keyframes raioPulsa { 0%, 100% { transform: scale(.94); opacity: .7; } 50% { transform: scale(1.04); opacity: 1; } }
.tg__bairro { position: absolute; left: var(--x); top: var(--y); transform: translate(-50%, -50%); font-size: 1.25em; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgba(220, 230, 242, .78); text-shadow: 0 1px 4px #06101E; white-space: nowrap; }
.tg__filtros { position: absolute; left: 1.4em; top: 1.4em; display: flex; gap: .6em; }
.tg__filtros i { font-style: normal; font-size: 1.2em; padding: .45em .9em; border-radius: 99em; background: rgba(5, 12, 23, .78); border: 1px solid rgba(255, 255, 255, .12); color: #C9D5E4; }
.tg__filtros i:first-child { border-color: rgba(240, 184, 72, .6); color: var(--ouro-claro); }

/* acessos: equipe abaixo das permissões */
.mock--acessos .tx__perm { padding: 1em 1.8em; margin-bottom: .8em; }
.tx__tit-eq { margin-top: 2em !important; }
.tx__equipe { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1em; }
.tx__equipe span { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 1em; align-items: center; padding: 1em 1.2em; border-radius: 1em; background: #12284A; border: 1px solid rgba(255, 255, 255, .05); }
.tx__equipe i { grid-row: 1 / 3; display: grid; place-items: center; width: 4.2em; height: 4.2em; border-radius: 50%; font-style: normal; font-weight: 700; font-size: 1.3em; color: #0A1625; background: linear-gradient(135deg, var(--ouro-claro), var(--ouro-escuro)); }
.tx__equipe b { font-size: 1.5em; color: #fff; }
.tx__equipe em { font-style: normal; font-size: 1.25em; color: #8FA3BD; }

/* relatórios: indicadores, linha do mês e rosca por categoria */
.mock--rel { grid-template-rows: auto auto auto 1fr; gap: 2em; }
.tl__kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.2em; }
.tl__kpis div { padding: 1.3em 1.5em; border-radius: 1.2em; background: #12284A; border: 1px solid rgba(255, 255, 255, .05); }
.tl__kpis span { display: block; font-size: 1.3em; color: #8FA3BD; }
.tl__kpis b { display: block; font-family: var(--f-titulo); font-size: 2.3em; color: #fff; margin: .15em 0; white-space: nowrap; }
.tl__kpis i { font-style: normal; font-size: 1.2em; color: var(--verde); }
.tl__corpo { display: grid; grid-template-columns: 1.55fr 1fr; gap: 1.6em; min-height: 0; }
.tl__linha-graf, .tl__rosca { display: flex; flex-direction: column; min-height: 0; padding: 1.6em; border-radius: 1.4em; background: #0E2240; }
.tl__linha-graf svg { flex: 1; min-height: 0; width: 100%; }
.tl__rosca-in { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; }
.tl__rosca-in svg { height: 100%; max-height: 17em; aspect-ratio: 1; transform: rotate(-90deg); }
.tl__rosca-in b { position: absolute; font-family: var(--f-titulo); font-size: 1.6em; color: #DCE6F2; }
.mock--rel .tl__tab { grid-template-columns: 1fr auto; gap: .4em 1em; font-size: 1.3em; margin-top: 1em; }
.tl__tab i { display: inline-block; width: .8em; height: .8em; border-radius: 50%; margin-right: .5em; }
.tl__tab .c1 { background: #F0B848; } .tl__tab .c2 { background: #4FA3F7; } .tl__tab .c3 { background: #3CCB8A; }
.js .is-vivo .tl__traco { animation: tracoDesenha 1.6s var(--ease) both; }
.tl__traco { stroke-dasharray: 1; stroke-dashoffset: 0; }
.js .is-vivo .tl__area { animation: areaSobe 1.6s var(--ease) both; }
@keyframes tracoDesenha { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes areaSobe { from { opacity: 0; } to { opacity: 1; } }
.js .tl__rosca-in circle.anima { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .tz__fila li.on, .tg__raio, .tl__traco, .tl__area { animation: none !important; }
}

/* ---------- celular: lista vertical mais enxuta ---------- */
@media (max-width: 1023px) {
  .mod { padding: 28px 0 44px; }
}

/* computador sem a apresentação (movimento reduzido ou tela baixa): cenas em duas colunas, estáticas */
@media (min-width: 1024px) {
  .mods:not(.is-horiz) .mod { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); grid-template-rows: 1fr auto auto auto auto 1fr; column-gap: clamp(28px, 4.5vw, 64px); }
  .mods:not(.is-horiz) .mod > * { grid-column: 1; }
  .mods:not(.is-horiz) .mod > .mod__num { grid-row: 2; }
  .mods:not(.is-horiz) .mod > .mod__titulo { grid-row: 3; }
  .mods:not(.is-horiz) .mod > .mod__texto { grid-row: 4; }
  .mods:not(.is-horiz) .mod > .mod__itens { grid-row: 5; }
  .mods:not(.is-horiz) .mod > .mod__slot { grid-column: 2; grid-row: 1 / -1; align-self: center; margin-top: 0; }
  .mods:not(.is-horiz) .tela-caixa--cel { display: flex; align-items: center; justify-content: center; gap: 28px; }
  .mods:not(.is-horiz) .tela-caixa--cel .tela--mobile { width: min(260px, 50%); margin: 0; }
}

/* menos vão entre o título da seção e a pista presa (a pista já reserva o espaço do topo) */
.mods.is-horiz .cabeca { margin-bottom: 0; }
