/* ============================================================
   Layout das páginas de projeto — versão "founder-grade"
   Estrutura editorial densa, bento cards, números grandes
============================================================ */

.conteudo-principal {
  position: relative;
  padding-top: 5rem;
}
@media (min-width: 768px) {
  .conteudo-principal { padding-top: 5.5rem; }
}

/* ─── Container central — mais estreito que o home pra clareza editorial ─── */
.projeto-shell {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .projeto-shell { padding: 0 2rem; }
}

/* ─── Voltar ─── */
.voltar-projetos {
  max-width: 72rem;
  margin: 0 auto 0.75rem;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .voltar-projetos {
    padding: 0 2rem;
    margin-bottom: 1rem;
  }
}
.voltar-projetos a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--muted);
  transition: color 200ms ease;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
.voltar-projetos a:hover { color: var(--foreground); }

/* ─── HERO ─── */
.projeto-hero {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 1.25rem;
  position: relative;
}
@media (min-width: 768px) {
  .projeto-hero { padding: 0 2rem; }
}
.projeto-hero-glow {
  position: absolute;
  top: -2rem;
  right: -8%;
  width: 32rem;
  height: 32rem;
  pointer-events: none;
  border-radius: 9999px;
  opacity: 0.35;
  filter: blur(70px);
  background: radial-gradient(circle, rgba(168,85,247,0.22) 0%, rgba(236,72,153,0.14) 40%, transparent 75%);
  display: none;
}
@media (min-width: 768px) {
  .projeto-hero-glow { display: block; }
}

.projeto-hero-rotulo {
  margin: 0 0 0.75rem;
}

.projeto-hero-titulo {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
  margin: 0 0 0.75rem;
}
.projeto-hero-tagline {
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--text-2);
  max-width: 42rem;
  line-height: 1.4;
  margin: 0 0 1.5rem;
}

/* Meta row mono */
.projeto-hero-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  margin: 0 0 2rem;
}
@media (min-width: 640px) {
  .projeto-hero-meta {
    grid-template-columns: repeat(4, 1fr);
  }
}
.projeto-hero-meta > div {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
}
.projeto-hero-meta .legenda-mono {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.projeto-hero-meta-valor {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
}

/* ─── Capa do projeto (imagem ou mockup) ─── */
.projeto-capa-wrap {
  max-width: 72rem;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .projeto-capa-wrap {
    padding: 0 2rem;
    margin-bottom: 3rem;
  }
}

.projeto-hero-capa {
  position: relative;
  overflow: hidden;
  border-radius: 1.25rem;
  border: 1px solid var(--border);
  margin: 0 auto;
  max-width: 64rem;
  box-shadow:
    0 24px 60px -20px rgba(10, 10, 11, 0.18),
    0 6px 18px -8px rgba(10, 10, 11, 0.08);
}

/* ─── Galeria 3×2 dentro da capa ─── */
.projeto-galeria {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  width: 100%;
  position: relative;
  z-index: 1;
}
@media (min-width: 640px) {
  .projeto-galeria { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .projeto-galeria {
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
  }
}
.galeria-celula {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow:
    0 14px 28px -14px rgba(10, 10, 11, 0.22),
    0 4px 10px -6px rgba(10, 10, 11, 0.08);
  transition: transform 400ms var(--ease-out-quart), box-shadow 400ms ease;
}
.galeria-celula:hover {
  transform: translateY(-2px);
  box-shadow:
    0 20px 40px -16px rgba(10, 10, 11, 0.25),
    0 6px 14px -6px rgba(10, 10, 11, 0.1);
}
.galeria-celula--paisagem {
  aspect-ratio: 16 / 10;
}
.galeria-celula--retrato {
  aspect-ratio: 9 / 16;
}
.galeria-celula img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}
.projeto-hero-capa:not(.projeto-hero-capa-mockup) {
  aspect-ratio: 16 / 10;
}
.projeto-hero-capa-imagem {
  position: absolute;
  inset: 0;
}
.projeto-hero-capa-imagem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.projeto-hero-capa-mockup {
  background:
    radial-gradient(ellipse 60% 45% at 50% 0%, rgba(99, 102, 241, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 50% 40% at 95% 100%, rgba(236, 72, 153, 0.05) 0%, transparent 70%),
    linear-gradient(180deg, #fafafa 0%, #f5f5f7 100%);
  padding: 2.5rem 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
@media (min-width: 768px) {
  .projeto-hero-capa-mockup { padding: 3.5rem 2.5rem; }
}

/* Bicho Rural — galeria com chapéu flutuante */
.projeto-hero-bichorural {
  position: relative;
  width: 100%;
}
.projeto-hero-bichorural-chapeu {
  position: absolute;
  z-index: 20;
  top: -2.5rem;
  left: -1.75rem;
  width: 5.5rem;
  pointer-events: none;
  transform: perspective(900px) rotateX(18deg) rotateY(-18deg) rotateZ(-10deg);
  filter:
    drop-shadow(0 12px 18px rgba(217, 119, 6, 0.35))
    drop-shadow(0 4px 8px rgba(10, 10, 11, 0.18));
  animation: chapeu-flutuar 4s ease-in-out infinite;
}
@media (min-width: 768px) {
  .projeto-hero-bichorural-chapeu { width: 7rem; top: -3rem; left: -2rem; }
}
.projeto-hero-bichorural-glow {
  position: absolute;
  top: -1rem;
  left: -0.25rem;
  width: 7rem;
  height: 7rem;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0.55;
  background: radial-gradient(circle, rgba(251, 191, 36, 0.45) 0%, transparent 70%);
  filter: blur(20px);
}

/* ─── Stats strip ─── */
.projeto-stats {
  max-width: 72rem;
  margin: 0 auto 2.5rem;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .projeto-stats {
    padding: 0 2rem;
    margin-bottom: 3rem;
  }
}
.projeto-stats-cartao {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 1.75rem;
  border-radius: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  gap: 1.5rem 0;
}
@media (min-width: 640px) {
  .projeto-stats-cartao {
    grid-template-columns: repeat(4, 1fr);
    padding: 2rem 2.5rem;
  }
}
.projeto-stat {
  padding: 0 1rem;
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.projeto-stat:first-child,
.projeto-stat:nth-child(3) {
  padding-left: 0;
  border-left: none;
}
@media (min-width: 640px) {
  .projeto-stat {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
  }
  .projeto-stat:first-child {
    padding-left: 0;
    border-left: none;
  }
  .projeto-stat:nth-child(3) {
    padding-left: 1.5rem;
    border-left: 1px solid var(--border);
  }
}
.projeto-stat-valor {
  margin: 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-size: clamp(1.875rem, 3.5vw, 2.5rem);
  background: linear-gradient(95deg, #06b6d4 0%, #8b5cf6 50%, #ec4899 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  display: inline-block;
}
.projeto-stat-rotulo {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-3);
}

/* ─── Conteúdo principal (sidebar + artigo) ─── */
.projeto-conteudo-bloco {
  max-width: 68rem;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}
@media (min-width: 768px) {
  .projeto-conteudo-bloco {
    padding: 0 2rem;
    margin-bottom: 5rem;
  }
}
.projeto-conteudo-grade {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
@media (min-width: 900px) {
  .projeto-conteudo-grade {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.8fr);
    gap: 1.25rem;
    align-items: start;
  }
}

/* Sidebar — bento card único com múltiplas seções */
.projeto-ficha {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
}
@media (min-width: 900px) {
  .projeto-ficha {
    padding: 2rem;
    position: sticky;
    top: 6.5rem;
    align-self: start;
  }
}
.projeto-ficha-cabecalho {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid var(--border);
}
.projeto-ficha-cabecalho .legenda-mono {
  text-transform: uppercase;
  letter-spacing: 0.15em;
}

.projeto-ficha-bloco {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.projeto-ficha-bloco:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.projeto-ficha-bloco-rotulo {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-3);
}
.projeto-ficha-bloco-numero {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--iris-2);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.projeto-ficha-bloco-valor {
  margin: 0;
  color: var(--foreground);
  font-size: 0.95rem;
  line-height: 1.45;
}
.projeto-ficha-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}
.projeto-ficha-tags li {
  font-family: var(--font-mono);
  font-size: 10.5px;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  background: var(--background-alt);
  border: 1px solid var(--border);
  color: var(--muted-strong);
}
.projeto-ficha-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  font-size: 0.875rem;
}
.projeto-ficha-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  color: var(--foreground);
}
.projeto-ficha-links a svg {
  color: var(--muted);
  transition: transform 200ms ease, color 200ms ease;
}
.projeto-ficha-links a:hover svg {
  color: var(--iris-2);
  transform: translate(2px, -2px);
}

/* Coluna direita — bento empilhados */
.projeto-artigo-coluna {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
@media (min-width: 768px) {
  .projeto-artigo-coluna { gap: 1.25rem; }
}

.projeto-bloco {
  padding: 1.75rem;
}
@media (min-width: 768px) {
  .projeto-bloco { padding: 2.25rem; }
}

.projeto-bloco-cabeca {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.projeto-bloco-titulo {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin: 0.5rem 0 1rem;
}
@media (min-width: 768px) {
  .projeto-bloco-titulo { font-size: 1.875rem; }
}
.projeto-bloco-texto {
  color: var(--text-2);
  line-height: 1.65;
  font-size: 1.0625rem;
  margin: 0;
}
.projeto-bloco-texto + .projeto-bloco-texto { margin-top: 1rem; }
.projeto-bloco-texto strong { color: var(--foreground); font-weight: 500; }

/* Destaques numerados */
.projeto-destaques-lista {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  counter-reset: destaque;
}
.projeto-destaques-lista li {
  display: grid;
  grid-template-columns: 3.5rem 1fr;
  gap: 1rem;
  align-items: start;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.projeto-destaques-lista li:first-child {
  padding-top: 0;
  border-top: none;
}
@media (min-width: 768px) {
  .projeto-destaques-lista li {
    grid-template-columns: 4.5rem 1fr;
    gap: 1.5rem;
  }
}
.projeto-destaques-lista li::before {
  counter-increment: destaque;
  content: "0" counter(destaque);
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--text-3);
}
.projeto-destaque-texto {
  margin: 0;
  color: var(--text-2);
  line-height: 1.6;
  font-size: 1rem;
  padding-top: 0.25rem;
}

/* ─── Próximo projeto ─── */
.proximo-projeto {
  max-width: 68rem;
  margin: 0 auto;
  padding: 0 1.25rem 6rem;
}
@media (min-width: 768px) {
  .proximo-projeto { padding: 0 2rem 6rem; }
}
.proximo-projeto-cartao {
  position: relative;
  display: block;
  border-radius: 1.5rem;
  padding: 2.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition:
    transform 400ms var(--ease-out-quart),
    box-shadow 400ms ease,
    border-color 400ms ease;
}
@media (min-width: 768px) {
  .proximo-projeto-cartao { padding: 3.5rem; }
}
.proximo-projeto-cartao:hover {
  transform: translateY(-4px);
  box-shadow:
    0 24px 48px -16px rgba(10, 10, 11, 0.15),
    0 0 0 1px rgba(99, 102, 241, 0.15);
  border-color: rgba(99, 102, 241, 0.25);
}
.proximo-projeto-fundo {
  position: absolute;
  bottom: -8rem;
  right: -8rem;
  width: 420px;
  height: 420px;
  border-radius: 9999px;
  opacity: 0.6;
  filter: blur(2rem);
  pointer-events: none;
  animation: orbita-flutuar 8s ease-in-out infinite;
  background:
    radial-gradient(ellipse 50% 45% at 22% 28%, rgba(168, 85, 247, 0.8) 0%, transparent 60%),
    radial-gradient(ellipse 45% 40% at 78% 22%, rgba(236, 72, 153, 0.75) 0%, transparent 60%),
    radial-gradient(ellipse 55% 50% at 60% 78%, rgba(251, 146, 60, 0.75) 0%, transparent 65%),
    radial-gradient(ellipse 40% 35% at 18% 75%, rgba(99, 102, 241, 0.7) 0%, transparent 60%),
    linear-gradient(135deg, #faf5ff 0%, #fdf2f8 50%, #fff7ed 100%);
  transition: opacity 300ms ease;
}
.proximo-projeto-cartao:hover .proximo-projeto-fundo {
  opacity: 0.8;
}
.proximo-projeto-conteudo {
  position: relative;
  z-index: 10;
}
.proximo-projeto-rotulo {
  margin: 0 0 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--muted);
}
.proximo-projeto-nome {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.025em;
  margin: 0 0 0.75rem;
  transition: transform 300ms ease;
}
.proximo-projeto-cartao:hover .proximo-projeto-nome {
  transform: translateX(0.5rem);
}
.proximo-projeto-tagline {
  margin: 0;
  color: var(--text-2);
  font-size: 1.125rem;
  max-width: 36rem;
}
