/* =========================================================================
   HIDRO: Redução de Riscos | site institucional
   Identidade do jogo (azul-marinho, dourado, pixel-art) com leitura de site.
   Fonte: Poppins (SIL Open Font License). Sem dependências externas.
   ========================================================================= */
@font-face { font-family: "Poppins"; font-weight: 400; font-style: normal; font-display: swap; src: url("../fonts/Poppins-Regular.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-style: normal; font-display: swap; src: url("../fonts/Poppins-Medium.ttf") format("truetype"); }
@font-face { font-family: "Poppins"; font-weight: 700; font-style: normal; font-display: swap; src: url("../fonts/Poppins-Bold.ttf") format("truetype"); }

:root {
  --navy: #0F1B2E; --navy2: #1B2C4A; --navy3: #24385C;
  --sky: #2A9FD6; --skyDark: #1B78A8; --cyan: #42C2F5; --skyLight: #BFE3F6;
  --gold: #F5C451; --goldDark: #B98B1C; --coral: #E5533D; --green: #2FA36B; --orange: #E57A2E;
  --f1: #D9A21B; --f2: #E57A2E; --f3: #2FA36B; --f4: #D64545;
  --ice: #F3F8FC; --white: #fff; --ink: #14213D; --muted: #4A5A73; --line: #D5E0EB; --pale: #E9F2FA;
  --radius: 14px; --max: 1180px; --shadow: 0 6px 22px rgba(15,27,46,.10);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; color: var(--ink); background: var(--ice); line-height: 1.7; font-size: 16.5px; }
img { max-width: 100%; height: auto; }
.pix { image-rendering: pixelated; image-rendering: crisp-edges; }
a { color: var(--skyDark); text-underline-offset: 3px; }
a:hover { color: var(--navy); }
h1, h2, h3, h4 { font-family: "Poppins", system-ui, sans-serif; line-height: 1.25; color: var(--navy); margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 4.6vw, 3.3rem); font-weight: 700; }
h2 { font-size: clamp(1.55rem, 3vw, 2.15rem); font-weight: 700; }
h3 { font-size: 1.22rem; font-weight: 700; }
h4 { font-size: 1.05rem; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--gold); color: var(--navy); padding: 10px 16px; z-index: 200; font-weight: 700; border-radius: 6px; }
.skip-link:focus { left: 12px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- barra institucional ---------- */
.inst-bar { background: #fff; border-bottom: 1px solid var(--line); }
.inst-bar .wrap { display: flex; align-items: center; gap: 26px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.inst-bar .inst-label { font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; margin-right: auto; max-width: 260px; line-height: 1.3; }
.inst-bar a { display: inline-flex; }
.inst-bar img { height: 42px; width: auto; display: block; }

/* ---------- cabeçalho ---------- */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 3px 0 var(--gold); }
.site-header .wrap { display: flex; align-items: center; gap: 18px; padding-top: 10px; padding-bottom: 10px; }
.brand { display: inline-flex; align-items: center; }
.brand img { height: 46px; width: auto; display: block; }
.nav-toggle { display: none; margin-left: auto; background: var(--navy2); color: #fff; border: 2px solid var(--gold); border-radius: 8px; padding: 8px 14px; font: 700 .9rem Poppins, sans-serif; cursor: pointer; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav a { color: #DCE8F5; text-decoration: none; font-weight: 500; font-size: .93rem; padding: 8px 11px; border-radius: 8px; border-bottom: 3px solid transparent; }
.nav a:hover { color: #fff; background: var(--navy2); }
.nav a[aria-current="page"] { color: var(--gold); border-bottom-color: var(--gold); }
.nav .btn-play { background: var(--gold); color: var(--navy); font-weight: 700; margin-left: 8px; border-radius: 6px; box-shadow: 0 3px 0 var(--goldDark); border-bottom: 0; padding: 8px 16px; }
.nav .btn-play:hover { background: #ffd473; color: var(--navy); }

/* ---------- botões pixel ---------- */
.px-btn { display: inline-flex; align-items: center; gap: 8px; padding: .8rem 1.35rem; font: 700 1rem Poppins, sans-serif; background: var(--gold); color: var(--navy); text-decoration: none; border: 0; border-radius: 6px; box-shadow: 0 5px 0 var(--goldDark); transition: transform .08s, box-shadow .08s; cursor: pointer; }
.px-btn:hover { transform: translateY(2px); box-shadow: 0 3px 0 var(--goldDark); color: var(--navy); }
.px-btn:active { transform: translateY(5px); box-shadow: 0 0 0 var(--goldDark); }
.px-btn.ghost { background: transparent; color: #fff; box-shadow: inset 0 0 0 3px var(--skyLight), 0 5px 0 rgba(191,227,246,.35); }
.px-btn.ghost:hover { background: rgba(191,227,246,.12); color: #fff; }
.px-btn.sky { background: var(--sky); color: #fff; box-shadow: 0 5px 0 #17678f; }
.px-btn.sky:hover { color: #fff; box-shadow: 0 3px 0 #17678f; }
.px-btn.small { padding: .55rem 1rem; font-size: .9rem; box-shadow: 0 4px 0 var(--goldDark); }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.4rem; }

/* ---------- herói ---------- */
.hero { background: var(--navy); color: #fff; position: relative; overflow: hidden; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; opacity: .5; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.15fr .85fr; gap: 34px; align-items: center; padding-top: 58px; padding-bottom: 42px; }
.hero .kicker { display: inline-block; background: var(--gold); color: var(--navy); font-weight: 700; font-size: .78rem; letter-spacing: .07em; text-transform: uppercase; padding: 6px 14px; border-radius: 6px; margin-bottom: 18px; }
.hero h1 { color: #fff; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero .lead { font-size: 1.12rem; color: var(--skyLight); max-width: 34em; }
.hero-art { position: relative; text-align: center; }
.hero-art .scene { width: 100%; height: auto; border-radius: 26px; box-shadow: 0 0 0 4px var(--navy3), 0 0 70px rgba(66,194,245,.20), 0 18px 44px rgba(0,0,0,.5); display: block; }
.hero-art .mascot { position: absolute; left: 50%; bottom: -14px; width: 132px; transform: translateX(-50%); animation: bob 1.8s ease-in-out infinite; filter: drop-shadow(0 8px 0 rgba(0,0,0,.25)); }
@keyframes bob { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(-8px); } }
.hero .ground { height: 40px; background: url("../img/tile_sidewalk.png") repeat-x; background-size: 40px 40px; image-rendering: pixelated; position: relative; border-top: 4px solid var(--goldDark); }
.badges { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 1.6rem; padding: 0; list-style: none; }
.badges li { margin: 0; background: rgba(255,255,255,.1); border: 1px solid rgba(191,227,246,.35); color: #fff; border-radius: 999px; padding: 6px 14px; font-size: .84rem; font-weight: 500; }

/* páginas internas */
.page-hero { background: var(--navy); color: #fff; position: relative; }
.page-hero .wrap { padding-top: 42px; padding-bottom: 38px; }
.page-hero h1 { color: #fff; font-size: clamp(1.8rem, 3.8vw, 2.8rem); margin-bottom: .35em; }
.page-hero p { color: var(--skyLight); max-width: 46em; font-size: 1.08rem; margin: 0; }
.page-hero .kicker { display: inline-block; background: var(--gold); color: var(--navy); font-weight: 700; font-size: .75rem; letter-spacing: .07em; text-transform: uppercase; padding: 5px 12px; border-radius: 6px; margin-bottom: 14px; }
.tile-strip { height: 24px; background: url("../img/tile_grass1.png") repeat-x; background-size: 48px 48px; background-position: 0 -12px; image-rendering: pixelated; border-top: 4px solid var(--goldDark); }
.breadcrumb { font-size: .84rem; color: var(--skyLight); margin-bottom: 14px; }
.breadcrumb a { color: var(--skyLight); }

/* ---------- seções ---------- */
.section { padding: 62px 0; }
.section.alt { background: #fff; }
.section.dark { background: var(--navy); color: #E4EEF8; }
.section.dark h2, .section.dark h3 { color: #fff; }
.section-head { max-width: 46em; margin-bottom: 34px; }
.section-head p { color: var(--muted); font-size: 1.06rem; }
.section.dark .section-head p { color: var(--skyLight); }
.eyebrow { display: inline-block; font-weight: 700; font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--skyDark); margin-bottom: 8px; }
.section.dark .eyebrow { color: var(--gold); }

.grid { display: grid; gap: 22px; }
.grid.c2 { grid-template-columns: repeat(2, 1fr); }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); padding: 24px; position: relative; }
.section.alt .card { background: var(--ice); box-shadow: none; }
.section.dark .card { background: var(--navy2); border-color: var(--navy3); box-shadow: none; color: #E4EEF8; }
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }
a.card { text-decoration: none; color: inherit; display: block; transition: transform .12s, box-shadow .12s; }
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(15,27,46,.16); color: inherit; }
.card .ico { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; margin-bottom: 14px; }
.card .ico img { width: 28px; height: 28px; }
.phase-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.phase-card img.thumb { width: 100%; display: block; border-bottom: 4px solid var(--phase, var(--gold)); }
.phase-card .body { padding: 20px 22px 24px; }
.phase-card .tag { display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .06em; color: #fff; background: var(--phase, var(--gold)); padding: 4px 10px; border-radius: 6px; margin-bottom: 10px; text-transform: uppercase; }
.pill { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 11px; border-radius: 999px; background: var(--pale); color: var(--skyDark); margin: 0 6px 6px 0; }
.pill.gold { background: #FFF1CC; color: #7a5a06; }
.pill.green { background: #DDF3E8; color: #1c6d47; }
.pill.coral { background: #FBE1DC; color: #a02f1f; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.split.top { align-items: start; }
.split img.shot { width: 100%; border-radius: 16px; box-shadow: 0 0 0 4px var(--navy3), 0 14px 34px rgba(15,27,46,.25); }
.steps { counter-reset: st; list-style: none; padding: 0; display: grid; gap: 18px; }
.steps li { counter-increment: st; position: relative; padding: 4px 0 4px 64px; margin: 0; }
.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 46px; height: 46px; border-radius: 10px; background: var(--gold); color: var(--navy); font-weight: 700; display: grid; place-items: center; font-size: 1.2rem; box-shadow: 0 4px 0 var(--goldDark); }
.steps strong { display: block; color: var(--navy); }
.section.dark .steps strong { color: #fff; }

.callout { border-left: 6px solid var(--gold); background: #fff; padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; box-shadow: var(--shadow); margin: 1.2em 0; }
.callout.warn { border-left-color: var(--coral); }
.callout.ok { border-left-color: var(--green); }
.callout.info { border-left-color: var(--sky); }
.callout strong.t { display: block; color: var(--navy); margin-bottom: 4px; }
.callout p:last-child, .callout ul:last-child { margin-bottom: 0; }
.section.dark .callout { background: var(--navy2); color: #E4EEF8; }
.section.dark .callout strong.t { color: #fff; }

/* tabelas */
.table-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow); margin: 1.2em 0; }
table { border-collapse: collapse; width: 100%; font-size: .94rem; }
th { background: var(--navy); color: #fff; text-align: left; padding: 12px 14px; font-weight: 700; }
td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: top; }
tbody tr:nth-child(even) td { background: #F7FAFD; }
td.first { font-weight: 700; color: var(--navy); }
th.first { font-weight: 700; color: #fff; }
caption { text-align: left; padding: 10px 14px; font-weight: 700; color: var(--navy); }

/* acordeão */
details.acc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); margin-bottom: 14px; overflow: hidden; }
details.acc > summary { list-style: none; cursor: pointer; padding: 18px 22px; display: flex; gap: 16px; align-items: center; font-weight: 700; color: var(--navy); }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .num { flex: none; width: 42px; height: 42px; border-radius: 10px; background: var(--gold); display: grid; place-items: center; box-shadow: 0 3px 0 var(--goldDark); font-size: 1.1rem; }
details.acc > summary .ttl { flex: 1; font-size: 1.08rem; line-height: 1.3; }
details.acc > summary .meta { font-weight: 500; font-size: .82rem; color: var(--muted); display: block; margin-top: 2px; }
details.acc > summary::after { content: "+"; font-size: 1.6rem; color: var(--skyDark); flex: none; }
details.acc[open] > summary::after { content: "−"; }
details.acc[open] > summary { border-bottom: 1px solid var(--line); background: var(--pale); }
details.acc .inner { padding: 22px 24px 26px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 1em 0; }
.two-col > div { background: var(--ice); border-radius: 12px; padding: 14px 18px; border: 1px solid var(--line); }
.two-col h4 { margin-bottom: .3em; font-size: .95rem; color: var(--skyDark); }
.two-col p { font-size: .93rem; margin: 0; }

/* filtros */
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 26px; }
.chip { font: 700 .88rem Poppins, sans-serif; border: 2px solid var(--navy); background: #fff; color: var(--navy); padding: 8px 16px; border-radius: 999px; cursor: pointer; }
.chip:hover { background: var(--pale); }
.chip[aria-pressed="true"] { background: var(--navy); color: #fff; }

/* downloads */
.dl-card { display: flex; flex-direction: column; gap: 10px; }
.btns { display: flex; flex-wrap: wrap; gap: 10px; }
.dl-card .btns { margin-top: auto; padding-top: 10px; }
details.acc, h2[id], section[id] { scroll-margin-top: 92px; }
.dl-btn { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-weight: 700; font-size: .88rem; padding: 8px 14px; border-radius: 8px; border: 2px solid var(--navy); color: var(--navy); background: #fff; }
.dl-btn:hover { background: var(--navy); color: #fff; }
.dl-btn.primary { background: var(--navy); color: #fff; }
.dl-btn.primary:hover { background: var(--navy3); }
.dl-btn small { font-weight: 500; opacity: .75; }

/* dados/lista */
.kv { display: grid; grid-template-columns: 200px 1fr; gap: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; margin: 1em 0; }
.kv dt { background: var(--pale); font-weight: 700; color: var(--navy); padding: 12px 16px; border-top: 1px solid var(--line); }
.kv dd { margin: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.kv dt:first-of-type, .kv dd:first-of-type { border-top: 0; }
.keys { display: inline-block; background: var(--navy); color: #fff; font-weight: 700; font-size: .82rem; padding: 2px 9px; border-radius: 6px; box-shadow: 0 2px 0 #000; margin: 0 2px; }
.sprite-row { display: flex; gap: 6px; align-items: flex-end; flex-wrap: wrap; }
.sprite-row img { width: 64px; height: 64px; image-rendering: pixelated; }
.cite { background: var(--navy); color: #E4EEF8; border-radius: var(--radius); padding: 20px 24px; font-size: .95rem; position: relative; }
.cite button { margin-top: 10px; }

/* ---------- rodapé ---------- */
.site-footer { background: var(--navy); color: #C9D8EA; margin-top: 0; border-top: 6px solid var(--gold); }
.site-footer .wrap { padding-top: 44px; padding-bottom: 26px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; }
.site-footer h4 { color: #fff; font-size: .9rem; letter-spacing: .07em; text-transform: uppercase; }
.site-footer a { color: #DCE8F5; text-decoration: none; }
.site-footer a:hover { color: var(--gold); text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; font-size: .94rem; }
.logos-plate { background: #fff; border-radius: 12px; padding: 12px 16px; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; margin-top: 16px; }
.logos-plate img { height: 46px; width: auto; display: block; }
.legal { border-top: 1px solid var(--navy3); margin-top: 28px; padding-top: 18px; font-size: .84rem; color: #9FB4CD; }

/* impressão */
.print-only { display: none; }
@media print {
  .inst-bar, .site-header, .site-footer, .btn-row, .no-print, .hero canvas, .tile-strip, .filters, .nav-toggle { display: none !important; }
  body { background: #fff; font-size: 11pt; }
  .page-hero { background: #fff; color: #000; } .page-hero h1, .page-hero p { color: #000; }
  .section { padding: 14px 0; } .card, .callout, details.acc, .table-wrap { box-shadow: none; }
  details.acc { break-inside: avoid; } details.acc > summary::after { content: ""; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block; }
}

/* ---------- responsivo ---------- */
@media (max-width: 980px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 38px; }
  .hero-art { max-width: 520px; margin: 0 auto; }
  .grid.c4 { grid-template-columns: repeat(2, 1fr); }
  .grid.c3 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; gap: 26px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 840px) {
  .nav-toggle { display: inline-block; }
  .nav { display: none; flex-direction: column; align-items: stretch; width: 100%; margin: 6px 0 0; }
  .site-header .wrap { flex-wrap: wrap; }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; border-bottom: 0; border-left: 4px solid transparent; }
  .nav a[aria-current="page"] { border-left-color: var(--gold); }
  .nav .btn-play { margin: 8px 0 4px; text-align: center; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .section { padding: 44px 0; }
  .grid.c2, .grid.c3, .grid.c4, .two-col, .footer-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; }
  .kv dt { border-top: 1px solid var(--line); }
  .inst-bar img { height: 34px; }
  .inst-bar .inst-label { max-width: none; width: 100%; }
  .hero .wrap { padding-bottom: 30px; }
  .px-btn { width: 100%; justify-content: center; }
  details.acc > summary { padding: 14px 16px; }
  details.acc .inner { padding: 18px 16px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art .mascot { animation: none; }
  .px-btn, a.card { transition: none; }
}
