/* ============================================================
   QGE-EFFECTS — biblioteca de efeitos visuais curados
   Mobile-first, prefers-reduced-motion respeitado.
   Cada projeto importa e usa 2 a 4 efeitos.
   Cores usam var(--fx-accent, ...) com fallback: para adaptar
   à marca do cliente, defina --fx-accent no :root do projeto.
   ============================================================ */

/* ================= 01. Glass Panel ================= */

.fx-glass {
  padding: 1.5rem 2rem;
  background: rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.fx-glass--dark {
  background: rgba(0, 0, 0, 0.25);
  border-color: rgba(255, 255, 255, 0.15);
}

/* ================= 02. Aurora Background ================= */

.fx-aurora {
  position: relative;
  overflow: hidden;
}

.fx-aurora__bg {
  position: absolute;
  inset: -20%;
  background: conic-gradient(
    from 140deg at 60% 40%,
    rgba(196, 105, 79, 0.55),
    rgba(122, 158, 126, 0.35),
    rgba(245, 240, 232, 0.2),
    rgba(196, 105, 79, 0.55)
  );
  filter: blur(48px);
  opacity: 0.85;
  animation: fx-aurora-spin 18s linear infinite;
  will-change: transform;
  pointer-events: none;
}

.fx-aurora__content {
  position: relative;
  z-index: 1;
}

@keyframes fx-aurora-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ================= 03. Light Ray ================= */

.fx-ray {
  height: 1px;
  border: none;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(245, 240, 232, 0.9),
    transparent
  );
  position: relative;
  margin-block: 1rem;
}

.fx-ray::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 80%;
  height: 20px;
  transform: translate(-50%, -50%);
  background: radial-gradient(
    ellipse at center,
    rgba(196, 105, 79, 0.4),
    transparent 70%
  );
  filter: blur(4px);
  pointer-events: none;
}

.fx-ray--subtle::before {
  opacity: 0.5;
}

/* ================= 04. Parallax Suave ================= */

.fx-parallax {
  position: relative;
  overflow: hidden;
}

.fx-parallax__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  will-change: transform;
  transition: transform 50ms linear;
}

.fx-parallax__content {
  position: relative;
  z-index: 1;
}

/* ================= 05. Fade in on Scroll ================= */

.fx-fade {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.fx-fade.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= 06. Text Reveal ================= */

.fx-text-reveal > span {
  display: inline-block;
  opacity: 0;
  transform: translateY(12px);
  animation: fx-text-rise 0.8s ease forwards;
  animation-delay: calc(var(--i, 0) * 120ms);
}

@keyframes fx-text-rise {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================= 07. Magnetic Cursor ================= */

.fx-magnetic {
  position: relative;
  transition: transform 220ms cubic-bezier(0.25, 1, 0.3, 1);
  will-change: transform;
}

/* ================= 08. Noise Texture Overlay ================= */

.fx-noise {
  position: relative;
  isolation: isolate;
}

.fx-noise::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' /><feColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  opacity: 0.18;
  pointer-events: none;
  mix-blend-mode: overlay;
  z-index: 0;
}

.fx-noise > * {
  position: relative;
  z-index: 1;
}

/* ================= 09. Cursor Spotlight ================= */

.fx-spotlight {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  --fx-mx: 50%;
  --fx-my: 50%;
}

.fx-spotlight::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle 240px at var(--fx-mx) var(--fx-my),
    rgba(196, 105, 79, 0.5),
    transparent 70%
  );
  pointer-events: none;
  transition: background 140ms linear;
  z-index: 0;
}

.fx-spotlight > * {
  position: relative;
  z-index: 1;
}

/* ================= 14. Chat Scroll Blur ================= */

.fx-chat-scroll {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding-block: 2rem;
  position: relative;
}

/* Mobile: conjunto avatar+bolha centralizado */
.fx-chat-scroll__msg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  opacity: 0;
  filter: blur(10px);
  transform: translateY(16px);
  transition: opacity 0.5s ease, filter 0.5s ease, transform 0.45s ease;
  will-change: filter, opacity;
}

.fx-chat-scroll__msg--right {
  flex-direction: row-reverse;
}

.fx-chat-scroll__msg.is-revealed {
  opacity: 1;
  filter: blur(0);
  transform: translateY(0);
}

/* Desktop: zigzag com linha central */
@media (min-width: 768px) {
  .fx-chat-scroll::before {
    content: "";
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 6px;
    transform: translateX(-50%);
    background: linear-gradient(to bottom, transparent, #d8d4cf 8%, #d8d4cf 92%, transparent);
    border-radius: 3px;
    pointer-events: none;
  }

  .fx-chat-scroll__msg {
    width: 46%;
    margin: 0;
  }

  .fx-chat-scroll__msg--left {
    align-self: flex-start;
  }

  .fx-chat-scroll__msg--right {
    align-self: flex-end;
  }
}

.fx-chat-scroll__avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--c-sage, #7a9e7e);
  flex-shrink: 0;
}

.fx-chat-scroll__avatar--b { background: #6b8fa8; }
.fx-chat-scroll__avatar--c { background: #9e9590; }
.fx-chat-scroll__avatar--d { background: #b07c6a; }
.fx-chat-scroll__avatar--e { background: #8a9a5b; }

.fx-chat-scroll__bubble {
  padding: 0.7rem 1.1rem;
  background: #fff;
  border-radius: 18px 18px 18px 4px;
  font-style: italic;
  font-size: 0.9rem;
  line-height: 1.55;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.07);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.fx-chat-scroll__msg--right .fx-chat-scroll__bubble {
  border-radius: 18px 18px 4px 18px;
}

/* ================= 10. Card 3D Reveal on Scroll ================= */

.fx-card3d {
  display: flex;
  gap: 1.5rem;
  perspective: 700px;
}

.fx-card3d__card {
  flex: 1;
  will-change: transform;
}

@media (max-width: 640px) {
  .fx-card3d { flex-direction: column; }
}

/* ================= 11. Timeline Line Fill ================= */

.fx-timeline-fill {
  position: relative;
  padding-left: 2.5rem;
}

.fx-timeline-fill__track {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}

.fx-timeline-fill__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--fx-accent, #FF3F7F), var(--fx-accent-soft, #A8CDE4));
  border-radius: 2px;
}

.fx-timeline-fill__item {
  position: relative;
  padding-bottom: 2rem;
}

.fx-timeline-fill__item:last-child { padding-bottom: 0; }

.fx-timeline-fill__dot {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fx-accent, #FF3F7F);
  border: 2px solid var(--fx-surface, #fff);
  box-shadow: 0 0 0 2px rgba(255, 63, 127, 0.25);
}

.fx-timeline-fill__year {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fx-accent, #FF3F7F);
  margin-bottom: 3px;
}

.fx-timeline-fill__label {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ================= 12. Timeline Sync Reveal ================= */

.fx-tlsync {
  position: relative;
  padding-left: 2.5rem;
}

.fx-tlsync__track {
  position: absolute;
  top: 0.25rem;
  bottom: 0.25rem;
  left: 0;
  width: 2px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 2px;
}

.fx-tlsync__fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(to bottom, var(--fx-accent, #FF3F7F), var(--fx-accent-soft, #A8CDE4));
  border-radius: 2px;
}

.fx-tlsync__item {
  position: relative;
  padding-bottom: 2rem;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.fx-tlsync__item:last-child { padding-bottom: 0; }

.fx-tlsync__item.is-visible {
  opacity: 1;
  transform: none;
}

.fx-tlsync__dot {
  position: absolute;
  left: -2.5rem;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--fx-accent, #FF3F7F);
  border: 2px solid var(--fx-surface, #fff);
  box-shadow: 0 0 0 2px rgba(255, 63, 127, 0.25);
  transition: transform 0.35s ease;
}

.fx-tlsync__item.is-visible .fx-tlsync__dot {
  transform: scale(1.25);
}

.fx-tlsync__year {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--fx-accent, #FF3F7F);
  margin-bottom: 3px;
}

.fx-tlsync__label {
  font-size: 0.9rem;
  line-height: 1.6;
}

/* ================= 13. Float Wander ================= */

.fx-float {
  will-change: transform;
}

/* ================= Máscaras e molduras ================= */

/* M1. Celular
   Frame aberto embaixo: SO A LINHA, sem preenchimento e sem overflow:hidden.
   A barra de controles e mais larga que o frame de proposito: ela vaza pelas
   laterais. Nunca colocar overflow:hidden no frame, e o que mata o efeito.

   A CENA (.fx-mask-phone-scene) NAO tem fundo por padrao: o fundo e o que ja
   existe atras (o card, a secao). So declare um fundo ou coloque a foto em
   .fx-mask-phone-scene__photo se voce realmente quiser uma imagem por tras,
   e nesse caso ela vaza abaixo do aparelho. No preview da biblioteca o
   degrade esta la so pra ilustrar essa possibilidade.

   Cores adaptaveis pelo projeto, o padrao ja serve pra fundo claro:
   --fx-phone-line   linha do frame, da ilha e do fio dos selos
   --fx-phone-bar    barra de controles e fundo dos selos
   --fx-phone-check  visto do selo
   --fx-phone-dim    conteudo da tela (avatar e status), bem apagado */

.fx-mask-phone-scene {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  padding: 1.25rem 0 0;
  overflow: hidden;
}

.fx-mask-phone-scene__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.fx-mask-phone {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  width: 150px;
  height: 271px;
  border: 2px solid var(--fx-phone-line, rgba(40, 60, 72, 0.45));
  border-bottom: none;
  border-radius: 37px 37px 0 0;
}

/* Alternativa: foto recortada dentro do frame em vez de cena atras.
   Perde o vazamento da foto, mantem o dos controles. */
.fx-mask-phone--recortado { overflow: hidden; }

.fx-mask-phone__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fx-mask-phone__island {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 69px;
  height: 23px;
  background: transparent;
  border: 2px solid var(--fx-phone-line, rgba(40, 60, 72, 0.45));
  border-radius: 14px;
  z-index: 2;
}

/* Tela: chamada em andamento sem foto. Fica apagada de proposito, pra nao
   competir com o texto do bloco. */
.fx-mask-phone__tela {
  position: absolute;
  inset: 58px 12px 66px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  text-align: center;
  color: var(--fx-phone-dim, #a9b7bd);
}

.fx-mask-phone__avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  opacity: 0.75;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
}

.fx-mask-phone__status { font-size: 0.72rem; letter-spacing: 0.02em; }

.fx-mask-phone__controls {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--fx-phone-bar, rgba(24, 28, 30, 0.88));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 26px;
  padding: 6px 12px;
  display: flex;
  gap: 7px;
  align-items: center;
  white-space: nowrap;
  z-index: 2;
}

.fx-mask-phone__ctrl {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(244, 244, 244, 0.9);
  flex-shrink: 0;
}

.fx-mask-phone__ctrl--end { background: #d63030; }

.fx-mask-phone__badges {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* fio vertical que amarra os selos no frame.
   Use .fx-mask-phone__badges--sem-fio quando os selos ficarem
   sobrepostos ao aparelho, aí o fio não tem o que ligar. */
.fx-mask-phone__badges--sem-fio::before { display: none; }

.fx-mask-phone__badges::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 12px;
  bottom: 12px;
  width: 1px;
  background: var(--fx-phone-line, rgba(40, 60, 72, 0.28));
}

.fx-mask-phone__badge {
  background: var(--fx-phone-badge-bg, rgba(24, 28, 30, 0.88));
  color: #ffffff;
  padding: 6px 12px;
  border-radius: 18px;
  font-size: 0.72rem;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.fx-mask-phone__badge__check {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 1px solid var(--fx-phone-check, #7ec8a0);
  color: var(--fx-phone-check, #7ec8a0);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* M2. Círculo */
.fx-mask-circle {
  position: relative;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 0 0 6px rgba(255, 63, 127, 0.25), 0 16px 48px rgba(0, 0, 0, 0.35);
}

.fx-mask-circle__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.fx-mask-circle::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.25) 0%, transparent 60%);
  pointer-events: none;
}

/* M3. Polaroid */
.fx-mask-polaroid {
  display: inline-flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #fff;
  padding: 0.75rem 0.75rem 1.5rem;
  border-radius: 4px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3), 0 2px 4px rgba(0, 0, 0, 0.15);
  transform: rotate(-2.5deg);
}

.fx-mask-polaroid__photo {
  width: 220px;
  height: 240px;
  object-fit: cover;
  border-radius: 2px;
  display: block;
}

.fx-mask-polaroid__caption {
  text-align: center;
  font-family: Georgia, serif;
  font-size: 0.75rem;
  color: rgba(0, 0, 0, 0.55);
  letter-spacing: 0.04em;
}

/* ================= Divisores de seção (SVG) ================= */

.fx-divider {
  line-height: 0;
}

.fx-divider svg {
  display: block;
  width: 100%;
}

/* ================= Divisores em linha ================= */

.fx-hr {
  width: 100%;
  height: 1px;
  border: none;
  background: rgba(0, 0, 0, 0.12);
  margin-block: 1.5rem;
}

.fx-hr-dot {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fx-hr-dot__ln {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.fx-hr-dot__mark {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--fx-accent, #FF3F7F);
  flex-shrink: 0;
}

.fx-hr-dot__mark--diamond {
  border-radius: 0;
  transform: rotate(45deg);
}

.fx-hr-arrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.fx-hr-arrow__ln {
  flex: 1;
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
}

.fx-hr-arrow__circle {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.75rem;
  line-height: 1;
}

.fx-hr-full {
  height: 1px;
  background: rgba(0, 0, 0, 0.12);
  margin-inline: calc(-1 * var(--fx-container-pad, 1.5rem));
}

.fx-hr-short {
  width: 52px;
  height: 2px;
  border-radius: 2px;
  background: var(--fx-accent, #FF3F7F);
  margin-inline: auto;
}

/* ================= Botão WhatsApp flutuante ================= */

.fx-wa {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #25d366;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: transform 0.2s ease;
}

.fx-wa svg {
  width: 32px;
  height: 32px;
  position: relative;
  z-index: 1;
  fill: #fff;
}

.fx-wa:hover {
  transform: scale(1.08);
}

/* V1: pulso simples */
@keyframes fx-wa-pulse {
  0%   { transform: scale(1);    opacity: 0.55; }
  100% { transform: scale(1.75); opacity: 0; }
}

.fx-wa--pulse::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(37, 211, 102, 0.5);
  animation: fx-wa-pulse 2s ease-out infinite;
  z-index: 0;
}

/* V2: dois anéis */
.fx-wa--rings::before,
.fx-wa--rings::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgba(37, 211, 102, 0.8);
  animation: fx-wa-pulse 2s ease-out infinite;
  z-index: 0;
}

.fx-wa--rings::after {
  animation-delay: 0.75s;
}

/* V3: label expansivo */
.fx-wa--label {
  width: 60px;
  border-radius: 30px;
  overflow: hidden;
  white-space: nowrap;
  gap: 10px;
  padding-inline: 14px;
  transition: width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s ease;
}

.fx-wa--label:hover {
  width: 180px;
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

.fx-wa__label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #fff;
  opacity: 0;
  max-width: 0;
  overflow: hidden;
  transition: opacity 0.25s ease 0.1s, max-width 0.35s ease;
}

.fx-wa--label:hover .fx-wa__label {
  opacity: 1;
  max-width: 120px;
}

/* V4: flutuante */
@keyframes fx-wa-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}

.fx-wa--float {
  background: var(--fx-accent, #FF3F7F);
  box-shadow: 0 8px 24px rgba(255, 63, 127, 0.45);
  animation: fx-wa-float 3s ease-in-out infinite;
}

.fx-wa--float:hover {
  box-shadow: 0 12px 32px rgba(255, 63, 127, 0.6);
  animation-play-state: paused;
}

/* V5: glow escuro */
@keyframes fx-wa-glow {
  0%, 100% { box-shadow: 0 0 12px rgba(37, 211, 102, 0.3), 0 4px 16px rgba(0, 0, 0, 0.4); }
  50%      { box-shadow: 0 0 28px rgba(37, 211, 102, 0.65), 0 4px 20px rgba(0, 0, 0, 0.4); }
}

.fx-wa--glow {
  background: #1a1a1a;
  border: 1.5px solid rgba(37, 211, 102, 0.35);
  animation: fx-wa-glow 2.5s ease-in-out infinite;
}

.fx-wa--glow:hover {
  border-color: rgba(37, 211, 102, 0.7);
  animation-play-state: paused;
  box-shadow: 0 0 40px rgba(37, 211, 102, 0.8), 0 4px 24px rgba(0, 0, 0, 0.5);
}

/* ================= Reduced motion fallback ================= */

@media (prefers-reduced-motion: reduce) {
  .fx-aurora__bg { animation: none; }
  .fx-parallax__layer { transform: none !important; transition: none; }
  .fx-fade { opacity: 1; transform: none; transition: none; }
  .fx-text-reveal > span { animation: none; opacity: 1; transform: none; }
  .fx-magnetic { transform: none !important; transition: none; }
  .fx-spotlight::before { transition: none; }
  .fx-chat-scroll__msg { opacity: 1 !important; filter: none !important; transform: none !important; transition: none !important; }
  .fx-card3d__card { transform: none !important; transition: none !important; }
  .fx-timeline-fill__fill { height: 100% !important; }
  .fx-tlsync__fill { height: 100% !important; }
  .fx-tlsync__item { opacity: 1 !important; transform: none !important; transition: none !important; }
  .fx-float { transform: none !important; }
  .fx-wa--pulse::before,
  .fx-wa--rings::before,
  .fx-wa--rings::after,
  .fx-wa--float,
  .fx-wa--glow { animation: none; }
}
