/* ==========================================
   BUFFET · versão 2
   Direção D, "Almoço de domingo"
   Especificação completa em /buffet/layout.md
   Fontes, cores, botões, selo, cartão-postal, rodapé e formulário vêm de /style.css
   ========================================== */

/* Quebra equilibrada só nos textos de destaque: em todos os parágrafos ela pesa no celular */
.hero__lead,
.carta p {
  text-wrap: pretty;
}

/* Foco visível sobre fundo escuro */
.eventos :focus-visible,
.processo :focus-visible,
.diferenciais :focus-visible,
.orcamento__head :focus-visible {
  outline-color: var(--sand);
}

/* ==========================================
   2. HERO
   Split Horizontal: claro em cima, verde embaixo,
   com a guirlanda e o selo na divisa
   ========================================== */

.hero {
  position: relative;
  z-index: 2;
  min-height: 700px;
  padding: clamp(3rem, 6vw, 5.5rem) 0 clamp(9rem, 13vw, 11.5rem);
}

.hero__inner {
  position: relative;
  z-index: 1;
}

.hero h1 {
  max-width: 12em;
  margin-top: 1.25rem;
  font-size: clamp(2.125rem, 1.1rem + 4.4vw, 4.75rem);
  line-height: 1.1;
  letter-spacing: -0.015em;
  color: var(--olive);
}

.hero h1 em {
  color: var(--terracota);
}

.hero__base {
  display: flex;
  align-items: flex-start;
  gap: clamp(2rem, 5vw, 4rem);
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.hero__lead {
  max-width: 29rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero__actions .btn {
  min-height: 54px;
  padding: 0 1.85rem;
}

.hero__trust {
  margin-top: 1.1rem;
  font-size: 0.875rem;
  color: var(--olive);
}

/* Ramo em traço fino no alto, à direita */
.hero__ramo {
  position: absolute;
  top: 1.25rem;
  right: 0;
  width: min(50vw, 720px);
  height: auto;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.4;
  pointer-events: none;
}

/* Divisa: guirlanda que cresce da esquerda para a direita e o selo girando */
.hero__divisa {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 0;
}

.hero__divisa .selo {
  position: absolute;
  z-index: 3;
  left: max(var(--container-px), calc((100% - var(--container-max)) / 2 + var(--container-px)));
  bottom: -66px;
}

/* Foto do hero: cartão de convite com cantos recortados ao lado do texto */
.hero__foto {
  position: relative;
  margin: 2.25rem 0 0;
  max-width: 560px;
  filter: drop-shadow(0 26px 34px rgba(46, 47, 34, 0.28));
}

.hero__moldura {
  --r: 28px;
  position: relative;
  aspect-ratio: 1 / 1;
  background: var(--olive);
}

.hero__moldura img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__foto .moldura {
  --m-cor: var(--paper);
  --m-inset: 12px;
  --m-r: 40px;
  opacity: 0.75;
}

@media (min-width: 1024px) {
  .hero__inner {
    display: grid;
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    column-gap: clamp(2.5rem, 5vw, 5rem);
    align-items: center;
  }

  .hero h1 {
    font-size: clamp(2.125rem, 1rem + 3.3vw, 4rem);
  }

  .hero__base {
    flex-direction: column;
    gap: 1.75rem;
  }

  .hero__foto {
    justify-self: end;
    width: 100%;
    max-width: 470px;
    margin: 0;
  }

  /* O ramo passa para trás da foto: a ponta solta não encosta no título */
  .hero {
    overflow-x: clip;
  }

  .hero__ramo {
    right: -110px;
  }

  .hero__moldura {
    aspect-ratio: 4 / 5;
  }
}

/* ==========================================
   3. TIPOS DE EVENTO
   Editorial sobre verde
   ========================================== */

.eventos {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: clamp(7rem, 11vw, 9.5rem) 0 clamp(9rem, 15vw, 13rem);
  background: var(--olive);
  color: var(--paper);
}

.eventos__ramos {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 300px;
  fill: none;
  stroke: var(--paper);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.16;
  pointer-events: none;
}

.eventos__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.eventos__head {
  grid-column: 1 / span 4;
}

.eventos h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.875rem, 1rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  color: var(--paper);
}

.eventos h2 em {
  color: var(--mustard);
}

.eventos__lista {
  grid-column: 6 / span 7;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.evento {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  padding: 0.25rem 2.5rem 0.25rem 0;
}

.evento + .evento {
  padding: 0.25rem 0 0.25rem 2.5rem;
  border-left: 1px solid var(--fio-claro);
}

.evento h3 {
  font-size: clamp(1.625rem, 1.2rem + 1vw, 1.875rem);
  line-height: 1.15;
  color: var(--paper);
}

.evento p {
  font-size: 1rem;
  line-height: 1.6;
}

.evento .link-claro {
  margin-top: 0.375rem;
  font-size: 0.9375rem;
}

.eventos__outros {
  grid-column: 1 / -1;
  margin-top: 4rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--fio-claro);
  font-family: var(--font-heading);
  font-size: clamp(1.1875rem, 1rem + 0.6vw, 1.375rem);
  line-height: 1.4;
  color: var(--paper);
}

/* Títulos das seções claras da mãe */
.cadernos__head h2,
.perguntas h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.875rem, 1rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  color: var(--olive);
}

.cadernos__sub {
  max-width: 24rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink);
}

/* ==========================================
   5. DESTAQUES DO CARDÁPIO
   Card Stack: fichas do caderno de receitas
   ========================================== */

.cadernos {
  --fio-cor: rgba(66, 67, 49, 0.2);
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--sand);
}

/* Sobre areia, o rótulo fica em oliva para manter o contraste */
.cadernos .kicker {
  color: var(--olive);
}

.cadernos__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.cadernos__head {
  grid-column: 1 / span 4;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 4rem);
}

.cadernos__botao {
  margin-top: 2rem;
}

.cadernos__pilha {
  grid-column: 6 / span 7;
  timeline-scope: --ficha-2, --ficha-3;
}

.ficha {
  --pauta-passo: 40px;
  --pauta-topo: 72px;
  position: sticky;
  top: calc(var(--header-h) + 2.5rem + (var(--i) * 18px));
  min-height: 340px;
  margin-bottom: 4.5rem;
  padding: var(--pauta-topo) 48px 48px 88px;
  border-radius: 4px;
  background-color: var(--surface);
  background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--pauta-passo) - 1px), var(--pauta) calc(var(--pauta-passo) - 1px) var(--pauta-passo));
  background-position: 0 var(--pauta-topo);
  background-size: 100% calc(100% - var(--pauta-topo));
  background-repeat: no-repeat;
  box-shadow: 0 1px 0 rgba(66, 67, 49, 0.08), 0 18px 40px -24px rgba(46, 47, 34, 0.45);
}

.ficha:last-child {
  margin-bottom: 0;
}

/* Margem do caderno */
.ficha::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 64px;
  width: 1px;
  background: var(--terracota);
  opacity: 0.45;
}

/* Categoria e prato assentados nas linhas da pauta */
.ficha__categoria {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  line-height: var(--pauta-passo);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--terracota-dark);
}

/* Fita adesiva mostarda segurando a ficha no caderno */
.ficha::after {
  content: "";
  position: absolute;
  top: -13px;
  left: 42%;
  width: 104px;
  height: 26px;
  background: rgba(242, 182, 23, 0.62);
  box-shadow: 0 1px 2px rgba(46, 47, 34, 0.12);
  clip-path: polygon(2% 0, 98% 0, 100% 20%, 97% 40%, 100% 60%, 97% 80%, 100% 100%, 2% 100%, 0 80%, 3% 60%, 0 40%, 3% 20%);
  transform: rotate(-3deg);
  pointer-events: none;
}

.ficha:nth-child(2)::after {
  left: 58%;
  transform: rotate(2.5deg);
}

.ficha:nth-child(3)::after {
  left: 34%;
  transform: rotate(-1.5deg);
}

.page-buffet .ficha__categoria {
  font-weight: 500;
  letter-spacing: 0.16em;
  text-wrap: nowrap;
}

.ficha__prato {
  max-width: 30rem;
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 1.1rem + 1.1vw, 1.875rem);
  line-height: var(--pauta-passo);
  color: var(--ink);
}

.ficha__raminho {
  position: absolute;
  top: 22px;
  right: 28px;
  width: 120px;
  height: 44px;
  fill: none;
  stroke: var(--olive);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.35;
  transform: rotate(-12deg);
}

.cadernos__acao {
  display: none;
}

/* Fichas de trás recuam quando a seguinte chega (melhoria progressiva) */
@supports (animation-timeline: view()) {
  .ficha:nth-child(2) { view-timeline-name: --ficha-2; }
  .ficha:nth-child(3) { view-timeline-name: --ficha-3; }

  .ficha:nth-child(1) {
    animation: recuar linear both;
    animation-timeline: --ficha-2;
    animation-range: entry 100% cover 50%;
  }

  .ficha:nth-child(2) {
    animation: recuar linear both;
    animation-timeline: --ficha-3;
    animation-range: entry 100% cover 50%;
  }
}

@keyframes recuar {
  from { transform: scale(1); filter: brightness(1); }
  to { transform: scale(0.965); filter: brightness(0.97); }
}

/* ==========================================
   6. COMO FUNCIONA
   Progressive Reveal: caule que cresce com a leitura
   ========================================== */

.processo {
  padding: clamp(6rem, 10vw, 9rem) 0;
  background: var(--olive);
  color: var(--paper);
}

.processo__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
}

.processo__head {
  grid-column: 1 / span 5;
  align-self: start;
  position: sticky;
  top: calc(var(--header-h) + 4rem);
}

.processo h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.875rem, 1rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  color: var(--paper);
}

.processo__botao {
  margin-top: 2rem;
  min-height: 54px;
  padding: 0 1.85rem;
}

.processo__trilha {
  position: relative;
  grid-column: 7 / span 6;
}

.processo__caule {
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 17px;
  width: 40px;
  height: calc(100% - 36px);
  fill: none;
  stroke: var(--sand);
  stroke-width: 1;
  stroke-linecap: round;
  opacity: 0.55;
}

.processo__folhas {
  position: absolute;
  left: 7px;
  width: 60px;
  height: 38px;
  fill: none;
  stroke: var(--sand);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.55;
  transform: translateY(-100%);
}

.processo__passos {
  position: relative;
  padding-left: 72px;
}

.passo {
  position: relative;
  padding-bottom: 3.5rem;
}

.passo:last-child {
  padding-bottom: 0;
}

.passo__marca {
  position: absolute;
  top: 0;
  left: -72px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--terracota);
  border-radius: 50%;
  background: var(--terracota);
  font-size: 0.875rem;
  font-weight: 500;
  color: #fff;
  transition: box-shadow 0.6s var(--ease-suave);
}

.passo.aos-animate .passo__marca {
  box-shadow: 0 0 0 6px rgba(170, 90, 57, 0.3);
}

.passo h3 {
  padding-top: 0.2rem;
  font-size: 1.5rem;
  line-height: 1.2;
  color: var(--paper);
}

.passo p {
  max-width: 32rem;
  margin-top: 0.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

/* O caule se desenha conforme a leitura desce (melhoria progressiva) */
@supports (animation-timeline: view()) {
  .processo__caule {
    animation: crescer-caule linear both;
    animation-timeline: view();
    animation-range: entry 20% cover 60%;
  }
}

@keyframes crescer-caule {
  from { clip-path: inset(0 0 100% 0); }
  to { clip-path: inset(0 0 0 0); }
}

/* ==========================================
   7. DIFERENCIAIS
   Poster: a promessa da marca em tamanho de cartaz
   ========================================== */

.diferenciais {
  --fio-cor: var(--fio-claro);
  overflow: hidden;
  padding: clamp(6rem, 10vw, 9rem) 0;
  background: var(--terracota-dark);
  color: var(--paper);
}

.diferenciais__ramo {
  position: absolute;
  top: 3rem;
  right: -2%;
  width: min(40vw, 560px);
  height: auto;
  fill: none;
  stroke: var(--paper);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.22;
  pointer-events: none;
}

.cartaz {
  position: relative;
  display: grid;
  font-size: clamp(3rem, 1rem + 6.4vw, 7rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.page-buffet .cartaz {
  letter-spacing: -0.02em;
}

.cartaz__l1,
.cartaz__l2 {
  display: block;
}

.cartaz__l2 {
  padding-left: clamp(2rem, 16vw, 16rem);
  color: var(--mustard);
}

.diferenciais__corpo {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  margin-top: clamp(3rem, 6vw, 5rem);
}

.carta {
  grid-column: 1 / span 6;
  display: grid;
  gap: 1.25rem;
  padding-left: 1.5rem;
  border-left: 1px solid var(--mustard);
}

.carta p {
  max-width: 30rem;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.5;
  color: var(--paper);
}

/* Reserva: só a carta, alinhada com a segunda linha do cartaz */
.diferenciais__corpo--carta .carta {
  grid-column: 1 / span 8;
  margin-left: clamp(2rem, 16vw, 16rem);
}

.diferenciais__corpo--carta .carta p {
  max-width: 34rem;
}

/* Lista das qualidades, usada quando os itens forem confirmados */
.qualidades {
  grid-column: 7 / span 6;
}

.qualidades li {
  display: grid;
  grid-template-columns: 12rem 1fr;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--fio-claro);
}

.qualidades h3 {
  font-size: 1.25rem;
  line-height: 1.25;
  color: var(--mustard);
}

.qualidades p {
  font-size: 1rem;
  line-height: 1.6;
  color: var(--paper);
}

/* ==========================================
   10. PERGUNTAS FREQUENTES
   Conversational: pergunta e resposta abertas
   ========================================== */

.perguntas {
  padding: clamp(5rem, 8vw, 7rem) 0;
  background: var(--surface);
}

.perguntas__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: 24px;
  align-items: start;
}

.perguntas h2 {
  grid-column: 1 / span 4;
  margin-top: 0;
}

.conversa {
  grid-column: 6 / span 6;
}

.conversa__item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--line);
}

.conversa__item:first-child {
  padding-top: 0.5rem;
  border-top: 0;
}

.conversa dt {
  display: flex;
  align-items: baseline;
  font-family: var(--font-heading);
  font-size: 1.375rem;
  line-height: 1.3;
  color: var(--olive);
}

/* Traço antes da pergunta */
.conversa dt::before {
  content: "";
  flex: none;
  width: 20px;
  height: 1px;
  margin-right: 0.75rem;
  background: var(--terracota);
  transform: translateY(-0.3em);
  transition: width 0.3s var(--ease-suave), background-color 0.3s var(--ease-suave), margin 0.3s var(--ease-suave);
}

.conversa dd {
  max-width: 36rem;
  margin: 0.6rem 0 0 calc(20px + 0.75rem);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--ink);
}

@media (hover: hover) {
  .conversa__item:hover dt::before {
    width: 32px;
    margin-right: 0;
    background: var(--terracota-dark);
  }
}

/* ==========================================
   11. ORÇAMENTO
   Split Assimétrico: o formulário como ficha de papel
   ========================================== */

.orcamento {
  padding: clamp(6rem, 10vw, 9rem) 0;
  background: var(--olive);
  color: var(--paper);
}

.orcamento__grid {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.orcamento__head {
  position: sticky;
  top: calc(var(--header-h) + 3rem);
}

.orcamento h2 {
  max-width: 11em;
  margin-top: 1.1rem;
  font-size: clamp(1.875rem, 1rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  color: var(--paper);
}

.orcamento__texto {
  max-width: 26rem;
  margin-top: 1rem;
  font-size: 1.125rem;
  line-height: 1.6;
}

.orcamento__raminho {
  display: block;
  width: 120px;
  height: auto;
  margin-top: 3rem;
  fill: none;
  stroke: var(--sand);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.45;
}

.orcamento__ficha {
  filter: drop-shadow(0 22px 40px rgba(20, 21, 14, 0.35));
}

.orcamento__papel {
  --r: 26px;
  position: relative;
  min-height: 520px;
  padding: clamp(2rem, 4vw, 3.25rem);
  background: var(--surface);
  color: var(--ink);
}

.moldura--ficha {
  --m-cor: var(--line);
  --m-inset: 10px;
  --m-r: 36px;
}

.orcamento__papel .budget-form {
  position: relative;
  z-index: 2;
  padding: 0;
}

/* ==========================================
   RESPONSIVO
   ========================================== */

@media (max-width: 1023px) {
  .hero {
    min-height: 720px;
  }

  .hero__base {
    flex-direction: column;
    gap: 1.75rem;
  }

  .hero__ramo {
    display: none;
  }

  .eventos__head,
  .eventos__lista {
    grid-column: 1 / -1;
  }

  .eventos__lista {
    margin-top: 3rem;
  }

  .cadernos__head,
  .cadernos__pilha {
    grid-column: 1 / -1;
  }

  .cadernos__head {
    position: static;
    margin-bottom: 3rem;
  }

  .processo__head,
  .processo__trilha {
    grid-column: 1 / -1;
  }

  .processo__head {
    position: static;
    margin-bottom: 3rem;
  }

  .diferenciais__ramo {
    display: none;
  }

  .carta,
  .qualidades {
    grid-column: 1 / -1;
  }

  .qualidades {
    margin-top: 3rem;
  }

  .perguntas h2,
  .conversa {
    grid-column: 1 / -1;
  }

  .perguntas h2 {
    margin-bottom: 1.5rem;
  }

  .orcamento__grid {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .orcamento__head {
    position: static;
    margin-bottom: 2.5rem;
  }

  .orcamento__raminho {
    display: none;
  }

}

@media (max-width: 767px) {

  .hero {
    min-height: 640px;
    padding-bottom: 8.5rem;
  }

  .hero__base {
    align-items: stretch;
  }

  .hero__actions {
    flex-direction: column;
  }

  .hero__actions .btn {
    width: 100%;
  }

  .hero__divisa .selo {
    bottom: -46px;
    width: 92px;
    height: 92px;
  }

  .eventos {
    padding-top: 5.5rem;
  }

  .eventos__ramos {
    height: 140px;
  }

  .eventos__lista {
    grid-template-columns: 1fr;
    margin-top: 2rem;
  }

  .evento,
  .evento + .evento {
    padding: 1.75rem 0;
    border-left: 0;
    border-top: 1px solid var(--fio-claro);
  }

  .eventos__outros {
    margin-top: 0;
  }

  .ficha {
    --pauta-passo: 32px;
    --pauta-topo: 56px;
    top: calc(var(--header-h) + 1.25rem + (var(--i) * 12px));
    min-height: 260px;
    margin-bottom: 3rem;
    padding: var(--pauta-topo) 24px 32px 52px;
  }

  .ficha::before {
    left: 36px;
  }

  .ficha__prato {
    font-size: 1.375rem;
  }

  .ficha__raminho {
    top: 14px;
    right: 14px;
    width: 90px;
    height: 34px;
  }

  .cadernos__botao {
    display: none;
  }

  .cadernos__acao {
    display: block;
    grid-column: 1 / -1;
    margin-top: 2.5rem;
  }

  .cadernos__acao .btn {
    width: 100%;
    min-height: 54px;
  }

  .processo__passos {
    padding-left: 56px;
  }

  .passo {
    padding-bottom: 2.5rem;
  }

  .passo__marca {
    left: -56px;
    width: 32px;
    height: 32px;
  }

  .processo__caule {
    left: 11px;
    top: 16px;
    height: calc(100% - 32px);
    width: 36px;
  }

  .processo__folhas {
    left: -1px;
    width: 52px;
    height: 33px;
  }

  .processo__botao {
    width: 100%;
  }

  .cartaz {
    font-size: clamp(2.75rem, 12vw, 3.5rem);
  }

  .cartaz__l2 {
    padding-left: 1.5rem;
  }

  .diferenciais__corpo--carta .carta {
    grid-column: 1 / -1;
    margin-left: 0;
  }

  .carta p {
    font-size: 1.25rem;
  }

  .qualidades li {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .conversa dd {
    margin-left: 0;
  }

  .orcamento__papel {
    --r: 22px;
    padding: 1.75rem 1.25rem;
  }

  .moldura--ficha {
    --m-inset: 8px;
    --m-r: 30px;
  }

}

/* ==========================================
   8. GALERIA
   Gallery Wall: parede de porta-retratos com fotos de eventos reais
   ========================================== */

.galeria {
  padding: clamp(5rem, 9vw, 8rem) 0;
  background: var(--paper);
}

.galeria h2 {
  margin-top: 1.1rem;
  font-size: clamp(1.875rem, 1rem + 2.2vw, 2.625rem);
  line-height: 1.15;
  color: var(--olive);
}

.galeria h2 em {
  color: var(--terracota);
}

.galeria__parede {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: clamp(180px, 19vw, 260px);
  grid-auto-flow: dense;
  gap: clamp(0.75rem, 1.6vw, 1.25rem);
  margin-top: clamp(2rem, 4vw, 3rem);
}

.quadro--grande {
  grid-column: span 2;
  grid-row: span 2;
}

.quadro--alto {
  grid-row: span 2;
}

.quadro--largo {
  grid-column: span 2;
}

/* Passe-partout claro em volta de cada foto, como porta-retrato */
.quadro__botao {
  display: block;
  width: 100%;
  height: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: var(--surface);
  box-shadow: 0 18px 34px -24px rgba(46, 47, 34, 0.55);
  cursor: zoom-in;
  transition: transform 0.35s var(--ease-suave), box-shadow 0.35s var(--ease-suave);
}

.quadro__botao img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (hover: hover) {
  .quadro__botao:hover {
    transform: translateY(-4px);
    box-shadow: 0 26px 40px -22px rgba(46, 47, 34, 0.6);
  }
}

/* Visualizador da galeria (comportamento em initLightbox() de /script.js) */
.lightbox {
  width: min(1100px, calc(100vw - 2rem));
  max-width: none;
  max-height: calc(100svh - 2rem);
  margin: auto;
  padding: 0;
  border: 0;
  overflow: visible;
  background: transparent;
}

.lightbox::backdrop {
  background: rgba(46, 47, 34, 0.92);
}

.lightbox figure {
  display: grid;
  justify-items: center;
  gap: 0.9rem;
  margin: 0;
}

.lightbox img {
  width: auto;
  max-height: calc(100svh - 7rem);
  border: 8px solid var(--surface);
  border-radius: 2px;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
}

.lightbox figcaption {
  max-width: 40rem;
  font-size: 0.9375rem;
  line-height: 1.5;
  text-align: center;
  color: var(--paper);
}

.lightbox__fechar,
.lightbox__seta {
  position: fixed;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 238, 225, 0.5);
  border-radius: 50%;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--paper);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lightbox__fechar:hover,
.lightbox__seta:hover {
  background: var(--paper);
  color: var(--olive);
}

.lightbox :focus-visible {
  outline-color: var(--sand);
}

.lightbox__fechar {
  top: 1rem;
  right: 1rem;
  font-size: 1.75rem;
}

.lightbox__seta {
  top: 50%;
  transform: translateY(-50%);
}

.lightbox__seta--ant {
  left: 1rem;
}

.lightbox__seta--prox {
  right: 1rem;
}

@media (max-width: 767px) {
  .galeria__parede {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 150px;
    gap: 0.6rem;
  }

  .quadro__botao {
    padding: 5px;
  }

  .quadro--largo-m {
    grid-column: span 2;
  }

  /* No celular as setas descem para baixo da foto */
  .lightbox__seta {
    top: auto;
    bottom: 1rem;
    transform: none;
  }
}
