/* Hub de Iniciativas Digitais — mobile first */
:root {
  --red: #C3090A;
  --red-d: #A00708;
  --blue: #0270AA;
  --blue-d: #015A8A;
  --green: #087A23;
  --yellow: #FBCE02;
  --ink: #2A2A2A;
  --ink-m: #5E5E5E;
  --line: #D9D4CC;
  --line-s: #8A847B;
  --surf: #FFFFFF;
  --bg: #F3F1EE;
  --info-bg: #E1F1FA;
  --r-sm: 4px;
  --r-md: 8px;
  --r-pill: 9999px;
  --shadow: 0 2px 8px rgba(0, 0, 0, .10); /* sombra única por card */
  --shadow-h: 0 8px 22px rgba(0, 0, 0, .14);
  --chip: rgba(0, 0, 0, .07);
  --footer-bg: #2A2A2A;
  --toast-bg: #2A2A2A;
  --bar-bg: #1F1F1F;
  --accent-text: #A00708;
  --ok: #087A23;
  --max: 1200px;
  color-scheme: light;
}

/* Tema escuro */
:root[data-theme="dark"] {
  --ink: #ECE8E2;
  --ink-m: #B9B3AA;
  --line: #3A3733;
  --line-s: #77716A;
  --surf: #1E1D1B;
  --bg: #141312;
  --info-bg: #0F2635;
  --blue-d: #8ACDF5;
  --shadow: 0 2px 8px rgba(0, 0, 0, .45);
  --shadow-h: 0 8px 22px rgba(0, 0, 0, .6);
  --chip: rgba(255, 255, 255, .08);
  --footer-bg: #0C0B0A;
  --toast-bg: #0C0B0A;
  --bar-bg: #0C0B0A;
  --accent-text: #FF8A80;
  --ok: #5FD07A;
  color-scheme: dark;
}

/* Alto contraste (vence o tema) */
:root[data-contrast="high"] {
  --ink: #FFFFFF;
  --ink-m: #FFFFFF;
  --line: #FFFFFF;
  --line-s: #FFFFFF;
  --surf: #000000;
  --bg: #000000;
  --info-bg: #000000;
  --blue: #FFE600;
  --blue-d: #FFE600;
  --shadow: none;
  --shadow-h: none;
  --chip: #000000;
  --footer-bg: #000000;
  --toast-bg: #000000;
  --bar-bg: #000000;
  --accent-text: #FFE600;
  --ok: #FFE600;
  color-scheme: dark;
}

/* Tamanho do texto: tudo em rem escala junto */
html { font-size: calc(100% * var(--fs, 1)); }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
button { font-family: inherit; }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.dark :focus-visible { outline-color: var(--yellow); }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: 1rem; }
@media (min-width: 768px) { .wrap { padding-inline: 1.5rem; } }
@media (min-width: 1024px) { .wrap { padding-inline: 2rem; } }


/* Header */
.site-header { background: var(--red); color: #fff; }
.site-header .wrap { position: relative; }
.flag { display: flex; height: 6px; }
.flag span { flex: 1; }
.flag span:nth-child(1) { background: var(--blue); }
.flag span:nth-child(2) { background: var(--yellow); }
.flag span:nth-child(3) { background: var(--green); }
.flag span:nth-child(4) { background: #fff; }
.header-row {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1rem; padding-block: 1.75rem; text-align: center;
}
.brand img { height: clamp(110px, 32vw, 150px); width: auto; }
.header-title .kicker {
  display: block; font-size: .8rem; font-weight: 800;
  letter-spacing: .1em; text-transform: uppercase; color: var(--yellow); margin-bottom: .25rem;
}
.header-title h1 {
  font-size: clamp(2rem, 9vw, 3rem); font-weight: 900; line-height: 1.05;
  text-transform: uppercase; letter-spacing: .01em;
}
.header-actions { display: flex; flex-direction: column; align-items: center; gap: .75rem; }
.header-row .btn-contribute {
  flex: none; width: auto; max-width: 100%;
  min-height: 52px; padding: .7rem 1.75rem; gap: .5rem;
  background: rgba(255, 255, 255, .12); color: #fff;
  border: 2px solid #fff; border-radius: var(--r-pill);
  font-size: 1rem; font-weight: 800; line-height: 1.2; white-space: nowrap;
  transition: background .15s, color .15s;
}
.header-row .btn-contribute svg { width: 18px; height: 18px; }
.header-row .btn-contribute:hover { background: #fff; color: var(--red-d); }
.header-row .btn-contribute:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
.header-row .btn-submit {
  flex: none; width: auto; max-width: 100%;
  min-height: 60px; padding: .9rem 2rem; gap: .6rem;
  background: var(--yellow); color: #2A2A2A;
  border: 3px solid #fff; border-radius: var(--r-pill);
  font-size: 1.1rem; font-weight: 900; line-height: 1.2; letter-spacing: .01em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
  transition: transform .15s, background .15s;
}
.header-row .btn-submit svg { width: 20px; height: 20px; }
.header-row .btn-submit:hover { background: #fff; transform: translateY(-2px); }
.header-row .btn-submit:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }

/* Web: logo, título e botão lado a lado (título sempre centralizado) */
@media (min-width: 1200px) {
  .header-row {
    display: grid; grid-template-columns: minmax(max-content, 1fr) auto minmax(max-content, 1fr);
    align-items: center; gap: 1.5rem; padding-block: 2rem;
  }
  .brand { justify-self: start; }
  .brand img { height: 170px; }
  .header-title { justify-self: center; }
  .header-title h1 { font-size: clamp(2.75rem, 4vw, 3.25rem); max-width: 9.6em; margin-inline: auto; }
  .header-actions { justify-self: end; }
  .header-row .btn-submit { min-height: 64px; padding-inline: 2.25rem; font-size: 1.15rem; }
}

/* Contadores em destaque */
.stats { background: rgba(0, 0, 0, .3); padding-block: .85rem; }
.stats .wrap { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem 2rem; }
.stats .wrap > span {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-size: 1rem; font-weight: 800; color: #fff; text-transform: uppercase; letter-spacing: .06em;
}
.stats strong { color: var(--yellow); font-size: 2rem; font-weight: 900; line-height: 1; letter-spacing: 0; }
.stats .wrap > span + span { padding-left: 2rem; border-left: 2px solid rgba(255, 255, 255, .35); }
@media (max-width: 420px) {
  .stats .wrap { gap: .5rem 1.25rem; }
  .stats .wrap > span { font-size: .85rem; }
  .stats strong { font-size: 1.6rem; }
  .stats .wrap > span + span { padding-left: 1.25rem; }
}

/* Busca e filtros */
.search-area { background: var(--surf); border-bottom: 1px solid var(--line); padding-block: 1.5rem; }
.lead { color: var(--ink-m); max-width: 60ch; margin-bottom: 1.25rem; }
.search { position: relative; max-width: 680px; }
.search svg.ico { position: absolute; left: 1rem; top: 50%; transform: translateY(-50%); color: var(--ink-m); pointer-events: none; }
.search input {
  width: 100%; height: 52px; padding: 0 3.25rem;
  border: 1.5px solid var(--line-s); border-radius: var(--r-pill);
  background: var(--surf); color: var(--ink);
  font: inherit; font-size: 1rem;
}
.search input::placeholder { color: var(--ink-m); }
.search input::-webkit-search-cancel-button { display: none; }
.search .clear {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  width: 44px; height: 44px; border: 0; background: none; color: var(--ink-m);
  border-radius: 50%; cursor: pointer; display: none; align-items: center; justify-content: center;
}
.search .clear.on { display: inline-flex; }
.pills-label {
  margin: 1.25rem 0 .5rem; font-size: .7rem; font-weight: 800;
  text-transform: uppercase; letter-spacing: .08em; color: var(--ink-m);
}
.pills { display: flex; gap: .5rem; overflow-x: auto; padding-bottom: .5rem; scrollbar-width: none; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: .4rem;
  min-height: 44px; padding: 0 1rem; border-radius: var(--r-pill);
  border: 1.5px solid var(--line-s); background: var(--surf); color: var(--ink);
  font-size: .8rem; font-weight: 800; cursor: pointer; white-space: nowrap;
}
.pill:hover { background: var(--bg); }
.pill[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.pill .n {
  font-size: .7rem; font-weight: 900; padding: 1px 7px; border-radius: var(--r-pill);
  background: var(--bg); color: var(--ink);
}
.pill[aria-pressed="true"] .n { background: rgba(255, 255, 255, .25); color: #fff; }

/* Seções */
main { padding-block: 2rem 3rem; }
.filter-bar {
  display: none; align-items: center; justify-content: space-between; gap: .75rem;
  background: var(--info-bg); border: 1.5px solid var(--blue); color: var(--blue-d);
  border-radius: var(--r-md); padding: .25rem .5rem .25rem 1rem; margin-bottom: 1.5rem;
  font-size: .85rem; font-weight: 700;
}
.filter-bar.on { display: flex; }
.link-btn {
  min-height: 44px; padding: 0 .75rem; border: 0; background: none; cursor: pointer;
  font-weight: 800; font-size: inherit; color: var(--blue-d); text-decoration: underline; white-space: nowrap;
}
#hub { display: flex; flex-direction: column; gap: 2.5rem; }
.cat-head {
  display: flex; align-items: center; gap: .75rem; flex-wrap: wrap;
  padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 3px solid var(--red);
}
.cat-head h2 {
  flex: 1; font-size: clamp(1rem, 4vw, 1.3rem); font-weight: 900;
  text-transform: uppercase; letter-spacing: .04em;
}
.cat-head .count {
  font-size: .7rem; font-weight: 800; background: var(--chip);
  padding: 4px 10px; border-radius: var(--r-pill); color: var(--ink);
}

.grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem; } }

/* Card */
.card {
  display: flex; flex-direction: column; background: var(--surf);
  border: 1.5px solid var(--line); border-radius: var(--r-md);
  padding: 1rem; box-shadow: var(--shadow);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); border-color: var(--line-s); }
.card:focus-within { border-color: var(--line-s); }
.card .domain {
  font-family: 'Courier New', monospace; font-size: .7rem; font-weight: 700;
  color: var(--ink-m); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-bottom: .35rem;
}
.card h3 { font-size: 1.05rem; font-weight: 800; line-height: 1.3; margin-bottom: auto; padding-bottom: .75rem; }

.details { border-top: 1px solid var(--line); margin-bottom: .75rem; }
.details-btn {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  min-height: 44px; background: none; border: 0; cursor: pointer;
  font-size: .85rem; font-weight: 800; color: var(--blue-d); text-align: left;
}
.details-btn span { text-decoration: underline; text-underline-offset: 3px; }
.details-btn svg { width: 16px; height: 16px; transition: transform .25s; }
.details-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.details-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .25s ease; }
.details-body.open { grid-template-rows: 1fr; }
.details-body > div { overflow: hidden; }
.details-body p {
  font-size: .85rem; color: var(--ink-m); line-height: 1.6;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: .75rem; margin-bottom: .25rem;
}

.actions { display: flex; gap: .5rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 44px; min-width: 44px; padding: 0 1rem; border-radius: var(--r-pill);
  font-size: .85rem; font-weight: 800; cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.btn-primary { flex: 1; background: var(--red); color: #fff; border: 1.5px solid var(--red); }
.btn-primary:hover { background: var(--red-d); border-color: var(--red-d); }
.btn-outline { background: var(--surf); color: var(--ink); border: 1.5px solid var(--line-s); }
.btn-outline:hover { background: var(--bg); }
.btn-outline.done { border-color: var(--ok); color: var(--ok); }

/* Vazio */
.empty {
  display: none; text-align: center; padding: 3rem 1rem; background: var(--surf);
  border: 1.5px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow);
}
.empty.on { display: block; }
.empty h3 { font-size: 1.15rem; font-weight: 800; margin-bottom: .5rem; }
.empty p { color: var(--ink-m); margin-bottom: 1.25rem; }

/* Toast e topo */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--mq-h, 3.25rem) + 1.25rem); z-index: 58;
  transform: translate(-50%, 150%); opacity: 0; pointer-events: none;
  background: var(--toast-bg); color: #fff; border: 2px solid var(--yellow);
  padding: .7rem 1.25rem; border-radius: var(--r-pill);
  font-size: .85rem; font-weight: 800; max-width: calc(100vw - 2rem);
  transition: transform .3s, opacity .25s;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.to-top {
  position: fixed; right: 1rem; bottom: calc(var(--mq-h, 3.25rem) + 2.25rem); z-index: 56;
  width: 48px; height: 48px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--red); color: #fff; display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none; transition: opacity .25s;
}
.to-top.on { opacity: 1; pointer-events: auto; }
.to-top svg { width: 20px; height: 20px; }

/* Rodapé */
.site-footer { background: var(--footer-bg); color: #fff; border-top: 4px solid var(--red); padding-block: 2rem; }
/* Respiro para os botões flutuantes não cobrirem o texto */
.site-footer { padding-bottom: 6.5rem; }
@media (min-width: 768px) { .site-footer { padding-bottom: 2rem; } .site-footer .wrap { padding-inline: 5.5rem; } }
.site-footer strong { display: block; color: var(--yellow); text-transform: uppercase; letter-spacing: .04em; font-weight: 900; margin-bottom: .25rem; }
.site-footer p { font-size: .85rem; color: #E6E2DB; max-width: 48ch; }

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .card:hover { transform: none; }
}

/* Pular para o conteúdo */
.skip {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  background: var(--yellow); color: #2A2A2A; font-weight: 900;
  padding: .75rem 1.25rem; border-radius: var(--r-pill); text-decoration: none;
}
.skip:focus { top: .5rem; }
main:focus { outline: none; }

/* ── Faixa marquee ─────────────────────────────────────────── */
.marquee {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 55;
  background: var(--red); color: #fff; overflow: hidden;
  border-top: 4px solid var(--yellow);
  box-shadow: 0 -4px 16px rgba(0, 0, 0, .2);
}
/* Espaço para a faixa fixa não cobrir o rodapé (altura medida via JS) */
body { padding-bottom: var(--mq-h, 3.25rem); }
.marquee-track { display: flex; width: max-content; animation: marquee 45s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-group { display: flex; align-items: center; flex-shrink: 0; }
.marquee-group span {
  padding: .65rem 1.4rem; white-space: nowrap;
  font-size: clamp(1rem, 2.4vw, 1.35rem); font-weight: 900;
  text-transform: uppercase; letter-spacing: .05em;
}
.marquee-group b { color: var(--yellow); font-weight: 900; }
.marquee-group i { font-style: normal; color: #fff; font-size: 1.1rem; line-height: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ── Botão flutuante de acessibilidade ─────────────────────── */
.a11y {
  position: fixed; left: .75rem; top: .9rem; z-index: 60;
  display: flex; flex-direction: row; align-items: center; gap: .4rem;
}
/* Atalhos A+ / A− sempre visíveis acima do botão */
.a11y-quick {
  display: flex; flex-direction: row; gap: .35rem;
  animation: pop .6s .95s cubic-bezier(.2, .9, .3, 1.35) backwards;
}
.a11y-q {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  background: var(--surf); color: var(--blue-d); border: 2px solid var(--blue);
  font-family: inherit; font-size: 1rem; font-weight: 900; line-height: 1;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  transition: transform .15s ease, background .15s, color .15s;
}
.a11y-q.small { font-size: .8rem; }
.a11y-q:hover:not(:disabled) { background: var(--blue); color: #fff; transform: scale(1.06); }
.a11y-q:disabled { opacity: .4; cursor: not-allowed; }
.a11y-q:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.a11y.open .a11y-quick { visibility: hidden; }
/* Atalhos não escalam com o texto, para não crescerem demais */
.a11y-q { font-size: 16px; } .a11y-q.small { font-size: 13px; }
.a11y-fab {
  width: 52px; height: 52px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: var(--blue); color: #fff; border: 3px solid #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .3);
  transition: transform .2s ease, background .2s;
  animation: pop .6s .8s cubic-bezier(.2, .9, .3, 1.35) backwards;
}
.a11y-fab svg { width: 28px; height: 28px; }
.a11y-fab:hover { transform: scale(1.08); background: var(--blue-d); }
.a11y-fab[aria-expanded="true"] { background: var(--ink); color: var(--surf); }
.a11y-fab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }

.a11y-panel {
  position: absolute; left: 0; top: calc(100% + .6rem);
  width: min(320px, calc(100vw - 2rem));
  background: var(--surf); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 16px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .28);
  padding: .5rem 1rem 1rem; transform-origin: top left;
  opacity: 0; transform: translateY(-8px) scale(.97);
  transition: opacity .18s ease, transform .18s ease;
}
.a11y-panel.on { opacity: 1; transform: none; }
.a11y-head { display: flex; align-items: center; justify-content: space-between; padding-block: .25rem .5rem; }
.a11y-head h2 { font-size: 1rem; font-weight: 900; text-transform: uppercase; letter-spacing: .05em; }
.a11y-x {
  width: 40px; height: 40px; border-radius: 50%; border: 0; cursor: pointer;
  background: none; color: var(--ink); display: inline-flex; align-items: center; justify-content: center;
}
.a11y-x:hover { background: var(--bg); }
.a11y-row {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem;
  padding: .6rem 0; border-top: 1px solid var(--line);
  font-size: .9rem; font-weight: 800;
}
.a11y-fs { display: inline-flex; align-items: center; gap: .35rem; }
.a11y-fs output { min-width: 3.2em; text-align: center; font-size: .85rem; font-weight: 900; }
.a11y-step {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  border: 1.5px solid var(--line-s); background: var(--surf); color: var(--ink);
  font-family: inherit; font-size: .8rem; font-weight: 900;
}
.a11y-step.big { font-size: 1rem; }
.a11y-step:hover:not(:disabled) { background: var(--bg); }
.a11y-step:disabled { opacity: .35; cursor: not-allowed; }
.a11y-toggle {
  display: flex; align-items: center; gap: .65rem; width: 100%;
  min-height: 48px; padding: .25rem 0; border: 0; border-top: 1px solid var(--line);
  background: none; color: var(--ink); cursor: pointer; text-align: left;
  font-family: inherit; font-size: .9rem; font-weight: 800;
}
.a11y-toggle svg { width: 20px; height: 20px; flex-shrink: 0; }
.a11y-toggle .t { flex: 1; }
.a11y-toggle .sw {
  position: relative; width: 44px; height: 26px; flex-shrink: 0;
  border-radius: var(--r-pill); background: var(--line-s); transition: background .2s;
}
.a11y-toggle .sw::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px;
  border-radius: 50%; background: #fff; transition: transform .2s ease;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.a11y-toggle[aria-pressed="true"] .sw { background: var(--green); }
.a11y-toggle[aria-pressed="true"] .sw::after { transform: translateX(18px); }
.a11y-reset {
  display: block; width: 100%; margin-top: .5rem; min-height: 44px;
  border: 1.5px solid var(--line-s); border-radius: var(--r-pill);
  background: none; color: var(--ink); cursor: pointer;
  font-family: inherit; font-size: .85rem; font-weight: 800;
}
.a11y-reset:hover { background: var(--bg); }

/* ── Animações ─────────────────────────────────────────────── */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.8) rotate(-5deg); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.brand img { animation: pop .7s cubic-bezier(.2, .9, .3, 1.35) backwards; }
.header-title h1 { animation: rise .6s .12s ease-out backwards; }
.header-actions > * { animation: rise .5s ease-out backwards; }
.header-actions > :nth-child(1) { animation-delay: .22s; }
.header-actions > :nth-child(2) { animation-delay: .3s; }
.header-actions > :nth-child(3) { animation-delay: .38s; }
.stats { animation: fadeIn .6s .3s backwards; }
.marquee { animation: slideUp .6s .5s ease-out backwards; }
@keyframes slideUp { from { transform: translateY(100%); } to { transform: none; } }
.lead, .search, .pills-label, .pills { animation: rise .5s .35s ease-out backwards; }

#hub.animate .cat-head { animation: rise .45s ease-out backwards; }
/* Cards aparecem ao entrar na tela (IntersectionObserver no app.js) */
.card.reveal:not(.in) { opacity: 0; }
.card.reveal.in { animation: rise .5s ease-out backwards; animation-delay: calc(var(--i, 0) * 70ms); }

.pill { transition: background .15s, border-color .15s, color .15s, transform .12s; }
.pill:active, .btn:active { transform: scale(.96); }
.btn { transition: background .15s, border-color .15s, color .15s, transform .12s; }
.details-btn svg { transition: transform .25s ease; }

/* Sem animação: preferência do sistema ou opção do painel */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; }
  .marquee-track { transform: none; }
}
:root[data-motion="reduced"] *,
:root[data-motion="reduced"] *::before,
:root[data-motion="reduced"] *::after {
  animation: none !important; transition-duration: .01ms !important; scroll-behavior: auto !important;
}
:root[data-motion="reduced"] .card:hover { transform: none; }
:root[data-motion="reduced"] .card.reveal { opacity: 1 !important; }
@media (prefers-reduced-motion: reduce) { .card.reveal { opacity: 1 !important; } }

/* Ajustes do alto contraste */
[data-contrast="high"] .site-header,
[data-contrast="high"] .stats { background: #000; }
[data-contrast="high"] .site-header { border-bottom: 2px solid #fff; }
[data-contrast="high"] :focus-visible { outline-color: #FFE600; }
[data-contrast="high"] .btn-primary,
[data-contrast="high"] .to-top { background: #FFE600; border-color: #FFE600; color: #000; }
[data-contrast="high"] .btn-primary:hover { background: #fff; border-color: #fff; }
[data-contrast="high"] .pill[aria-pressed="true"] { background: #FFE600; border-color: #FFE600; color: #000; }
[data-contrast="high"] .pill[aria-pressed="true"] .n { background: #000; color: #FFE600; }
[data-contrast="high"] .cat-head { border-bottom-color: #FFE600; }
[data-contrast="high"] .header-row .about-btn { background: #000; color: #FFE600; }
[data-contrast="high"] .search input { border-width: 2px; }
[data-contrast="high"] .card .domain { color: #FFE600; }
[data-contrast="high"] .marquee { background: #000; border-color: #FFE600; }
[data-contrast="high"] .a11y-fab { background: #FFE600; color: #000; border-color: #000; }
[data-contrast="high"] .a11y-panel { border: 2px solid #fff; }
[data-contrast="high"] .a11y-q { background: #000; color: #FFE600; border-color: #FFE600; }
[data-contrast="high"] .a11y-toggle[aria-pressed="true"] .sw { background: #FFE600; }
[data-contrast="high"] .a11y-toggle[aria-pressed="true"] .sw::after { background: #000; }

/* Botão "Sobre o Comitê" (terceiro botão do cabeçalho) */
.header-row .about-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 48px; padding: 0 1.6rem; max-width: 100%; white-space: nowrap;
  background: #fff; color: var(--red-d);
  border: 3px solid var(--yellow); border-radius: var(--r-pill);
  font-family: inherit; font-size: .95rem; font-weight: 900; cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, .25);
  transition: background .15s, color .15s, transform .15s;
}
.header-row .about-btn svg { width: 18px; height: 18px; flex-shrink: 0; }
.header-row .about-btn:hover { background: var(--yellow); color: var(--ink); transform: translateY(-1px); }
.header-row .about-btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }

/* Modal "Sobre" */
html.modal-open { overflow: hidden; }
.modal {
  margin: auto; padding: 0; border: 0; border-radius: 16px; overflow: hidden;
  width: calc(100% - 2rem); max-width: 680px; max-height: calc(100vh - 2rem); max-height: calc(100dvh - 2rem);
  background: var(--surf); color: var(--ink);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .35);
}
.modal[open] { display: flex; flex-direction: column; }
.modal::backdrop { background: rgba(20, 20, 20, .65); }
.modal-flag { display: flex; height: 6px; flex-shrink: 0; }
.modal-flag span { flex: 1; }
.modal-flag span:nth-child(1) { background: var(--blue); }
.modal-flag span:nth-child(2) { background: var(--yellow); }
.modal-flag span:nth-child(3) { background: var(--green); }
.modal-flag span:nth-child(4) { background: var(--red); }
.modal-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: .75rem;
  padding: 1.25rem 1rem .75rem 1.25rem; flex-shrink: 0;
}
.modal-head h2 { font-size: clamp(1.2rem, 4.5vw, 1.6rem); font-weight: 900; line-height: 1.2; color: var(--accent-text); }
.modal-x {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  border: 1.5px solid var(--line-s); background: var(--surf); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.modal-x:hover { background: var(--bg); }
.modal-body { padding: .25rem 1.25rem 1rem; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-body p { font-size: .95rem; line-height: 1.7; margin-bottom: 1rem; }
.modal-body p:last-child { margin-bottom: 0; }
.modal-foot { padding: .75rem 1.25rem 1.25rem; border-top: 1px solid var(--line); flex-shrink: 0; display: flex; justify-content: flex-end; }
.modal-foot .btn { flex: none; min-width: 140px; }
@media (min-width: 768px) {
  .modal-head { padding: 1.5rem 1.25rem .75rem 2rem; }
  .modal-body { padding-inline: 2rem; }
  .modal-body p { font-size: 1rem; }
  .modal-foot { padding-inline: 2rem; }
}

/* No celular: só o ícone (A+/A− ficam dentro do painel) */
@media (max-width: 767px) {
  .a11y-quick { display: none; }
  .a11y-fab { width: 46px; height: 46px; }
  .a11y-fab svg { width: 25px; height: 25px; }
}
/* Desktop largo: respiro no topo do header para o grupo de botões não encostar no logo */
@media (min-width: 1200px) {
  .header-row { padding-top: 4.75rem; }
}

/* Link de privacidade no rodapé e títulos do aviso */
.footer-link {
  margin-top: .75rem; padding: .5rem 0; min-height: 44px;
  background: none; border: 0; cursor: pointer; font-family: inherit;
  color: #fff; font-size: .85rem; font-weight: 800;
  text-decoration: underline; text-underline-offset: 3px;
}
.footer-link:hover { color: var(--yellow); }
.modal-body h3 { font-size: 1rem; font-weight: 900; margin: 1.25rem 0 .35rem; }

/* ── Efeitos de fundo (leves: só transform e opacity) ─────── */
/* Manchas de luz atrás do conteúdo */
.bg-fx { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-fx::before, .bg-fx::after {
  content: ''; position: absolute; width: 70vmax; height: 70vmax; border-radius: 50%;
}
.bg-fx::before {
  left: -25vmax; top: 15vh;
  background: radial-gradient(circle, rgba(195, 9, 10, .07), transparent 65%);
  animation: blobA 32s ease-in-out infinite alternate;
}
.bg-fx::after {
  right: -28vmax; bottom: -25vmax;
  background: radial-gradient(circle, rgba(251, 206, 2, .12), transparent 65%);
  animation: blobB 38s ease-in-out infinite alternate;
}
@keyframes blobA { to { transform: translate(30vw, 25vh); } }
@keyframes blobB { to { transform: translate(-35vw, -30vh); } }
[data-theme="dark"] .bg-fx::before { background: radial-gradient(circle, rgba(195, 9, 10, .14), transparent 65%); }
[data-theme="dark"] .bg-fx::after { background: radial-gradient(circle, rgba(251, 206, 2, .06), transparent 65%); }

/* Header: brilho passeando e estrelas flutuando */
.site-header { position: relative; overflow: hidden; isolation: isolate; }
.hdr-fx { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.hdr-fx .glow {
  position: absolute; left: -25vmax; top: -35vmax; width: 70vmax; height: 70vmax; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 214, 0, .16), transparent 60%);
  animation: glowMove 24s ease-in-out infinite alternate;
}
@keyframes glowMove { to { transform: translate(65vw, 15vmax); } }
.hdr-fx i {
  position: absolute; font-style: normal; line-height: 1; color: #fff; opacity: .13;
  font-size: var(--s, 1.5rem);
  animation: drift var(--d, 10s) ease-in-out infinite alternate;
}
.hdr-fx i:nth-of-type(1) { left: 5%;  top: 72%; --s: 2.3rem; --d: 9s; }
.hdr-fx i:nth-of-type(2) { left: 21%; top: 14%; --s: 1.1rem; --d: 11s; color: var(--yellow); opacity: .3; }
.hdr-fx i:nth-of-type(3) { left: 36%; top: 82%; --s: 1.6rem; --d: 13s; }
.hdr-fx i:nth-of-type(4) { left: 57%; top: 10%; --s: 2.6rem; --d: 10s; }
.hdr-fx i:nth-of-type(5) { left: 73%; top: 78%; --s: 1.2rem; --d: 12s; color: var(--yellow); opacity: .3; }
.hdr-fx i:nth-of-type(6) { left: 91%; top: 32%; --s: 2rem;   --d: 14s; }
.hdr-fx i:nth-of-type(7) { left: 47%; top: 50%; --s: .9rem;  --d: 8s;  }
@keyframes drift { from { transform: translateY(0) rotate(0); } to { transform: translateY(-18px) rotate(28deg); } }

/* Reflexo de luz na faixa de cores */
.flag { position: relative; overflow: hidden; }
.flag::after {
  content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 25%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .75), transparent);
  transform: translateX(-100%);
  animation: shimmer 7s 2.5s ease-in-out infinite;
}
@keyframes shimmer { 0% { transform: translateX(-100%); } 35%, 100% { transform: translateX(420%); } }

/* Logo flutuando de leve (depois do "pop" de entrada) */
.brand img {
  animation: pop .7s cubic-bezier(.2, .9, .3, 1.35) backwards,
             float 6s 1.2s ease-in-out infinite alternate;
}
@keyframes float { to { transform: translateY(-6px) rotate(-1.5deg); } }

/* Anel pulsando no botão principal */
.header-row .btn-submit { position: relative; }
.header-row .btn-submit::after {
  content: ''; position: absolute; inset: -3px; border-radius: inherit; pointer-events: none;
  border: 3px solid var(--yellow); opacity: 0;
  animation: ring 3.8s 2.2s ease-out infinite;
}
@keyframes ring { 0% { opacity: .75; transform: scale(1); } 60%, 100% { opacity: 0; transform: scale(1.12, 1.45); } }

/* Alto contraste: sem efeitos decorativos */
[data-contrast="high"] .bg-fx,
[data-contrast="high"] .hdr-fx,
[data-contrast="high"] .flag::after,
[data-contrast="high"] .header-row .btn-submit::after { display: none; }

/* A−/A+ recolhem ao rolar (ficam no painel) */
.a11y-quick { transition: opacity .2s ease, transform .2s ease; }
.a11y.compact .a11y-quick { opacity: 0; transform: translateX(-10px); pointer-events: none; visibility: hidden; transition: opacity .2s ease, transform .2s ease, visibility 0s .2s; }

/* Grupo inteiro some ao rolar para baixo e volta ao rolar para cima */
.a11y { transition: transform .25s ease, opacity .25s ease; }
.a11y.hide { transform: translateY(calc(-100% - 1.5rem)); opacity: 0; pointer-events: none; }

/* ── Ícone de acessibilidade preto + botão de tema separado ── */
.a11y-fab { background: #111; color: #fff; border-color: #fff; }
.a11y-fab:hover { background: #333; }
.a11y-fab[aria-expanded="true"] { background: var(--yellow); color: #111; border-color: #111; }

/* Botões redondos do grupo: mesma linguagem visual, se adaptam ao tema */
.a11y-q, .a11y-theme {
  background: var(--surf); color: var(--ink); border: 2px solid var(--ink);
}
.a11y-q:hover:not(:disabled), .a11y-theme:hover { background: var(--ink); color: var(--surf); }
.a11y-theme {
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
  transition: transform .2s ease, background .15s, color .15s;
  animation: pop .6s .9s cubic-bezier(.2, .9, .3, 1.35) backwards;
}
.a11y-theme svg { width: 22px; height: 22px; }
.a11y-theme:active svg { transform: rotate(-30deg) scale(.9); }
.a11y-theme:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.a11y-theme .ico-sun { display: none; }
[data-theme="dark"] .a11y-theme .ico-sun { display: block; color: var(--yellow); }
[data-theme="dark"] .a11y-theme .ico-moon { display: none; }
[data-theme="dark"] .a11y-theme:hover .ico-sun { color: inherit; }
@media (max-width: 767px) { .a11y-theme { width: 40px; height: 40px; } .a11y-theme svg { width: 20px; height: 20px; } }

[data-contrast="high"] .a11y-fab { background: #000; color: #FFE600; border-color: #FFE600; }
[data-contrast="high"] .a11y-theme { background: #000; color: #FFE600; border-color: #FFE600; }

/* ── Ajuste: acessibilidade azul; ao rolar some e fica só o botão de tema ── */
.a11y-fab { background: var(--blue); color: #fff; border-color: #fff; overflow: hidden;
  transition: transform .2s ease, background .2s, width .25s ease, opacity .2s ease, border-width .25s ease, margin .25s ease; }
.a11y-fab:hover { background: #015A8A; }
.a11y-fab[aria-expanded="true"] { background: var(--yellow); color: #111; border-color: #111; }

.a11y.hide { transform: none; opacity: 1; pointer-events: auto; }
.a11y.hide .a11y-fab { width: 0; opacity: 0; border-width: 0; margin-right: -.4rem; pointer-events: none; }
.a11y.hide .a11y-quick { opacity: 0; visibility: hidden; pointer-events: none; }

/* ── Estrelas do header: mais vivas (só transform e opacity) ── */
.hdr-fx i {
  opacity: var(--o, .15);
  animation:
    drift2 var(--d, 10s) ease-in-out var(--dl, 0s) infinite alternate,
    twinkle var(--t, 3s) ease-in-out var(--dl, 0s) infinite alternate;
}
@keyframes drift2 {
  0%   { transform: translate(0, 0) rotate(0) scale(1); }
  50%  { transform: translate(var(--x, 14px), -16px) rotate(22deg) scale(1.12); }
  100% { transform: translate(calc(var(--x, 14px) * -1), -30px) rotate(48deg) scale(.92); }
}
@keyframes twinkle { from { opacity: var(--o, .15); } to { opacity: calc(var(--o, .15) * 2.6); } }

.hdr-fx i:nth-of-type(1)  { left: 4%;  top: 70%; --s: 2.4rem; --d: 9s;  --t: 3.2s; --x: 18px;  --o: .14; --dl: 0s; }
.hdr-fx i:nth-of-type(2)  { left: 13%; top: 12%; --s: 1rem;   --d: 11s; --t: 2.1s; --x: -12px; --o: .3;  --dl: -2s; color: var(--yellow); }
.hdr-fx i:nth-of-type(3)  { left: 24%; top: 45%; --s: .8rem;  --d: 7s;  --t: 1.6s; --x: 10px;  --o: .25; --dl: -1s; }
.hdr-fx i:nth-of-type(4)  { left: 32%; top: 84%; --s: 1.7rem; --d: 13s; --t: 3.6s; --x: -20px; --o: .13; --dl: -4s; }
.hdr-fx i:nth-of-type(5)  { left: 41%; top: 18%; --s: 1.2rem; --d: 10s; --t: 2.4s; --x: 16px;  --o: .2;  --dl: -3s; color: var(--yellow); }
.hdr-fx i:nth-of-type(6)  { left: 50%; top: 62%; --s: .9rem;  --d: 8s;  --t: 1.9s; --x: -10px; --o: .28; --dl: -5s; }
.hdr-fx i:nth-of-type(7)  { left: 57%; top: 8%;  --s: 2.7rem; --d: 12s; --t: 4s;   --x: 22px;  --o: .12; --dl: -1.5s; }
.hdr-fx i:nth-of-type(8)  { left: 64%; top: 88%; --s: 1.1rem; --d: 9s;  --t: 2.2s; --x: -14px; --o: .3;  --dl: -6s; color: var(--yellow); }
.hdr-fx i:nth-of-type(9)  { left: 70%; top: 40%; --s: .7rem;  --d: 6s;  --t: 1.4s; --x: 8px;   --o: .3;  --dl: -2.5s; }
.hdr-fx i:nth-of-type(10) { left: 77%; top: 74%; --s: 1.9rem; --d: 14s; --t: 3.4s; --x: -18px; --o: .13; --dl: -3.5s; }
.hdr-fx i:nth-of-type(11) { left: 84%; top: 14%; --s: 1rem;   --d: 9s;  --t: 2s;   --x: 12px;  --o: .3;  --dl: -4.5s; color: var(--yellow); }
.hdr-fx i:nth-of-type(12) { left: 91%; top: 52%; --s: 2.1rem; --d: 11s; --t: 3s;   --x: -16px; --o: .14; --dl: -0.5s; }
.hdr-fx i:nth-of-type(13) { left: 96%; top: 86%; --s: .8rem;  --d: 7s;  --t: 1.7s; --x: 10px;  --o: .28; --dl: -3s; }
.hdr-fx i:nth-of-type(14) { left: 19%; top: 92%; --s: 1.3rem; --d: 10s; --t: 2.6s; --x: -12px; --o: .2;  --dl: -5.5s; color: var(--yellow); }

/* Estrela cadente */
.hdr-fx .shoot {
  position: absolute; left: -12%; width: 130px; height: 2px; border-radius: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 230, 0, .95));
  opacity: 0; transform: rotate(16deg) translateX(0);
  animation: shoot 10s linear infinite;
}
.hdr-fx .shoot::after {
  content: ''; position: absolute; right: -2px; top: -2px; width: 6px; height: 6px; border-radius: 50%;
  background: #FFF6B0; box-shadow: 0 0 8px 2px rgba(255, 230, 0, .8);
}
.hdr-fx .shoot:nth-of-type(1) { top: 14%; animation-delay: 3s; }
.hdr-fx .shoot:nth-of-type(2) { top: 46%; animation-delay: 8s; width: 90px; }
@keyframes shoot {
  0%   { opacity: 0; transform: rotate(16deg) translateX(0); }
  2%   { opacity: 1; }
  11%  { opacity: 0; transform: rotate(16deg) translateX(115vw); }
  100% { opacity: 0; transform: rotate(16deg) translateX(115vw); }
}

/* Botão de tema: estrela amarela no modo escuro, com giro na troca */
.a11y-theme svg { transition: transform .45s cubic-bezier(.2, .9, .3, 1.35); }
[data-theme="dark"] .a11y-theme .ico-star { display: block; color: var(--yellow); transform: rotate(144deg); width: 24px; height: 24px; }
[data-theme="dark"] .a11y-theme:hover .ico-star { color: var(--yellow); }
[data-theme="dark"] .a11y-theme:hover { background: #111; }
.a11y-theme.spin svg { animation: themeSpin .5s cubic-bezier(.2, .9, .3, 1.35); }
@keyframes themeSpin { from { transform: rotate(-180deg) scale(.4); opacity: 0; } }

/* ── Botão "Acessar": ícone vira estrela vermelha girando ──── */
.ico-swap { position: relative; display: inline-block; width: 16px; height: 16px; flex-shrink: 0; }
.ico-swap svg { position: absolute; inset: 0; width: 16px; height: 16px; transition: opacity .2s ease, transform .25s ease; }
.ico-swap .i-star { opacity: 0; transform: scale(.3); width: 18px; height: 18px; inset: -1px; }

/* Botão continua vermelho no hover; só o ícone vira estrela amarela girando devagar */
.card .btn-primary:hover .i-ext,
.card .btn-primary:focus-visible .i-ext,
.card .btn-primary:active .i-ext { opacity: 0; transform: scale(.3) rotate(45deg); }
.card .btn-primary:hover .i-star,
.card .btn-primary:focus-visible .i-star,
.card .btn-primary:active .i-star {
  opacity: 1; transform: none; color: var(--yellow);
  animation: starPop .4s cubic-bezier(.2, .9, .3, 1.4), starSpin 4s .4s linear infinite;
}
@keyframes starPop { from { transform: scale(.3) rotate(-120deg); } to { transform: scale(1) rotate(0); } }
@keyframes starSpin { to { transform: rotate(360deg); } }
[data-contrast="high"] .card .btn-primary .i-star { color: #000 !important; }
