/* ============================================================================
   RHR  —  responsivo.css
   Adaptacoes por dispositivo. Testado para: iPhone 14/15/16/17 (base/Pro/Pro Max),
   iPads, MacBooks, monitores desktop e Android/Samsung.
   Larguras logicas de referencia (Apple):
     iPhone 14 / 15 / 16 ........ 390-393 pt
     iPhone 14/15/16 Pro Max .... 428-440 pt
     iPhone 16 Pro .............. 402 pt
     iPad (retrato) ............. 768-834 pt
     iPad Pro 12.9 ............... 1024 pt
   ========================================================================== */

/* -------------------------------------------------------------------------- */
/* Layout de contato e projetos em telas medias/grandes                        */
/* -------------------------------------------------------------------------- */
@media (min-width: 880px) {
  .contato__grade { grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .formulario__linha { grid-template-columns: 1fr 1fr; }
}

/* Projetos: composicao editorial assimetrica no desktop */
@media (min-width: 768px) {
  .projeto--destaque { grid-column: span 6; grid-row: span 2; aspect-ratio: 3 / 4; }
  .projeto--largo { grid-column: span 6; aspect-ratio: 3 / 2; }
}

/* -------------------------------------------------------------------------- */
/* Tablet e abaixo (<= 900px): ativa menu mobile                               */
/* -------------------------------------------------------------------------- */
@media (max-width: 900px) {
  .cabecalho__nav { display: none; }
  .cabecalho__acoes .botao { display: none; }
  .cabecalho__menu-botao { display: flex; }
}

/* -------------------------------------------------------------------------- */
/* Telefones (<= 640px)                                                        */
/* -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  :root { --altura-cabecalho: 4.25rem; }

  .cabecalho__logo img { height: 2.9rem; }

  .heroi { min-height: 100svh; justify-content: flex-end; }
  .heroi__titulo { font-size: clamp(2.4rem, 12vw, 3.4rem); max-width: 14ch; }
  .heroi__acoes { flex-direction: column; align-items: stretch; }
  .heroi__acoes .botao { width: 100%; }
  .heroi__selos { gap: 0.85rem 1.5rem; }
  .heroi__indicadores { left: var(--conteiner-pad); right: auto; bottom: auto; top: calc(var(--altura-cabecalho) + var(--seguro-topo) + 1rem); }

  .grade-projetos { gap: 0.85rem; }
  .projeto, .projeto--alto, .projeto--largo, .projeto--destaque {
    grid-column: span 12;
    grid-row: auto;
    aspect-ratio: 3 / 2;
  }

  .rodape__topo { grid-template-columns: 1fr; gap: 2rem; }
  .rodape__base { flex-direction: column; align-items: flex-start; }

  .mensagem-flutuante__texto { display: none; }
  .mensagem-flutuante { padding: 0.95rem; }

  .avaliacoes__nota { font-size: 2rem; }
}

/* Telefones muito estreitos (iPhone SE / mini ~320-375px) */
@media (max-width: 380px) {
  :root { --conteiner-pad: 1.1rem; }
  .cabecalho__logo img { height: 2.5rem; }
  .heroi__titulo { font-size: clamp(2.1rem, 11vw, 2.9rem); }
}

/* -------------------------------------------------------------------------- */
/* Telas muito grandes (iMac / monitores 4K/ultrawide)                         */
/* -------------------------------------------------------------------------- */
@media (min-width: 1600px) {
  :root { --conteiner-max: 88rem; }
  html { font-size: 17px; }
}
@media (min-width: 2200px) {
  html { font-size: 18px; }
}

/* -------------------------------------------------------------------------- */
/* Orientacao paisagem em telefones (evita hero cortado)                       */
/* -------------------------------------------------------------------------- */
@media (max-height: 500px) and (orientation: landscape) {
  .heroi { min-height: 130svh; }
  .heroi__selos { display: none; }
}

/* -------------------------------------------------------------------------- */
/* Suporte a telas de alta densidade (retina) — nitidez das imagens de fundo   */
/* -------------------------------------------------------------------------- */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .heroi__slide, .contato__fundo { image-rendering: -webkit-optimize-contrast; }
}

/* -------------------------------------------------------------------------- */
/* Modo escuro do sistema — mantemos identidade clara, apenas ajuste de barra  */
/* -------------------------------------------------------------------------- */
@media (prefers-color-scheme: dark) {
  /* A identidade visual permanece clara (marca), sem inverter cores. */
  .cabecalho--solido { background-color: rgba(250, 249, 246, 0.95); }
}

/* Impressao */
@media print {
  .cabecalho, .mensagem-flutuante, .heroi__indicadores, .menu-movel { display: none !important; }
  body { color: #000; background: #fff; }
}
