/* =====================================================================
   ARS · VIII Assembleia Quadrienal — camada visual (nov/2026)
   Tipografia Caminho ARS Display + grafismos da Plataforma Gráfica v3.
   Carrega depois de styles.css. Não redefine estrutura: só voz e matéria.
   ===================================================================== */
@font-face{font-family:"Caminho ARS";src:url("assets/fonts/CaminhoARSDisplay-Regular-VF.woff2") format("woff2");font-weight:300 800;font-style:normal;font-display:swap}
@font-face{font-family:"Caminho ARS";src:url("assets/fonts/CaminhoARSDisplay-Italic-VF.woff2") format("woff2");font-weight:300 800;font-style:italic;font-display:swap}

:root{
  --serif:"Caminho ARS","Fraunces","Hoefler Text",Georgia,serif;
  --chev:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23123241' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
  --chev-claro:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF5EA' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 5l7 7-7 7'/%3E%3C/svg%3E");
}
html{scrollbar-color:var(--azul) var(--creme)}
body{background:var(--papel) url("assets/gfx/papel.webp") top center/1400px auto}
:focus-visible{outline:2px solid var(--terra);outline-offset:3px}

/* ---------- Tipografia: Caminho em títulos, números e destaques ---------- */
h1,h2,h3,h4,h5{font-weight:600!important;letter-spacing:-.012em!important;font-variation-settings:normal!important;text-wrap:balance}
h3,h4,h5{font-weight:560!important}
h1 em,h2 em,h3 em,h4 em{font-weight:400!important;font-style:italic}
blockquote{text-wrap:pretty}

/* ---------- Divisor: o caminho dourado da marca ---------- */
.ornament{padding:52px var(--gutter)!important}
.ornament>*{display:none!important}
.ornament::after{display:none!important}
.ornament::before{content:""!important;display:block!important;width:min(340px,56vw)!important;height:auto!important;aspect-ratio:1200/442;background:url("assets/gfx/caminho.webp") center/contain no-repeat!important;opacity:1!important}

/* ---------- Home · hero ---------- */
.hero .art{aspect-ratio:16/9;max-width:980px}
@media (max-width:720px){.hero .art{aspect-ratio:4/5;max-width:92vw}}

/* ---------- Home · os quatro marcos ilustrados ---------- */
.mcard{padding:0 0 30px!important;border-radius:16px!important;border:0!important;background:var(--papel)}
.mcard .mc-art{display:block;width:100%;aspect-ratio:16/10;object-fit:cover;margin-bottom:22px}
.mcard .num{font-family:var(--sans)!important;font-style:normal!important;font-weight:800!important;font-size:11px!important;letter-spacing:.24em!important;line-height:1!important;color:var(--terra-deep)!important;opacity:1!important;margin:0 28px 10px!important}
.mcard h3{margin-inline:28px}
.mcard p{margin-inline:28px}
.marcos .versiculo{background:var(--azul-noite) url("assets/gfx/bg-noite.webp") center/cover no-repeat!important;border-radius:16px!important}
.marcos .versiculo p,.marcos .versiculo .ref{color:var(--papel)!important}
.marcos .versiculo p{font-weight:400!important}

/* ---------- Home · números nas quatro ênfases (texturas dos banners do evento) ---------- */
.numeros{background:var(--creme)!important}
.numeros h2 em{color:var(--terra)!important}
.numeros .eyebrow{color:var(--terra-deep)!important}
.numeros .lede{color:var(--ink-soft)!important}
.numeros .grid{gap:16px!important;background:none!important;border-radius:0!important;overflow:visible!important}
.numeros .stat{--tex:none;border-radius:16px!important;padding:32px 26px 30px!important;overflow:hidden;text-align:left;border:0;color:var(--papel);
  background:linear-gradient(180deg,rgba(18,50,65,.12),rgba(18,50,65,.58)),var(--tex) center/cover no-repeat,var(--azul-noite)!important;
  transition:transform .45s var(--ease),box-shadow .45s var(--ease)!important}
.numeros .stat:nth-child(1){--tex:url("assets/gfx/enfase-1.webp")}
.numeros .stat:nth-child(2){--tex:url("assets/gfx/enfase-2.webp")}
.numeros .stat:nth-child(3){--tex:url("assets/gfx/enfase-3.webp")}
.numeros .stat:nth-child(4){--tex:url("assets/gfx/enfase-4.webp")}
.numeros .stat:nth-child(3){background:linear-gradient(180deg,rgba(250,245,234,0),rgba(250,245,234,.18)),var(--tex) center/cover no-repeat,var(--gold)!important;color:var(--azul-noite)}
.numeros .stat:hover{transform:translateY(-6px);box-shadow:0 28px 50px -26px rgba(18,50,65,.55)}
.numeros .stat .n{font-style:normal!important;font-weight:700!important;-webkit-text-stroke:0!important;paint-order:normal!important;color:inherit!important;font-size:clamp(50px,5.6vw,82px)!important;letter-spacing:-.015em!important;line-height:.95!important}
.numeros .stat,.numeros .stat .n,.numeros .stat h3,.numeros .stat p,.numeros .stat .stat-more{color:var(--papel)!important;opacity:1!important}
.numeros .stat:nth-child(3),.numeros .stat:nth-child(3) .n,.numeros .stat:nth-child(3) h3,.numeros .stat:nth-child(3) p,.numeros .stat:nth-child(3) .stat-more{color:var(--azul-noite)!important}
.numeros .stat h3 span{color:var(--gold)!important;line-height:1.35}
.numeros .stat:nth-child(3) h3 span{color:var(--azul-noite)!important}
.numeros .stat p{font-size:14.5px!important;line-height:1.5!important}
.numeros .stat .icon-wrap{background:rgba(250,245,234,.18)!important}
.numeros .stat:nth-child(3) .icon-wrap{background:var(--azul-noite)!important}

/* ---------- Fecho: a imagem-chave do palco ---------- */
section.cta{background:transparent!important;padding-bottom:0!important}
section.cta h2 em{color:var(--terra)!important}
section.cta .eyebrow{color:var(--terra-deep)!important}
section.cta::after{content:"";display:block;position:relative;z-index:1;height:clamp(240px,44vw,620px);margin-top:clamp(40px,6vw,80px);background:url("assets/gfx/keyvisual.webp") center bottom/cover no-repeat}

/* ---------- Relatório · abertura ---------- */
.dep-hero{background:transparent!important}
.dh-nome-bg{letter-spacing:-.02em!important;font-weight:400!important}
.dh-stage::after{content:"";position:absolute;left:50%;bottom:-3%;width:clamp(360px,48vw,700px);aspect-ratio:1300/520;transform:translateX(-50%) rotate(-3deg);background:url("assets/gfx/pincel-duo.webp") center/contain no-repeat;z-index:1;pointer-events:none}
.dh-foto{border-radius:16px!important}
.dh-quote{font-weight:400!important}

/* ---------- Relatório · corpo do texto ---------- */
#dep-descricao>p{max-width:70ch}
.rl-lede{font-family:var(--serif);font-style:italic;font-weight:400;font-size:clamp(19px,2vw,23px);line-height:1.45;color:var(--ink-soft);max-width:48ch!important;margin:0 0 30px!important}
.rl-eye{display:inline-block;margin:64px 0 6px -24px;padding:15px 40px 16px 26px;background:url("assets/gfx/pincel-ceu.webp") center/100% 100% no-repeat;font-family:var(--serif);font-weight:700;font-size:16px;line-height:1.2;letter-spacing:.07em;text-transform:uppercase;color:var(--azul-noite);max-width:calc(100% + 24px)}
.rl-lede+.rl-eye{margin-top:14px}
.rl-h3{font-family:var(--serif);font-size:clamp(26px,3vw,34px);line-height:1.12;color:var(--azul-noite);margin:46px 0 14px}
.rl-eye+.rl-h3{margin-top:22px}
.rl-h4{font-family:var(--serif);font-size:clamp(21px,2.2vw,25px);line-height:1.18;color:var(--azul-noite);margin:36px 0 10px}
.rl-lab{font-family:var(--sans);font-weight:800;font-size:10.5px;letter-spacing:.2em;text-transform:uppercase;color:var(--terra-deep);margin:28px 0 2px}
.rl-quote{font-family:var(--serif);font-style:italic;font-weight:400;font-size:clamp(22px,2.5vw,29px);line-height:1.28;color:var(--azul);max-width:30ch!important;margin:40px 0!important;padding-top:34px;background:url("assets/gfx/caminho.webp") left top/118px auto no-repeat}
.rl-link{font-family:var(--sans);font-weight:800;font-size:12px;letter-spacing:.12em;text-transform:uppercase;color:var(--terra-deep);text-decoration:underline;text-decoration-thickness:1.5px;text-underline-offset:5px;display:inline-flex;align-items:center;gap:10px}
.rl-link::before{content:"";width:30px;height:30px;border-radius:50%;background:var(--terra-deep) var(--chev-claro) 55% 50%/14px no-repeat;flex:none}
.rl-link:hover{color:var(--azul-noite)}
.rl-link:hover::before{background-color:var(--azul-noite)}

/* Milagre em números: o dourado fica com o milagre */
.rl-milagre{display:inline-block;position:relative;z-index:0;margin-top:60px;padding:4px 6px 6px 0}
.rl-milagre::before{content:"";position:absolute;z-index:-1;left:-26px;right:-40px;top:50%;height:190%;transform:translateY(-52%) rotate(-1.2deg);background:url("assets/gfx/pincel-ouro.webp") center/100% 100% no-repeat}
.rl-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:0 30px;margin:16px 0 10px}
.rl-card{padding:18px 0 18px;border-top:1px solid rgba(31,73,90,.18)}
.rl-num{font-family:var(--serif);font-weight:650;font-size:clamp(34px,3.6vw,46px);line-height:1;color:var(--azul-noite);font-variant-numeric:lining-nums}
.rl-cap{font-family:var(--sans);font-size:13.5px;line-height:1.42;color:var(--ink-soft);margin-top:8px}
.rl-card-txt .rl-cap{margin-top:0;font-family:var(--serif);font-weight:560;font-size:19px;line-height:1.25;color:var(--azul-noite)}

/* ---------- Carrossel de fotos dentro do texto ---------- */
.fx-car{margin:30px 0 46px}
.fx-track{display:flex;gap:12px;overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x proximity;margin-right:calc(50% - 50vw);padding:0 24px 14px 0;scrollbar-width:thin;scrollbar-color:var(--terra) transparent}
.fx-track::-webkit-scrollbar{height:6px}
.fx-track::-webkit-scrollbar-thumb{background:var(--terra);border-radius:6px}
.fx-it{flex:0 0 auto;display:block;height:clamp(230px,30vw,400px);border-radius:14px;overflow:hidden;background:var(--creme);scroll-snap-align:start;cursor:zoom-in}
.fx-it img{display:block;height:100%;width:auto;max-width:none}
.fx-car figcaption{display:flex;align-items:center;justify-content:space-between;gap:18px;margin-top:8px;min-height:40px}
.fx-cap{font-family:var(--sans);font-weight:800;font-size:11px;line-height:1.5;letter-spacing:.16em;text-transform:uppercase;color:var(--ink-soft)}
.fx-nav{display:flex;gap:8px;flex:none}
.fx-nav button{width:40px;height:40px;border-radius:50%;border:1px solid rgba(31,73,90,.28);background:transparent var(--chev) 55% 50%/16px no-repeat;transition:background-color .3s var(--ease),border-color .3s var(--ease)}
.fx-nav .fx-prev{transform:scaleX(-1)}
.fx-nav button:hover{background-color:var(--gold);border-color:var(--gold)}
.fx-car.fx-fixo .fx-nav{display:none}

/* ---------- Galeria do relatório ---------- */
a.gal{cursor:zoom-in;text-decoration:none;border:0!important;border-radius:14px}
.gal img{transition:none}
.gal-cap{position:absolute;inset:auto 0 0 0;z-index:1;padding:34px 14px 12px;background:linear-gradient(180deg,rgba(18,50,65,0),rgba(18,50,65,.82));color:var(--papel);font-family:var(--sans);font-weight:700;font-size:12px;line-height:1.35;letter-spacing:.04em;text-align:left}

/* ---------- Ampliação das fotos ---------- */
dialog.fx-lb{border:0;padding:0;margin:0;background:transparent;width:100vw;height:100vh;max-width:none;max-height:none;overflow:hidden}
dialog.fx-lb[open]{display:flex;align-items:center;justify-content:center}
dialog.fx-lb::backdrop{background:rgba(10,30,40,.94)}
.fx-lb figure{margin:0;max-width:min(1280px,90vw)}
.fx-lb img{display:block;margin:0 auto;max-width:100%;max-height:80vh;width:auto;height:auto;border-radius:10px}
.fx-lb figcaption{display:flex;justify-content:space-between;gap:20px;margin-top:14px;color:var(--papel);font-family:var(--sans);font-weight:700;font-size:11.5px;letter-spacing:.14em;text-transform:uppercase}
.fx-lb button{position:fixed;width:48px;height:48px;border-radius:50%;border:1px solid rgba(250,245,234,.4);background:rgba(18,50,65,.6) var(--chev-claro) 55% 50%/18px no-repeat;cursor:pointer}
.fx-lb button:hover{background-color:var(--terra)}
.fx-lb .fx-lp{left:max(12px,2vw);top:50%;transform:translateY(-50%) scaleX(-1)}
.fx-lb .fx-lx{right:max(12px,2vw);top:50%;transform:translateY(-50%)}
.fx-lb .fx-x{top:max(12px,2vh);right:max(12px,2vw);background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF5EA' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");background-position:center}

/* ---------- Mapa · ilustração de cada região ---------- */
.regiao .banda.tem-arte{height:auto!important;aspect-ratio:16/8;background-size:cover!important;background-position:center!important;border-bottom:5px solid var(--cor)}

@media (max-width:720px){
  .rl-eye{margin-left:-12px;padding:15px 30px 16px;font-size:13.5px}
  .fx-it{height:230px}
  .rl-milagre::before{left:-14px;right:-18px}
  .mcard .mc-art{aspect-ratio:16/9}
  .numeros .grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:10px!important}
  .numeros .stat{padding:22px 16px 20px!important;min-width:0}
  .numeros .stat .n{font-size:clamp(34px,10.5vw,44px)!important}
  .numeros .stat p{font-size:13px!important}
}
/* Home · chamada do mapa: no celular o título e o texto empilham (antes o texto saía da tela) */
@media (max-width:820px){
  #mapa-preview .heading{grid-template-columns:1fr!important;gap:20px!important;margin-bottom:34px!important}
  #mapa-preview .heading>div{text-align:left!important}
  #mapa-preview .heading p{margin-left:0!important}
}
@media (prefers-reduced-motion:reduce){.numeros .stat,.fx-nav button{transition:none!important}}


/* =====================================================================
   Relatório · diagramação editorial (nov/2026)
   Uma malha só: coluna de margem (rótulos, legendas, sumário) + coluna de
   texto com medida de leitura. Entrelinha de 28px como unidade de ritmo:
   todo intervalo vertical é múltiplo dela. A classe .ed entra pelo
   upgrade.js só nos relatórios já convertidos (corpo com classes rl-).
   ===================================================================== */
::selection{background:var(--ceu);color:var(--azul-noite)}
.ed-sec{overflow-x:clip}
#dep-descricao.ed{--lh:28px;--ed-m:11rem;--ed-gap:2.5rem;font-size:17px!important;line-height:var(--lh)!important}
#dep-descricao.ed>p{text-wrap:pretty}
#dep-descricao.ed :is(.rl-h3,.rl-h4){scroll-margin-top:120px}

/* ritmo: só margem de cima, sempre em múltiplos da entrelinha (mais ar acima do título que abaixo) */
#dep-descricao.ed>*{margin-top:0!important;margin-bottom:0!important}
#dep-descricao.ed>*+*{margin-top:var(--lh)!important}
#dep-descricao.ed>.fx-car+*,#dep-descricao.ed>.rl-grid+*{margin-top:calc(var(--lh)*2)!important}
#dep-descricao.ed>.rl-quote+*{margin-top:calc(var(--lh)*2.5)!important}
#dep-descricao.ed>.rl-sum+*{margin-top:calc(var(--lh)*3)!important}
#dep-descricao.ed>.rl-h3{margin-top:calc(var(--lh)*3)!important}
#dep-descricao.ed>.rl-h4{margin-top:calc(var(--lh)*2)!important}
#dep-descricao.ed>.rl-lab{margin-top:calc(var(--lh)*1.5)!important}
#dep-descricao.ed>.rl-eye{margin-top:calc(var(--lh)*3)!important}
#dep-descricao.ed>.fx-car{margin-top:calc(var(--lh)*1.5)!important}
#dep-descricao.ed>.rl-quote{margin-top:calc(var(--lh)*2.5)!important}
#dep-descricao.ed>.rl-sum{margin-top:calc(var(--lh)*1.5)!important}
#dep-descricao.ed>:is(.rl-h3,.rl-h4,.rl-lab)+*{margin-top:calc(var(--lh)*.5)!important}
#dep-descricao.ed>.rl-eye+.rl-h3{margin-top:calc(var(--lh)*.75)!important}
#dep-descricao.ed>.rl-milagre+.rl-grid{margin-top:var(--lh)!important}
#dep-descricao.ed>:first-child{margin-top:0!important}

/* medida de leitura quando ainda não há malha (celular e tablet) */
#dep-descricao.ed>:is(p,h3,h4,.rl-lab):not(.rl-lede):not(.rl-quote){max-width:35rem!important}

/* abertura: capitular na primeira matéria */
#dep-descricao.ed>.rl-h3:first-of-type+p::first-letter{float:left;font-family:var(--serif);font-weight:600;font-size:104px;line-height:.78;padding:4px 12px 0 0;color:var(--azul-noite)}
@supports (initial-letter:3) or (-webkit-initial-letter:3){
  /* onde o navegador sabe compor capitular, ela ocupa exatamente três linhas da malha */
  #dep-descricao.ed>.rl-h3:first-of-type+p::first-letter{float:none;font-size:inherit;line-height:inherit;padding:0;margin-right:12px;-webkit-initial-letter:3;initial-letter:3}
}

/* sumário do relatório */
.rl-sum{border-block:1px solid rgba(31,73,90,.18);padding-block:calc(var(--lh)*.75)}
.rl-sum-t{all:unset;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;width:100%;min-height:44px;cursor:pointer;font-family:var(--sans);font-weight:800;font-size:11px;letter-spacing:.18em;text-transform:uppercase;color:var(--terra-deep)}
.rl-sum-t::after{content:"";width:28px;height:28px;border-radius:50%;border:1px solid rgba(31,73,90,.28);background:var(--chev) 50% 50%/13px no-repeat;transform:rotate(90deg);transition:transform .35s var(--ease)}
.rl-sum.on .rl-sum-t::after{transform:rotate(-90deg)}
.rl-sum-t:focus-visible{outline:2px solid var(--terra);outline-offset:3px}
.rl-sum ol{list-style:none;margin:0;padding:0}
.rl-sum-l{display:none;padding-top:10px}
.rl-sum.on .rl-sum-l{display:block}
.rl-sum-g{break-inside:avoid;padding-bottom:16px}
.rl-sum-g>a{display:block;font-family:var(--serif);font-weight:600;font-size:18px;line-height:1.25;color:var(--azul-noite);text-decoration:none;padding:5px 0}
.rl-sum-g ol a{display:block;font-family:var(--sans);font-size:14.5px;line-height:1.4;color:var(--ink-soft);text-decoration:none;padding:5px 0}
.rl-sum a:hover{color:var(--terra-deep);text-decoration:underline;text-decoration-thickness:1px;text-underline-offset:4px}

@media (min-width:1100px){
  #dep-descricao.ed{display:grid;grid-template-columns:[m] var(--ed-m) [t] minmax(0,35rem) [r] minmax(0,1fr) [end];column-gap:var(--ed-gap);align-items:start}
  #dep-descricao.ed>*{grid-column:t;min-width:0}
  #dep-descricao.ed>:is(p,h3,h4,.rl-lab):not(.rl-lede):not(.rl-quote){max-width:none!important}

  /* abertura e respiro ocupam margem + texto */
  #dep-descricao.ed>.rl-lede{grid-column:m/r;font-size:clamp(22px,1.9vw,27px);line-height:1.4;max-width:40ch!important}
  #dep-descricao.ed>.rl-quote{grid-column:m/r;font-size:clamp(28px,2.6vw,38px);line-height:1.22;max-width:24ch!important;padding-top:44px;background-size:150px auto}

  /* subdepartamento: título corrente na coluna de margem, na linha do título */
  #dep-descricao.ed>.rl-eye{grid-column:m;display:block;max-width:none;margin-left:0;padding:0;background:none;font-family:var(--sans);font-weight:800;font-size:11px;line-height:1.55;letter-spacing:.18em;color:var(--terra-deep);margin-top:calc(var(--lh)*4 + 2px)!important}
  #dep-descricao.ed>.rl-eye::before{content:"";display:block;width:76px;height:15px;margin:0 0 12px -6px;background:url("assets/gfx/pincel-ceu.webp") left center/100% 100% no-repeat}
  #dep-descricao.ed>.rl-eye+.rl-h3{margin-top:calc(var(--lh)*4)!important}

  /* milagre em números: título na margem, números na coluna de texto */
  #dep-descricao.ed>.rl-milagre{grid-column:m;display:block;font-size:25px;line-height:1.14;padding:0}
  #dep-descricao.ed>.rl-milagre::before{left:-16px;right:-6px;height:150%}
  #dep-descricao.ed>.rl-grid{grid-column:t/end;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 28px;margin-bottom:0}
  #dep-descricao.ed>.rl-milagre+.rl-grid{margin-top:calc(var(--lh)*3 - 14px)!important}
  #dep-descricao.ed .rl-num{font-size:clamp(38px,3.3vw,50px)}

  /* fotos: legenda na margem, imagens a partir da coluna de texto, sangrando à direita */
  #dep-descricao.ed>.fx-car{grid-column:m/end;display:grid;grid-template-columns:var(--ed-m) minmax(0,1fr);column-gap:var(--ed-gap);align-items:start;margin-right:calc(50% - 50vw)!important}
  #dep-descricao.ed>.fx-car .fx-track{grid-column:2;grid-row:1;margin-right:0}
  #dep-descricao.ed>.fx-car figcaption{grid-column:1;grid-row:1;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:14px;margin-top:0;padding-top:12px;border-top:1px solid rgba(31,73,90,.22)}

  /* sumário: rótulo na margem, lista em duas colunas */
  #dep-descricao.ed>.rl-sum{grid-column:m/end;display:grid;grid-template-columns:var(--ed-m) minmax(0,1fr);column-gap:var(--ed-gap);align-items:start;padding-block:var(--lh)}
  .rl-sum-t{pointer-events:none;min-height:0;padding-top:3px}
  .rl-sum-t::after{display:none}
  .rl-sum-l{display:block!important;columns:2;column-gap:var(--ed-gap);padding-top:0}
  .rl-sum-g>a{padding-top:0}
}
@media (prefers-reduced-motion:reduce){.rl-sum-t::after{transition:none}}
