/**
 * Floating accessibility toolbar (Libras / speech / vision / translate).
 */

.a11y-toolbar {
  --a11y-btn: 36px;
  --a11y-gap: 6px;
  --a11y-bg: #0b1f3a;
  position: fixed;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: var(--a11y-gap);
  width: var(--a11y-btn);
  overflow: visible;
  font-size: 16px; /* stable vs html.a11y-font-* */
  pointer-events: none;
  /* Undo html zoom so toolbar buttons stay usable size. */
  zoom: 1;
}

.a11y-toolbar > * {
  pointer-events: auto;
}

.a11y-toolbar__btn {
  position: relative;
  box-sizing: border-box;
  display: grid;
  place-items: center;
  width: var(--a11y-btn);
  height: var(--a11y-btn);
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: var(--a11y-bg);
  color: #fff;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transform: scale(1);
  transition:
    background 0.15s ease,
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.a11y-toolbar__btn:hover,
.a11y-toolbar__btn:focus-visible {
  background: #163358;
  transform: scale(1.15);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
  z-index: 1;
}

.a11y-toolbar__btn[aria-pressed="true"],
.a11y-toolbar__btn[aria-expanded="true"],
.a11y-toolbar__btn.is-active {
  background: #163358;
}

.a11y-toolbar__btn:focus-visible {
  outline: 2px solid var(--c-accent, #c1681b);
  outline-offset: 2px;
}

.a11y-toolbar__icon {
  display: block;
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.a11y-toolbar__icon--libras {
  width: 20px;
  height: 20px;
  object-fit: contain;
  pointer-events: none;
}

.a11y-toolbar__label {
  position: absolute;
  right: calc(100% + 8px);
  top: 50%;
  transform: translate(4px, -50%);
  padding: 0.28rem 0.55rem;
  border-radius: 5px;
  background: var(--a11y-bg);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.15s ease,
    transform 0.15s ease;
}

.a11y-toolbar__btn:hover .a11y-toolbar__label,
.a11y-toolbar__btn:focus-visible .a11y-toolbar__label {
  opacity: 1;
  transform: translate(0, -50%);
}

/* VLibras host: keep fixed at bottom-right (official placement). */
div[vw].a11y-vlibras {
  position: fixed !important;
  right: 0 !important;
  bottom: 0 !important;
  top: auto !important;
  left: auto !important;
  margin: 10px !important;
  z-index: 2147483645 !important;
}

/* Hide default launcher; toolbar Libras button opens it via JS. */
div[vw].a11y-vlibras [vw-access-button],
div[vw].a11y-vlibras .access-button {
  opacity: 0 !important;
  pointer-events: none !important;
}

/* Google Translate host: required by the widget, visually hidden. */
.a11y-google-translate {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.goog-te-banner-frame,
.goog-te-balloon-frame,
iframe.skiptranslate,
.goog-te-gadget,
#goog-gt-tt,
.goog-tooltip,
.goog-text-highlight {
  display: none !important;
}

body {
  top: 0 !important;
}

.a11y-toolbar__panel {
  position: absolute;
  right: calc(100% + 8px);
  top: 0;
  width: min(14.5rem, calc(100vw - 4rem));
  padding: 0.7rem 0.75rem 0.6rem;
  border-radius: 8px;
  background: #fff;
  color: #122033;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(11, 31, 58, 0.12);
}

.a11y-toolbar__panel[hidden] {
  display: none !important;
}

.a11y-toolbar__panel-title {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  line-height: 1.3;
}

.a11y-toolbar__panel-actions {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.a11y-toolbar__font-row {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.35rem;
}

.a11y-toolbar__font-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.75rem;
  padding: 0 0.2rem;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
  color: var(--a11y-bg);
  font-variant-numeric: tabular-nums;
}

.a11y-toolbar__panel-btn,
.a11y-toolbar__panel-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2rem;
  margin: 0;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(11, 31, 58, 0.18);
  border-radius: 5px;
  background: #f4f7fa;
  color: inherit;
  font: inherit;
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
}

.a11y-toolbar__panel-btn:hover,
.a11y-toolbar__panel-close:hover {
  background: #e8eef4;
}

.a11y-toolbar__panel-btn[aria-pressed="true"] {
  background: var(--a11y-bg);
  border-color: var(--a11y-bg);
  color: #fff;
}

.a11y-toolbar__panel-close {
  margin-top: 0.4rem;
  background: transparent;
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.a11y-toolbar__panel-btn:focus-visible,
.a11y-toolbar__panel-close:focus-visible {
  outline: 2px solid var(--c-accent, #c1681b);
  outline-offset: 2px;
}

/* ==========================================================================
   Vision prefs — high contrast
   Remap design tokens, then force common surfaces/components so hardcoded
   hex colors and gradients still become black / white / yellow.
   ========================================================================== */

html.a11y-contrast {
  color-scheme: dark;
  --c-navy: #fff;
  --c-teal: #ffe566;
  --c-accent: #ffe566;
  --c-navy-900: #000;
  --c-navy-700: #111;
  --c-navy-500: #fff;
  --c-teal-900: #000;
  --c-teal-700: #111;
  --c-teal-600: #ffe566;
  --c-teal-300: #ffe566;
  --c-accent-700: #ffe566;
  --c-accent-600: #ffe566;
  --c-accent-500: #ffe566;
  --c-ink: #fff;
  --c-body: #fff;
  --c-muted: #ddd;
  --c-line: #fff;
  --c-surface: #000;
  --c-surface-alt: #000;
  --c-surface-muted: #111;
  --c-surface-soft: #111;
  --c-ciano-400: #ffe566;
  --c-ciano-300: #ffe566;
  --c-azul-100: #222;
  --c-ink-muted: #ddd;
  --branco-100: #fff;
  --c-on-dark: #fff;
  --c-on-dark-muted: #ddd;
  --CInza-50: #000;
  --Azul-500: #fff;
  --Azul-700: #fff;
  --Terracota-500: #ffe566;
  --Ciano-500: #ffe566;
  --grad-hero: #000;
  --grad-band: #000;
  --grad-teal: #000;
  --grad-bridge3: #000;
  --grad-bridge3-warm: #000;
  --grad-accent: #000;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
  --focus-ring: 0 0 0 3px #000, 0 0 0 6px #ffe566;
  --ap-grad: #000;
  --ap-on-dark: #fff;
}

/* Prevent color transitions from fighting contrast paints (header pill, buttons). */
html.a11y-contrast,
html.a11y-contrast *,
html.a11y-contrast *::before,
html.a11y-contrast *::after {
  transition: none !important;
  animation: none !important;
}

/* Structural shells + pseudo texture layers */
html.a11y-contrast body,
html.a11y-contrast .site-main,
html.a11y-contrast .site-header,
html.a11y-contrast .site-header__inner,
html.a11y-contrast .site-footer,
html.a11y-contrast .site-footer::before,
html.a11y-contrast .hero-band::before,
html.a11y-contrast main,
html.a11y-contrast header,
html.a11y-contrast footer,
html.a11y-contrast aside,
html.a11y-contrast nav,
html.a11y-contrast section,
html.a11y-contrast article {
  background: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
}

/*
 * Broad surface coverage for page components that hardcode colors.
 * Excludes media, VLibras host, and the a11y toolbar (styled below).
 */
html.a11y-contrast body *:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *) {
  background-color: #000 !important;
  background-image: none !important;
  color: #fff !important;
  border-color: #fff !important;
  box-shadow: none !important;
  text-shadow: none !important;
  outline-color: #ffe566 !important;
}

/* Keep VLibras widget free of forced contrast paints */
html.a11y-contrast [vw],
html.a11y-contrast [vw] *,
html.a11y-contrast .skiptranslate,
html.a11y-contrast .skiptranslate *,
html.a11y-contrast .a11y-google-translate,
html.a11y-contrast .a11y-google-translate * {
  background-color: revert !important;
  background-image: revert !important;
  color: revert !important;
  border-color: revert !important;
  box-shadow: revert !important;
  filter: none !important;
}

/*
 * Yellow accents (#ffe566): must match/exceed the nuclear selector specificity
 * so links and CTAs are not left pure white-on-black.
 */
html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *),
html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):visited,
html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):hover,
html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):focus,
html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):active {
  color: #ffe566 !important;
  border-color: #ffe566 !important;
  text-decoration-color: #ffe566 !important;
  outline-color: #ffe566 !important;
}

html.a11y-contrast body a:not(img):not(picture):not(video):not(svg):not(path):not(circle):not(rect):not(line):not(polyline):not(polygon):not(g):not(iframe):not(canvas):not(source):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *) * {
  color: #ffe566 !important;
  fill: currentColor;
  border-color: #ffe566 !important;
}

html.a11y-contrast body a:focus-visible {
  outline: 2px solid #ffe566 !important;
  outline-offset: 2px;
}

/* Interactive controls: yellow border + label on black */
html.a11y-contrast body .btn:not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *),
html.a11y-contrast body .btn:not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):hover,
html.a11y-contrast body .btn:not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *):focus,
html.a11y-contrast body button:not(.a11y-toolbar__btn):not(.a11y-toolbar__panel-btn):not(.a11y-toolbar__panel-close):not([vw]):not([vw] *),
html.a11y-contrast body input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([vw]):not([vw] *),
html.a11y-contrast body select:not([vw]):not([vw] *),
html.a11y-contrast body textarea:not([vw]):not([vw] *),
html.a11y-contrast body .wa-float:not([vw]):not([vw] *) {
  background: #000 !important;
  color: #ffe566 !important;
  border: 1px solid #ffe566 !important;
}

/* Accent / highlight text (eyebrows, prices, stats that used brand orange/teal) */
html.a11y-contrast body .eyebrow:not([vw]):not([vw] *),
html.a11y-contrast body [class*="accent"]:not(img):not(picture):not(video):not(svg):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *),
html.a11y-contrast body [class*="price"]:not(img):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *),
html.a11y-contrast body [class*="stat"] strong:not([vw]):not([vw] *),
html.a11y-contrast body [class*="stat"]__value:not([vw]):not([vw] *),
html.a11y-contrast body .stat-card__value:not([vw]):not([vw] *),
html.a11y-contrast body .impacto__value:not([vw]):not([vw] *),
html.a11y-contrast body [class*="__value"]:not(img):not([vw]):not([vw] *):not(.a11y-toolbar):not(.a11y-toolbar *) {
  color: #ffe566 !important;
}

html.a11y-contrast input[type="checkbox"],
html.a11y-contrast input[type="radio"] {
  accent-color: #ffe566;
  background: #000 !important;
  border: 1px solid #ffe566 !important;
}

html.a11y-contrast ::placeholder {
  color: #bbb !important;
  opacity: 1;
}

html.a11y-contrast img,
html.a11y-contrast picture,
html.a11y-contrast video {
  filter: grayscale(1) contrast(1.15) brightness(1.25);
  background: transparent !important;
  background-image: none !important;
}

/* Brand / mono logos: force light silhouette on black */
html.a11y-contrast .site-branding img,
html.a11y-contrast .site-logo-img,
html.a11y-contrast .footer-brand img,
html.a11y-contrast .clients img,
html.a11y-contrast .clients__logo,
html.a11y-contrast [class*="clients"] img,
html.a11y-contrast [class*="logos"] img,
html.a11y-contrast [class*="partner"] img {
  filter: brightness(0) invert(1);
}

html.a11y-contrast svg:not(.a11y-toolbar svg) {
  color: inherit !important;
  fill: currentColor;
}

html.a11y-contrast body a svg:not(.a11y-toolbar svg),
html.a11y-contrast body .btn svg:not(.a11y-toolbar svg) {
  color: #ffe566 !important;
  fill: currentColor;
}

/* Toolbar remains usable in contrast mode */
html.a11y-contrast .a11y-toolbar__btn {
  background: #000 !important;
  color: #fff !important;
  border: 1px solid #fff;
}

html.a11y-contrast .a11y-toolbar__label {
  background: #000;
  color: #fff;
  border: 1px solid #fff;
}

html.a11y-contrast .a11y-toolbar__panel {
  background: #111 !important;
  color: #fff !important;
  border-color: #fff !important;
}

html.a11y-contrast .a11y-toolbar__font-level {
  color: #ffe566 !important;
  background: transparent !important;
  border-color: transparent !important;
}

html.a11y-contrast .a11y-toolbar__panel-btn,
html.a11y-contrast .a11y-toolbar__panel-close {
  background: #000 !important;
  color: #fff !important;
  border-color: #fff !important;
}

html.a11y-contrast .a11y-toolbar__panel-btn[aria-pressed="true"] {
  background: #ffe566 !important;
  color: #000 !important;
  border-color: #ffe566 !important;
}

html.a11y-contrast .a11y-toolbar__panel-close {
  background: transparent !important;
  border-color: transparent !important;
  text-decoration: underline;
}

/* ==========================================================================
   Vision prefs — font size (zoom covers rem and hardcoded px)
   ========================================================================== */

html.a11y-font-lg {
  zoom: 1.125;
}

html.a11y-font-xl {
  zoom: 1.25;
}

/* Reciprocal zoom so floating toolbar stays ~original size */
html.a11y-font-lg .a11y-toolbar {
  zoom: 0.8889; /* 1 / 1.125 */
}

html.a11y-font-xl .a11y-toolbar {
  zoom: 0.8; /* 1 / 1.25 */
}

@media (prefers-reduced-motion: reduce) {
  .a11y-toolbar__btn,
  .a11y-toolbar__label {
    transition: none;
  }

  .a11y-toolbar__btn:hover,
  .a11y-toolbar__btn:focus-visible {
    transform: none;
  }

  .a11y-toolbar__label {
    transform: translate(0, -50%);
  }
}

@media (max-width: 480px) {
  /* Keep vertically centered (same as desktop); panel opens upward to stay on-screen. */
  .a11y-toolbar {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .a11y-toolbar__btn:hover,
  .a11y-toolbar__btn:focus-visible {
    transform: none;
  }

  .a11y-toolbar__label {
    display: none;
  }

  .a11y-toolbar__panel {
    right: 0;
    top: auto;
    bottom: calc(100% + 6px);
  }
}
