/* ============================================================
   RECIFE NIMBUS — Estilos compartilhados
   Segue o Guia de Identidade Visual do projeto:
   Display: Space Grotesk · Corpo: Public Sans · Dados: IBM Plex Mono
   Este arquivo cobre apenas o que o Tailwind (utilitário) não
   expressa bem sozinho: fontes, foco de teclado, animações e o
   componente assinatura (indicador de risco).
   ============================================================ */

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: "Public Sans", ui-sans-serif, system-ui, sans-serif;
  background-color: #F2F5F7;
  color: #101820;
}

h1, h2, h3, h4, .font-display {
  font-family: "Space Grotesk", ui-sans-serif, system-ui, sans-serif;
}

.font-mono, .font-data {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, monospace;
}

/* Largura editorial padrão do site (mesma proporção do guia de marca) */
.wrap {
  max-width: 1152px;
  margin-inline: auto;
  padding-inline: clamp(20px, 5vw, 48px);
}

/* ============================== ACESSIBILIDADE ============================== */

/* Link "pular para o conteúdo" — só aparece com foco de teclado */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3.5rem;
  z-index: 100;
  background: #FFFFFF;
  color: #14293F;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.15s ease;
}
.skip-link:focus {
  top: 1rem;
}

/* Foco visível consistente em toda a navegação por teclado */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
summary:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #1F7A8C;
  outline-offset: 3px;
  border-radius: 4px;
}

/* Classe utilitária para esconder visualmente mantendo leitura por leitor de tela */
.sr-only-focusable:not(:focus):not(:focus-within) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ============================== DIVISOR DE ONDA ============================== */
.wave-divider {
  display: block;
  width: 100%;
  height: 44px;
  margin-top: -1px;
}

/* ============================== INDICADOR DE RISCO (assinatura) ============================== */
.gauge-track {
  position: relative;
  display: flex;
  gap: 4px;
  height: 14px;
  border-radius: 999px;
}
.gauge-seg {
  flex: 1;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
}
.gauge-seg.is-baixo { background: #3F9142; }
.gauge-seg.is-moderado { background: #E8A33D; }
.gauge-seg.is-alto { background: #E0692E; }
.gauge-seg.is-critico { background: #C4372B; }

.gauge-pointer {
  position: absolute;
  top: -9px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.35);
  animation: pulse-pointer 2.4s ease-in-out infinite;
}
@keyframes pulse-pointer {
  0%, 100% { box-shadow: 0 0 0 4px rgba(232, 163, 61, 0.35); }
  50% { box-shadow: 0 0 0 9px rgba(232, 163, 61, 0.12); }
}
@media (prefers-reduced-motion: reduce) {
  .gauge-pointer { animation: none; }
}

/* ============================== TIMELINE (cronograma) ============================== */
.timeline {
  position: relative;
  border-left: 2px solid #DCE3E7;
}
.timeline-item {
  position: relative;
  padding-left: 28px;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #FFFFFF;
  border: 3px solid #1F7A8C;
}
.timeline-item.is-done::before {
  background: #1F7A8C;
}

/* ============================== MENU MÓVEL ============================== */
#mobile-menu[hidden] {
  display: none;
}

/* ============================== NAV ATIVA ============================== */
.nav-link[aria-current="page"] {
  color: #FFFFFF;
  position: relative;
}
.nav-link[aria-current="page"]::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -6px;
  height: 2px;
  background: #1F7A8C;
  border-radius: 2px;
}

/* ============================== REVELAÇÃO SUAVE AO ROLAR ============================== */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* Impressão: simplifica para leitura em papel (pré-projeto, cronograma etc.) */
@media print {
  .no-print { display: none !important; }
  body { background: #FFFFFF; }
  a { color: #14293F; text-decoration: underline; }
}
