/* Footer: brand block, link columns, language switcher, bottom bar, floating WhatsApp. */
#footer {
  --ft-ink: var(--branco);
  --ft-soft: color-mix(in srgb, var(--branco) 82%, transparent);
  --ft-line: color-mix(in srgb, var(--branco) 18%, transparent);
  position: relative;
  overflow: hidden;
  background: var(--caramelo-profundo);
  color: var(--ft-ink);
  padding: clamp(64px, 8vw, 112px) 0 0;
  isolation: isolate;
}
/* Soft warm light in the top-right corner, palette only */
#footer::before {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 70vw;
  height: 70vw;
  max-width: 980px;
  max-height: 980px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--caramelo) 55%, transparent), transparent);
  z-index: -1;
  pointer-events: none;
}

.footer-inner { position: relative; }

/* Columns */
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1.2fr 1fr 1fr;
  gap: 40px;
  padding: 0 0 clamp(48px, 6vw, 72px);
}
.footer-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--caramelo-claro);
  margin-bottom: 22px;
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.footer-list--nav { grid-template-columns: repeat(2, max-content); column-gap: 40px; }
.footer-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 2px 0;
  font-size: 16px;
  font-weight: 400;
  color: var(--ft-ink);
  text-decoration: none;
}
.footer-link > span:not(.footer-ext),
.footer-list--nav .footer-link {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .35s var(--ease);
}
.footer-link:hover > span,
.footer-list--nav .footer-link:hover { background-size: 100% 1px; }
.footer-link--icon > svg:first-child { flex: none; color: var(--caramelo-claro); }
.footer-ext { opacity: .7; transition: transform .3s var(--ease), opacity .3s var(--ease); }
.footer-link:hover .footer-ext { transform: translate(2px, -2px); opacity: 1; }

.footer-where { font-style: normal; display: grid; gap: 8px; }
.footer-where-base { display: inline-flex; align-items: center; gap: 10px; font-weight: 400; }
.footer-where-base svg { flex: none; color: var(--caramelo-claro); }

/* Language switcher: three stacked rows with code + native name */
.footer-lang { display: grid; gap: 6px; max-width: 220px; }
.footer-lang-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--ft-line);
  border-radius: 999px;
  background: transparent;
  color: var(--ft-ink);
  font: 400 15px/1 var(--font);
  text-align: left;
  cursor: pointer;
  transition: background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
}
.footer-lang-code { font-size: 12px; font-weight: 600; letter-spacing: .1em; color: var(--caramelo-claro); min-width: 22px; transition: color .25s var(--ease); }
.footer-lang-btn:hover { border-color: color-mix(in srgb, var(--branco) 50%, transparent); }
.footer-lang-btn.is-active { background: var(--branco); border-color: var(--branco); color: var(--grafite); }
.footer-lang-btn.is-active .footer-lang-code { color: var(--caramelo-profundo); }
.footer-lang-btn.is-active::after {
  content: "";
  margin-left: auto;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--caramelo-profundo);
}

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 0 32px;
  border-top: 1px solid var(--ft-line);
  font-size: var(--fs-small);
  color: var(--ft-soft);
}
.footer-top-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ft-ink);
  text-decoration: none;
  font-weight: 400;
}
.footer-top-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--ft-line);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.footer-top-link:hover .footer-top-icon { background: var(--branco); color: var(--caramelo-profundo); border-color: var(--branco); transform: translateY(-3px); }

#footer :focus-visible { outline-color: var(--branco); }

/* Floating WhatsApp button (page-wide) */
.footer-float {
  position: fixed;
  right: max(20px, env(safe-area-inset-right));
  bottom: max(20px, env(safe-area-inset-bottom));
  z-index: 90;
  display: inline-flex;
  align-items: center;
  height: 60px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--caramelo-profundo);
  color: var(--branco);
  text-decoration: none;
  box-shadow: 0 16px 34px -12px color-mix(in srgb, var(--grafite) 55%, transparent), 0 0 0 1px color-mix(in srgb, var(--branco) 14%, transparent) inset;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(.92);
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s linear .45s, background .25s var(--ease);
}
.footer-float.is-visible {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: opacity .35s var(--ease), transform .45s var(--ease), visibility 0s, background .25s var(--ease);
}
.footer-float-icon { display: grid; place-items: center; width: 46px; height: 46px; flex: none; }
.footer-float-label {
  max-width: 0;
  overflow: hidden;
  white-space: nowrap;
  font: 500 15px/1 var(--font);
  transition: max-width .45s var(--ease), padding .45s var(--ease);
}
.footer-float:hover, .footer-float:focus-visible { background: var(--grafite); }
.footer-float:hover .footer-float-label,
.footer-float:focus-visible .footer-float-label { max-width: 220px; padding-right: 16px; }
.footer-float::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px solid var(--caramelo);
  opacity: 0;
  animation: footer-halo 3.2s var(--ease) 1s infinite;
  pointer-events: none;
}
@keyframes footer-halo { 0% { transform: scale(1); opacity: .6; } 60%, 100% { transform: scale(1.35); opacity: 0; } }

/* Tablet */
@media (max-width: 1080px) {
  .footer-grid { grid-template-columns: 1fr 1fr; row-gap: 48px; }
}

/* Mobile */
@media (max-width: 720px) {
  .footer-grid { grid-template-columns: 1fr; gap: 40px; padding: 0 0 44px; }
  .footer-list--nav { grid-template-columns: 1fr 1fr; column-gap: 20px; }
  .footer-title { margin-bottom: 18px; }
  .footer-lang { grid-template-columns: repeat(3, 1fr); max-width: none; }
  .footer-lang-btn { justify-content: center; flex-direction: column; gap: 4px; min-height: 60px; border-radius: 16px; padding: 10px 6px; text-align: center; font-size: 13px; }
  .footer-lang-btn.is-active::after { display: none; }
  .footer-bottom { flex-direction: column-reverse; align-items: flex-start; gap: 20px; padding-bottom: 96px; }
  .footer-float { height: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  .footer-float::before { animation: none; }
  .footer-float, .footer-float-label, .footer-top-icon { transition: none; }
}
