/* Reaja — design system v5
   Paleta principal inalterada: vermelho #a9232d · laranja #bd4b10 · amarelo #f2bf3d.
   Mudança: fundos neutros claros (branco / cinza claro) para contraste e leitura, blocos com borda definida.
   Fontes carregadas por <link> no HTML (sem @import bloqueante). */

:root {
  color-scheme: light;
  --bg: #f4f3f1;
  --surface: #ffffff;
  --surface-2: #faf9f7;
  --ink: #201513;
  --muted: #4f403c;
  --line: #d9d3cc;
  --brand: #a9232d;
  --brand-contrast: #ffffff;
  --red: #a9232d;
  --orange: #bd4b10;
  --yellow: #795900;
  --yellow-fill: #f2bf3d;
  --band: #bd4b10;
  --dark: #2a1816;
  --dark-ink: #fffaf2;
  --tint: #fdeee3;
  --notice-bg: #fff3e8;
  --callout-bg: #fdecec;
  --focus: #bd4b10;
  --shadow: 0 1px 2px #20151310, 0 8px 24px #20151308;
  --shadow-lg: 0 2px 4px #20151312, 0 16px 40px #2015131a;
  --radius: 18px;
  --font-body: 'Clash Grotesk', system-ui, sans-serif;
  --font-heading: 'Clash Grotesk', system-ui, sans-serif;
  --font-ui: 'Clash Grotesk', system-ui, sans-serif;
  --font-display: 'Tanker', 'Clash Grotesk', sans-serif;
  --cat-hydric: var(--orange);
  --cat-geologic: var(--red);
  --cat-weather: var(--yellow);
  --cat-climate: var(--orange);
  --cat-technological: var(--red);
  font-family: var(--font-body);
  font-size: 18px;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --bg: #181010;
  --surface: #261a18;
  --surface-2: #2d201d;
  --ink: #fff3e5;
  --muted: #e2cdbb;
  --line: #5a423a;
  --brand: #ff7773;
  --brand-contrast: #241715;
  --red: #ff7773;
  --orange: #ff9a61;
  --yellow: #ffdc70;
  --dark: #0f0908;
  --tint: #3a2519;
  --notice-bg: #3a2519;
  --callout-bg: #43211f;
  --focus: #ffbd78;
  --shadow: 0 1px 2px #0006, 0 8px 24px #0004;
  --shadow-lg: 0 2px 4px #0008, 0 16px 40px #0006;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; } /* garante que `hidden` nunca seja sobrescrito por display:* */
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
a { color: var(--brand); text-underline-offset: 3px; }
button, input, select { font: inherit; }
button, a, select { min-height: 44px; }
button { cursor: pointer; }
img { max-width: 100%; }
h1, h2, h3 { margin: 0; }
h1 { font-family: 'Archivo Black', var(--font-heading), sans-serif; font-weight: 400; letter-spacing: -.04em; line-height: 1.04; }
h2 { font-family: var(--font-heading); font-weight: 700; letter-spacing: -.03em; line-height: 1.15; }
h3, .nav, .control, .btn, .chip { font-family: var(--font-ui); }
.skip { position: absolute; left: -9999px; top: 0; z-index: 99; padding: 1rem; background: var(--surface); }
.skip:focus { left: 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }
.shell { max-width: 1160px; margin: auto; padding: 0 24px; }
.icon { width: 1.25em; height: 1.25em; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ── Cabeçalho ─────────────────────────────────────────── */
.header { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.headrow { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.logo { display: block; margin-right: auto; }
.logo img { display: block; width: 168px; height: auto; }
html[data-theme='dark'] .logo { padding: 6px 12px; background: #fff8ed; border-radius: 12px; }
.nav { display: flex; align-items: center; gap: 6px; }
.nav a { display: inline-flex; align-items: center; padding: 0 14px; color: var(--ink); font-weight: 600; text-decoration: none; border-radius: 999px; }
.nav a:hover { background: var(--tint); }
.nav a[aria-current='page'] { color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); border-radius: 0; }
.controls { display: flex; align-items: center; gap: 8px; }
.control { min-height: 44px; padding: 8px 12px; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; }
html[data-theme='dark'] option { background: var(--surface); color: var(--ink); }

/* ── Botões ────────────────────────────────────────────── */
.btn { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 10px; padding: 12px 26px; color: var(--brand-contrast); background: var(--brand); border: 2px solid var(--brand); border-radius: 999px; font-weight: 700; text-decoration: none; transition: transform .15s ease, box-shadow .15s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.btn-sm { min-height: 44px; padding: 8px 18px; font-size: .92rem; }
.btn-dark { color: var(--dark-ink); background: var(--dark); border-color: var(--dark); }
html[data-theme='dark'] .btn-dark { color: var(--ink); background: transparent; border-color: var(--line); }
.btn-ghost { color: var(--ink); background: var(--surface); border-color: var(--line); }
.btn-yellow { color: #2a1816; background: var(--yellow-fill); border-color: var(--yellow-fill); }

/* ── Início: hero ──────────────────────────────────────── */
.hero { background: var(--surface); border-bottom: 1px solid var(--line); }
.herogrid { display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px; padding-top: 64px; padding-bottom: 64px; }
.eyebrow { margin: 0 0 14px; color: var(--orange); font: 1rem var(--font-display); letter-spacing: .09em; text-transform: uppercase; }
.hero h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); }
.hero h1 em, .dhero h1 em { color: var(--orange); font-style: normal; }
.lead { max-width: 56ch; margin: 18px 0 0; color: var(--muted); font: 1.2rem/1.55 'Chillax', var(--font-body), sans-serif; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 28px 0 0; }
.hero-art { position: relative; padding: 0 0 30px; }
.mosaic { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.mosaic-img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); }
.mosaic-img:nth-child(even) { transform: translateY(26px); }
.badge { position: absolute; left: -18px; bottom: 6px; display: grid; width: 104px; height: 104px; place-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 50%; box-shadow: var(--shadow-lg); }
.badge img { width: 54px; height: auto; }

/* faixa de números (laranja) */
.stats { color: #fff; background: var(--band); }
.statsgrid { display: grid; grid-template-columns: repeat(3, 1fr); }
.statsgrid > div { display: flex; flex-direction: column; gap: 4px; padding: 30px 24px; border-left: 1px solid #ffffff40; }
.statsgrid > div:first-child { padding-left: 0; border-left: 0; }
.statsgrid strong { font: 400 clamp(2rem, 4.5vw, 3rem)/1 'Archivo Black', var(--font-heading), sans-serif; letter-spacing: -.03em; }
.statsgrid span { font-size: .95rem; font-weight: 500; }

/* ── Seções ────────────────────────────────────────────── */
.section { padding: 72px 0; }
.section.alt { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.sechead { max-width: 720px; margin-bottom: 32px; }
.sechead h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
.sechead p:not(.eyebrow) { margin: 10px 0 0; color: var(--muted); }

/* busca + filtros */
.finder { display: grid; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.searchbox { position: relative; display: flex; align-items: center; }
.searchbox > .icon { position: absolute; left: 18px; width: 22px; height: 22px; color: var(--orange); pointer-events: none; }
.search { width: 100%; min-height: 58px; padding: 12px 52px; color: var(--ink); background: var(--surface-2); border: 2px solid var(--line); border-radius: 999px; font-size: 1.05rem; }
.search:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 4px #bd4b1026; }
.search::-webkit-search-cancel-button { display: none; }
.clearbtn { position: absolute; right: 8px; display: grid; width: 44px; height: 44px; place-items: center; color: var(--ink); background: var(--tint); border: 0; border-radius: 50%; font-size: 1.5rem; line-height: 1; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip { display: inline-flex; min-height: 44px; align-items: center; gap: 8px; padding: 8px 18px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; font-weight: 600; transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--orange); }
.chip[aria-pressed='true'] { color: var(--brand-contrast); background: var(--brand); border-color: var(--brand); }
.chip-n { display: inline-grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; color: var(--ink); background: var(--tint); border-radius: 999px; font-size: .78rem; }
.chip[aria-pressed='true'] .chip-n { color: var(--ink); background: #fff; }
.count { margin: 20px 0 14px; color: var(--muted); font-size: .92rem; font-weight: 600; }
.empty { padding: 48px 24px; text-align: center; background: var(--surface); border: 2px dashed var(--line); border-radius: var(--radius); }
.empty h3 { margin-bottom: 6px; font-size: 1.25rem; }
.empty p { margin: 0 0 18px; color: var(--muted); }

/* cards */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card { display: flex; flex-direction: column; overflow: hidden; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.card:hover { transform: translateY(-4px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.cardart { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--tint); }
.illus { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.card:hover .illus { transform: scale(1.04); }
.cardbody { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; border-top: 4px solid var(--accent); }
.card h3 { font-size: 1.2rem; line-height: 1.25; }
.card p { margin: 0; color: var(--muted); font-size: .9rem; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--brand); font: 700 .95rem var(--font-ui); }
.card:hover .more .icon { transform: translateX(4px); }
.more .icon { transition: transform .18s ease; }
.pill { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; color: var(--accent); background: var(--tint); border-radius: 999px; font: .95rem var(--font-display); letter-spacing: .04em; text-transform: uppercase; }
.pill-lg { display: flex; width: max-content; margin: 22px 0 14px; padding: 6px 14px; }

/* preparar-se */
.prepgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.prep { padding: 32px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.prepicon { display: grid; flex: none; width: 56px; height: 56px; margin-bottom: 18px; place-items: center; color: #fff; background: var(--orange); border-radius: 16px; }
.prepicon .icon { width: 28px; height: 28px; }
.prep h3 { margin-bottom: 8px; font-size: 1.3rem; }
.prep p { margin: 0; color: var(--muted); }

/* faixa de chamada (CTA) */
.cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; padding: 44px 48px; color: #fff; background: var(--band); border-radius: 28px; box-shadow: var(--shadow-lg); }
.cta h2 { font-size: clamp(1.6rem, 3.5vw, 2.3rem); }
.cta p { margin: 8px 0 0; max-width: 46ch; }

/* ── Página de desastre ────────────────────────────────── */
.dhero { background: var(--surface); border-bottom: 1px solid var(--line); }
.dgrid { display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 48px; padding-top: 40px; padding-bottom: 56px; }
.dhero:not(:has(.dgrid)) .shell { padding-top: 40px; padding-bottom: 48px; }
.crumb { display: flex; width: max-content; align-items: center; color: var(--muted); font-weight: 600; text-decoration: none; }
.crumb:hover { color: var(--brand); }
.dhero h1 { font-size: clamp(2.2rem, 5vw, 3.8rem); }
.dhero .lead { margin-top: 16px; }
.srcline { margin: 18px 0 0; color: var(--muted); font-size: .92rem; }
.detail-illus { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: 28px; box-shadow: var(--shadow-lg); }

/* orientações (antes / durante / depois) */
.jump { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.jump a { display: inline-flex; align-items: center; padding: 6px 18px; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 999px; font: 600 .95rem var(--font-ui); text-decoration: none; }
.jump a:hover { border-color: var(--orange); color: var(--brand); }
.phasegrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: start; gap: 20px; }
.phase { overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-top: 6px solid var(--ph); border-radius: var(--radius); box-shadow: var(--shadow); }
.phase-before { --ph: var(--yellow-fill); }
.phase-during { --ph: var(--red); }
.phase-after { --ph: var(--orange); }
.phase summary { display: flex; align-items: center; gap: 12px; padding: 18px 20px; cursor: pointer; list-style: none; }
.phase summary::-webkit-details-marker { display: none; }
.phase summary h3 { flex: 1; font-size: 1.35rem; }
.phase-n { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--ph); border-radius: 50%; font: 700 1rem var(--font-ui); }
.phase-before .phase-n { color: #2a1816; }
.phase-count { padding: 2px 10px; color: var(--muted); background: var(--tint); border-radius: 999px; font-size: .8rem; font-weight: 700; }
.chev { transition: transform .2s ease; }
.phase[open] .chev { transform: rotate(180deg); }
.phase-body { padding: 0 20px 22px; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding: 12px 0 12px 40px; border-top: 1px solid var(--line); counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 12px; display: grid; width: 26px; height: 26px; place-items: center; color: var(--brand); background: var(--tint); border-radius: 50%; font: 700 .8rem var(--font-ui); }
.blocks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.block { padding: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.block h3 { margin-bottom: 8px; font-size: 1.2rem; }
.fallback { display: flex; flex-wrap: wrap; align-items: center; gap: 24px; padding: 32px; background: var(--surface); border: 1px solid var(--line); border-left: 8px solid var(--orange); border-radius: var(--radius); box-shadow: var(--shadow); }
.fallback .prepicon { margin: 0; }
.fallback > div { flex: 1 1 320px; }
.fallback h2 { font-size: 1.5rem; }
.fallback p { margin: 6px 0 0; color: var(--muted); }

.callout { margin: 0 0 20px; padding: 24px 28px; background: var(--callout-bg); border: 1px solid var(--red); border-left: 8px solid var(--red); border-radius: var(--radius); }
.callout h2 { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; color: var(--red); font-size: 1.35rem; }
.callout p { margin: 0; }
.callout .steps li { border-top-color: #a9232d33; }
.notice { margin: 0 0 40px; padding: 16px 20px; background: var(--notice-bg); border-left: 5px solid var(--orange); border-radius: 12px; }
.relhead { margin-bottom: 20px; font-size: 1.7rem; }

.prose { max-width: 800px; }
.prose h2 { margin: 32px 0 10px; font-size: 1.6rem; }
.prose h1 { margin-bottom: 20px; }
.prose p { color: var(--muted); }
.calls { display: flex; flex-wrap: wrap; gap: 10px; }

/* ── Rodapé e barra de emergência ──────────────────────── */
.footer { margin-top: 0; padding: 56px 0 110px; color: #e6d6c8; background: var(--dark); font-size: .92rem; }
.footgrid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; }
.footlogo { display: inline-block; margin-bottom: 14px; padding: 8px 14px; background: #fff8ed; border-radius: 12px; }
.footlogo img { display: block; width: 150px; height: auto; }
.footer h2 { margin-bottom: 12px; color: #fff; font: 700 1rem var(--font-ui); letter-spacing: 0; }
.footer ul { margin: 0; padding: 0; list-style: none; }
.footer li { padding: 3px 0; }
.footer a { display: inline-flex; align-items: center; min-height: 32px; color: #ffd7a8; }
.footer p { margin: 6px 0; }
.footbase { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; margin-top: 36px; padding-top: 20px; border-top: 1px solid #ffffff22; color: #cdb9a8; font-size: .85rem; }
.footbase p { margin: 0; }
.emergency { position: sticky; bottom: 0; z-index: 9; padding: 8px 0; color: var(--dark-ink); background: #391b1b; border-top: 4px solid var(--yellow-fill); }
.emrow { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 18px; }
.emrow strong { margin-right: auto; font-family: var(--font-ui); }
.emrow a { display: inline-flex; align-items: center; padding: 6px; color: var(--dark-ink); font-weight: 700; text-decoration: none; }
.emrow a:hover { text-decoration: underline; }
.sms { color: var(--yellow-fill) !important; }

/* ── Responsivo ────────────────────────────────────────── */
@media (max-width: 960px) {
  .herogrid, .dgrid { grid-template-columns: 1fr; gap: 36px; }
  .hero-art { max-width: 520px; }
  .badge { left: auto; right: 6px; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .phasegrid { grid-template-columns: 1fr; }
  .footgrid { grid-template-columns: 1fr 1fr; }
  .footbrand { grid-column: 1 / -1; }
  .dgrid .detail-illus { max-width: 520px; }
}
@media (max-width: 720px) {
  .headrow { flex-wrap: wrap; gap: 4px 12px; padding-top: 10px; padding-bottom: 10px; min-height: 0; }
  .nav { order: 3; width: 100%; margin: 0 -14px; }
  .hide-sm { display: none; }
  .shell { padding-right: 18px; padding-left: 18px; }
  .herogrid { padding-top: 40px; padding-bottom: 40px; }
  .section { padding: 52px 0; }
  .statsgrid > div { padding: 22px 12px; }
  .statsgrid span { font-size: .8rem; }
  .prepgrid, .blocks { grid-template-columns: 1fr; }
  .cta { padding: 32px 24px; }
  .footer { padding-bottom: 110px; }
  .emrow strong { display: none; }
  .emrow { justify-content: space-between; gap: 0 10px; }
  .emrow a { min-height: 38px; padding: 4px 2px; font-size: .84rem; }
}
@media (max-width: 520px) {
  .grid { grid-template-columns: 1fr; }
  .footgrid { grid-template-columns: 1fr; }
  .mosaic-img:nth-child(even) { transform: none; }
  .actions .btn { flex: 1 1 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ── Impressão ─────────────────────────────────────────── */
@media print {
  .header, .emergency, .actions, .jump, .footer, .cta, .finder, .hero-art, .detail-illus, .chev { display: none !important; }
  body { color: #111; background: #fff; font-size: 12pt; }
  .shell { max-width: none; padding: 0; }
  .section, .dhero { padding: 12pt 0; background: #fff; border: 0; }
  .phasegrid { grid-template-columns: 1fr; }
  .phase, .block, .callout, .card { break-inside: avoid; color: #111; background: #fff; box-shadow: none; }
  a { color: #111; text-decoration: none; }
}
