/* ============================================================
   GLOBAL.CSS — Componentes globais compartilhados
   WhatsApp flutuante, scroll progress, melhorias gerais
   ============================================================ */

/* ── WhatsApp Button Flutuante ── */
.wpp-float {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 800;
  width: 54px;
  height: 54px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,.35);
  transition: transform .3s var(--ease-out), box-shadow .3s;
  animation: wppPop .6s var(--ease-spring) 1.5s both;
}
.wpp-float:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 8px 28px rgba(37,211,102,.45);
}
/* Tooltip */
.wpp-float::before {
  content: 'Fale comigo';
  position: absolute;
  right: calc(100% + .7rem);
  top: 50%;
  transform: translateY(-50%) translateX(6px);
  background: var(--ink);
  color: var(--cream);
  font-family: var(--sans);
  font-size: .68rem;
  letter-spacing: .06em;
  white-space: nowrap;
  padding: .4rem .8rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s, transform .25s;
}
.wpp-float:hover::before {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}
@keyframes wppPop {
  0%   { opacity: 0; transform: scale(0.5); }
  70%  { transform: scale(1.1); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── Scroll progress bar (topo da página) ── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  background: var(--green);
  width: 0%;
  z-index: 1000;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Skip to content (acessibilidade) ── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--green);
  color: var(--cream);
  padding: .5rem 1rem;
  font-size: .8rem;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: .5rem; }

/* ── Smooth image loading ── */
img {
  opacity: 0;
  transition: opacity .5s ease;
}
img.is-loaded { opacity: 1; }

/* ── Selection melhorada ── */
::selection {
  background: var(--sage-light);
  color: var(--ink);
}

/* ── Focus ring global ── */
:focus-visible {
  outline: 2px solid var(--sage);
  outline-offset: 3px;
}

/* Entrada da página: sem animação forçada no main — cada página define a sua */

/* ── Nav scroll indicator (dot ativo) ── */
.nav__link.is-active {
  color: var(--ink);
}

/* ── Melhorias de tipografia ── */
h1, h2, h3, h4 {
  text-wrap: balance;
}
p {
  text-wrap: pretty;
}

/* ── Print ── */
@media print {
  .nav, .wpp-float, .scroll-progress, .nav__drawer { display: none; }
  body { cursor: auto; font-size: 12pt; }
  .footer { break-inside: avoid; }
}
