/* ---------- RESET BÁSICO ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --preto: #0C0C0C;
  --branco: #FAFAF8;
  --cinza: #8A8A86;
  --linha: #DEDDD6;
  --linha-escura: #2C2C2A;
  --serif: 'Fraunces', serif;
  --mono: 'Space Mono', monospace;
  --sans: 'Inter', sans-serif;
}

body {
  background: var(--branco);
  color: var(--preto);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 clamp(24px, 5vw, 80px);
}

/* ---------- CABEÇALHO ---------- */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 32px 0;
}

.logo {
  font-family: var(--mono);
  font-size: 14px;
  letter-spacing: 0.05em;
}

nav { display: flex; gap: 28px; }

nav a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  position: relative;
  padding-bottom: 4px;
}

nav a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 0%;
  height: 1px;
  background: var(--preto);
  transition: width 0.3s ease;
}

nav a:hover::after { width: 100%; }

/* ---------- HERO (página inicial) ---------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 0;
  background: var(--preto);
  color: var(--branco);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
}

.hero-texto {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(32px, 6vw, 100px);
}

.hero .eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: #B5B5B0;
  margin-bottom: 20px;
  letter-spacing: 0.04em;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(26px, 2.6vw, 36px);
  line-height: 1.15;
  letter-spacing: -0.01em;
  max-width: 14ch;
}

.hero p {
  margin-top: 20px;
  max-width: 42ch;
  font-size: 16px;
  color: #C7C7C2;
}

/* painel escuro onde fica a logo (no lugar da foto) */
.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--preto);
}

/* MARCA-D'ÁGUA / PLACEHOLDER DA LOGO
   Troque este bloco por <img src="sua-logo.png" alt="Logo Lavine Chaves">
   quando a logo estiver pronta. */
.logo-mark {
  width: 100px;
  height: 100px;
  border: 1px solid #3A3A38;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 26px;
  letter-spacing: 0.02em;
  color: var(--branco);
}

/* ---------- SEÇÕES ---------- */
section { padding: 90px 0; border-bottom: 1px solid var(--linha); }

.section-title {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cinza);
  letter-spacing: 0.05em;
  margin-bottom: 48px;
}

/* ---------- PROJETOS (lista na home) ---------- */
#projetos { display: block; }

.projetos-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0 48px;
}

@media (min-width: 900px) {
  .projetos-grid {
    grid-template-columns: 1fr 1fr;
  }
  .projetos-grid .projeto { border-top: 1px solid var(--linha); }
}

.projeto-link { display: block; }

.projeto {
  display: grid;
  grid-template-columns: 140px 1fr;
  align-items: center;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid var(--linha);
  transition: opacity 0.2s ease;
}

.projeto-link:hover .projeto { opacity: 0.6; }

/* PLACEHOLDER DE FOTO DO PROJETO
   Troque o <div class="thumb-placeholder"> por
   <img src="sua-foto.jpg" class="thumb"> quando tiver as fotos. */
.thumb-placeholder {
  width: 140px;
  height: 100px;
  background: #ECEBE6;
  border: 1px solid var(--linha);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 10px;
  color: var(--cinza);
  text-align: center;
  letter-spacing: 0.02em;
}

.thumb { width: 140px; height: 100px; object-fit: cover; display: block; }

.projeto .info { display: flex; flex-direction: column; gap: 6px; }

.projeto .num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cinza);
}

.projeto .titulo {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 500;
}

.projeto .tags {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cinza);
}

/* ---------- SOBRE ---------- */
.sobre-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
}

.sobre-foto img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  filter: grayscale(1) contrast(1.05);
  display: block;
}

.sobre-texto p {
  font-size: 17px;
  color: #2A2A28;
  text-align: justify;
  text-justify: inter-word;
}

.sobre-texto p + p { margin-top: 20px; }

/* Em telas maiores: título + foto ficam "congelados" (sticky) como
   antes. Novidade: o texto começa alinhado com o topo da foto e corre
   dentro de uma janela invisível com a altura exata da foto, movido
   pela rolagem da própria página (sem barra de rolagem separada).
   Quando o texto termina, a página volta a rolar normalmente.
   As alturas e posições são calculadas pelo script no index.html. */
@media (min-width: 701px) {
  .sobre-grid {
    grid-template-columns: 320px 1fr;
    gap: 48px;
    align-items: start;
  }

  .sobre-fixo {
    position: sticky;
    top: 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
  }

  .sobre-fixo .section-title {
    margin-bottom: 0;
  }

  /* janela invisível da altura da foto onde o texto corre */
  .sobre-janela {
    position: sticky;
    overflow: hidden; /* esconde o texto que "sobra", sem barra de rolagem */
  }

  .sobre-janela .sobre-texto {
    transition: none;      /* o movimento é controlado pelo script */
    will-change: transform;
  }
}

/* ---------- FALE CONOSCO ---------- */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px 28px;
}

.campo { display: flex; flex-direction: column; gap: 8px; }

.campo.full { grid-column: 1 / -1; }

.campo label {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--cinza);
  letter-spacing: 0.03em;
}

.campo input,
.campo textarea {
  font-family: var(--sans);
  font-size: 15px;
  color: var(--preto);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--linha);
  padding: 10px 2px;
  outline: none;
  transition: border-color 0.2s ease;
}

.campo input:focus,
.campo textarea:focus { border-color: var(--preto); }

.campo textarea { resize: vertical; min-height: 90px; font-family: var(--sans); }

.btn-enviar {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 8px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  background: var(--preto);
  color: var(--branco);
  border: none;
  padding: 14px 28px;
  cursor: pointer;
  transition: opacity 0.2s ease;
}

.btn-enviar:hover { opacity: 0.75; }

.form-status {
  grid-column: 1 / -1;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cinza);
  display: none;
}

/* ---------- CONTATO / RODAPÉ ---------- */
footer {
  background: var(--preto);
  color: var(--branco);
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  padding: 56px clamp(32px, 6vw, 100px) 36px;
}

footer h2 {
  font-family: var(--serif);
  font-size: clamp(32px, 6vw, 52px);
  font-weight: 500;
  margin-bottom: 32px;
}

.localizacao {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 13px;
  color: #B5B5B0;
  margin-bottom: 28px;
  letter-spacing: 0.02em;
}

.localizacao svg {
  width: 14px;
  height: 14px;
  stroke: #B5B5B0;
  flex-shrink: 0;
}

.contatos { display: flex; align-items: center; gap: 24px; }

.contatos a {
  display: inline-flex;
  color: var(--branco);
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.contatos a:hover { opacity: 1; }

.contatos a svg {
  width: 22px;
  height: 22px;
  stroke: var(--branco);
  fill: none;
  stroke-width: 1.6;
}

.copy {
  margin-top: 60px;
  font-family: var(--mono);
  font-size: 12px;
  color: #8A8A86;
}

/* ---------- PÁGINA DE DETALHE DO PROJETO ---------- */
.voltar {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cinza);
  display: inline-block;
  margin-bottom: 24px;
}

.detalhe-topo { padding: 50px 0 60px; border-bottom: 1px solid var(--linha); }

.detalhe-topo .eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--cinza);
  margin-bottom: 16px;
}

.detalhe-topo h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(34px, 6vw, 56px);
  line-height: 1.05;
  max-width: 14ch;
}

.detalhe-topo .descricao {
  margin-top: 24px;
  max-width: 60ch;
  font-size: 17px;
  color: #2A2A28;
}

/* ---------- CONTEÚDO DA PÁGINA DE PROJETO ---------- */
.projeto-conteudo {
  max-width: 1080px;
  margin: 0 auto;
  padding: 60px 0;
}

.foto-grande {
  width: 100%;
  height: 560px;
  margin-bottom: 56px;
}

.texto-projeto {
  max-width: 68ch;
  font-size: 17px;
  color: #2A2A28;
  margin-bottom: 56px;
}

.texto-projeto p + p { margin-top: 18px; }

.fotos-pequenas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 56px;
}

.fotos-pequenas .thumb-placeholder,
.fotos-pequenas img {
  width: 100%;
  height: 320px;
}

.thumb-placeholder,
.foto-grande.thumb-placeholder,
.fotos-pequenas .thumb-placeholder {
  background: #ECEBE6;
  border: 1px solid var(--linha);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--cinza);
  text-align: center;
  letter-spacing: 0.02em;
}

/* ---------- ANIMAÇÃO DE ENTRADA ---------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visivel { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  nav a::after { display: none; }
}

/* ---------- BOTÃO VOLTAR AO TOPO ---------- */
.voltar-topo {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 44px;
  height: 44px;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(6px);
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 100;
}

.voltar-topo.visivel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.voltar-topo:hover {
  transform: translateY(-3px);
}

.voltar-topo svg {
  width: 26px;
  height: 26px;
  stroke: var(--preto);
}

@media (max-width: 600px) {
  .voltar-topo { width: 40px; height: 40px; bottom: 20px; right: 20px; }
  .voltar-topo svg { width: 22px; height: 22px; }
}

/* ---------- MOBILE ---------- */
@media (max-width: 700px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }
  .hero-texto { padding: 48px 24px; order: 2; }
  .hero-logo { height: 260px; order: 1; }
  footer { padding: 60px 24px 40px; }
  .foto-grande { height: 320px; }
  .sobre-foto { max-width: 280px; margin: 0 auto; }
  .fotos-pequenas { grid-template-columns: 1fr; }
  .fotos-pequenas .thumb-placeholder, .fotos-pequenas img { height: 260px; }
}

@media (max-width: 600px) {
  nav { gap: 16px; }
  .form-grid { grid-template-columns: 1fr; }
  .projeto { grid-template-columns: 96px 1fr; gap: 16px; }
  .thumb-placeholder, .thumb { width: 96px; height: 72px; }
}
