/* portal-cativo — estilo exclusivo desta tela.
   O que e reaproveitado por mais de uma pagina mora em css/style.css,
   que carrega antes deste. */
/* ===== 27-cena-portal.css ===== */
/* Cena do hero de /solucoes/portal-cativo/: o visitante entrando.

   A navegacao e a do iPhone: tela inicial, Ajustes, lista de redes. Cada tela
   entra pela direita empurrando a anterior para a esquerda, que e o empurrao do
   iOS; no fim o portal sobe como folha, que e como o iPhone abre um portal
   cativo.

   O portal e o print de verdade. Ele e uma foto larga e o formulario esta no
   meio dela: `object-fit: cover` numa tela de celular mostra justamente essa
   faixa central, sem precisar recortar o arquivo. A encenacao em volta e
   `aria-hidden`; o que conta esta no `alt` da imagem.

   Todas as medidas sao `cqw`, a largura da propria cena. */
.pcv-cena {
  position: relative;
  display: flex;
  justify-content: center;
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  container-type: inline-size;
}

/* --- O aparelho --- */
.pcv-fone {
  position: relative;
  width: 55.0cqw;
  padding: 1.4cqw;
  border-radius: 6cqw;
  background: #0f172a;
  box-shadow: 0 4cqw 9cqw rgba(15, 23, 42, 0.3);
}

.pcv-ilha {
  position: absolute;
  z-index: 6;
  top: 3.4cqw;
  left: 50%;
  translate: -50% 0;
  width: 16cqw;
  height: 4.4cqw;
  border-radius: 9999px;
  background: #0f172a;
}

.pcv-tela {
  position: relative;
  overflow: hidden;
  border-radius: 4.8cqw;
  aspect-ratio: 9 / 18.4;
  background: #f2f2f7;
}

.pcv-indicador {
  position: absolute;
  z-index: 6;
  bottom: 1.2cqw;
  left: 50%;
  translate: -50% 0;
  width: 28%;
  height: 0.7cqw;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.4);
}

/* --- A barra de status --- */
.pcv-status {
  position: absolute;
  z-index: 5;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.6cqw 5cqw 0;
  font-size: 1.9cqw;
  font-weight: 700;
  color: #0f172a;
}

.pcv-status-icones {
  display: flex;
  align-items: center;
  gap: 1.2cqw;
  font-size: 1.6cqw;
}

.pcv-status-wifi {
  opacity: 0.25;
  animation: pcv-status-wifi 18s step-end infinite;
}

@keyframes pcv-status-wifi {
  0%,
  40.99% {
    opacity: 0.25;
  }

  41.0%,
  88.0% {
    opacity: 1;
  }

  95.0%,
  100% {
    opacity: 0.25;
  }
}

/* --- As telas, e o empurrao do iOS --- */
/* Cada tela entra pela direita e empurra a anterior um quarto para a esquerda,
   que e como o iPhone troca de tela dentro de um aplicativo. */
.pcv-vista {
  position: absolute;
  inset: 0;
  padding: 9cqw 0 6cqw;
  overflow: hidden;
}

.pcv-vista-inicio {
  padding-inline: 3.4cqw;
  display: flex;
  flex-direction: column;
  background: linear-gradient(160deg, #dbeafe 0%, #eef2f7 45%, #e2e8f0 100%);
  animation: pcv-inicio 18s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes pcv-inicio {
  0%,
  9.0% {
    translate: 0 0;
  }

  14.0%,
  94.99% {
    translate: -25% 0;
  }

  95.0%,
  100% {
    translate: 0 0;
  }
}

.pcv-vista-ajustes,
.pcv-vista-wifi {
  background: #f2f2f7;
  box-shadow: -0.6cqw 0 1.6cqw rgba(15, 23, 42, 0.12);
}

.pcv-vista-ajustes {
  z-index: 2;
  translate: 100% 0;
  animation: pcv-ajustes 18s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes pcv-ajustes {
  0%,
  9.0% {
    translate: 100% 0;
  }

  14.0%,
  21.0% {
    translate: 0 0;
  }

  26.0%,
  94.99% {
    translate: -25% 0;
  }

  95.0%,
  100% {
    translate: 100% 0;
  }
}

.pcv-vista-wifi {
  z-index: 3;
  translate: 100% 0;
  animation: pcv-wifi 18s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes pcv-wifi {
  0%,
  21.0% {
    translate: 100% 0;
  }

  26.0%,
  94.99% {
    translate: 0 0;
  }

  95.0%,
  100% {
    translate: 100% 0;
  }
}

/* --- A tela inicial --- */
.pcv-apps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3.4cqw 2.4cqw;
  margin-top: 2cqw;
  list-style: none;
}

.pcv-app {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1cqw;
}

.pcv-app-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 2.8cqw;
  background: color-mix(in srgb, var(--cor) 18%, #fff);
  font-size: 3.4cqw;
  color: var(--cor);
  box-shadow: 0 0.8cqw 1.6cqw rgba(15, 23, 42, 0.08);
}

.pcv-app-nome {
  font-size: 1.5cqw;
  font-weight: 600;
  color: #334155;
}

.pcv-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.4cqw;
  margin-top: auto;
  padding: 2.2cqw;
  border-radius: 3.4cqw;
  background: rgba(255, 255, 255, 0.55);
}

/* --- As telas de ajustes --- */
.pcv-voltar {
  padding: 0 4cqw;
  font-size: 2.2cqw;
  font-weight: 500;
  color: #007aff;
}

.pcv-voltar i {
  font-size: 1.8cqw;
}

.pcv-titulao {
  padding: 0.6cqw 4cqw 2cqw;
  font-size: 4.4cqw;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.pcv-secao {
  padding: 3cqw 4cqw 1.2cqw;
  font-size: 1.7cqw;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #6e6e73;
}

/* O cartao branco de cantos redondos: e o jeito do iOS agrupar uma lista. */
.pcv-grupo {
  margin-inline: 3.4cqw;
  border-radius: 2.6cqw;
  background: #fff;
  list-style: none;
  overflow: hidden;
}

.pcv-linha,
.pcv-rede {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2cqw;
  padding: 2cqw 3cqw;
  font-size: 2.2cqw;
  color: #0f172a;
}

/* O risco de separacao comeca depois do icone, como no iOS. */
.pcv-linha + .pcv-linha::before,
.pcv-rede + .pcv-rede::before {
  content: "";
  position: absolute;
  top: 0;
  left: 9cqw;
  right: 0;
  height: 1px;
  background: #e5e5ea;
}

.pcv-linha-icone {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5cqw;
  height: 5cqw;
  border-radius: 1.4cqw;
  background: var(--cor);
  font-size: 2.4cqw;
  color: #fff;
}

.pcv-linha-nome {
  flex: none;
  white-space: nowrap;
}

.pcv-rede-nome {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pcv-linha-valor {
  flex: 1;
  min-width: 0;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 2cqw;
  color: #6e6e73;
}

.pcv-rede-icones {
  flex: none;
  font-size: 2cqw;
  color: #6e6e73;
}

.pcv-rede-icones {
  display: flex;
  gap: 1.4cqw;
}

.pcv-rede-icones .fa-circle-info {
  color: #007aff;
}

.pcv-seta {
  font-size: 1.8cqw;
  color: #c7c7cc;
}

/* A chave do Wi-Fi, ligada. */
.pcv-chave {
  display: flex;
  align-items: center;
  width: 8cqw;
  height: 4.6cqw;
  padding: 0.4cqw;
  border-radius: 9999px;
  background: #34c759;
}

.pcv-chave i {
  width: 3.8cqw;
  height: 3.8cqw;
  margin-left: auto;
  border-radius: 9999px;
  background: #fff;
  box-shadow: 0 0.2cqw 0.6cqw rgba(15, 23, 42, 0.25);
}

/* A rede da casa: gira enquanto conecta, e fica com o certo depois. */
.pcv-rede-marca {
  position: relative;
  width: 3cqw;
  flex: none;
}

/* Centrados na casinha: com `inset: 0` numa casinha que estica junto com a
   altura da linha, o glifo fica ancorado no topo dela. */
.pcv-rede-certo,
.pcv-rede-girando {
  position: absolute;
  top: 50%;
  left: 50%;
  translate: -50% -50%;
  font-size: 2.2cqw;
  line-height: 1;
  color: #007aff;
  opacity: 0;
}

.pcv-rede-certo {
  animation: pcv-certo 18s step-end infinite;
}

@keyframes pcv-certo {
  0%,
  40.99% {
    opacity: 0;
  }

  41.0%,
  94.99% {
    opacity: 1;
  }

  95.0%,
  100% {
    opacity: 0;
  }
}

.pcv-rede-girando {
  animation:
    pcv-gira 0.9s linear infinite,
    pcv-girando 18s step-end infinite;
}

@keyframes pcv-gira {
  from {
    rotate: 0deg;
  }

  to {
    rotate: 360deg;
  }
}

@keyframes pcv-girando {
  0%,
  33.99% {
    opacity: 0;
  }

  34.0%,
  40.99% {
    opacity: 1;
  }

  41.0%,
  100% {
    opacity: 0;
  }
}

/* --- O portal, que o iPhone abre como folha --- */
.pcv-folha {
  position: absolute;
  z-index: 4;
  inset: 4cqw 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 3.4cqw 3.4cqw 0 0;
  background: #f2f2f7;
  box-shadow: 0 -1cqw 3cqw rgba(15, 23, 42, 0.18);
  translate: 0 100%;
  animation: pcv-folha 18s cubic-bezier(0.32, 0.72, 0, 1) infinite;
}

@keyframes pcv-folha {
  0%,
  45.0% {
    translate: 0 100%;
  }

  50.0%,
  88.0% {
    translate: 0 0;
  }

  95.0%,
  100% {
    translate: 0 100%;
  }
}

.pcv-folha-barra {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2.4cqw 3cqw;
  font-size: 1.9cqw;
  color: #007aff;
}

.pcv-folha-barra strong {
  font-size: 1.8cqw;
  font-weight: 700;
  color: #0f172a;
}

/* A foto e larga e o formulario esta no meio dela: o `cover` numa tela de
   celular mostra justamente essa faixa central. */
.pcv-portal {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: cover;
  object-position: center;
}

/* --- O toque --- */
.pcv-toque {
  position: absolute;
  z-index: 7;
  width: 9cqw;
  height: 9cqw;
  border-radius: 9999px;
  border: 0.5cqw solid rgba(0, 122, 255, 0.7);
  background: rgba(0, 122, 255, 0.12);
  translate: -50% -50%;
  opacity: 0;
  animation: pcv-toque 18s ease-out infinite;
}

/* As posicoes saem da geometria da cena, em % do aparelho: o icone de Ajustes
   na quarta coluna da segunda fila, a linha do Wi-Fi e a rede da casa. */
.pcv-toque-ajustes {
  left: 82.59%;
  top: 30.06%;
  animation-delay: 1.44s;
}

.pcv-toque-wifi {
  left: 37.82%;
  top: 29.02%;
  animation-delay: 3.6s;
}

.pcv-toque-rede {
  left: 37.82%;
  top: 36.21%;
  animation-delay: 5.94s;
}

@keyframes pcv-toque {
  0% {
    scale: 0.3;
    opacity: 0;
  }

  2.5% {
    scale: 0.6;
    opacity: 1;
  }

  8%,
  100% {
    scale: 1.4;
    opacity: 0;
  }
}

/* Quem pediu menos movimento ve o desfecho: o portal aberto no celular. */
@media (prefers-reduced-motion: reduce) {
  .pcv-cena * {
    animation: none !important;
  }

  .pcv-folha,
  .pcv-portal {
    translate: 0 0;
  }

  .pcv-toque {
    opacity: 0;
  }
}



/* ===== Central de Autenticacao: o pulso que desce pelo caminho =====
   Smartphone -> nuvem -> access point. O pulso desce o primeiro trecho e,
   na sequencia, o segundo; os dois dividem o mesmo ciclo de 2,4 s, entao
   nunca aparecem juntos. Ate 10/11/2026 o primeiro trecho tinha so um
   ponto piscando parado, fora do eixo da linha, e o segundo nada. */
.pcv-fluxo {
  position: relative;
  display: block;
  width: 2px;
  height: 2rem;
  background-image: linear-gradient(to bottom, #cbd5e1 50%, transparent 50%);
  background-size: 2px 6px;
}

.pcv-fluxo-pulso {
  position: absolute;
  left: 50%;
  top: 0;
  width: 8px;
  height: 8px;
  margin-left: -4px;
  border-radius: 9999px;
  background: #1e6fa9;
  box-shadow: 0 0 0 4px rgba(30, 111, 169, 0.18);
  opacity: 0;
  animation: pcv-fluxo-desce 2.4s ease-in-out infinite;
}

.pcv-fluxo-2 .pcv-fluxo-pulso {
  animation-name: pcv-fluxo-desce-2;
}

@keyframes pcv-fluxo-desce {
  0% { top: -4px; opacity: 0; }
  8% { opacity: 1; }
  42% { top: calc(100% - 4px); opacity: 1; }
  50%, 100% { top: calc(100% - 4px); opacity: 0; }
}

@keyframes pcv-fluxo-desce-2 {
  0%, 50% { top: -4px; opacity: 0; }
  58% { opacity: 1; }
  92% { top: calc(100% - 4px); opacity: 1; }
  100% { top: calc(100% - 4px); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .pcv-fluxo-pulso {
    animation: none;
    opacity: 1;
    top: calc(50% - 4px);
  }
}
