/* Responsive refinements loaded last to keep every section consistent. */

main,
main > section,
.hero-content,
.hero-image,
.servico-card,
.processo-item,
.projeto-card,
.sobre-content > *,
.contato-content > * {
  min-width: 0;
}

.hero,
.numeros,
.servicos-section,
.processos-section,
.projetos-section,
.sobre-page,
.contato-page {
  width: 100%;
}

@media (max-width: 1100px) {
  header { padding-inline: 28px; }
  .hero { padding-inline: 28px; gap: 40px; }
  .hero h1 { font-size: clamp(2.8rem, 5vw, 3.5rem); }
}

@media (max-width: 900px) {
  .hero { padding: 56px 28px 72px; }
  .hero-content { max-width: 720px; }
  .hero-image img { width: min(100%, 680px); max-width: none; }

  .servicos-section,
  .processos-section,
  .projetos-section,
  .sobre-page,
  .contato-page { padding: 72px 28px; }

  .cta-section { padding: 88px 28px; }
  .contato-content { gap: 36px; }
  .sobre-content { gap: 40px; }
}

@media (max-width: 640px) {
  * { scroll-margin-top: 72px; }
  header { padding-inline: 18px; }
  .logo-name { font-size: 1rem; }
  .hero { padding: 44px 18px 56px; gap: 34px; }
  .hero h1 { font-size: clamp(2rem, 10.5vw, 2.65rem); line-height: 1.08; }
  .hero p { font-size: 1rem; margin-bottom: 28px; }
  .hero-image img { width: 100%; aspect-ratio: 16 / 10; }
  .botoes { gap: 12px; }
  .botoes a { min-height: 46px; padding: 13px 18px; }

  .numeros {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px 16px;
    padding: 36px 18px;
  }
  .num-item h3 { font-size: 1.45rem; }
  .num-item p { font-size: 0.86rem; }

  .servicos-section,
  .processos-section,
  .projetos-section,
  .sobre-page,
  .contato-page { padding: 56px 18px; }

  .servicos-header,
  .processos-header,
  .projetos-header { margin-bottom: 36px; }

  .servicos-header h2,
  .processos-header h2,
  .projetos-header h2,
  .page-header h2,
  .tecnologias-section h2 {
    font-size: clamp(1.75rem, 8vw, 2rem);
  }

  .servicos-grid,
  .processos-grid,
  .projetos-grid,
  .contato-content { grid-template-columns: minmax(0, 1fr); }

  .servico-card { padding: 26px 22px; }
  .processo-item { min-height: 0; padding: 30px 22px; }
  .projeto-imagem { height: auto; aspect-ratio: 16 / 10; }
  .projeto-info { padding: 22px 20px; }

  .cta-section { padding: 72px 18px; }
  .cta-content h2 { font-size: clamp(1.9rem, 9vw, 2.4rem); }
  .cta-section .cta-button {
    width: 100%;
    max-width: 340px;
    padding-inline: 20px;
  }

  .sobre-content { gap: 28px; margin-bottom: 52px; }
  .sobre-imagem img { aspect-ratio: 4 / 3; object-fit: cover; }
  .tecnologias-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .tech-card { padding: 16px 10px; font-size: 0.95rem; }

  .contato-content { gap: 32px; }
  .contato-form { padding: 24px 18px; }
  .form-group input,
  .form-group textarea { font-size: 1rem; }
  .info-item { align-items: flex-start; padding: 20px 18px; }

  .footer { padding: 48px 18px 24px; }
  .footer-content { gap: 28px; margin-bottom: 28px; }
  .footer-links { justify-content: center; gap: 12px 20px; }
  .footer-links a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
  }
}

@media (max-width: 380px) {
  .botoes { flex-direction: column; }
  .botoes a { width: 100%; flex-basis: auto; }
  .navigation { padding-inline: 18px; }
  .tecnologias-grid { grid-template-columns: minmax(0, 1fr); }
}
