/* =========================================================================
   Seções da página. Mobile primeiro; o computador ganha colunas.
   ========================================================================= */

/* ---- Topo (aparece depois da abertura) ---- */
.topo {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  height: 60px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--papel) 92%, transparent);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid color-mix(in srgb, var(--tinta) 18%, transparent);
  transform: translateY(-101%);
  transition: transform .45s var(--ease);
}
.topo.visivel { transform: none; }
.topo__selo { display: block; width: 46px; color: var(--tinta); }
.topo__selo svg { width: 100%; height: auto; overflow: visible; }
.topo__selo:hover { color: var(--laranja); }
.topo__nav { display: flex; gap: clamp(1rem, 3vw, 2rem); font-size: .9375rem; }
.topo__nav a { text-decoration: none; }
.topo__nav a:hover { text-decoration: underline; }

/* ---- 1. Abertura: o pacote ---- */
.pacote { position: relative; height: 260vh; }
.pacote__palco {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: grid; grid-template-rows: 1fr auto; gap: 12px;
  padding: 18px var(--gutter) 14px;
}
.pacote__moldura {
  position: relative; overflow: hidden;
  border: var(--linha) solid var(--tinta);
  color: var(--tinta);
  cursor: grab; touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.pacote__moldura:active { cursor: grabbing; }
.pacote.formado .pacote__moldura { cursor: pointer; }
.pacote__desenho { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.pacote__desenho circle[pathLength] { stroke-linecap: round; }
.pacote__linha {
  position: absolute; left: 0; right: 0; bottom: 5%;
  margin: 0; text-align: center; font-size: clamp(.875rem, 1.6vw, 1rem); line-height: 1.45;
  color: var(--tinta-2);
  opacity: 0; transform: translateY(6px);
  transition: opacity .6s, transform .6s var(--ease);
}
.pacote.formado .pacote__linha { opacity: 1; transform: none; }
.pacote.respirando .pacote__linha { opacity: 0; }
.pacote__dicas {
  display: flex; justify-content: space-between; gap: 1rem;
  font-size: .75rem; letter-spacing: .08em; color: var(--tinta-2);
}
.dica { transition: opacity .4s; }
.dica--toque { display: none; }
.pacote.rolou .dica--mexe { opacity: 0; }
.pacote.formado .dica--rola { display: none; }
.pacote.formado .dica--toque { display: inline; }
/* reduzir movimento: selo pronto e parado, sem rolagem longa */
.pacote.parado { height: auto; }
.pacote.parado .pacote__palco { position: relative; }
.pacote.parado .pacote__dicas { display: none; }
.pacote.parado .pacote__moldura { cursor: default; }

/* ---- 2. Sobre ---- */
.sobre, .contato {
  max-width: calc(var(--largo) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(4rem, 12vw, 9rem) var(--gutter) clamp(2rem, 6vw, 4rem);
}
.sobre__texto { max-width: 48rem; }
.sobre__texto p {
  margin: 0;
  font-size: clamp(1.3rem, 3vw, 2.15rem);
  line-height: 1.34;
  text-wrap: pretty;
}
.pessoas {
  list-style: none; margin: clamp(3rem, 7vw, 5rem) 0 0; padding: 0;
  display: grid; gap: 1.75rem;
}
.pessoas li { display: grid; gap: .15rem; padding-top: .9rem; border-top: 1px solid var(--tinta); }
.pessoa__nome { font-size: 1.25rem; font-style: italic; font-weight: 400; }
.pessoa__faz { color: var(--tinta-2); }
.pessoa__links { font-size: .9375rem; }
@media (min-width: 720px) {
  .pessoas { grid-template-columns: repeat(2, minmax(0, 22rem)); gap: 2.5rem; }
}

/* ---- 3. Projetos ---- */
.projetos {
  max-width: calc(var(--largo) + 2 * var(--gutter));
  margin-inline: auto;
  padding: clamp(4rem, 10vw, 7rem) var(--gutter) 0;
}
.projetos__cabeca { margin-bottom: clamp(2.5rem, 7vw, 5rem); }
.projetos__titulo { margin: 0; font-size: clamp(2.6rem, 8vw, 6rem); font-weight: 300; line-height: .95; letter-spacing: -.01em; }
.projetos__sub { margin: .6rem 0 0; font-size: clamp(1.05rem, 2vw, 1.35rem); color: var(--tinta-2); }

.periodo + .periodo { margin-top: clamp(3.5rem, 9vw, 6rem); }
.periodo__rotulo {
  position: sticky; top: 60px; z-index: 2;
  margin: 0 0 .5rem; padding: .5rem 0;
  background: var(--papel);
  font-size: clamp(2.4rem, 9vw, 3.4rem); font-weight: 300; font-style: italic; line-height: 1;
  color: var(--cor);
  font-variant-numeric: lining-nums;
}

.periodo__lista { list-style: none; margin: 0; padding: 0; }
.projeto {
  position: relative;
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem;
  padding: 1.5rem 0 1.6rem;
  border-top: 1px solid color-mix(in srgb, var(--tinta) 22%, transparent);
}
.projeto > * { grid-column: 1; margin: 0; }
.projeto__antes { font-size: .875rem; letter-spacing: .02em; color: var(--tinta-2); }
.projeto__titulo {
  margin-top: .3rem;
  font-size: clamp(1.65rem, 4.4vw, 2.6rem); font-weight: 400; font-style: italic;
  line-height: 1.05; letter-spacing: -.005em;
  transition: transform .4s var(--ease);
}
.projeto.abre:hover .projeto__titulo { transform: translateX(4px); }
.projeto__complemento { margin-top: .45rem; font-size: 1.0625rem; }
.projeto__credito { margin-top: .7rem; max-width: 38rem; font-size: .8125rem; line-height: 1.5; color: var(--tinta-2); }
.projeto__ano {
  grid-column: 2; grid-row: 1 / span 2; align-self: start;
  padding-top: .1rem; font-size: .9375rem; color: var(--tinta-2);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

@media (min-width: 900px) {
  .periodo { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2rem; align-items: start; }
  .periodo__rotulo { top: 84px; font-size: clamp(3.4rem, 6vw, 5.4rem); line-height: .92; padding: 0; background: none; }
  .periodo__rotulo br { display: inline; }
}
@media (max-width: 899px) { .periodo__rotulo br { display: none; } }

/* ---- 4. Contato ---- */
.contato { padding-top: clamp(4rem, 10vw, 7rem); }
.contato__lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.25rem; }
.contato__lista li { display: grid; gap: .3rem; }
.contato__lista .rotulo { margin: 0; }
.contato__lista a { font-size: clamp(1.4rem, 4.2vw, 2.6rem); line-height: 1.1; text-decoration: none; overflow-wrap: anywhere; }
.contato__lista a:hover { text-decoration: underline; }
@media (min-width: 1000px) { .contato__lista { grid-template-columns: repeat(2, max-content); gap: 3rem; } }

/* ---- Rodapé: endereço à esquerda, assinatura do Bruno à direita ---- */
.rodape {
  position: relative;
  display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1.5rem;
  max-width: calc(var(--largo) + 2 * var(--gutter));
  margin-inline: auto;
  padding: 4rem var(--gutter) calc(2rem + env(safe-area-inset-bottom));
  font-size: .875rem; color: var(--tinta-2);
}
.rodape__info { margin: 0 0 1.4rem; }
@media (max-width: 600px) {
  .rodape { flex-direction: column; align-items: stretch; }
  .rodape__info { margin: 0; text-align: center; }
  .pacote { height: 220vh; }
}
/* celulares bem estreitos: a assinatura quebra em duas linhas em vez de estourar a tela */
@media (max-width: 360px) {
  .rodape .credit { flex-wrap: wrap; justify-content: center; row-gap: 4px; }
}

/* no computador os dois anos do período ficam empilhados, sem o traço */
@media (min-width: 900px) { .periodo__ate { display: none; } }
@media (max-width: 899px) { .periodo__rotulo { position: static; } }

/* ---- Sobre: texto à esquerda; frase + foto do espaço ao lado ---- */
.sobre { display: grid; gap: clamp(2.5rem, 6vw, 4rem); }
.sobre__lado { display: grid; gap: 1.75rem; align-content: start; }
.sobre__frase {
  margin: 0;
  font-size: clamp(2rem, 5.2vw, 3.3rem); font-style: italic; font-weight: 300; line-height: 1.06;
  color: var(--laranja);
}
.foto { margin: 0; }
.foto figcaption { margin-top: .6rem; font-size: .75rem; letter-spacing: .08em; color: var(--tinta-2); }
.so-toque { display: none; }
@media (hover: none) { .so-mouse { display: none; } .so-toque { display: inline; } }
@media (min-width: 1000px) {
  .sobre { grid-template-columns: minmax(0, 40rem) minmax(22rem, 1fr); column-gap: clamp(2.5rem, 4.5vw, 4.5rem); align-items: start; }
  .sobre__lado { position: sticky; top: 100px; padding-top: 2.9rem; }
}
@media (max-width: 999px) {
  /* no celular a frase vem antes do texto e a foto depois */
  .sobre__lado { display: contents; }
  .sobre__frase { order: -1; }
  .sobre__corpo { display: contents; }
  .sobre__corpo .rotulo { order: -2; margin-bottom: 0; }
  .sobre__texto { order: 0; }
  .foto { order: 1; }
  .pessoas { order: 2; margin-top: 0; }
}

/* foto em bitmap (retícula do manual) que revela a original */
.bitmap { position: relative; overflow: hidden; cursor: crosshair; background: var(--papel); }
.bitmap img { display: block; width: 100%; height: auto; }
.bitmap__o {
  position: absolute; inset: 0; height: 100% !important; object-fit: cover;
  clip-path: circle(0 at var(--mx, 50%) var(--my, 50%));
  transition: clip-path .6s var(--ease);
}
@media (hover: hover) { .bitmap:hover .bitmap__o { clip-path: circle(28% at var(--mx, 50%) var(--my, 50%)); } }
.bitmap.revelada .bitmap__o { clip-path: circle(150% at var(--mx, 50%) var(--my, 50%)); }

/* ---- Projeto que abre: o marcador é um pacote (círculo fechado) que se desembrulha ---- */
.projeto.abre { cursor: pointer; }
.projeto__abrir { all: unset; cursor: pointer; display: inline; font: inherit; color: inherit; }
.projeto__abrir:focus-visible { outline: var(--linha) dashed currentColor; outline-offset: 4px; }
.marcador {
  display: inline-block; width: .86em; height: .86em; margin-left: .3em; vertical-align: -.08em;
  overflow: visible; color: var(--cor);
  transform: rotate(-90deg); transition: transform .6s var(--ease);
}
.marcador circle, .marcador path { fill: none; stroke: currentColor; stroke-width: 4.2; stroke-linecap: round; stroke-linejoin: round; }
.marcador__fechado { transition: opacity .35s, stroke-dasharray .6s var(--ease); stroke-dasharray: 239 0; }
.marcador__aberto { opacity: 0; transition: opacity .35s .1s; }
@media (hover: hover) {
  .projeto.abre:hover .marcador { transform: rotate(-60deg) scale(1.08); }
  .projeto.abre:hover .marcador__fechado { stroke-dasharray: 200 39; }   /* o pacote começa a abrir */
}
.projeto.aberto .marcador { transform: rotate(180deg); }   /* desembrulha e a seta aponta pro texto que abriu */
.projeto.aberto .marcador__fechado { opacity: 0; }
.projeto.aberto .marcador__aberto { opacity: 1; }

.ficha { grid-column: 1 / -1; margin-top: 1rem; cursor: default; animation: ficha-abre .45s var(--ease); }
.ficha[hidden] { display: none; }
@keyframes ficha-abre { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.ficha__texto { max-width: 40rem; }
.ficha__texto p { margin: 0 0 .9em; font-size: 1.0625rem; line-height: 1.55; }
.ficha__galeria { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); max-width: 46rem; margin-bottom: .8rem; }
.ficha .projeto__credito { margin-top: .2rem; }

/* frase do sobre: no computador uma ideia por linha; no celular corre normal */
.sobre__frase .quebra { display: none; }
@media (min-width: 1000px) { .sobre__frase .quebra { display: block; } }
.junto { white-space: nowrap; }

/* ---- Fluxo: a linha do tempo torta (elementos do manual: circulinho, curvas, seta) ---- */
.periodo__corpo { position: relative; padding-left: 4rem; }
.fluxo { position: absolute; left: 0; top: 0; width: 3.2rem; height: 100%; overflow: visible; pointer-events: none; }
.fluxo path, .fluxo circle { fill: none; stroke: var(--cor); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.fluxo__linha { stroke-dasharray: 1 1; stroke-dashoffset: 1; }
.fluxo__fim { fill: var(--papel) !important; opacity: 0; transition: opacity .3s; }
.fluxo__origem { fill: var(--cor) !important; }
.fluxo__nos circle { fill: var(--papel); opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .3s, transform .4s var(--ease), fill .25s; }
.fluxo__nos circle.chegou { opacity: 1; transform: none; }
.fluxo__nos circle.aberto { fill: var(--cor); }
@media (max-width: 600px) {
  .periodo__corpo { padding-left: 2.9rem; }
  .fluxo { width: 2.3rem; }
}
@media (prefers-reduced-motion: reduce) { .fluxo__linha { stroke-dashoffset: 0 !important; } }

/* ícones (instagram, e-mail) no traço do site */
.com-icone { display: inline-flex; align-items: center; gap: .38em; }
.icone { width: 1.05em; height: 1.05em; flex: none; overflow: visible; }
.icone rect, .icone circle, .icone path { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.icone .icone__ponto { fill: currentColor; stroke: none; }
.contato__lista .icone { width: .82em; height: .82em; }
.contato__lista .com-icone { gap: .3em; }
.pessoa__links { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .7rem; }
.pessoa__links .com-icone { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }

/* "chacoalhe" só faz sentido no celular; no computador o mouse já empurra as letras */
@media (hover: hover) and (pointer: fine) {
  .dica--mexe { display: none; }
}
