/* ===== Projeto Letramento Digital — estilos públicos ===== */
:root {
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-2: #eef2f8;
    --text: #172033;
    --muted: #556079;
    --line: #dfe4ee;
    --primary: #1f4fd1;
    --primary-ink: #ffffff;
    --focus: #ffb703;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 16px rgba(16, 24, 40, .06);
    --container: 1180px;

    --c-conheca: #1f4fd1;
    --c-acoes: #0a8a5f;
    --c-resultados: #6d3ad6;
    --c-conteudos: #d2530a;
    --c-producao: #b8215a;
    --c-acessibilidade: #0b6f80;
    --c-destaques: #b7791f;
    --cor: var(--primary);
}

html { font-size: 100%; scroll-behavior: smooth; scroll-padding-top: 130px; }
html[data-fonte="1"] { font-size: 112.5%; }
html[data-fonte="2"] { font-size: 125%; }
html[data-fonte="3"] { font-size: 140%; }
html[data-fonte="-1"] { font-size: 90%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Lexend", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.2; margin: 0; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icone { width: 1.15em; height: 1.15em; flex: none; vertical-align: -0.2em; }

.pular {
    position: absolute; left: 12px; top: -60px; z-index: 100;
    background: var(--text); color: #fff; padding: 10px 16px; border-radius: 8px;
}
.pular:focus { top: 12px; }

/* ---------- Barra de acessibilidade ---------- */
.barra-a11y { background: #0f1a33; color: #dfe6f5; font-size: .85rem; }
.barra-a11y__in { display: flex; align-items: center; gap: 6px; justify-content: flex-end; min-height: 40px; flex-wrap: wrap; }
.barra-a11y__rotulo { margin-right: 4px; opacity: .8; }
.barra-a11y button {
    font: inherit; color: inherit; background: transparent; border: 1px solid rgba(255,255,255,.25);
    border-radius: 6px; padding: 2px 10px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center;
}
.barra-a11y button:hover, .barra-a11y button[aria-pressed="true"] { background: rgba(255,255,255,.15); }

/* ---------- Topo ---------- */
.topo {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92); backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
/* Desktop: linha 1 = logo + busca; linha 2 = menu das seções */
.topo__in { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 20px; padding-top: 12px; }
.marca { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; flex: none; white-space: nowrap; }
.marca__selo {
    flex: none;
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--c-conheca), var(--c-acessibilidade)); color: #fff; font-size: .95rem;
}
.marca__nome { font-size: 1.02rem; }
.menu { display: flex; flex-wrap: wrap; gap: 4px; order: 3; width: 100%; margin: 4px -12px 0; }
.menu a {
    color: var(--muted); text-decoration: none; font-size: .92rem; font-weight: 500;
    padding: 10px 12px; border-bottom: 3px solid transparent; white-space: nowrap;
}
.menu a:hover { color: var(--text); border-bottom-color: var(--primary); }
.busca { margin-left: auto; display: flex; align-items: center; background: var(--surface-2); border-radius: 999px; padding: 2px 4px 2px 14px; }
.busca input { border: 0; background: transparent; font: inherit; font-size: .9rem; width: 240px; padding: 8px 0; color: var(--text); }
.busca input:focus { outline: none; }
.busca:focus-within { outline: 3px solid var(--focus); }
.busca button { border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 8px; display: grid; }
.topo__menu { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--surface); border-radius: 10px; padding: 8px; cursor: pointer; color: var(--text); }

@media (max-width: 860px) {
    .topo__in { padding-top: 10px; padding-bottom: 10px; gap: 10px; }
    .topo__menu { display: grid; }
    .menu { display: none; flex-direction: column; margin: 0; }
    .menu.aberto { display: flex; }
    .menu a { padding: 12px; border-bottom: 0; border-radius: 8px; }
    .menu a:hover { background: var(--surface-2); }
    .busca { width: 100%; order: 4; }
    .busca input { width: 100%; }
}

/* ---------- Hero / mapa ---------- */
.hero {
    background:
        radial-gradient(1200px 400px at 90% -10%, rgba(31,79,209,.18), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(11,111,128,.16), transparent 60%),
        var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 56px 0 48px;
}
.hero__sobre { margin: 0 0 8px; color: var(--primary); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; font-size: .8rem; }
.hero h1 { font-size: clamp(2rem, 5vw, 3.2rem); letter-spacing: -.02em; }
.hero__sub { font-size: clamp(1.02rem, 2vw, 1.2rem); color: var(--muted); max-width: 640px; margin: 12px 0 32px; }

.mapa { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.mapa__item {
    display: flex; align-items: center; gap: 14px; padding: 14px 16px;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
    text-decoration: none; color: var(--text); box-shadow: var(--shadow);
    transition: transform .15s, border-color .15s;
}
.mapa__item:hover { transform: translateY(-2px); border-color: var(--cor); }
.mapa__icone { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; background: color-mix(in srgb, var(--cor) 12%, transparent); color: var(--cor); flex: none; }
.mapa__texto { display: flex; flex-direction: column; min-width: 0; }
.mapa__texto small { color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mapa__qtd { margin-left: auto; font-weight: 700; color: var(--cor); font-size: .9rem; }

/* ---------- Seções ---------- */
.secao--conheca { --cor: var(--c-conheca); }
.secao--acoes { --cor: var(--c-acoes); }
.secao--resultados { --cor: var(--c-resultados); }
.secao--conteudos { --cor: var(--c-conteudos); }
.secao--producao { --cor: var(--c-producao); }
.secao--acessibilidade { --cor: var(--c-acessibilidade); }
.secao--destaques { --cor: var(--c-destaques); }

.secao { padding: 56px 0; border-bottom: 1px solid var(--line); }
.secao:nth-of-type(even) { background: var(--surface); }
.secao__topo { display: flex; gap: 16px; align-items: center; margin-bottom: 24px; }
.secao__topo h2, .secao__topo h1 { font-size: clamp(1.5rem, 3vw, 2rem); letter-spacing: -.01em; }
.secao__topo p { margin: 4px 0 0; color: var(--muted); }
.secao__icone {
    display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; flex: none;
    background: var(--cor); color: #fff;
}
.secao__icone .icone { width: 26px; height: 26px; }

.abas { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.aba {
    font: inherit; font-size: .92rem; font-weight: 500; cursor: pointer;
    padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line);
    background: var(--surface); color: var(--muted); display: inline-flex; gap: 8px; align-items: center;
}
.aba:hover { color: var(--text); border-color: var(--cor); }
.aba[aria-selected="true"] { background: var(--cor); border-color: var(--cor); color: #fff; }
.aba__qtd { font-size: .75rem; background: rgba(0,0,0,.08); border-radius: 999px; padding: 0 8px; }
.aba[aria-selected="true"] .aba__qtd { background: rgba(255,255,255,.25); }
.painel:focus-visible { outline-offset: 8px; }

.vazio {
    margin: 0; padding: 32px; text-align: center; color: var(--muted);
    border: 2px dashed var(--line); border-radius: var(--radius); background: var(--bg);
}
.ver-todos {
    display: inline-flex; margin-top: 20px; font-weight: 600; color: var(--cor);
    text-decoration: none; border-bottom: 2px solid currentColor;
}
.trilha { font-size: .88rem; color: var(--muted); margin-bottom: 20px; }
.trilha a { color: var(--muted); }

/* ---------- Cards ---------- */
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
    transition: transform .15s, box-shadow .15s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(16,24,40,.12); }
.card--texto { grid-column: 1 / -1; border-left: 5px solid var(--cor); }
.card__midia { position: relative; aspect-ratio: 16 / 9; background: var(--surface-2); overflow: hidden; }
.card__midia img { width: 100%; height: 100%; object-fit: cover; }
.card__placeholder {
    width: 100%; height: 100%; display: grid; place-items: center; color: var(--cor);
    background: linear-gradient(135deg, color-mix(in srgb, var(--cor) 16%, #fff), color-mix(in srgb, var(--cor) 4%, #fff));
}
.card__placeholder .icone { width: 48px; height: 48px; opacity: .8; }
.card__play {
    position: absolute; inset: 0; margin: auto; width: 56px; height: 56px; border-radius: 50%;
    display: grid; place-items: center; background: rgba(0,0,0,.6); color: #fff; pointer-events: none;
}
.card__corpo { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__meta { margin: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: .78rem; color: var(--muted); }
.selo { background: color-mix(in srgb, var(--cor) 12%, transparent); color: var(--cor); font-weight: 600; padding: 2px 10px; border-radius: 999px; }
.card__titulo { font-size: 1.08rem; font-weight: 600; }
.card__desc {
    margin: 0; color: var(--muted); font-size: .92rem;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.card--texto .card__desc { display: block; -webkit-line-clamp: unset; font-size: 1rem; color: var(--text); }
.card__acoes { display: flex; gap: 8px; margin-top: auto; padding-top: 8px; }

.botao {
    font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; text-decoration: none;
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 9px 16px; border-radius: 10px; border: 1px solid var(--cor);
    background: var(--cor); color: #fff; flex: 1;
}
.botao:hover { filter: brightness(1.1); }
.botao--leve { background: transparent; color: var(--cor); flex: 0 0 auto; }

/* ---------- Equipe ---------- */
.grade-equipe { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 40px 24px; }
.grade-equipe + .grade { margin-top: 40px; }
.pessoa { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; }
.pessoa__foto {
    width: 180px; height: 180px; border-radius: 50%; overflow: hidden; flex: none;
    background: var(--surface-2); display: grid; place-items: center; margin-bottom: 12px;
    box-shadow: 0 6px 20px rgba(16, 24, 40, .12);
}
.pessoa__foto img { width: 100%; height: 100%; object-fit: cover; }
.pessoa__foto span { font-size: 3rem; font-weight: 700; color: var(--cor-nome); opacity: .55; }
.pessoa__foto--p { width: 96px; height: 96px; margin-bottom: 8px; }
.pessoa__foto--p span { font-size: 1.8rem; }
.pessoa__nome { font-size: 1.05rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; color: var(--cor-nome); max-width: 240px; }
.pessoa__cargo { margin: 0; font-size: .85rem; font-weight: 600; color: var(--muted); }
.pessoa__desc { margin: 4px 0 0; font-size: .95rem; color: var(--text); max-width: 250px; line-height: 1.55; }
.pessoa__link { font-size: .85rem; font-weight: 500; display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; }
:root { --cor-nome: #9b1c2e; }
html.alto-contraste { --cor-nome: #ffeb3b; }

/* ---------- Player ---------- */
.player {
    width: min(960px, calc(100vw - 32px)); padding: 0; border: 0; border-radius: var(--radius);
    background: #0b1020; color: #fff; box-shadow: 0 30px 80px rgba(0,0,0,.5);
}
.player::backdrop { background: rgba(6, 10, 20, .75); }
.player__topo { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 20px; }
.player__topo h2 { font-size: 1rem; font-weight: 500; flex: 1; }
.player__fechar { background: rgba(255,255,255,.1); border: 0; color: #fff; border-radius: 10px; padding: 8px; cursor: pointer; display: grid; }
.player__quadro { aspect-ratio: 16 / 9; background: #000; }
.player--audio .player__quadro { aspect-ratio: auto; height: 352px; background: transparent; padding: 0 12px 12px; }
.player__quadro iframe { width: 100%; height: 100%; border: 0; display: block; border-radius: 0 0 var(--radius) var(--radius); }

/* ---------- Rodapé ---------- */
.rodape { background: #0f1a33; color: #c9d3e8; padding: 40px 0; }
.rodape__in { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.rodape strong { color: #fff; }
.rodape p { margin: 4px 0 0; font-size: .9rem; }
.rodape nav { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.rodape nav a { color: #c9d3e8; font-size: .9rem; }

/* ---------- Alto contraste ---------- */
html.alto-contraste {
    --bg: #000; --surface: #000; --surface-2: #111; --text: #fff; --muted: #fff; --line: #fff;
    --primary: #ffeb3b; --focus: #00e5ff; --shadow: none;
    --c-conheca: #ffeb3b; --c-acoes: #ffeb3b; --c-resultados: #ffeb3b; --c-conteudos: #ffeb3b;
    --c-producao: #ffeb3b; --c-acessibilidade: #ffeb3b; --c-destaques: #ffeb3b;
}
html.alto-contraste .topo { background: #000; }
html.alto-contraste .hero { background: #000; }
html.alto-contraste a { color: #ffeb3b; }
html.alto-contraste .botao, html.alto-contraste .aba[aria-selected="true"], html.alto-contraste .secao__icone,
html.alto-contraste .marca__selo { background: #ffeb3b; color: #000; border-color: #ffeb3b; }
html.alto-contraste .botao--leve { background: #000; color: #ffeb3b; }
html.alto-contraste .card__placeholder, html.alto-contraste .mapa__icone, html.alto-contraste .selo { background: #000; color: #ffeb3b; border: 1px solid #ffeb3b; }
html.alto-contraste .card:hover { box-shadow: none; }
html.alto-contraste img { filter: grayscale(1) contrast(1.2); }
