.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 1.25rem var(--gutter);
  font-size: var(--step--1);
}

.site-nav a {
  text-decoration: none;
  color: var(--marble-blue);
}

.site-nav a:hover {
  color: var(--paper);
}

.hero {
  min-height: calc(100vh - 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  align-items: center;
  gap: 2rem;
  padding: 2rem var(--gutter) 4rem;
}

.hero__title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: var(--step-4);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--paper);
}

.hero__lede {
  margin-top: 1.75rem;
  max-width: 44ch;
  color: var(--marble-blue);
}

.hero__by {
  margin-top: 1.25rem;
  font-size: var(--step--1);
  color: var(--marble-beige);
}

/* A pilha de pastas do hero: fecha-se num monte e abre em leque ao carregar —
   o único momento de animação automática da página. */
.hero__stack {
  position: relative;
  height: clamp(22rem, 46vw, 30rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.mini-folder {
  --rot: 0deg;
  --dx: 0px;
  --dy: 0px;
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(11rem, 16vw, 13.5rem);
  aspect-ratio: 3 / 4;
  margin: calc(clamp(11rem, 16vw, 13.5rem) * -0.667) 0 0 calc(clamp(11rem, 16vw, 13.5rem) * -0.5);
  transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
  animation: fan-out 900ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
  animation-delay: calc(var(--n) * 90ms + 200ms);
}

.mini-folder:nth-child(1) { --rot: -8deg; --dx: -10.5rem; --dy: 1.5rem; }
.mini-folder:nth-child(2) { --rot: -2.5deg; --dx: -3.5rem; --dy: -0.5rem; }
.mini-folder:nth-child(3) { --rot: 2.5deg; --dx: 3.5rem; --dy: 0.25rem; }
.mini-folder:nth-child(4) { --rot: 8deg; --dx: 10.5rem; --dy: 1.75rem; }

@keyframes fan-out {
  from {
    transform: translate(0, 2rem) rotate(0deg);
    opacity: 0;
  }
  to {
    transform: translate(var(--dx), var(--dy)) rotate(var(--rot));
    opacity: 1;
  }
}

.mini-folder a {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 1rem 1.1rem;
  margin-top: 1.4rem;
  background: var(--folder-bg);
  color: var(--folder-ink);
  text-decoration: none;
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.mini-folder a::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 0;
  width: 45%;
  height: 1.4rem;
  background: var(--folder-bg);
  border-radius: var(--radius) 0 0 0;
  clip-path: polygon(0 0, calc(100% - 1rem) 0, 100% 100%, 0 100%);
}

/* A animação de entrada fica dona do transform do <li> (fill-mode both), por isso o
   levantar ao passar o rato vai para o <a> de dentro. */
.mini-folder:hover,
.mini-folder:focus-within {
  z-index: 5;
}

.mini-folder a {
  transition: transform 250ms ease;
}

.mini-folder:hover a,
.mini-folder a:focus-visible {
  transform: translateY(-1.25rem);
}

.mini-folder__client {
  font-family: var(--font-display);
  font-size: var(--step-1);
  line-height: 1.15;
}

.mini-folder__figure {
  font-size: clamp(1.15rem, 1.7vw, 1.45rem);
  font-weight: 700;
  line-height: 1.15;
}

.mini-folder__caption {
  font-size: var(--step--1);
  line-height: 1.4;
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero__stack {
    height: 20rem;
  }

  .hero__stack {
    height: 24rem;
  }

  .mini-folder {
    width: 9.5rem;
    margin: -6.33rem 0 0 -4.75rem;
  }

  .mini-folder:nth-child(1) { --dx: -6.2rem; }
  .mini-folder:nth-child(2) { --dx: -2rem; }
  .mini-folder:nth-child(3) { --dx: 2rem; }
  .mini-folder:nth-child(4) { --dx: 6.2rem; }
}
