/* Estilos do cartão digital da Zapper Telecom
   Cores da marca: roxo #370279 e branco */

:root {
  --brand: #370279;
  --brand-950: #120029;
  --accent: #a77bff;

  --text: #ffffff;
  --text-2: rgba(255, 255, 255, 0.72);
  --text-3: rgba(255, 255, 255, 0.5);
  --line: rgba(255, 255, 255, 0.12);

  --radius: 18px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --font-titulo: "Sora", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-texto: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

html {
  background: var(--brand-950);
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font-texto);
  color: var(--text);
  background: var(--brand-950);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

svg {
  display: block;
  width: 1em;
  height: 1em;
}

::selection {
  background: var(--accent);
  color: #fff;
}

/* Estrutura da página */

.main {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  padding: calc(32px + env(safe-area-inset-top)) 16px calc(28px + env(safe-area-inset-bottom));
}

.container {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 640px) {
  .main {
    align-items: center;
    padding: 56px 24px;
  }
  .container {
    max-width: 480px;
    padding: 40px 32px 28px;
    border-radius: 32px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow:
      0 50px 120px -40px rgba(6, 0, 20, 0.75),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
  }
}

.somente-leitor {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Fundo roxo com as linhas animadas */

.fundo {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: radial-gradient(130% 80% at 50% -10%, #5a12b4 0%, var(--brand) 40%, #21004a 74%, var(--brand-950) 100%);
}

.fundo-grade {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 36px 36px;
  background-position: center top;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 20%, transparent 75%);
  mask-image: radial-gradient(ellipse 80% 60% at 50% 25%, #000 20%, transparent 75%);
}

.fundo-orb {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}

.fundo-orb-a {
  width: 620px;
  height: 620px;
  left: 50%;
  top: -260px;
  margin-left: -310px;
  background: radial-gradient(circle, rgba(140, 82, 255, 0.55) 0%, rgba(140, 82, 255, 0) 65%);
  animation: flutuar-a 14s ease-in-out infinite alternate;
}

.fundo-orb-b {
  width: 520px;
  height: 520px;
  right: -220px;
  bottom: -200px;
  background: radial-gradient(circle, rgba(186, 104, 255, 0.28) 0%, rgba(186, 104, 255, 0) 65%);
  animation: flutuar-b 18s ease-in-out infinite alternate;
}

.fundo-vinheta {
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgba(10, 0, 26, 0.55) 100%);
}

.fibras {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fibras-paisagem {
  display: none;
}

@media (min-width: 768px) {
  .fibras-retrato {
    display: none;
  }
  .fibras-paisagem {
    display: block;
  }
}

/* linha fininha que fica parada no fundo */
.fibras path {
  fill: none;
  stroke: rgba(205, 182, 255, 0.11);
  stroke-width: 1;
}

/* luzinha que corre pelas linhas (o script.js que cria) */
.fibras .pulso,
.fibras .brilho {
  stroke-linecap: round;
  stroke-dasharray: 80 1920;
  stroke-dashoffset: 80;
  animation: viajar var(--dur, 9s) linear var(--atraso, 0s) infinite;
}

.fibras .pulso {
  stroke: #e6dbff;
  stroke-width: 1.6;
}

.fibras .brilho {
  stroke: #a77bff;
  stroke-width: 6;
  opacity: 0.35;
}

/* Logo */

.cabecalho {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.logo {
  position: relative;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  perspective: 1000px;
}

.logo-halo {
  position: absolute;
  inset: 4% 2% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(150, 88, 255, 0.6), rgba(150, 88, 255, 0));
  filter: blur(18px);
  pointer-events: none;
  animation: respirar 5s ease-in-out infinite;
}

.logo-caixa {
  --rx: 0deg;
  --ry: 0deg;
  position: relative;
  transform: rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.5s var(--ease);
  animation: flutuar 6s ease-in-out infinite;
}

.logo-caixa.ativo {
  transition: transform 0.12s linear;
}

.logo-img {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 18px 28px rgba(8, 0, 26, 0.55));
  -webkit-user-select: none;
  user-select: none;
  -webkit-user-drag: none;
}

/* brilho que passa por cima do logo de vez em quando */
.logo-reflexo {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.4) 50%, transparent 60%);
  background-size: 260% 100%;
  background-position: 160% 0;
  -webkit-mask-image: url("../img/logo-zapper.webp");
  mask-image: url("../img/logo-zapper.webp");
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  animation: reflexo 7s var(--ease) 1.2s infinite;
}

/* Títulos das seções */

.secao {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.rotulo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 2px 2px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-3);
}

.rotulo::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line), transparent);
}

.blocos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

/* Botão do WhatsApp, o principal da página */

@property --angulo {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: true;
}

.whats-anel {
  position: relative;
  isolation: isolate;
  padding: 2px;
  border-radius: calc(var(--radius) + 2px);
  animation: girar 5s linear infinite;
}

.whats-anel,
.whats-anel::after {
  background: conic-gradient(
    from var(--angulo),
    rgba(255, 255, 255, 0.25) 0%,
    rgba(255, 255, 255, 0.25) 55%,
    #b48cff 72%,
    #ffffff 82%,
    rgba(255, 255, 255, 0.25) 95%
  );
}

.whats-anel::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  filter: blur(16px);
  opacity: 0.5;
}

.whats {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 72px;
  padding: 14px 16px 14px 14px;
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.3s var(--ease),
    background 0.3s;
}

.whats:active {
  transform: scale(0.985);
}

.whats:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
}

.whats-icone {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  font-size: 24px;
  color: #fff;
  background: var(--brand);
  box-shadow: 0 8px 18px -8px rgba(55, 2, 121, 0.7);
  transition: transform 0.3s var(--ease);
}

.whats-textos {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.whats-titulo {
  font-family: var(--font-titulo);
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.whats-numero {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  color: rgba(55, 2, 121, 0.7);
}

.whats-chamada {
  flex-shrink: 0;
  padding: 7px 12px;
  border-radius: 999px;
  font-family: var(--font-titulo);
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
}

@media (hover: hover) {
  .whats:hover {
    background: #faf7ff;
  }
  .whats:hover .seta {
    transform: translate(2px, -2px);
    opacity: 1;
  }
  .whats:hover .whats-icone {
    transform: scale(1.06) rotate(-4deg);
  }
}

/* em celular pequeno a seta sai pra caber o "Conversar" */
@media (max-width: 389px) {
  .whats {
    gap: 12px;
    padding-right: 12px;
  }
  .whats-seta {
    display: none;
  }
}

/* em celular bem pequeno nem o "Conversar" cabe, então volta só a seta */
@media (max-width: 359px) {
  .whats-chamada {
    display: none;
  }
  .whats-seta {
    display: block;
  }
}

/* Botões de contato e redes sociais */

.link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 12px 16px 12px 12px;
  border-radius: var(--radius);
  color: #fff;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.09), rgba(255, 255, 255, 0.04));
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 0.3s var(--ease),
    border-color 0.3s,
    background 0.3s,
    box-shadow 0.3s;
}

.link:active {
  transform: scale(0.985);
}

.link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

.link-icone {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 13px;
  font-size: 21px;
  color: var(--brand);
  background: #fff;
  box-shadow: 0 8px 18px -8px rgba(0, 0, 0, 0.55);
  transition: transform 0.3s var(--ease);
}

.link-textos {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.link-titulo {
  font-family: var(--font-titulo);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.link-sub {
  font-size: 13px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-linha {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.link-etiqueta {
  flex-shrink: 0;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ece3ff;
  background: rgba(205, 182, 255, 0.16);
  border: 1px solid rgba(205, 182, 255, 0.28);
}

.seta {
  flex-shrink: 0;
  font-size: 18px;
  opacity: 0.55;
  transition:
    transform 0.3s var(--ease),
    opacity 0.3s;
}

.whats .seta {
  opacity: 0.75;
}

@media (hover: hover) {
  .link:hover {
    transform: translateY(-2px);
    border-color: rgba(205, 182, 255, 0.45);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.06));
    box-shadow:
      0 16px 34px -16px rgba(8, 0, 24, 0.85),
      0 0 0 4px rgba(167, 123, 255, 0.1);
  }
  .link:hover .seta {
    transform: translate(2px, -2px);
    opacity: 1;
  }
  .link:hover .link-icone {
    transform: scale(1.06) rotate(-4deg);
  }
}

/* em celular bem pequeno tiramos a seta pro número não ficar cortado */
@media (max-width: 359px) {
  .link {
    gap: 12px;
    padding-right: 12px;
  }
  .link:not(.link-bloco) .seta {
    display: none;
  }
}

/* Instagram e Facebook, um do lado do outro */
.link-bloco {
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  min-height: 118px;
  padding: 14px;
}

.link-bloco .link-textos {
  width: 100%;
}

.link-bloco .seta {
  position: absolute;
  top: 14px;
  right: 14px;
}

/* Botões Salvar contato e Compartilhar */

.acoes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.acao {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 48px;
  padding: 0 14px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
  font-family: var(--font-titulo);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 0.3s,
    border-color 0.3s,
    transform 0.3s var(--ease);
}

.acao svg {
  font-size: 17px;
}

.acao:active {
  transform: scale(0.97);
}

.acao:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

@media (hover: hover) {
  .acao:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.45);
  }
}

.aviso {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 50;
  padding: 11px 18px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  font-family: var(--font-titulo);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 18px 40px -12px rgba(8, 0, 26, 0.7);
  opacity: 0;
  transform: translate(-50%, 16px);
  pointer-events: none;
  transition:
    opacity 0.3s,
    transform 0.4s var(--ease);
}

.aviso.visivel {
  opacity: 1;
  transform: translate(-50%, 0);
}

.rodape {
  margin-top: 4px;
  text-align: center;
  font-size: 12px;
  color: var(--text-3);
}

/* Animações */

/* os itens vão aparecendo um depois do outro quando a página abre */
.surgir {
  animation: surgir 0.8s var(--ease) backwards;
  animation-delay: calc(var(--i, 0) * 70ms + 100ms);
}

@keyframes surgir {
  from {
    opacity: 0;
    transform: translateY(16px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: blur(0);
  }
}

/* a luz atravessa a linha e dá uma pausa antes de passar de novo */
@keyframes viajar {
  0% {
    stroke-dashoffset: 80;
  }
  65%,
  100% {
    stroke-dashoffset: -1000;
  }
}

@keyframes flutuar-a {
  to {
    transform: translate(40px, 30px) scale(1.08);
  }
}

@keyframes flutuar-b {
  to {
    transform: translate(-60px, -40px) scale(1.1);
  }
}

@keyframes flutuar {
  0%,
  100% {
    translate: 0 0;
  }
  50% {
    translate: 0 -6px;
  }
}

@keyframes respirar {
  0%,
  100% {
    opacity: 0.75;
    transform: scale(0.96);
  }
  50% {
    opacity: 1;
    transform: scale(1.04);
  }
}

@keyframes reflexo {
  0% {
    background-position: 160% 0;
  }
  22%,
  100% {
    background-position: -60% 0;
  }
}

@keyframes girar {
  to {
    --angulo: 360deg;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}
