/* =========================================================
   TOKENS E BASE
   ========================================================= */
:root {
  color-scheme: light; /* força tema claro */
  --max-w: 1200px;
  --pad-x: 16px;
  --radius: 14px;

  --header-h: 72px;
  --logo-h: 60px;
  --gap: 14px;

  --bg: #ffffff;
  --bd: #e5e7eb;
  --fg: #0f172a;
  --fg-dim: #334155;

  --btn-red: #dc2626;
  --btn-red-hover: #b91c1c;

  --btn-green: #22c55e; /* corrigido: green */
  --btn-green-hover: #16a34a;

  --focus: #93c5fd;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  font: 500 16px/1.45 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto,
    Ubuntu, Cantarell, 'Helvetica Neue', Arial;
  color: var(--fg);
  background: #ffffff !important;
}
img {
  display: block;
  max-width: 100%;
  height: auto;
  text-align: center;
  justify-content: center;
  align-items: center;
}
a {
  color: inherit;
  text-decoration: none;
}
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* Skip link (acessibilidade) */
.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  left: 16px;
  top: 16px;
  width: auto;
  height: auto;
  padding: 10px 12px;
  background: #fff;
  border: 2px solid var(--fg);
  border-radius: 8px;
  z-index: 9999;
}

/* =========================================================
   HEADER
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--bd);
}
.header-inner {
  height: var(--header-h);
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: var(--pad-x);
  display: grid;
  grid-template-columns: 1fr auto; /* marca | meta */
  align-items: center;
  gap: var(--gap);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--gap);
  min-width: 0;
}
.logo {
  height: var(--logo-h);
  width: auto;
  object-fit: contain;
}
.divider {
  width: 1px;
  height: calc(var(--logo-h) * 0.9);
  background: var(--bd);
}
.doc-meta {
  justify-self: end;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 12px;
  border: 1px solid var(--bd);
  background: #f8fafc;
  border-radius: var(--radius);
  font-size: 14px;
}
.doc-meta b {
  font-weight: 700;
}
.doc-meta .sep {
  opacity: 0.5;
}

/* Mobile: header empilha, logos centralizadas */
@media (max-width: 720px) {
  :root {
    --header-h: auto;
  }
  .header-inner {
    grid-template-columns: 1fr;
    padding-block: 10px;
    row-gap: 10px;
  }
  .brand {
    justify-self: center;
  }
  .doc-meta {
    justify-self: start;
  } /* troque para center se preferir */
}

/* ===== Hero (main) ===== */
.hero {
  border-bottom: 1px solid var(--bd);
  background: #fff;
}
.hero-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 28px var(--pad-x) 32px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  align-items: center;
  gap: 28px;
}
.hero-title {
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.15;
  margin: 0 0 12px;
  font-weight: 800;
  letter-spacing: 0.2px;
}
.hero-sub {
  color: var(--fg-dim);
  margin: 0 0 18px;
}
.hero-img {
  width: 100%;
  height: auto;
  border-radius: 16px;
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Botão vermelho (caso ative no hero) */
.btn-red {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--btn-red-hover);
  background: var(--btn-red);
  color: #fff;
  font-weight: 500;
}
.btn-red:hover {
  background: var(--btn-red-hover);
}
.btn-red:active {
  transform: translateY(1px);
}

/* ===== Seções padrão (para você seguir adicionando conteúdo) ===== */
.section {
  border-bottom: 1px solid var(--bd);
  background: #fff;
}
.section-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 28px var(--pad-x) 32px;
}
.section-title {
  font-size: clamp(18px, 2.2vw, 28px);
  font-weight: 800;
  margin: 0 0 12px;
}
.section p {
  color: var(--fg-dim);
  margin: 0 0 10px;
}

/* ===== Footer básico ===== */
.site-footer {
  border-top: 1px solid var(--bd);
  background: #fff;
}
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 18px var(--pad-x);
}
.footer-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--fg);
  font-size: 14px;
}
.footer-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}
.footer-tagline {
  flex-basis: 100%;
  color: var(--fg-dim);
  font-size: 13px;
  margin-top: 4px;
}

/* ===== CLASSE DE FOGO ABC ===== */
.section-fogo .section-intro {
  margin-bottom: 8px;
}
.class-notes {
  margin: 0 0 10px 0;
  padding-left: 0;
  display: grid;
  gap: 6px;
  color: var(--fg-dim);
}
.class-notes > li {
  list-style: none;
}

/* Figura geral (tabela comparativa) */
.fire-classes-figure {
  margin: 8px 0 14px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}
.fire-classes-img {
  display: block;
  width: 100%;
  height: auto;
}
.fire-classes-cap {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--fg-dim);
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

/* Cards de extintores (grid responsivo) */
.ext-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  margin-top: 10px;
}
.ext-card {
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
  transition: box-shadow 0.18s ease, transform 0.18s ease;
  outline: none;
  display: flex;
  flex-direction: column;
  height: 100%;
}
.ext-card:hover {
  box-shadow: 0 6px 20px rgba(2, 6, 23, 0.08);
  transform: translateY(-1px);
}
.ext-card:focus-visible {
  box-shadow: 0 0 0 3px var(--focus);
}

.ext-head {
  display: grid;
  justify-items: center;
  gap: 8px;
  margin-bottom: 6px;
}
.ext-img {
  width: 100%;
  max-width: 220px;
  height: auto;
  object-fit: contain;
}
.ext-name {
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 800;
  color: var(--fg);
}
.ext-type {
  font-weight: 800;
}

/* corpo */
.ext-body {
  color: var(--fg-dim);
}
.ext-uses {
  margin: 0;
  padding-left: 16px;
  display: grid;
  gap: 6px;
}
.ext-uses li {
  line-height: 1.35;
}

/* destaques */
.warn {
  color: #b45309;
  font-weight: 700;
} /* âmbar: não recomendado */
.bad {
  color: #b91c1c;
  font-weight: 800;
} /* vermelho: proibido */

@media (max-width: 420px) {
  .ext-cards {
    grid-template-columns: 1fr;
  }
}

/* ===== CONTATOS DE EMERGÊNCIAS ===== */
.section-contatos {
  background: #fff;
}

.contatos-grid {
  display: grid;
  grid-template-columns: 1.1fr 1fr; /* texto | imagem */
  gap: 16px;
  align-items: start;
}

.contact-box {
  border: 1px solid var(--bd);
  border-radius: var(--radius);
  background: #fff;
  padding: 12px 14px;
  box-shadow: 0 2px 10px rgba(2, 6, 23, 0.04);
}

.contact-h {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.contact-emoji {
  font-size: 1.4rem;
  line-height: 1;
}
.contact-title {
  margin: 0;
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 800;
  color: var(--fg);
}

.contact-phone {
  margin: 6px 0 10px;
  font-size: clamp(18px, 3vw, 22px);
}
.contact-link {
  text-decoration: none;
  border-bottom: 1px dashed transparent;
}
.contact-link:hover {
  border-bottom-color: currentColor;
}

.contact-actions {
  margin-top: 6px;
}

.contatos-media {
  margin: 0;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--radius);
  overflow: hidden;
}
.contatos-img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}
.contatos-cap {
  margin: 0;
  padding: 8px 10px;
  font-size: 13px;
  color: var(--fg-dim);
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  text-align: center;
}

/* Responsivo: texto primeiro, imagem por último */
@media (max-width: 960px) {
  .contatos-grid {
    grid-template-columns: 1fr;
  }
  .contatos-text {
    order: 1;
  }
  .contatos-media {
    order: 2;
  }
}

/* ===== Footer ===== */
.site-footer {
  border-top: 1px solid var(--bd);
  background: #fff;
}
.footer-inner {
  max-width: var(--max-w);
  margin-inline: auto;
  padding: 18px var(--pad-x);
  display: grid;
  grid-template-columns: 1.2fr auto;
  gap: 16px;
  align-items: center;
}
.footer-left {
  color: var(--fg);
  font-size: 14px;
  line-height: 1.35;
}
.footer-tagline {
  color: var(--fg-dim);
  font-size: 13px;
  margin-top: 4px;
}
.footer-right {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  justify-self: end;
}
.footer-metric .metric-label {
  color: var(--fg-dim);
  margin-right: 6px;
}
.back-top {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--bd);
  font-weight: 700;
}
.back-top:hover {
  background: #f8fafc;
}

@media (max-width: 720px) {
  .footer-inner {
    grid-template-columns: 1fr;
  }
  .footer-right {
    justify-self: start; /* alinha à esquerda no mobile */
  }
}
