/* Páginas: lista de projetos, galeria, visualizador */
.nav nav a.on { color: var(--ink); }
.page-head { padding: clamp(120px, 14vw, 180px) var(--pad) clamp(24px, 3vw, 40px); max-width: 1440px; margin: 0 auto; }
.page-head h1 { font-size: clamp(2.6rem, 8vw, 7rem); line-height: 1; letter-spacing: -.04em; font-weight: 400; }
.page-head h1 em { font-style: normal; color: var(--orange); }
.page-head .lead { margin-top: 22px; }
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 var(--pad) clamp(48px, 8vw, 110px); }
.wrap .section-head { margin-bottom: 8px; }
.more { display: flex; justify-content: center; margin-top: 36px; }

/* Lista com leque de miniaturas */
.list { border-bottom: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 3.2rem 1fr minmax(0, 300px) 7.5rem; align-items: center; gap: 20px;
  padding: 20px 0; border-top: 1px solid var(--line); cursor: pointer;
  transition: opacity .45s var(--ease), filter .45s var(--ease), transform .8s var(--ease);
}
.r-num { color: var(--muted); font-size: .85rem; letter-spacing: .1em; }
.r-name { font-size: clamp(1.5rem, 3.8vw, 3.2rem); letter-spacing: -.035em; line-height: 1.05; transition: color .3s, transform .5s var(--ease); }
.r-info { text-align: right; color: var(--muted); font-size: .9rem; }
.stack { position: relative; height: 84px; display: block; }
.stack .t {
  position: absolute; top: 0; left: calc(var(--k) * 26px); width: 84px; height: 84px; border-radius: 14px; overflow: hidden;
  background: var(--soft); z-index: calc(10 - var(--k));
  transform: rotate(calc((var(--k) - .5) * -3deg));
  transition: left .6s var(--ease), transform .6s var(--ease), box-shadow .6s var(--ease);
  box-shadow: 0 8px 20px -12px rgba(20,20,20,.5);
}
.stack .t img { width: 100%; height: 100%; object-fit: cover; }
.stack .t b {
  position: absolute; inset: 0; display: grid; place-items: center; background: #1a1a1a; color: var(--orange);
  font-weight: 600; font-size: 2rem; letter-spacing: -.04em;
}
.row:hover .t, .row:focus-visible .t {
  left: calc(var(--k) * 94px); transform: translateY(-4px) rotate(calc((var(--k) - .5) * 5deg));
  box-shadow: 0 18px 30px -14px rgba(20,20,20,.55);
}
.row:hover .r-name, .row:focus-visible .r-name { color: var(--orange); transform: translateX(8px); }
.row:focus-visible { outline: 2px solid var(--orange); outline-offset: 4px; border-radius: 6px; }
/* tudo o mais desfoca quando uma linha está em foco */
.list:has(.row:hover) .row:not(:hover),
.list:has(.row:focus-visible) .row:not(:focus-visible) { opacity: .28; filter: blur(5px); }

/* Galeria aberta */
.open-gallery, .gallery { columns: 3 280px; column-gap: 16px; }
.g-item {
  position: relative; display: block; width: 100%; margin: 0 0 16px; padding: 0; border: 0; background: var(--soft);
  border-radius: var(--radius); overflow: hidden; break-inside: avoid; cursor: zoom-in; font: inherit; color: #fff;
}
.g-item img { width: 100%; height: auto; transition: transform .8s var(--ease), filter .6s var(--ease); }
.g-item:hover img, .g-item:focus-visible img { transform: scale(1.04); filter: blur(3px); }
.g-item:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; }
.g-cap {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 40px 18px 14px; font-weight: 600; letter-spacing: -.01em;
  background: linear-gradient(to top, rgba(14,14,14,.8), rgba(14,14,14,0)); opacity: 0; transition: opacity .4s var(--ease);
}
.g-item:hover .g-cap, .g-item:focus-visible .g-cap { opacity: 1; }
.open-gallery .g-item { cursor: pointer; }

/* Projeto aberto */
.viewer-body { max-width: 1200px; }
.pv-head { display: grid; gap: 14px; margin-bottom: 8px; }
.pv-num { color: var(--orange); font-size: .85rem; letter-spacing: .12em; }
.pv-desc { font-size: clamp(1.3rem, 2.8vw, 2.1rem); line-height: 1.2; letter-spacing: -.025em; max-width: 30ch; }
.pv-desc.muted { font-size: 1.1rem; letter-spacing: 0; }
.pv-imgs { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.pv-imgs img { width: 100%; height: auto; border-radius: var(--radius); }
.pv-imgs img.wide { grid-column: 1 / -1; }
.pv-next { justify-self: start; margin-top: 12px; border: 0; cursor: pointer; font-family: inherit; }
.viewer-body > * { animation: pvin .7s var(--ease) both; }
.viewer-body > :nth-child(2) { animation-delay: .08s; }
.viewer-body > :nth-child(3) { animation-delay: .16s; }
@keyframes pvin { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

/* Lightbox */
.lb {
  position: fixed; inset: 0; z-index: 50; background: rgba(250,250,250,.97); display: grid;
  grid-template-rows: auto 1fr auto; opacity: 0; transition: opacity .3s var(--ease);
}
.lb[hidden] { display: none; }
.lb.open { opacity: 1; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); gap: 12px; }
.lb-stage { display: grid; place-items: center; min-height: 0; padding: 0 var(--pad); }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 18px; }
.lb-foot { display: flex; justify-content: space-between; align-items: center; padding: 16px var(--pad); gap: 12px; color: var(--muted); }
.lb-foot .btn { border: 0; cursor: pointer; font-family: inherit; padding: 11px 22px; }

@media (max-width: 800px) {
  .row { grid-template-columns: 2.4rem 1fr; }
  .row .stack { display: none; }
  .r-info { display: none; }
  .pv-imgs { grid-template-columns: 1fr; }
  .list:has(.row:hover) .row:not(:hover) { opacity: .5; filter: blur(2px); }
}
@media (prefers-reduced-motion: reduce) {
  .stack .t, .row, .r-name, .g-item img { transition-duration: .01ms !important; }
  .viewer-body > * { animation: none; }
  .list:has(.row:hover) .row:not(:hover) { filter: none; }
}
/* hero: ênfase em peso maior */
.intro h1 em { font-weight: 600; }

/* seleção de texto na cor da marca */
::selection { background: rgba(255, 78, 0, .38); color: inherit; }
::-moz-selection { background: rgba(255, 78, 0, .38); color: inherit; }

/* vídeo do hero: sem botão de play do navegador (o vídeo toca sozinho, mudo e em loop) */
.hero-video video::-webkit-media-controls,
.hero-video video::-webkit-media-controls-start-playback-button,
.hero-video video::-webkit-media-controls-overlay-play-button,
.hero-video video::-webkit-media-controls-panel { display: none !important; -webkit-appearance: none; }
.hero-video video { pointer-events: none; }

/* botão de embaralhar a galeria da home */
.shuffle-wrap { display: flex; justify-content: center; margin: 4px 0 26px; }
.shuffle {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: inherit; font-weight: 600;
  background: var(--orange); color: #fff; border-radius: 999px; padding: 13px 26px;
  transition: transform .3s var(--ease), background .25s;
}
.shuffle:hover { background: var(--orange-2); transform: translateY(-2px); }
.shuffle:active { transform: scale(.97); }
.shuffle:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.shuffle.spin svg { animation: shufspin .7s cubic-bezier(.2, .7, .2, 1); }
@keyframes shufspin { to { transform: rotate(360deg); } }
.open-gallery { transition: opacity .28s ease, filter .28s ease; }
.open-gallery.swap { opacity: 0; filter: blur(6px); }
@media (prefers-reduced-motion: reduce) { .shuffle.spin svg { animation: none; } .open-gallery.swap { filter: none; } }

/* botão alinhado na mesma linha do título e do link */
.section-head.has-shuffle { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.section-head.has-shuffle .muted { justify-self: end; }
.section-head.has-shuffle .shuffle-wrap { margin: 0; }
.section-head.has-shuffle .shuffle { padding: 9px 20px; }
@media (max-width: 560px) {
  .section-head.has-shuffle { gap: 8px; }
  .section-head.has-shuffle .shuffle { padding: 8px 14px; gap: 7px; font-size: .9rem; }
  .section-head.has-shuffle .shuffle svg { width: 16px; height: 16px; }
  .section-head.has-shuffle .muted { font-size: .9rem; }
}

/* versão compacta do botão */
.section-head.has-shuffle .shuffle { padding: 6px 15px; gap: 7px; font-size: .88rem; line-height: 1.3; }
.section-head.has-shuffle .shuffle svg { width: 14px; height: 14px; }
@media (max-width: 560px) {
  .section-head.has-shuffle .shuffle { padding: 5px 11px; gap: 6px; font-size: .82rem; }
  .section-head.has-shuffle .shuffle svg { width: 13px; height: 13px; }
}
