/* ==========================================================================
   Ferramentas de acessibilidade: painel + modos (classes a11y-* no <html>)
   ========================================================================== */

/* ---------- botão flutuante + painel ---------- */
.a11y-launch{
  position:fixed; left:16px; bottom:16px; z-index:9990; width:52px; height:52px; display:grid; place-items:center; padding:0;
  border:0; border-radius:50%; cursor:pointer; color:#fff; background:var(--grad-text);
  box-shadow:0 10px 30px rgba(0,0,0,.35), 0 0 0 3px rgba(255,255,255,.0);
  transition:transform .15s, box-shadow .2s;
}
.a11y-launch:hover{ transform:translateY(-2px); }
.a11y-launch:focus-visible{ outline:3px solid #fff; outline-offset:3px; box-shadow:0 0 0 6px #1a1030; }
.a11y-launch svg{ width:28px; height:28px; }

.a11y-panel{
  position:fixed; left:16px; bottom:80px; z-index:9991; width:min(calc(100vw - 32px), 372px); max-height:min(calc(100vh - 100px), 700px); overflow:auto;
  padding:18px 18px 14px; color:var(--text); background:var(--surface); border:1px solid var(--line-strong); border-radius:20px;
  box-shadow:0 30px 70px rgba(0,0,0,.45);
}
.a11y-panel[hidden]{ display:none; }
.a11y-head{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:14px; }
.a11y-head h2{ margin:0; font-size:1.1rem; }
.a11y-close{
  width:34px; height:34px; display:grid; place-items:center; padding:0; cursor:pointer; font-size:1.3rem; line-height:1;
  color:var(--text); background:var(--fill); border:1px solid var(--line-strong); border-radius:50%;
}
.a11y-group{ margin:0 0 14px; padding:0; border:0; }
.a11y-group legend{ padding:0; margin:0 0 8px; font-size:.74rem; font-weight:700; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); }
.a11y-seg{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.a11y-size{ display:grid; grid-template-columns:48px 1fr 48px; gap:8px; align-items:center; }
.a11y-size output{ text-align:center; font-weight:700; font-family:var(--font-head); }
.a11y-btn{
  display:flex; align-items:center; gap:10px; padding:10px 12px; min-height:44px; text-align:left; cursor:pointer;
  font-size:.88rem; font-weight:600; color:var(--text); background:var(--fill); border:1px solid var(--line-strong); border-radius:12px;
  transition:background .15s, border-color .15s;
}
.a11y-btn:hover{ background:var(--fill-2); }
.a11y-btn svg{ flex:none; width:20px; height:20px; }
.a11y-btn[aria-pressed="true"], .a11y-btn[aria-checked="true"]{ background:var(--grad-text); border-color:transparent; color:#fff; }
.a11y-size .a11y-btn{ justify-content:center; padding:10px 0; font-size:1rem; }
.a11y-grid{ display:grid; grid-template-columns:1fr 1fr; gap:8px; }
.a11y-foot{ display:flex; flex-direction:column; gap:10px; margin-top:4px; }
.a11y-reset{ justify-content:center; }
.a11y-note{ margin:0; font-size:.78rem; color:var(--muted); }
.a11y-status{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.a11y-panel button:focus-visible, .a11y-close:focus-visible{ outline:3px solid var(--pink); outline-offset:2px; }

/* o botão flutuante não pode tapar o fim do rodapé */
.site-footer{ padding-bottom:88px; }

/* ---------- guia de leitura ---------- */
.a11y-guide{
  position:fixed; left:0; right:0; top:40%; height:64px; z-index:9980; pointer-events:none;
  border-block:3px solid #ffd84a; box-shadow:0 0 0 100vmax rgba(0,0,0,.55);
}
.a11y-guide[hidden]{ display:none; }

/* ---------- modos ---------- */
/* Espaçamento do texto (WCAG 1.4.12) */
html.a11y-spacing body *{ letter-spacing:.04em !important; word-spacing:.14em !important; }
html.a11y-spacing p, html.a11y-spacing li, html.a11y-spacing dd, html.a11y-spacing td, html.a11y-spacing summary{ line-height:1.95 !important; }

/* Fonte legível */
html.a11y-font{ --font-body:Verdana,'Segoe UI',Tahoma,Arial,sans-serif; --font-head:Verdana,'Segoe UI',Tahoma,Arial,sans-serif; --font-serif:Verdana,'Segoe UI',Tahoma,Arial,sans-serif; }
html.a11y-font .hero h1 em, html.a11y-font .serif-em{ font-style:normal; }

/* Sublinhar ligações */
html.a11y-underline a{ text-decoration:underline !important; text-underline-offset:3px; text-decoration-thickness:2px; }

/* Parar animações e movimento */
html.a11y-motion *, html.a11y-motion *::before, html.a11y-motion *::after{
  animation:none !important; transition:none !important; scroll-behavior:auto !important;
}
html.a11y-motion [data-reveal]{ opacity:1 !important; transform:none !important; }
html.a11y-motion .tr-line{ stroke-dashoffset:0 !important; }
html.a11y-motion .tr-area, html.a11y-motion .stage-dot{ opacity:1 !important; }
html.a11y-motion .pill-dot{ box-shadow:none; }

/* Cursor grande */
html.a11y-cursor, html.a11y-cursor *{
  cursor:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l.1 18 4.6-4.4 3.2 7.2 3-1.4-3.2-7.1 6.5-.1z' fill='%23000' stroke='%23fff' stroke-width='1.4' stroke-linejoin='round'/%3E%3C/svg%3E") 4 2, auto !important;
}

/* Escala de cinzentos */
html.a11y-gray{ filter:grayscale(1); }

/* Alto contraste: fundo preto, texto branco, ligações amarelas */
html.a11y-contrast, html.a11y-contrast[data-theme]{
  color-scheme:dark;
  --bg:#000; --bg-2:#000; --surface:#000; --surface-2:#0a0a0a;
  --text:#fff; --muted:#fff; --line:#fff; --line-strong:#fff;
  --orange:#ffd84a; --red:#ffd84a; --pink:#ffd84a;
  --grad:linear-gradient(#ffd84a,#ffd84a); --grad-text:linear-gradient(#ffd84a,#ffd84a);
  --fill:rgba(255,255,255,.12); --fill-2:rgba(255,255,255,.22); --field:#000; --mock:#000;
  --shadow-glow:none;
}
html.a11y-contrast .hero, html.a11y-contrast .legal-hero, html.a11y-contrast .contact, html.a11y-contrast .callout,
html.a11y-contrast .cta-inner, html.a11y-contrast .launch-panel, html.a11y-contrast .not-found,
html.a11y-contrast .site-header.is-scrolled{ background-image:none !important; background-color:#000 !important; }
html.a11y-contrast .site-footer{ background:#000; }
html.a11y-contrast a:not(.btn){ color:#ffd84a; text-decoration:underline; }
html.a11y-contrast .main-nav a:not(.btn), html.a11y-contrast .logo, html.a11y-contrast .footer-col a{ color:#fff; }
html.a11y-contrast .btn-primary, html.a11y-contrast .bw-tag, html.a11y-contrast .badges li::before,
html.a11y-contrast .a11y-launch, html.a11y-contrast .a11y-btn[aria-pressed="true"], html.a11y-contrast .a11y-btn[aria-checked="true"]{ color:#000 !important; }
html.a11y-contrast .btn-ghost{ border-color:#fff; }
html.a11y-contrast .tile img{ filter:none; opacity:1; }
html.a11y-contrast *{ text-shadow:none !important; }
html.a11y-contrast :focus-visible{ outline:3px solid #ffd84a !important; outline-offset:3px; }

/* respeita a preferência do sistema por menos movimento */
@media (prefers-reduced-motion:reduce){
  .a11y-launch, .theme-toggle{ transition:none; }
}
@media print{ .a11y-launch, .a11y-panel, .a11y-guide, .theme-toggle{ display:none !important; } }
