:root {
  --branco: #F8F7F4;
  --gesso: #ECE9E3;
  --grafite: #23201C;
  --madeira: #B98555;
  --madeira-escura: #8A5630;
  --pedra: #5F5A53;
  --verde: #178C46;
  --verde-escuro: #12733A;
  --serifa: "Newsreader", Georgia, serif;
  --texto: "Hanken Grotesk", system-ui, sans-serif;
  --margem: clamp(16px, 4vw, 56px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--branco);
  color: var(--grafite);
  font-family: var(--texto);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  font-family: var(--serifa);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0;
}

p { margin: 0; }
a { color: inherit; }

:focus-visible { outline: 2px solid var(--madeira-escura); outline-offset: 3px; }

.icone { width: 1.3em; height: 1.3em; fill: currentColor; flex-shrink: 0; }
.icone-traco { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Botões de contato */

.botao-whatsapp,
.botao-ligar,
.botao-contorno {
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.7em 1.2em;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.botao-whatsapp {
  background: var(--verde);
  color: #fff;
  box-shadow: 0 6px 20px rgba(23, 140, 70, 0.28);
}
.botao-whatsapp:hover { background: var(--verde-escuro); }

.botao-ligar,
.botao-contorno {
  color: var(--grafite);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1.5px var(--grafite);
}
.botao-ligar:hover,
.botao-contorno:hover { background: var(--grafite); color: var(--branco); }

.botao-grande { padding: 1em 1.7em; font-size: 1.05rem; }

/* Topo fixo */

.topo {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px var(--margem);
  background: rgba(248, 247, 244, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.topo-marca img { height: 40px; width: auto; }
.topo-acoes { display: flex; gap: 10px; }

/* Galeria: carrossel em 3D com todas as fotos no mesmo tamanho */

.galeria {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-height: 100svh;
  padding: 84px 0 28px;
  overflow: hidden;
  background:
    radial-gradient(ellipse 70% 55% at 50% 58%, #FFFFFF 0%, rgba(255, 255, 255, 0) 70%),
    linear-gradient(to bottom, var(--branco) 0%, var(--branco) 62%, #E7E3DC 100%);
}

.galeria-topo { text-align: center; padding: 0 var(--margem); }
.galeria-logo { width: 96px; margin: 0 auto 10px; }
.galeria h1 { font-size: clamp(1.9rem, 3.4vw, 3rem); }
.junto { white-space: nowrap; }

/* Sem movimento: fileira de fotos que se arrasta para o lado. */
.anel-palco { width: 100%; margin-top: 28px; }
.anel {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 var(--margem) 12px;
}
.cartao {
  --h: min(56svh, 600px);
  flex: 0 0 auto;
  width: min(72vw, calc(var(--h) * 0.78));
  aspect-ratio: 0.78;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--gesso);
  scroll-snap-align: center;
  cursor: pointer;
}
.cartao img { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

.galeria-base { display: none; }
.dica { display: none; }

/* Com movimento: as fotos formam um anel que gira. */
.movimento .anel-palco {
  position: relative;
  flex: 1;
  min-height: 0;
  margin-top: 8px;
  perspective: 1200px;
  perspective-origin: 50% 40%;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
  /* A entrada fica aqui, e não no anel: opacidade animada no anel achata o 3D. */
  animation: chegar 1.6s cubic-bezier(.2, .8, .2, 1) both;
}
.movimento .anel-palco.arrastando { cursor: grabbing; }
.movimento.calmo .anel-palco { animation: none; }

.movimento .anel {
  position: absolute;
  left: 50%;
  top: 50%;
  display: block;
  overflow: visible;
  padding: 0;
  transform-style: preserve-3d;
}
@keyframes chegar {
  from { opacity: 0; scale: 0.7; }
  to { opacity: 1; scale: 1; }
}

.movimento .cartao {
  --h: min(58svh, 620px);
  position: absolute;
  left: 0;
  top: 0;
  width: min(66vw, calc(var(--h) * 0.78));
  backface-visibility: hidden;
  box-shadow: 0 28px 50px -24px rgba(35, 32, 28, 0.5);
  -webkit-box-reflect: below 14px linear-gradient(to bottom, transparent 84%, rgba(255, 255, 255, 0.14));
  will-change: transform, opacity;
}
.movimento .cartao::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--branco);
  opacity: var(--nevoa, 0);
  pointer-events: none;
}
.movimento .cartao.frente { box-shadow: 0 36px 60px -26px rgba(35, 32, 28, 0.6), 0 0 0 1px rgba(185, 133, 85, 0.35); }

.movimento .galeria-base {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  margin-top: 8px;
  padding: 0 var(--margem);
}
.legenda { min-width: 210px; text-align: center; }
.legenda-contagem { color: var(--madeira-escura); font-weight: 600; font-size: 0.85rem; font-variant-numeric: tabular-nums; }
.legenda-titulo { font-family: var(--serifa); font-size: clamp(1.4rem, 2.2vw, 1.9rem); line-height: 1.2; transition: opacity 0.2s; }
.legenda.trocando .legenda-titulo { opacity: 0; }

.movimento .dica {
  position: relative;
  z-index: 2;
  display: block;
  margin-top: 4px;
  color: var(--pedra);
  font-size: 0.875rem;
  transition: opacity 0.4s;
}
.movimento .dica.sumiu { opacity: 0; }

.controle {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border: 0;
  border-radius: 50%;
  background: #fff;
  color: var(--grafite);
  box-shadow: inset 0 0 0 1.5px var(--grafite);
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.controle svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.controle:hover { background: var(--grafite); color: #fff; }

/* Foto aberta: imagem inteira, sem corte, com o texto e o pedido de orçamento ao lado. */
.detalhe {
  width: min(1180px, calc(100vw - 32px));
  max-width: none;
  max-height: calc(100svh - 32px);
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: var(--branco);
  color: var(--grafite);
  overflow: hidden;
  box-shadow: 0 40px 100px -30px rgba(35, 32, 28, 0.55);
}
.detalhe[open] {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr);
  animation: abrir 0.45s cubic-bezier(.2, .8, .2, 1);
}
.detalhe::backdrop { background: rgba(236, 233, 227, 0.75); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
@keyframes abrir { from { opacity: 0; transform: translateY(24px) scale(0.96); } }

.detalhe-foto { background: #E4E0D9; display: grid; place-items: center; min-height: 0; }
.detalhe-foto img { width: 100%; height: 100%; max-height: calc(100svh - 32px); object-fit: contain; }
.detalhe-texto { display: flex; flex-direction: column; justify-content: center; gap: 14px; padding: clamp(24px, 4vw, 48px); }
.detalhe-contagem { color: var(--madeira-escura); font-weight: 600; font-size: 0.85rem; }
.detalhe h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); }
.detalhe-descricao { color: var(--pedra); }
.detalhe-whatsapp { align-self: flex-start; margin-top: 10px; }
.detalhe-navegar { display: flex; gap: 10px; margin-top: 8px; }
.detalhe-fechar {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.9);
  color: var(--grafite);
  cursor: pointer;
}
.detalhe-fechar svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.detalhe-fechar:hover { background: var(--grafite); color: #fff; }

/* Como trabalhamos */

.processo {
  padding: clamp(96px, 12vw, 160px) var(--margem);
  max-width: 1280px;
  margin: 0 auto;
}
.processo h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); max-width: 18ch; }

.etapas {
  position: relative;
  list-style: none;
  counter-reset: etapa;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(24px, 3vw, 48px);
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
}
/* Linha que liga as etapas. Com suporte, ela se desenha conforme a página rola. */
.etapas::before {
  content: "";
  position: absolute;
  top: 27px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--madeira);
  transform-origin: left;
}
.etapas li { position: relative; counter-increment: etapa; }
.etapas li::before {
  content: counter(etapa);
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin-bottom: 24px;
  border-radius: 50%;
  background: var(--branco);
  box-shadow: inset 0 0 0 2px var(--madeira);
  font-family: var(--serifa);
  font-size: 1.6rem;
  color: var(--madeira-escura);
}
.etapas h3 { font-size: 1.5rem; }
.etapas p { margin-top: 10px; color: var(--pedra); }

@supports (animation-timeline: view()) {
  .movimento .etapas::before {
    animation: desenhar linear both;
    animation-timeline: view();
    animation-range: entry 40% cover 55%;
  }
  .movimento .etapas li {
    animation: surgir linear both;
    animation-timeline: view();
    animation-range: entry 10% cover 35%;
  }
  .movimento .etapas li:nth-child(2) { animation-range: entry 25% cover 40%; }
  .movimento .etapas li:nth-child(3) { animation-range: entry 40% cover 45%; }
  .movimento .etapas li:nth-child(4) { animation-range: entry 55% cover 50%; }
}
@keyframes desenhar { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes surgir { from { opacity: 0; transform: translateY(32px); } to { opacity: 1; transform: none; } }

/* Instagram: esteira que passa sozinha */

.instagram { padding-bottom: clamp(96px, 12vw, 160px); overflow: hidden; }
.instagram-cabeca {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 32px;
  max-width: 1280px;
  margin: 0 auto 40px;
  padding: 0 var(--margem);
}
.instagram-cabeca h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }

.esteira { overflow-x: auto; }
.esteira-faixa { display: flex; gap: 14px; width: max-content; padding: 0 var(--margem); }
.esteira a { display: block; width: clamp(150px, 18vw, 240px); overflow: hidden; }
.esteira img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform 0.5s; }
.esteira a:hover img { transform: scale(1.05); }

.movimento .esteira { overflow: hidden; }
.movimento .esteira-faixa { animation: esteira 50s linear infinite; padding: 0; }
.movimento .esteira:hover .esteira-faixa,
.movimento .esteira:focus-within .esteira-faixa { animation-play-state: paused; }
@keyframes esteira { to { transform: translateX(calc(-50% - 7px)); } }

/* Contato: igual ao da versão 1, com fundo escuro e o logo claro */

.contato {
  --margem: clamp(16px, 5vw, 72px);
  --largura: 1240px;
  --papel: #F6F4F0;
  display: grid;
  grid-template-columns: minmax(180px, 300px) 1fr;
  gap: clamp(32px, 7vw, 120px);
  align-items: center;
  background: var(--grafite);
  color: var(--papel);
  padding: clamp(72px, 10vw, 144px) var(--margem);
}
@media (min-width: 1384px) {
  .contato {
    padding-left: calc((100% - var(--largura)) / 2 + var(--margem));
    padding-right: calc((100% - var(--largura)) / 2 + var(--margem));
  }
}
.contato h2 { font-size: clamp(2rem, 4vw, 3.4rem); max-width: 16ch; line-height: 1.1; }
.contato-texto p { margin-top: 20px; color: #C9C2B8; max-width: 44ch; font-size: 1.125rem; }
.contato-acoes {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 36px;
}
.contato-texto .contato-numero { margin-top: 0; font-size: 1rem; color: #9C958B; }
.contato-numero a { color: var(--papel); font-weight: 600; text-decoration: none; margin-left: 0.3em; }
.contato-numero a:hover { color: var(--madeira); }

.contato .botao {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 1.05em 1.8em;
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  border-radius: 3px;
  transition: background-color 0.2s;
}
.contato .botao-claro { background: var(--madeira); color: var(--grafite); }
.contato .botao-claro:hover { background: #CF9A68; }
.contato .icone { width: 1.25em; height: 1.25em; }
.contato :focus-visible { outline-color: var(--madeira); }

.rodape {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 32px var(--margem) 100px;
  font-size: 0.9rem;
  color: var(--pedra);
}
.rodape img { width: 110px; }
.rodape a { text-decoration: none; }
.rodape a:hover { color: var(--grafite); }

/* WhatsApp sempre à mão, com um anel que chama atenção de tempos em tempos. */

.whatsapp-flutuante {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 30;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--verde);
  color: #fff;
  box-shadow: 0 10px 28px rgba(23, 60, 35, 0.32);
  transition: background-color 0.2s;
}
.whatsapp-flutuante:hover { background: var(--verde-escuro); }
.whatsapp-flutuante .icone { width: 30px; height: 30px; }
.whatsapp-flutuante::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 0 rgba(23, 140, 70, 0.5);
  animation: chamar 4s ease-out infinite;
}
@keyframes chamar {
  0%, 60% { box-shadow: 0 0 0 0 rgba(23, 140, 70, 0.5); }
  100% { box-shadow: 0 0 0 18px rgba(23, 140, 70, 0); }
}

/* Telas menores */

@media (max-width: 760px) {
  .topo-marca img { height: 34px; }
  .topo-acoes .botao-ligar span,
  .topo-acoes .botao-whatsapp span { display: none; }
  .topo-acoes a { padding: 0.65em; }

  .galeria { padding-top: 72px; padding-bottom: 92px; }
  .galeria-logo { width: 76px; }
  .movimento .cartao { --h: min(42svh, 400px); }
  .movimento .anel-palco { margin-top: 20px; }
  .legenda { min-width: 0; flex: 1; }

  .detalhe[open] { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) auto; }
  .detalhe-foto img { max-height: 50svh; }
  .detalhe-texto { gap: 10px; padding: 20px; }
  .detalhe-descricao { font-size: 0.95rem; }
  .detalhe-whatsapp { align-self: stretch; justify-content: center; }

  .contato { grid-template-columns: 1fr; }
  .contato-logo { width: 200px; }

  .etapas { grid-template-columns: 1fr; }
  .etapas::before { top: 0; bottom: 0; left: 27px; right: auto; width: 2px; height: auto; transform-origin: top; }
  @keyframes desenhar { from { transform: scaleY(0); } to { transform: scaleY(1); } }
  .etapas li { padding-left: 80px; }
  .etapas li::before { position: absolute; left: 0; top: -12px; }

  .whatsapp-flutuante { width: 56px; height: 56px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .whatsapp-flutuante::before { animation: none; }
  .esteira img { transition: none; }
}
