/* Conexão Franca — cabeçalho-bolha (hdr-), rodapé (ftr-) e botão flutuante de contato (ftr-fab). Dono: agente HERO.
   Só usa tokens de base.css (e, com fallback, os de efeitos.css). O vidro escuro serve em fundo claro e escuro. */

/* A barra flutua: ~14px de respiro + ~60px de pílula. Âncoras (scroll-padding de base.css) e hero usam isto. */
:root { --header-h: 84px; }

/* ============================================================
   CABEÇALHO — pílula de vidro flutuante
   ============================================================ */
.hdr {
  --hdr-ease: var(--ease, cubic-bezier(.65, 0, .2, 1));
  --hdr-suave: var(--ease-suave, cubic-bezier(.22, 1, .36, 1));
  --hdr-txt: #e8eef5;                 /* contraste >= 7:1 sobre o vidro escuro */
  position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
  display: flex; justify-content: center;
  padding-inline: 12px;               /* largura útil = 100% - 24px */
  pointer-events: none;               /* a faixa transparente não bloqueia cliques na página */
  transition: top .4s var(--hdr-ease);
}
.hdr > * { pointer-events: auto; }
.hdr.is-scrolled { top: 8px; }
.hdr :focus-visible { outline: 3px solid #3ddba8; outline-offset: 2px; }

.hdr-bar {
  position: relative; isolation: isolate;
  width: 100%; max-width: 1080px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 8px 8px 8px 16px;
  border-radius: 999px; color: #fff;
  box-shadow: 0 14px 36px -14px rgba(13, 27, 42, .42), 0 2px 6px rgba(13, 27, 42, .08);   /* sombra suave: a barra escura flutua sobre fundo claro */
  transition: max-width .5s var(--hdr-ease), padding .4s var(--hdr-ease), box-shadow .4s ease;
}
.hdr.is-scrolled .hdr-bar { max-width: 960px; padding-block: 5px; box-shadow: 0 10px 26px -12px rgba(13, 27, 42, .5), 0 1px 4px rgba(13, 27, 42, .1); }

/* O vidro vive num pseudo-elemento: assim a pílula não vira "raiz de backdrop" e o menu (outra bolha) também borra o fundo. */
.hdr-bar::before, .hdr-nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; pointer-events: none;
  background: rgba(13, 27, 42, .9);          /* mais opaco que sobre fundo escuro: sobre --bg o vidro continua escuro e o texto >= 7:1 */
  -webkit-backdrop-filter: blur(18px) saturate(1.5); backdrop-filter: blur(18px) saturate(1.5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14);
  transition: background-color .3s ease;
}
.hdr.is-scrolled .hdr-bar::before, .hdr.is-open .hdr-bar::before, .hdr.is-scrolled .hdr-nav::before { background: rgba(10, 20, 33, .95); }
/* borda fina em degradê (máscara recorta só o anel) */
.hdr-bar::after, .hdr-nav::after {
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, .42), rgba(255, 255, 255, .07) 38%, rgba(61, 219, 168, 0) 62%, rgba(61, 219, 168, .34));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* sem JS o menu não é bolha */
html:not(.js) .hdr-nav::before, html:not(.js) .hdr-nav::after { display: none; }
/* sem suporte a backdrop-filter: fundo quase sólido */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .hdr-bar::before, .hdr-nav::before { background: rgba(11, 18, 32, .96); }
}

/* logo: a animação (e o recuo no hover) vêm de logo.css; aqui só o tamanho na barra */
.hdr .cf-logo { font-size: 18px; border-radius: 999px; }
.hdr .cf-logo__mark { width: 34px; height: 34px; transition: width .4s var(--hdr-ease), height .4s var(--hdr-ease); }
.hdr.is-scrolled .cf-logo__mark { width: 30px; height: 30px; }

/* Hambúrguer em CSS puro (aparece só com JS, no celular/tablet) */
.hdr-toggle {
  display: none; width: 44px; height: 44px; padding: 0; flex: none;
  align-items: center; justify-content: center; cursor: pointer;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2); border-radius: 50%;
  transition: background-color .2s ease, transform .3s var(--hdr-suave);
}
.hdr-toggle:hover { background: rgba(255, 255, 255, .18); }
.hdr-toggle:active { transform: scale(.94); }
.js .hdr-toggle { display: inline-flex; }
.hdr-toggle__bars { position: relative; width: 18px; height: 14px; display: block; }
.hdr-toggle__bars i {
  position: absolute; left: 0; width: 100%; height: 2px; border-radius: 2px; background: #fff;
  transition: transform .3s var(--hdr-ease), opacity .2s ease, top .3s var(--hdr-ease);
}
.hdr-toggle__bars i:nth-child(1) { top: 0; }
.hdr-toggle__bars i:nth-child(2) { top: 6px; }
.hdr-toggle__bars i:nth-child(3) { top: 12px; }
.hdr-toggle[aria-expanded="true"] .hdr-toggle__bars i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.hdr-toggle[aria-expanded="true"] .hdr-toggle__bars i:nth-child(2) { opacity: 0; transform: scaleX(.2); }
.hdr-toggle[aria-expanded="true"] .hdr-toggle__bars i:nth-child(3) { top: 6px; transform: rotate(-45deg); }

/* Links */
.hdr-list { display: none; }               /* sem JS no celular: só o botão (os links estão no rodapé) */
.hdr-ind { display: none; }
.hdr-link {
  position: relative; display: block; text-decoration: none; color: var(--hdr-txt);
  font-weight: 600; font-size: 15.5px; line-height: 1.2; border-radius: 999px; white-space: nowrap;
  transition: color .2s ease;
}
.hdr-link:hover, .hdr-link.is-active { color: #fff; }
.hdr-link.is-active { font-weight: 700; }
.hdr-cta { background: #07785a; box-shadow: none; }   /* verde escurecido: branco 5,4:1 (AA) */
.hdr-cta:hover { background: #06614a; }

/* Menu do celular = segunda bolha que desce da pílula */
.js .hdr-nav {
  position: absolute; top: calc(100% + 8px); left: 0; right: 0; isolation: isolate;
  display: flex; flex-direction: column; gap: 10px;
  padding: 8px 14px 14px; border-radius: 28px;
  box-shadow: 0 22px 44px -18px rgba(13, 27, 42, .5);
  opacity: 0; visibility: hidden; transform: translateY(-12px) scale(.97); transform-origin: 50% 0;
  transition: opacity .25s ease, transform .45s var(--hdr-suave), visibility 0s linear .45s;
}
.js .hdr.is-open .hdr-nav { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.js .hdr-list { display: block; }
.js .hdr-list li + li { border-top: 1px solid rgba(255, 255, 255, .1); }
.js .hdr-link { padding: 15px 10px; font-size: 18px; border-radius: 12px; }
.js .hdr-link.is-active { color: #3ddba8; }
.js .hdr-cta { width: 100%; }
/* links entram em cascata */
.js .hdr-list li { opacity: 0; transform: translateY(-8px); transition: opacity .3s ease, transform .4s var(--hdr-suave); }
.js .hdr.is-open .hdr-list li { opacity: 1; transform: none; }
.js .hdr.is-open .hdr-list li:nth-child(1) { transition-delay: .05s; }
.js .hdr.is-open .hdr-list li:nth-child(2) { transition-delay: .09s; }
.js .hdr.is-open .hdr-list li:nth-child(3) { transition-delay: .13s; }
.js .hdr.is-open .hdr-list li:nth-child(4) { transition-delay: .17s; }
.js .hdr.is-open .hdr-list li:nth-child(5) { transition-delay: .21s; }

@media (min-width: 900px) {
  .hdr-bar { padding: 8px 8px 8px 20px; }
  .hdr-toggle, .js .hdr-toggle { display: none; }
  .hdr-nav, .js .hdr-nav {
    position: static; isolation: auto; flex-direction: row; align-items: center; gap: 22px;
    padding: 0; border-radius: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .hdr-nav::before, .hdr-nav::after { display: none; }
  .hdr-links { position: relative; }
  .hdr-list, .js .hdr-list { display: flex; gap: 2px; }
  .js .hdr-list li, .js .hdr.is-open .hdr-list li { opacity: 1; transform: none; transition: none; }
  .js .hdr-list li + li { border-top: 0; }
  .hdr-link, .js .hdr-link { padding: 10px 14px; font-size: 15.5px; border-radius: 999px; }
  .js .hdr-link.is-active { color: #fff; }
  html:not(.js) .hdr-link:hover { background: rgba(255, 255, 255, .1); }
  .js .hdr-cta { width: auto; }
  /* indicador deslizante: a "bolha" que acompanha o link ativo/hover (posição vem do header.js) */
  .js .hdr-ind {
    display: block; position: absolute; left: 0; top: 0; bottom: 0; width: var(--iw, 0px);
    transform: translateX(var(--ix, 0px)); opacity: var(--io, 0); pointer-events: none;
    border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .14);
    transition: transform .5s var(--hdr-ease), width .5s var(--hdr-ease), opacity .25s ease;
  }
}
@media (min-width: 900px) and (max-width: 1079px) {
  .hdr-link, .js .hdr-link { padding-inline: 10px; font-size: 14.5px; }
  .hdr-nav, .js .hdr-nav { gap: 12px; }
  .hdr .cf-logo { font-size: 17px; }
}

/* ============================================================
   RODAPÉ
   ============================================================ */
.ftr { position: relative; z-index: 3; background: #08121d; color: var(--on-dark); padding-block: clamp(48px, 7vw, 84px) 28px; border-top: 1px solid var(--dark-line); }
.ftr a { color: inherit; text-decoration: none; }
.ftr :focus-visible { outline-color: #3ddba8; }
.ftr-topo { display: grid; gap: 40px 32px; grid-template-columns: minmax(0, 1fr); }
.ftr-frase { margin-top: 16px; max-width: 34ch; color: var(--on-dark-muted); font-size: 16px; line-height: 1.55; text-wrap: pretty; }
.ftr-contato { margin-top: 22px; display: grid; gap: 6px; justify-items: start; }
.ftr-contato a { display: inline-flex; align-items: center; gap: 10px; padding-block: 8px; min-height: 44px; font-weight: 600; font-size: 15.5px; color: var(--on-dark); border-bottom: 1px solid transparent; transition: color .2s ease; }
.ftr-contato a:hover { color: #3ddba8; }
.ftr-contato .ic { color: #3ddba8; width: 1.3em; height: 1.3em; --ic-acento: var(--warm); }
.ftr-contato .ic--wa { fill: currentColor; }

.ftr-cols { display: grid; gap: 32px 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.ftr-col--serv { grid-column: 1 / -1; }
.ftr-col__t { margin: 0 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--warm); }
.ftr-col__sub { margin: 0 0 6px; font-size: 12.5px; font-weight: 700; color: var(--on-dark-muted); letter-spacing: .02em; }
.ftr-col ul { display: grid; }
.ftr-col a { display: inline-block; padding-block: 6px; min-height: 32px; font-size: 15.5px; color: #cdd7e2; transition: color .2s ease, transform .3s var(--ease-suave, ease); }
.ftr-col a:hover { color: #fff; transform: translateX(3px); }
.ftr-col--serv { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; row-gap: 18px; align-content: start; }
.ftr-col--serv > .ftr-col__t { grid-column: 1 / -1; }
.ftr-grupo:nth-of-type(n+3) { grid-column: 1 / -1; }
.ftr-col:not(.ftr-col--serv) > .ftr-grupo { margin-top: 22px; }

.ftr-copy { margin-top: clamp(36px, 5vw, 56px); padding-top: 22px; border-top: 1px solid var(--dark-line); font-size: 14px; color: var(--on-dark-muted); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: space-between; }

@media (min-width: 700px) {
  .ftr-cols { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ftr-col--serv { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
  .ftr-grupo:nth-of-type(n+3) { grid-column: auto; }
}
@media (min-width: 980px) {
  .ftr-topo { grid-template-columns: minmax(0, .8fr) minmax(0, 1.9fr); gap: 48px; }
  .ftr-cols { grid-template-columns: minmax(0, 1.15fr) minmax(0, .8fr) minmax(0, .9fr); }
}

/* ============================================================
   BOTÃO FLUTUANTE DE CONTATO (ícone oficial do WhatsApp)
   ============================================================ */
.ftr-fab {
  position: fixed; z-index: 90; right: calc(16px + env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: center; gap: 12px; pointer-events: none;
  transition: opacity .3s ease, transform .4s var(--ease-suave, ease), visibility 0s;
}
.ftr-fab > * { pointer-events: auto; }
.ftr-fab--oculto { opacity: 0; visibility: hidden; transform: translateY(14px) scale(.9); transition: opacity .3s ease, transform .4s var(--ease-suave, ease), visibility 0s linear .4s; }
.ftr-fab--oculto > * { pointer-events: none; }
.ftr-fab__btn {
  position: relative; isolation: isolate; width: 58px; height: 58px; flex: none; display: grid; place-items: center; border-radius: 50%;
  color: #fff; text-decoration: none; background: linear-gradient(150deg, #14b88c, #087a5b);
  box-shadow: 0 12px 26px rgba(6, 97, 74, .36), 0 3px 8px rgba(13, 27, 42, .18), inset 0 1px 0 rgba(255, 255, 255, .3);
  transition: transform .35s var(--mola, cubic-bezier(.3, 1.4, .5, 1)), box-shadow .3s ease;
}
.ftr-fab__btn::before {                 /* anel que se expande, como um aviso discreto */
  content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 50%; background: #14b88c; opacity: 0;
  animation: ftr-fab-ping 3.4s 2.5s ease-out infinite;
}
@keyframes ftr-fab-ping { 0% { transform: scale(1); opacity: .5; } 60%, 100% { transform: scale(1.7); opacity: 0; } }
.ftr-fab__btn .ic { width: 30px; height: 30px; vertical-align: baseline; }
.ftr-fab__btn:hover { transform: scale(1.08) rotate(-6deg); }
.ftr-fab__btn:active { transform: scale(.95); }
.ftr-fab__btn:focus-visible { outline: 3px solid #fff; outline-offset: 3px; box-shadow: 0 0 0 6px #0d1b2a; }
.ftr-fab__balao {
  position: relative; padding: 10px 16px; border-radius: 16px; white-space: nowrap;
  background: #0d1b2a; color: #fff; font-size: 14.5px; font-weight: 700; line-height: 1.2;
  box-shadow: 0 12px 28px -8px rgba(13, 27, 42, .45), inset 0 0 0 1px rgba(255, 255, 255, .12);
  opacity: 0; transform: translateX(10px) scale(.92); transform-origin: 100% 50%; pointer-events: none !important;
  transition: opacity .35s ease, transform .5s var(--mola, cubic-bezier(.3, 1.4, .5, 1));
}
.ftr-fab__balao::after {                /* ponta apontando para a bolha */
  content: ""; position: absolute; top: 50%; right: -5px; width: 12px; height: 12px; margin-top: -6px; transform: rotate(45deg);
  background: #0d1b2a; border-radius: 2px;
}
.ftr-fab__balao.is-on { opacity: 1; transform: none; }
@media (min-width: 900px) {
  .ftr-fab { right: calc(24px + env(safe-area-inset-right, 0px)); bottom: calc(24px + env(safe-area-inset-bottom, 0px)); }
  .ftr-fab__btn { width: 64px; height: 64px; }
  .ftr-fab__btn .ic { width: 33px; height: 33px; }
}
@media (prefers-reduced-motion: reduce) {
  .hdr, .hdr-bar, .hdr-bar::before, .hdr-toggle, .hdr-toggle__bars i, .hdr .cf-logo__mark,
  .js .hdr-nav, .js .hdr-list li, .js .hdr-ind { transition: none !important; }
  .js .hdr-nav { transform: none; }
  .ftr-fab__btn::before { animation: none; display: none; }
  .ftr-fab__btn, .ftr-fab__btn:hover, .ftr-fab__balao, .ftr-fab, .ftr-col a, .ftr-col a:hover { transition: none; transform: none; }
  .ftr-fab__balao.is-on { transform: none; }
}
