/* ==========================================================================
   HEXA — estilos partilhados pelos sites exemplo (sites.hexa.pt)
   Barra "Site exemplo", botão WhatsApp flutuante, toast e animações reveal.
   ========================================================================== */

:root { --hexa-bar: 40px; }
[hidden] { display: none !important; }
html.hexa-bar-off { --hexa-bar: 0px; }
body { padding-top: var(--hexa-bar); }

/* ---------- Barra HEXA ---------- */
.hexa-bar {
  position: fixed; inset: 0 0 auto 0; z-index: 10000;
  height: var(--hexa-bar); overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 14px;
  padding: 0 44px 0 16px;
  background: #050505; color: #e5e7eb;
  border-bottom: 1px solid rgba(255,255,255,.08);
  font: 500 13px/1.2 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  letter-spacing: .01em;
}
.hexa-bar a { color: inherit; text-decoration: none; }
.hexa-bar__brand { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.hexa-bar__brand b { color: #00FB6B; letter-spacing: .32em; font-weight: 700; font-size: 12px; }
.hexa-bar__brand svg { width: 16px; height: 16px; }
.hexa-bar__text { color: #9ca3af; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hexa-bar__cta {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px; border-radius: 999px;
  background: #00FB6B; color: #000 !important; font-weight: 700; font-size: 12.5px;
  transition: transform .2s, box-shadow .2s;
}
.hexa-bar__cta:hover { transform: translateY(-1px); box-shadow: 0 4px 18px rgba(0,251,107,.35); }
.hexa-bar__close {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 28px; height: 28px; border: 0; border-radius: 50%;
  background: transparent; color: #6b7280; cursor: pointer; font-size: 18px; line-height: 1;
}
.hexa-bar__close:hover { color: #fff; background: rgba(255,255,255,.08); }
@media (max-width: 640px) {
  :root { --hexa-bar: 44px; }
  html.hexa-bar-off { --hexa-bar: 0px; }
  .hexa-bar { justify-content: space-between; gap: 10px; font-size: 12px; }
  .hexa-bar__text .hexa-long { display: none; }
}
@media (max-width: 380px) { .hexa-bar__text { display: none; } }

/* ---------- WhatsApp flutuante ---------- */
.hexa-wa {
  position: fixed; right: 20px; bottom: 20px; z-index: 9999;
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #25d366; color: #fff;
  box-shadow: 0 6px 20px rgba(37,211,102,.45);
  transition: transform .2s;
}
.hexa-wa:hover { transform: scale(1.08); }
.hexa-wa svg { width: 30px; height: 30px; position: relative; z-index: 1; }
.hexa-wa::before {
  content: ""; position: absolute; inset: 0; border-radius: 50%;
  background: #25d366; animation: hexa-pulse 2.4s ease-out infinite;
}
@keyframes hexa-pulse { 0% { transform: scale(1); opacity: .55 } 70%,100% { transform: scale(1.7); opacity: 0 } }

/* ---------- Toast (formulários demo) ---------- */
.hexa-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 10001;
  width: min(440px, calc(100% - 32px));
  transform: translate(-50%, 140%); opacity: 0;
  padding: 16px 18px; border-radius: 14px;
  background: #0b0b0b; color: #e5e7eb; border: 1px solid rgba(0,251,107,.35);
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
  font: 400 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  transition: transform .4s cubic-bezier(.2,.8,.2,1), opacity .4s;
}
.hexa-toast.show { transform: translate(-50%, 0); opacity: 1; }
.hexa-toast strong { color: #00FB6B; display: block; margin-bottom: 4px; }

/* ---------- Reveal on scroll ---------- */
.js .rv { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s cubic-bezier(.2,.8,.2,1); }
.js .rv.in { opacity: 1; transform: none; }
.js .rv.d1 { transition-delay: .1s } .js .rv.d2 { transition-delay: .2s } .js .rv.d3 { transition-delay: .3s }

/* ---------- Lightbox ---------- */
.hexa-lb {
  position: fixed; inset: 0; z-index: 10002; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(0,0,0,.92); cursor: zoom-out;
}
.hexa-lb.open { display: flex; }
.hexa-lb img { max-width: 100%; max-height: 90vh; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.6); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .js .rv { opacity: 1; transform: none; }
}
