:root {
  /* --- cores oficiais (Manual de Marca FADA ORG, pág. 9) --- */
  --roxo: #963676; /* HEX #963676 · Pantone 512C · cor primária */
  --azul: #6ec9e0; /* HEX #6EC9E0 · Pantone 636C */
  --dourado: #fcb82e; /* HEX #FCB82E · Pantone 136C */
  --branco: #fefefe; /* HEX #FEFEFE · Pantone Trans. White */
  --azul-texto: #2e7a93; /* variação escurecida do azul p/ contraste de texto — não é do manual */
  --ink: #1c1c1e;
  --paper: #fefefe;
  --paper-2: #f2f2f2;
  --thread: #8a8d8f;

  --font-display: "Archivo", "Arial Narrow", sans-serif; /* stand-in p/ Bahnschrift Custom (licenciada Microsoft) */
  --font-body: "Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; /* oficial */
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 3px solid var(--dourado); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- header ---------- */
header {
  position: sticky; top: 0; z-index: 20;
  background: rgba(254, 254, 254, 0.92);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(28, 28, 30, 0.1);
}
.nav { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.logo-img { height: 30px; width: auto; display: block; }
.logo-tag {
  font-family: var(--font-mono); font-size: 9.5px; font-weight: 500; color: var(--thread);
  letter-spacing: 0.04em; text-transform: uppercase; border-left: 1px solid rgba(28, 28, 30, 0.2);
  padding-left: 10px; line-height: 1.3; max-width: 16ch;
}
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 500; list-style: none; margin: 0; padding: 0; }
.nav-links a { text-decoration: none; opacity: 0.78; border-bottom: 2px solid transparent; padding-bottom: 2px; }
.nav-links a:hover { opacity: 1; border-color: var(--dourado); }
.nav-cta { background: var(--roxo); color: var(--branco); font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 3px; text-decoration: none; }

/* ---------- hero (home) ---------- */
.hero { position: relative; background: var(--ink); color: var(--paper); padding: 76px 0 96px; overflow: hidden; }
.hero .wrap { position: relative; z-index: 2; }
.eyebrow { font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--dourado); margin: 0 0 18px; }
h1 { font-family: var(--font-display); font-weight: 700; font-size: clamp(32px, 4.4vw, 52px); line-height: 1.08; margin: 0 0 22px; max-width: 20ch; letter-spacing: -0.01em; }
.hero-sub { font-size: 17px; max-width: 56ch; opacity: 0.86; margin: 0 0 30px; }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.btn { font-weight: 600; font-size: 15px; text-decoration: none; border-radius: 3px; padding: 13px 22px; display: inline-flex; align-items: center; gap: 8px; border: none; cursor: pointer; font-family: var(--font-body); }
.btn-primary { background: var(--dourado); color: var(--ink); }
.btn-primary:hover { background: #e6a622; }
.btn-ghost { border: 1px solid rgba(254, 254, 254, 0.4); color: var(--paper); background: transparent; }
.btn-ghost:hover { border-color: var(--paper); }
.btn-roxo { background: var(--roxo); color: var(--branco); }
.btn-roxo:hover { background: #7c2c61; }

.hero::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 18px;
  background: linear-gradient(135deg, var(--paper) 50%, transparent 50%), linear-gradient(45deg, var(--paper) 50%, transparent 50%);
  background-size: 18px 18px; background-position: 0 0, 9px 0; background-repeat: repeat-x;
}

/* ---------- vídeos institucionais (faixa secundária, home) ---------- */
.videos-strip { padding: 40px 0 64px; }
.eyebrow-mini {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--thread); margin: 0 0 16px;
}
.videos-strip-track { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.videos-strip-item { flex: 0 0 220px; }
.videos-strip-item .lite-yt { aspect-ratio: 16/9; margin-bottom: 8px; }
.videos-strip-item .lite-yt .play { width: 40px; height: 40px; }
.videos-strip-item .lite-yt .play::after { border-width: 7px 0 7px 11px; margin-left: 3px; }
.videos-strip-item .video-titulo { font-size: 12.5px; opacity: 0.75; margin: 0; line-height: 1.4; }

/* ---------- como funciona ---------- */
.funciona { padding: 88px 0 72px; }
.section-head { max-width: 56ch; margin-bottom: 52px; }
.section-head .eyebrow { color: var(--azul-texto); }
.section-head h2 { font-family: var(--font-display); font-size: clamp(24px, 3vw, 32px); font-weight: 700; margin: 0 0 12px; }
.section-head p { font-size: 16px; opacity: 0.75; margin: 0; }

.stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; position: relative; }
.stages::before { content: ""; position: absolute; top: 19px; left: 6%; right: 6%; height: 1px; background: repeating-linear-gradient(90deg, var(--thread) 0 6px, transparent 6px 12px); }
.stage { position: relative; padding: 0 16px 0 0; }
.stage-dot { width: 38px; height: 38px; border-radius: 50%; background: var(--paper); border: 2px solid var(--ink); display: flex; align-items: center; justify-content: center; font-family: var(--font-mono); font-size: 13px; font-weight: 600; margin-bottom: 18px; position: relative; z-index: 1; }
.stage:nth-child(1) .stage-dot { border-color: var(--dourado); color: #a8701e; }
.stage:nth-child(2) .stage-dot { border-color: var(--azul-texto); color: var(--azul-texto); }
.stage:nth-child(3) .stage-dot { border-color: var(--roxo); color: var(--roxo); }
.stage:nth-child(4) .stage-dot { border-color: var(--thread); color: var(--thread); }
.stage h3 { font-size: 16px; margin: 0 0 8px; font-weight: 600; }
.stage p { font-size: 14px; opacity: 0.72; margin: 0; max-width: 24ch; }

/* ---------- projetos (grid) ---------- */
.destaque-empresas { padding: 0; background: var(--roxo); }
.destaque-empresas-caixa { display: flex; align-items: center; padding: 40px 0; aspect-ratio: 2243 / 701; background: url("/img/destaque-empresas.jpg") right center / cover no-repeat; }
.destaque-empresas-caixa h3 { color: #fff; margin: 0 0 8px; font-size: 22px; }
.destaque-empresas-caixa p { color: rgba(255, 255, 255, 0.85); margin: 0 0 20px; max-width: 460px; }
.destaque-empresas-caixa .btn-primary { white-space: nowrap; }

.projetos { padding: 72px 0 96px; background: var(--paper-2); border-top: 1px solid rgba(28, 28, 30, 0.08); border-bottom: 1px solid rgba(28, 28, 30, 0.08); }
.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.card {
  background: var(--paper); border: 1px solid rgba(28, 28, 30, 0.12); position: relative; padding: 0 0 20px;
  text-decoration: none; color: var(--ink); display: block;
  clip-path: polygon(0% 2%, 3% 0%, 97% 0%, 100% 2%, 100% 98%, 97% 100%, 3% 100%, 0% 98%);
}
.card-cover { width: 100%; aspect-ratio: 16/10; object-fit: cover; background: var(--paper-2); }
.card-body { padding: 18px 20px 0; }
.card-org { font-family: var(--font-mono); font-size: 11px; color: var(--thread); text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 6px; }
.card h3 { font-family: var(--font-display); font-size: 23px; font-weight: 800; margin: 0 0 12px; line-height: 1.18; letter-spacing: -0.01em; }
.card p.desc { font-size: 13px; opacity: 0.7; margin: 0 0 18px; }
.progress-label { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 12px; margin-bottom: 6px; }
.progress-label .goal { color: var(--thread); }
.bar { height: 6px; background: rgba(28, 28, 30, 0.1); border-radius: 3px; overflow: hidden; margin-bottom: 4px; }
.bar > span { display: block; height: 100%; background: var(--roxo); }
.card-foot { display: flex; justify-content: flex-end; align-items: center; border-top: 1px dashed rgba(28, 28, 30, 0.25); padding-top: 14px; margin-top: 14px; }
.card-link { font-size: 13px; font-weight: 600; border-bottom: 1px solid var(--dourado); }
.empty-state { font-family: var(--font-mono); font-size: 14px; color: var(--thread); padding: 40px 0; }

/* ---------- página de projeto ---------- */
.projeto-hero { background: var(--ink); color: var(--paper); padding: 48px 0 64px; }
.projeto-hero .card-org { color: var(--dourado); opacity: 1; }
.projeto-hero h1 { max-width: none; }
.projeto-cover { width: 100%; max-height: 420px; object-fit: cover; margin: 28px 0 0; border-radius: 2px; }

.projeto-corpo { padding: 56px 0; }
.projeto-layout { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; align-items: start; }
/* Trava de segurança global: sem isso, qualquer conteúdo bem largo lá no
   fundo do corpo do projeto (uma galeria de fotos grandes, uma tabela, etc.)
   consegue "empurrar" a largura de toda a página, mesmo quando esse
   conteúdo já tem seu próprio jeito de rolar por dentro. Resolve de vez o
   problema de páginas de projeto estourando a tela em celulares. */
.projeto-layout > * { min-width: 0; }

.pagina-hero { padding: 56px 0 24px; border-bottom: 1px solid rgba(28, 28, 30, 0.08); }
.pagina-hero h1 { max-width: none; margin-bottom: 0; }
.pagina-corpo { padding: 48px 0 88px; }
.wrap-estreito { max-width: 760px; }
.projeto-descricao { font-size: 16px; line-height: 1.7; }
.projeto-descricao p { margin: 0 0 18px; }

/* cartão de doação */
.doacao-card { background: var(--paper-2); border: 1px solid rgba(28, 28, 30, 0.1); padding: 24px; position: sticky; top: 90px; }
.doacao-card h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 16px; }
.pix-nota-geral { font-size: 13px; color: var(--thread); background: var(--paper); border-left: 3px solid var(--dourado); padding: 10px 12px; margin: 0 0 16px; }
.pix-chave { display: flex; align-items: center; gap: 8px; background: var(--paper); border: 1px dashed var(--thread); padding: 10px 12px; font-family: var(--font-mono); font-size: 13px; margin-bottom: 12px; word-break: break-all; }
.pix-chave button { margin-left: auto; flex-shrink: 0; background: var(--roxo); color: var(--branco); border: none; border-radius: 3px; font-size: 11.5px; font-weight: 600; padding: 6px 10px; cursor: pointer; font-family: var(--font-body); }
.pix-qr { width: 100%; max-width: 180px; margin: 0 auto 16px; border: 1px solid rgba(28, 28, 30, 0.15); }
.doacao-actions { display: flex; flex-direction: column; gap: 10px; }

/* destaque "pisca-pisca" quando se chega no cartão de doação via âncora
   (botão "Doar agora" do cabeçalho, numa página de projeto) — só CSS,
   usando a pseudo-classe :target, sem precisar de JavaScript. Mantido só
   como reforço para quem navega sem JavaScript — quando JS está ativo
   (main.js), ele assume o controle inteiro do efeito e limpa a âncora da
   URL logo depois de usá-la, assim :target nunca fica "preso" ligado
   competindo com o clique seguinte no mesmo botão. */
@keyframes destacar-doacao {
  0%, 100% { box-shadow: 0 0 0 0 rgba(150, 54, 118, 0); }
  15%, 45%, 75% { box-shadow: 0 0 0 6px rgba(150, 54, 118, 0.35); }
  30%, 60%, 90% { box-shadow: 0 0 0 0 rgba(150, 54, 118, 0); }
}
.doacao-card:target { animation: destacar-doacao 2.4s ease-in-out 1; }
.doacao-card.piscar-doacao { animation: destacar-doacao 2.4s ease-in-out 1; }

/* corpo do projeto — imagens/links dentro do markdown "estilo post" */
.projeto-descricao img { border-radius: 2px; margin: 8px 0 20px; }
.projeto-descricao a { color: var(--roxo); text-decoration: underline; }
.projeto-descricao .lite-yt { margin: 8px 0 20px; }
.logo-parceiro { height: 56px; width: auto; border-radius: 0; margin: 0 0 20px; }

/* galeria de fotos — sem JS, rolagem horizontal só com CSS */
.galeria-track {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 4px;
  margin: 8px 0 20px;
  scrollbar-width: thin;
}
.galeria-track img {
  flex: 0 0 240px;
  min-width: 0;
  aspect-ratio: 4/3;
  object-fit: cover;
  border-radius: 2px;
  scroll-snap-align: start;
}
@media (max-width: 560px) {
  .galeria-track img { flex-basis: 200px; }
}

.transparencia-link { margin-top: 32px; padding-top: 24px; border-top: 1px dashed rgba(28, 28, 30, 0.25); }
.transparencia-link .atualizado { font-family: var(--font-mono); font-size: 12px; color: var(--thread); margin: 0 0 14px; text-transform: uppercase; letter-spacing: 0.03em; }

/* páginas institucionais — imagem de cabeçalho, carrossel de logos, resumo de ações */
.pagina-imagem-cabecalho { width: 100%; max-height: 320px; object-fit: cover; display: block; margin-top: 32px; }
.logos-titulo { font-family: var(--font-display); font-size: 18px; text-align: center; margin: 56px 0 24px; }
.logos-carrossel {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  padding-bottom: 8px;
  scrollbar-width: thin;
}
.logo-item {
  flex: 0 0 160px;
  height: 96px;
  background: var(--paper);
  border: 1px solid rgba(28, 28, 30, 0.1);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  scroll-snap-align: start;
}
.logo-item img { max-width: 100%; max-height: 100%; object-fit: contain; }
.resumo-acoes { margin-top: 56px; padding-top: 40px; border-top: 1px solid rgba(28, 28, 30, 0.08); }
.resumo-acoes h3 { font-family: var(--font-display); font-size: 18px; margin: 0 0 16px; }

/* cartão de doação "solo" (fora da página de projeto — página de doação geral) */
.doacao-card-solo { max-width: 420px; margin: 40px auto 0; position: static; }

/* ---------- lite youtube facade ---------- */
.lite-yt { position: relative; width: 100%; aspect-ratio: 16/9; background: #000 center/cover no-repeat; cursor: pointer; border-radius: 2px; overflow: hidden; margin-bottom: 12px; }
.lite-yt::before { content: ""; position: absolute; inset: 0; background: rgba(0, 0, 0, 0.15); pointer-events: none; }
.lite-yt .play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 64px; height: 64px;
  border-radius: 50%; background: rgba(28, 28, 30, 0.75); display: flex; align-items: center; justify-content: center;
}
.lite-yt .play::after { content: ""; border-style: solid; border-width: 11px 0 11px 18px; border-color: transparent transparent transparent var(--branco); margin-left: 4px; }
.lite-yt iframe { width: 100%; height: 100%; border: 0; }

/* ---------- contato ---------- */
.contato-hero { padding: 88px 0; }
.contato-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; max-width: 640px; margin-top: 32px; }
.contato-card { border: 1px solid rgba(28, 28, 30, 0.12); padding: 22px; text-decoration: none; color: var(--ink); }
.contato-card .eyebrow { margin-bottom: 10px; }
.contato-card strong { font-family: var(--font-display); font-size: 17px; display: block; margin-bottom: 6px; }

/* ---------- footer ---------- */
footer { background: var(--ink); color: var(--paper); padding: 64px 0 32px; }
.foot-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 48px; margin-bottom: 48px; }
footer h4 { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--dourado); margin: 0 0 16px; }
.logo-img-footer { height: 44px; width: auto; margin-bottom: 16px; }
footer p { font-size: 14px; opacity: 0.72; margin: 0 0 16px; max-width: 36ch; }
footer ul { list-style: none; margin: 0; padding: 0; font-size: 14px; }
footer li { margin-bottom: 10px; opacity: 0.85; }
footer a { text-decoration: none; }
footer a:hover { color: var(--dourado); }
.foot-bottom { border-top: 1px solid rgba(254, 254, 254, 0.15); padding-top: 24px; font-size: 12.5px; opacity: 0.55; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .stages { grid-template-columns: 1fr 1fr; row-gap: 32px; }
  .stages::before { display: none; }
  .grid { grid-template-columns: 1fr 1fr; }
  .projeto-layout { grid-template-columns: 1fr; }
  .doacao-card { position: static; }
  .foot-grid { grid-template-columns: 1fr; gap: 32px; }
  .contato-grid { grid-template-columns: 1fr; }
  .destaque-empresas-caixa { aspect-ratio: auto; background-image: none; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .stages { grid-template-columns: 1fr; }
  .logo-tag { display: none; }
}
