/* ============================================================
   hero.css — physics hero section
   ============================================================ */

#hero{
  position:relative;
  width:100%;
  height:100svh;
  min-height:480px;
  overflow:hidden;
  background:var(--paper);
  cursor:grab;
  touch-action:pan-y;         /* vertical page scroll stays free on touch */
  user-select:none;
}
#hero.is-grabbing{ cursor:grabbing; }

#physics-canvas{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  z-index:2;
  display:block;
}

/* ---- headline ---- */
/* Set as a wordmark line, not a display headline: one modest line pinned
   top-left, the way an agency site signs the page. */
#hero-copy{
  /* fixo e acima da vista de projetos (z 40), abaixo dos painéis e da aba
     de projeto (70+): é o único elemento que atravessa as duas vistas */
  position:fixed;
  top:clamp(1.4rem, 4vh, 2.6rem);
  left:var(--gutter);
  z-index:50;
  pointer-events:none;
  max-width:calc(100% - var(--gutter) * 2);
}
#hero-copy{ display:flex; align-items:flex-start; gap:.55em; }
.hero-marca{ display:flex; flex-direction:column; }

/* As duas linhas ao mesmo tamanho: o contraste vem do peso e da caixa,
   não da escala. */
.hero-papel{
  margin:.1em 0 0;
  font-size:clamp(.88rem, 1.2vw, 1.08rem);
  font-weight:300;
  letter-spacing:-.01em;
  line-height:1.2;
  color:var(--ink);
}
/* dentro de uma vista o wordmark é o caminho de volta: o papel sai */
.view-aberta .hero-papel{
  opacity:0;
  transition:opacity .25s ease;
}

/* seta de voltar: escondida no hero, entra em fade em My projects */
.back-arrow{
  width:0;
  /* a mesma altura de linha do h1: assenta na 1.ª linha, não entre as duas */
  height:1.2em;
  font-size:clamp(.88rem, 1.2vw, 1.08rem);
  flex:0 0 auto;
  stroke:var(--ink);
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
  fill:none;
  opacity:0;
  margin-right:-.55em;          /* não ocupa espaço enquanto escondida */
  transition:opacity .35s ease, width .35s ease, margin .35s ease;
}
.view-aberta .back-arrow{ width:1.2em; opacity:1; margin-right:0; }

/* em My projects passa a ser o caminho de volta ao hero */
.view-aberta #hero-copy{ pointer-events:auto; cursor:pointer; }
.view-aberta #hero-copy h1{
  /* dentro de uma vista o wordmark é só o caminho de volta, não o título
     da página: perde peso e fica como a linha do "Communication designer" */
  font-weight:300;
  text-decoration:underline;
  text-decoration-color:transparent;
  text-underline-offset:.25em;
  transition:text-decoration-color .2s ease;   /* o peso troca de uma vez, sem transição */
}
.view-aberta #hero-copy:hover h1,
.view-aberta #hero-copy:focus-visible h1{ text-decoration-color:currentColor; }
.view-aberta #hero-copy:focus-visible{ outline:none; }
#hero-copy h1{
  font-size:clamp(.88rem, 1.2vw, 1.08rem);
  line-height:1.2;
  font-weight:600;
  letter-spacing:.06em;
  text-transform:uppercase;
  color:var(--burnt);
  white-space:nowrap;
}

/* Physics labels are painted onto the canvas by js/hero.js, not laid out
   as DOM — see the renderer note there. Nothing to style here. */

@media (max-width:720px){
  #hero-copy{ max-width:86vw; }
}

/* Wordmark a preto; o "Communication designer" num preto mais leve.
   Em My projects o wordmark (e a seta) passam a esse mesmo tom leve. */
:root{ --ink-leve:#6E6A64; }
#hero-copy h1{ color:var(--ink); }
.hero-papel{ color:var(--ink-leve); }
.view-aberta #hero-copy h1{ color:var(--ink-leve); }
.view-aberta .back-arrow{ stroke:var(--ink-leve); }

/* aviso da versão mobile: por baixo do "Communication designer", muito leve */
.hero-aviso{
  margin:.35em 0 0;
  font-size:clamp(.72rem, .9vw, .82rem);
  font-weight:300;
  letter-spacing:.01em;
  color:rgba(21,19,18,.32);
}
.view-aberta .hero-aviso{ opacity:0; transition:opacity .25s ease; }
/* o aviso vai para o canto inferior esquerdo, alinhado com o wordmark */
.hero-aviso{
  position:fixed;
  left:var(--gutter);
  bottom:clamp(1.4rem, 4vh, 2.6rem);
  margin:0;
  z-index:50;
}
