
:root {
  --glass-tint-green: rgba(47, 196, 31, 0.80);
  --glass-tint-navy: rgba(29, 21, 70, 0.86);
  --glass-tint-white: rgba(255, 255, 255, 0.42);
  --glass-rim: rgba(255, 255, 255, 0.85);
  --glass-rim-soft: rgba(255, 255, 255, 0.18);
  --glass-shine: rgba(255, 255, 255, 0.55);
  --glass-drop: rgba(29, 21, 70, 0.18);
}

/* =========================================
   BASE — LIQUID GLASS
   ========================================= */

.jf-glass {
  --glass-tint: var(--glass-tint-white);
  --glass-blur: 18px;

  position: relative;
  isolation: isolate;

  background: var(--glass-tint);

  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(180%);
  backdrop-filter: blur(var(--glass-blur)) saturate(180%);

  border-color: transparent !important;

  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-rim-soft),
    0 8px 24px var(--glass-drop);
}

/* Borda de luz */
.jf-glass::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  pointer-events: none;
  z-index: -1;

  background: linear-gradient(
    135deg,
    var(--glass-rim) 0%,
    var(--glass-rim-soft) 40%,
    transparent 60%,
    var(--glass-rim-soft) 85%,
    var(--glass-shine) 100%
  );

  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);

  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

/* Reflexo especular */
.jf-glass::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: -1;

  background: radial-gradient(
    120% 90% at var(--mx, 28%) var(--my, 0%),
    var(--glass-shine),
    transparent 55%
  );

  opacity: .55;
  transition: opacity .25s;
}

/* Variações */
.jf-glass--regular {
  --glass-blur: 18px;
}

.jf-glass--clear {
  --glass-blur: 6px;
  --glass-tint: rgba(255, 255, 255, 0.16);
}

.jf-glass--clear::after {
  opacity: .35;
}

.jf-glass--tint-green {
  --glass-tint: var(--glass-tint-green);
  --glass-drop: rgba(47, 196, 31, 0.32);
}

.jf-glass--tint-navy {
  --glass-tint: var(--glass-tint-navy);
}

.jf-glass--tint-white {
  --glass-tint: var(--glass-tint-white);
}

.jf-glass--tint-navy::after,
.jf-glass--tint-green::after {
  opacity: .4;
}

/* Interação */
.jf-glass--interactive {
  transition:
    transform .25s cubic-bezier(.2, .8, .2, 1),
    box-shadow .25s;

  will-change: transform;
}

.jf-glass--interactive:hover {
  transform: translateY(-1px);
  filter: none;
}

.jf-glass--interactive:hover::after {
  opacity: .85;
}

.jf-glass--interactive:active {
  transform: scale(.96);
}

/* Acessibilidade */
@media (prefers-reduced-transparency: reduce) {
  .jf-glass {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }

  .jf-glass--tint-white,
  .jf-glass--clear {
    background: var(--surface);
  }

  .jf-glass--tint-green {
    background: var(--green);
  }

  .jf-glass--tint-navy {
    background: var(--navy);
  }

  .jf-glass::after {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .jf-glass--interactive,
  .jf-glass--interactive:hover,
  .jf-glass--interactive:active {
    transition: none;
    transform: none;
  }
}

/* =========================================
   CABEÇALHO E ESTRUTURA
   ========================================= */

.top {
  position: fixed;
  left: 0;
  right: 0;
  top: env(safe-area-inset-top, 0px);

  background: transparent !important;
  border-bottom: 0 !important;

  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;

  padding-top: 12px;
  pointer-events: none;
}

.top .wrap {
  pointer-events: auto;
}

.glass-bar {
  border-radius: var(--radius-pill);
  padding-inline: 18px 10px;
}

.top .jf-nav {
  padding-block: 8px;
}

.top .jf-nav img {
  max-height: 56px;
}

body::before {
  background: transparent;
}

/* Menu mobile antigo */
.mobile-menu {
  background: transparent;
  border-top: 0;
  margin-top: 10px;
  pointer-events: auto;
}

.mobile-menu .glass-sheet {
  border-radius: var(--radius-28);
  padding: 8px 20px 20px;
}

.mobile-menu li a {
  border-bottom-color: var(--glass-rim-soft);
}

.menu-btn {
  border: 0;
  background: transparent;
}

/* Espaçamento da página */
.jf {
  padding-top: calc(96px + env(safe-area-inset-top, 0px));
}

/* =========================================
   BARRAS E SUPERFÍCIES
   ========================================= */

.glass-bar,
.dock {
  --glass-tint: rgba(246, 247, 251, 0.78);
  --glass-blur: 28px;
}

.glass-sheet {
  --glass-tint: rgba(246, 247, 251, 0.84);
  --glass-blur: 32px;
}

/* Botões */
.jf-btn.jf-glass {
  box-shadow:
    inset 0 1px 0 var(--glass-rim),
    inset 0 -1px 1px var(--glass-rim-soft),
    0 8px 24px var(--glass-drop);
}

.jf-btn--ghost.jf-glass,
.jf-btn--light.jf-glass {
  color: var(--navy);
}

.jf-btn--light.jf-glass {
  --glass-tint: rgba(255, 255, 255, 0.78);
}

/* =========================================
   NAVEGAÇÃO DESKTOP
   ========================================= */

.jf-nav {
  width: 100%;

  display: flex;
  align-items: center;
  justify-content: space-between;

  gap: 24px;
}

.jf-nav-logo {
  flex: 0 0 auto;

  display: flex;
  align-items: center;
}

.jf-nav-logo img {
  display: block;
  width: 115px;
  height: auto;
  max-height: 56px;
  object-fit: contain;
}

/* Lista de navegação */
.jf-nav-links {
  position: relative;
  isolation: isolate;

  display: flex;
  align-items: center;
  justify-content: center;

  flex: 1;
  gap: 3px;

  padding: 5px;
  margin: 0;

  list-style: none;
}

/* Indicador compartilhado */
.jf-nav-glass {
  position: absolute;
  z-index: 0;

  left: 0;
  top: 0;

  width: 0;
  height: 0;

  border-radius: 999px;
  pointer-events: none;
  opacity: 0;

  transition:
    left 650ms cubic-bezier(.22,1,.36,1),
    top 650ms cubic-bezier(.22,1,.36,1),
    width 650ms cubic-bezier(.22,1,.36,1),
    height 650ms cubic-bezier(.22,1,.36,1),
    opacity 200ms ease;

  will-change: left, top, width, height;
}

.jf-nav-glass.is-ready {
  opacity: 1;
}

/* Superfície de vidro do indicador */
.jf-nav-glass::before {
  content: "";
  position: absolute;
  inset: 0;

  border-radius: inherit;

  background: linear-gradient(
    135deg,
    rgba(255,255,255,.75),
    rgba(255,255,255,.28) 45%,
    rgba(255,255,255,.48)
  );

  border: 1px solid rgba(255,255,255,.85);

  -webkit-backdrop-filter:
    blur(16px) saturate(200%) brightness(1.1);

  backdrop-filter:
    blur(16px) saturate(200%) brightness(1.1);

  box-shadow:
    inset 0 1px 1px rgba(255,255,255,.95),
    inset 0 -1px 2px rgba(255,255,255,.3),
    0 3px 12px rgba(29,21,70,.09);
}

/* Reflexo do indicador */
.jf-nav-glass::after {
  content: "";
  position: absolute;
  inset: 1px;

  border-radius: inherit;

  background: radial-gradient(
    ellipse at var(--shine-x, 50%) var(--shine-y, 20%),
    rgba(255,255,255,.85),
    transparent 70%
  );
}

/* Animação de deformação */
.jf-nav-glass.is-moving::before {
  animation:
    jf-desktop-glass-morph 650ms cubic-bezier(.22,1,.36,1);
}

@keyframes jf-desktop-glass-morph {
  0% {
    transform: scale(1);
  }

  30% {
    transform: scale(1.06,.93);
  }

  60% {
    transform: scale(.98,1.04);
  }

  100% {
    transform: scale(1);
  }
}

/* Links */
.jf-nav-links li {
  position: relative;
  z-index: 1;
}

.jf-nav-links li a {
  position: relative;
  z-index: 2;

  display: block;

  padding: 11px 15px;
  border-radius: 999px;

  text-decoration: none;
  white-space: nowrap;

  color: var(--muted);

  font-size: 14px;
  font-weight: 600;

  transition:
    color 300ms ease,
    transform 400ms cubic-bezier(.22,1,.36,1);
}

.jf-nav-links li a.active {
  color: var(--navy);
}

.jf-nav-links li a:active {
  transform: scale(.95);
}

.jf-nav-contact {
  flex: 0 0 auto;
}

/* =========================================
   DOCK MOBILE — BASE
   ========================================= */

.dock {
  display: none;
}

.liquid-dock {
  display: none;
}

/* Estilo geral dos links do dock */
.dock a {
  flex: 1;

  display: flex;
  flex-direction: column;
  align-items: center;

  gap: 3px;

  padding: 8px 4px;

  border-radius: var(--radius-pill);

  text-decoration: none;

  font: 600 11px/1.1 var(--font-sans);
  color: var(--navy);
}

.dock a svg {
  width: 22px;
  height: 22px;

  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* =========================================
   RESPONSIVIDADE — TABLETS E CELULARES
   ========================================= */

@media (max-width: 960px) {

  .dock {
    display: flex;
    gap: 6px;
    align-items: center;

    position: fixed;
    z-index: 25;

    left: max(12px, env(safe-area-inset-left, 0px));
    right: max(12px, env(safe-area-inset-right, 0px));

    bottom: calc(12px + env(safe-area-inset-bottom, 0px));

    border-radius: var(--radius-pill);
    padding: 6px;
  }

  .jf {
    padding-bottom:
      calc(110px + env(safe-area-inset-bottom, 0px));
  }
}

/* =========================================
   SMARTPHONE — LOGO DENTRO DO DOCK
   ========================================= */

@media (max-width: 767px) {

  /* Esconde o cabeçalho tradicional */
  .jf-nav {
    display: none !important;
  }

  /* Oculta menu antigo */
  .jf-nav-links,
  .jf-nav-contact,
  .menu-btn,
  .mobile-menu {
    display: none !important;
  }

  /* Dock */
  .liquid-dock {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 3px;

    height: 66px;
    padding: 6px;

    box-sizing: border-box;
  }

  /* Itens do dock */
  .liquid-dock .dock-link {
    position: relative;
    z-index: 2;

    flex: 1;
    min-width: 0;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 3px;

    height: 100%;
    padding: 4px 2px;

    border-radius: 999px;

    text-decoration: none;
    color: var(--navy);

    font-size: 10px;
    font-weight: 600;

    white-space: nowrap;
  }

  /* Logo */
  .liquid-dock .dock-logo {
    flex: 0 0 64px;
    padding: 2px;
  }

  .liquid-dock .dock-logo img {
    display: block;

    width: 100%;
    max-height: 42px;

    object-fit: contain;
  }

  /* Ícones */
  .liquid-dock .dock-link svg {
    width: 19px;
    height: 19px;

    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
  }

  /* Botão Contato compacto */
  .liquid-dock .dock-link--cta {
    flex: 1.15;

    flex-direction: row;
    justify-content: center;

    gap: 5px;

    padding: 8px 7px;

    font-size: 12px;
    font-weight: 700;

    color: var(--on-dark);
  }

  .liquid-dock .dock-link--cta svg {
    width: 16px;
    height: 16px;
  }

}

/* =========================================
   DESKTOP — GARANTIA DE EXIBIÇÃO
   ========================================= */

@media (min-width: 768px) {

  .jf-nav {
    display: flex;
  }

  .jf-nav-links {
    display: flex;
  }

  .jf-nav-contact {
    display: inline-flex;
  }

  .liquid-dock {
    display: none !important;
  }

}

/* =========================================
   TELAS GRANDES
   ========================================= */

@media (min-width: 1600px) {

  .jf-nav {
    gap: 36px;
  }

  .jf-nav-logo img {
    width: 140px;
  }

  .jf-nav-links li a {
    padding: 13px 19px;
    font-size: 15px;
  }

}


@media (min-width: 768px) {

  .top .jf-nav.glass-bar {
    --glass-tint: rgba(246, 247, 251, 0.90);
    --glass-blur: 28px;

    background: var(--glass-tint);

    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);

    border: 1px solid rgba(255, 255, 255, 0.65);
    border-radius: var(--radius-pill);

    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.95),
      inset 0 -1px 1px rgba(255, 255, 255, 0.35),
      0 8px 28px rgba(29, 21, 70, 0.10);
  }

}


/* =========================================
   v6 — CORREÇÕES
   ========================================= */

/* Indicador de vidro do dock mobile (mesmo visual do indicador desktop) */
.dock-glass {
  position: absolute;
  z-index: 1;
  left: 0; top: 0; width: 0; height: 0;
  border-radius: 999px;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.28) 45%, rgba(255,255,255,.48));
  border: 1px solid rgba(255,255,255,.85);
  -webkit-backdrop-filter: blur(16px) saturate(200%) brightness(1.1);
  backdrop-filter: blur(16px) saturate(200%) brightness(1.1);
  box-shadow: inset 0 1px 1px rgba(255,255,255,.95), inset 0 -1px 2px rgba(255,255,255,.3), 0 3px 12px rgba(29,21,70,.09);
  box-sizing: border-box;
  transition:
    left 650ms cubic-bezier(.22,1,.36,1),
    top 650ms cubic-bezier(.22,1,.36,1),
    width 650ms cubic-bezier(.22,1,.36,1),
    height 650ms cubic-bezier(.22,1,.36,1),
    opacity 200ms ease;
  will-change: left, top, width, height;
}
.dock-glass.is-ready { opacity: 1; }
.dock-glass.is-moving { animation: jf-desktop-glass-morph 650ms cubic-bezier(.22,1,.36,1); }
.dock-glass__shine, .dock-glass__reflection { position: absolute; inset: 1px; border-radius: inherit; pointer-events: none; }
.dock-glass__shine { background: radial-gradient(ellipse at var(--shine-x, 50%) var(--shine-y, 20%), rgba(255,255,255,.85), transparent 70%); }
.dock-glass__reflection { inset: 2px 18% auto; height: 35%; background: linear-gradient(180deg, rgba(255,255,255,.55), transparent); }
/* sobre o botão verde o indicador fica só como brilho, sem cobrir a cor */
.liquid-dock:has(.dock-link--cta.active) .dock-glass { background: rgba(255,255,255,.12); }

/* Botão Contato do dock: verde da marca */
.liquid-dock .dock-link--cta { border-radius: 999px; }
.liquid-dock .dock-link.active:not(.dock-link--cta) { color: var(--ink); }

/* Tablet (768–960px): links na barra superior, sem dock embaixo */
@media (min-width: 768px) and (max-width: 960px) {
  .top .jf-nav .jf-nav-links { display: flex; gap: 0; padding: 4px; }
  .top .jf-nav .jf-nav-links li a { padding: 9px 10px; font-size: 13px; }
  .top .jf-nav .jf-nav-contact { display: none; }
  .jf-nav-logo img { width: 96px; }
  .jf { padding-bottom: var(--space-48); }
}

/* Celular: sem barra superior, então sem o espaço reservado para ela */
@media (max-width: 767px) {
  .jf { padding-top: calc(16px + env(safe-area-inset-top, 0px)); padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)); }
}

@media (prefers-reduced-motion: reduce) {
  .jf-nav-glass, .dock-glass { transition: opacity 200ms ease; }
  .jf-nav-glass.is-moving::before, .dock-glass.is-moving { animation: none; }
}

/* =========================================
   v13.1 — DOCK MOBILE: ABAS IGUAIS + SOBRE NÓS
   Contato vira uma aba como as outras, com destaque
   só no círculo verde do ícone. Itens com altura fixa
   (não vazam do dock), ícones e textos maiores.
   ========================================= */
@media (max-width: 767px) {
  .liquid-dock .dock-link {
    box-sizing: border-box;
    gap: 4px;
    font-size: 11px;
  }
  .liquid-dock .dock-link svg { width: 22px; height: 22px; }
  .liquid-dock .dock-logo { flex: 0 0 52px; }
  .liquid-dock .dock-link:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; }

  /* Contato: aba normal, sem o botão verde inteiro */
  .liquid-dock .dock-link--cta {
    flex: 1;
    flex-direction: column;
    gap: 3px;
    padding: 4px 2px;
    background: none !important;
    border: 0 !important;
    box-shadow: none !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    color: var(--navy);
    font-size: 11px;
    font-weight: 700;
  }
  .liquid-dock .dock-link--cta::before,
  .liquid-dock .dock-link--cta::after { display: none !important; }
  .liquid-dock .dock-link--cta svg {
    width: 18px; height: 18px;
    padding: 7px;
    box-sizing: content-box;
    border-radius: 999px;
    background: linear-gradient(180deg, var(--green-bright), var(--green-deep));
    stroke: #fff;
    box-shadow: 0 4px 12px rgba(31, 154, 20, .35);
  }
  .liquid-dock .dock-link--cta.active { color: var(--ink); }
  /* o indicador de vidro volta ao visual normal sobre o Contato */
  .liquid-dock:has(.dock-link--cta.active) .dock-glass {
    background: linear-gradient(135deg, rgba(255,255,255,.75), rgba(255,255,255,.28) 45%, rgba(255,255,255,.48));
  }
}
